source: examples/access_rt2_typed/run_query @ 9502c50

mei_rt2mei_rt2_fix_1meiyap-rt1rt2
Last change on this file since 9502c50 was 9502c50, checked in by Mei <mei@…>, 12 years ago

1) rename examples' rr to run_query
2) updated some doc
3) add decode to creddy --roles and creddy --display --show so it will

show more useful attribute rule string

4) stub in the python script in one of the example directory

  • Property mode set to 100755
File size: 1.1 KB
Line 
1
2
3# access_rt2_typed
4
5pwd=`pwd`
6
7eloc=$pwd/../../libabac
8keyloc=$pwd
9
10alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
11bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
12joe=`creddy --keyid --cert $keyloc/Joe_ID.pem`
13
14bob_prin="[keyid:$bob]"
15
16access_fileA="[keyid:$alpha].role:access([string:'Read'],[urn:'file//fileA'])"
17team_proj2="[keyid:$alpha].role:team([string:'proj2'])"
18bob_prin="[keyid:$bob]"
19joe_prin="[keyid:$joe]"
20
21## dump all credentials
22$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
23
24#[keyid:Alpha].role:access([string:'Read'],[urn:'file//fileA']) <-?- [keyid:bob] (yes)
25echo " "
26echo "===good============ Alpha.access(Read,fileA)<-?-Bob"
27$eloc/abac_prover_yap  --keystore $keyloc --role "$access_fileA" --principal "$bob_prin"
28
29echo " "
30echo "===bad============ Alpha.access(Read,fileA)<-?-Joe"
31$eloc/abac_prover_yap  --keystore $keyloc --role "$access_fileA" --principal "$joe_prin"
32
33echo " "
34echo "===good============ Alpha.team(proj2)<-?-Joe"
35#[keyid:alpha].oset:team([string:'proj2'])<-[keyid:Joe]
36$eloc/abac_prover_yap  --keystore $keyloc --role "$team_proj2" --principal "$joe_prin"
37
Note: See TracBrowser for help on using the repository browser.