source: examples/creddy_prover_tests/alumni3_rt1/run_query @ 8de54ab

mei_rt2mei_rt2_fix_1
Last change on this file since 8de54ab 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: 2.2 KB
RevLine 
[acf3ff9]1
[9502c50]2# alumni3_rt1_typed 
[acf3ff9]3
[08b8da7]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
[acf3ff9]10keyloc=$pwd
11
12stateU=`creddy --keyid --cert $keyloc/StateU_ID.pem`
13
14bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
15mark=`creddy --keyid --cert $keyloc/Mark_ID.pem`
16joe=`creddy --keyid --cert $keyloc/Joe_ID.pem`
17maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem`
18jan=`creddy --keyid --cert $keyloc/Jan_ID.pem`
19
20stateU_foundingAlumni="[keyid:$stateU].role:foundingAlumni"
21bob_prin="[keyid:$bob]"
22maryann_prin="[keyid:$maryann]"
23joe_prin="[keyid:$joe]"
24mark_prin="[keyid:$mark]"
25jan_prin="[keyid:$jan]"
26
27# [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes)
28# [keyid:stateU].role:foundingAlumni <-?- [keyid:Mark] (no)
29# [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no)
30# [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (no)
31# [keyid:stateU].role:foundingAlumni <-?- [keyid:Jan] (yes)
32
33## dump all credentials
34$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
35
36# [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes)
37echo " "
[9502c50]38echo "===good============ stateU.foundingAlumni <- Bob"
[acf3ff9]39$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$bob_prin"
40
41# [keyid:stateU].role:foundingAlumni <-?- [keyid:Mark] (no)
42echo " "
[9502c50]43echo "===bad============ stateU.foundingAlumni <- Mark"
[acf3ff9]44$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$mark_prin"
45
46# [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no)
47echo " "
[9502c50]48echo "===bad============ stateU.foundingAlumni <- Joe"
[acf3ff9]49$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$joe_prin"
50
51# [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (no)
52# asking, isMember(pMaryann,role(pStateU,foundingAlumni),C).
53echo " "
[9502c50]54echo "===bad============ stateU.foundingAlumni <- Maryann"
[acf3ff9]55$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$maryann_prin"
56
57# [keyid:stateU].role:foundingAlumni <-?- [keyid:Jan] (yes)
58echo " "
[9502c50]59echo "===good============ stateU.foundingAlumni <- Jan"
[acf3ff9]60$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$jan_prin"
61
62
Note: See TracBrowser for help on using the repository browser.