[acf3ff9] | 1 | |
---|
[9502c50] | 2 | # alumni3_rt1_typed |
---|
[acf3ff9] | 3 | |
---|
[08b8da7] | 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 |
---|
[acf3ff9] | 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 " " |
---|
[9502c50] | 38 | echo "===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) |
---|
| 42 | echo " " |
---|
[9502c50] | 43 | echo "===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) |
---|
| 47 | echo " " |
---|
[9502c50] | 48 | echo "===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). |
---|
| 53 | echo " " |
---|
[9502c50] | 54 | echo "===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) |
---|
| 58 | echo " " |
---|
[9502c50] | 59 | echo "===good============ stateU.foundingAlumni <- Jan" |
---|
[acf3ff9] | 60 | $eloc/abac_prover_yap --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$jan_prin" |
---|
| 61 | |
---|
| 62 | |
---|