1 | |
---|
2 | # alumni3_rt1_typed |
---|
3 | |
---|
4 | pwd=`pwd` |
---|
5 | eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'` |
---|
6 | if [ "$eloc" = "" ]; then |
---|
7 | echo "ERROR: abac_prover_yap is not in the search path!!!" |
---|
8 | exit 1 |
---|
9 | fi |
---|
10 | keyloc=$pwd |
---|
11 | |
---|
12 | stateU=`creddy --keyid --cert $keyloc/StateU_ID.pem` |
---|
13 | |
---|
14 | bob=`creddy --keyid --cert $keyloc/Bob_ID.pem` |
---|
15 | mark=`creddy --keyid --cert $keyloc/Mark_ID.pem` |
---|
16 | joe=`creddy --keyid --cert $keyloc/Joe_ID.pem` |
---|
17 | maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem` |
---|
18 | jan=`creddy --keyid --cert $keyloc/Jan_ID.pem` |
---|
19 | |
---|
20 | stateU_foundingAlumni="[keyid:$stateU].role:foundingAlumni" |
---|
21 | bob_prin="[keyid:$bob]" |
---|
22 | maryann_prin="[keyid:$maryann]" |
---|
23 | joe_prin="[keyid:$joe]" |
---|
24 | mark_prin="[keyid:$mark]" |
---|
25 | jan_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) |
---|
37 | echo " " |
---|
38 | echo "===good============ stateU.foundingAlumni <- Bob" |
---|
39 | $eloc/abac_prover_yap --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$bob_prin" |
---|
40 | |
---|
41 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Mark] (no) |
---|
42 | echo " " |
---|
43 | echo "===bad============ stateU.foundingAlumni <- Mark" |
---|
44 | $eloc/abac_prover_yap --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$mark_prin" |
---|
45 | |
---|
46 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no) |
---|
47 | echo " " |
---|
48 | echo "===bad============ stateU.foundingAlumni <- Joe" |
---|
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). |
---|
53 | echo " " |
---|
54 | echo "===bad============ stateU.foundingAlumni <- Maryann" |
---|
55 | $eloc/abac_prover_yap --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$maryann_prin" |
---|
56 | |
---|
57 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Jan] (yes) |
---|
58 | echo " " |
---|
59 | echo "===good============ stateU.foundingAlumni <- Jan" |
---|
60 | $eloc/abac_prover_yap --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$jan_prin" |
---|
61 | |
---|
62 | |
---|