source: examples/alumni2_rt1_typed/run_query @ 9335cfa

mei_rt2mei_rt2_fix_1
Last change on this file since 9335cfa 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.4 KB
Line 
1
2# alumni2_rt1_typed
3
4pwd=`pwd`
5
6eloc=$pwd/../../libabac
7keyloc=$pwd
8
9stateU=`creddy --keyid --cert $keyloc/StateU_ID.pem`
10bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
11maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem`
12joe=`creddy --keyid --cert $keyloc/Joe_ID.pem`
13
14stateU_foundingAlumni="[keyid:$stateU].role:foundingAlumni"
15bob_prin="[keyid:$bob]"
16maryann_prin="[keyid:$maryann]"
17joe_prin="[keyid:$joe]"
18
19# [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes)
20# [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (no)
21# [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no)
22
23## dump all credentials
24$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
25
26# [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes)
27echo " "
28echo "===good============ stateU.foundingAlumni <- Bob"
29$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$bob_prin"
30
31# [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (no)
32# asking, isMember(pMaryann,role(pStateU,foundingAlumni),C).
33echo " "
34echo "===bad============ stateU.foundingAlumni <- Maryann"
35$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$maryann_prin"
36
37# [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no)
38echo " "
39echo "===bad============ stateU.foundingAlumni <- Joe"
40$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$joe_prin"
41
42
Note: See TracBrowser for help on using the repository browser.