source:
examples/creddy_prover_tests/access_rt2/run_query
@
888df49
Last change on this file since 888df49 was f824a9e, checked in by , 12 years ago | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[10e1588] | 1 | |
[9502c50] | 2 | |
3 | # access_rt2_typed | |
[10e1588] | 4 | |
[c469edf] | 5 | pwd=`pwd` |
6 | ||
[5110d42] | 7 | eloc=${ABAC_PROVER_PATH} |
[c469edf] | 8 | keyloc=$pwd |
[10e1588] | 9 | |
10 | alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem` | |
11 | bob=`creddy --keyid --cert $keyloc/Bob_ID.pem` | |
12 | joe=`creddy --keyid --cert $keyloc/Joe_ID.pem` | |
13 | ||
[f824a9e] | 14 | print $eloc/abac_prover_yap |
15 | ||
[10e1588] | 16 | bob_prin="[keyid:$bob]" |
17 | ||
[9806e76] | 18 | access_fileA="[keyid:$alpha].role:access([string:'Read'],[urn:'file//fileA'])" |
[10e1588] | 19 | team_proj2="[keyid:$alpha].role:team([string:'proj2'])" |
20 | bob_prin="[keyid:$bob]" | |
21 | joe_prin="[keyid:$joe]" | |
22 | ||
[7b548fa] | 23 | ## dump all credentials |
[e88c95b] | 24 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
[10e1588] | 25 | |
[8bd77b5] | 26 | # double check |
27 | #creddy --roles --cert Alpha_access_qFqP__alpha_team_qP_attr.der | |
28 | ||
[9806e76] | 29 | #[keyid:Alpha].role:access([string:'Read'],[urn:'file//fileA']) <-?- [keyid:bob] (yes) |
[36b100a] | 30 | echo " " |
[9502c50] | 31 | echo "===good============ Alpha.access(Read,fileA)<-?-Bob" |
[10e1588] | 32 | $eloc/abac_prover_yap --keystore $keyloc --role "$access_fileA" --principal "$bob_prin" |
33 | ||
[36b100a] | 34 | echo " " |
[9502c50] | 35 | echo "===bad============ Alpha.access(Read,fileA)<-?-Joe" |
[10e1588] | 36 | $eloc/abac_prover_yap --keystore $keyloc --role "$access_fileA" --principal "$joe_prin" |
37 | ||
[36b100a] | 38 | echo " " |
[9502c50] | 39 | echo "===good============ Alpha.team(proj2)<-?-Joe" |
[5110d42] | 40 | #[keyid:alpha].role:team([string:'proj2'])<-[keyid:Joe] |
[e88c95b] | 41 | $eloc/abac_prover_yap --keystore $keyloc --role "$team_proj2" --principal "$joe_prin" |
[10e1588] | 42 |
Note: See TracBrowser
for help on using the repository browser.