source: examples/creddy_prover_tests/alumni2_rt1/run_query @ 41d99fb

mei_rt2mei_rt2_fix_1
Last change on this file since 41d99fb was 08b8da7, checked in by Mei <mei@…>, 12 years ago

1) rework examples directory with Makefile
2) update scaling with plotting scripts
3) add more doc in there

  • Property mode set to 100755
File size: 1.5 KB
Line 
1
2# alumni2_rt1_typed
3
4pwd=`pwd`
5eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
6if [ "$eloc" = "" ]; then
7  echo "ERROR: abac_prover_yap is not in the search path!!!"
8  exit 1
9fi
10keyloc=$pwd
11
12stateU=`creddy --keyid --cert $keyloc/StateU_ID.pem`
13bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
14maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem`
15joe=`creddy --keyid --cert $keyloc/Joe_ID.pem`
16
17stateU_foundingAlumni="[keyid:$stateU].role:foundingAlumni"
18bob_prin="[keyid:$bob]"
19maryann_prin="[keyid:$maryann]"
20joe_prin="[keyid:$joe]"
21
22# [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes)
23# [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (no)
24# [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no)
25
26## dump all credentials
27$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
28
29# [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes)
30echo " "
31echo "===good============ stateU.foundingAlumni <- Bob"
32$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$bob_prin"
33
34# [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (no)
35# asking, isMember(pMaryann,role(pStateU,foundingAlumni),C).
36echo " "
37echo "===bad============ stateU.foundingAlumni <- Maryann"
38$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$maryann_prin"
39
40# [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no)
41echo " "
42echo "===bad============ stateU.foundingAlumni <- Joe"
43$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$joe_prin"
44
45
Note: See TracBrowser for help on using the repository browser.