source:
examples/creddy_prover_tests/access_rt2/run_query
@
47d5cf9
Last change on this file since 47d5cf9 was 5110d42, checked in by , 13 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 | ||
14 | bob_prin="[keyid:$bob]" | |
15 | ||
[9806e76] | 16 | access_fileA="[keyid:$alpha].role:access([string:'Read'],[urn:'file//fileA'])" |
[10e1588] | 17 | team_proj2="[keyid:$alpha].role:team([string:'proj2'])" |
18 | bob_prin="[keyid:$bob]" | |
19 | joe_prin="[keyid:$joe]" | |
20 | ||
[7b548fa] | 21 | ## dump all credentials |
[e88c95b] | 22 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
[10e1588] | 23 | |
[8bd77b5] | 24 | # double check |
25 | #creddy --roles --cert Alpha_access_qFqP__alpha_team_qP_attr.der | |
26 | ||
[9806e76] | 27 | #[keyid:Alpha].role:access([string:'Read'],[urn:'file//fileA']) <-?- [keyid:bob] (yes) |
[36b100a] | 28 | echo " " |
[9502c50] | 29 | echo "===good============ Alpha.access(Read,fileA)<-?-Bob" |
[10e1588] | 30 | $eloc/abac_prover_yap --keystore $keyloc --role "$access_fileA" --principal "$bob_prin" |
31 | ||
[36b100a] | 32 | echo " " |
[9502c50] | 33 | echo "===bad============ Alpha.access(Read,fileA)<-?-Joe" |
[10e1588] | 34 | $eloc/abac_prover_yap --keystore $keyloc --role "$access_fileA" --principal "$joe_prin" |
35 | ||
[36b100a] | 36 | echo " " |
[9502c50] | 37 | echo "===good============ Alpha.team(proj2)<-?-Joe" |
[5110d42] | 38 | #[keyid:alpha].role:team([string:'proj2'])<-[keyid:Joe] |
[e88c95b] | 39 | $eloc/abac_prover_yap --keystore $keyloc --role "$team_proj2" --principal "$joe_prin" |
[10e1588] | 40 |
Note: See TracBrowser
for help on using the repository browser.