[acf3ff9] | 1 | |
---|
[9502c50] | 2 | # alumni3_rt1_typed |
---|
[acf3ff9] | 3 | pwd=`pwd` |
---|
| 4 | |
---|
[5110d42] | 5 | eloc=${ABAC_PROVER_PATH} |
---|
[acf3ff9] | 6 | keyloc=$pwd |
---|
| 7 | |
---|
| 8 | stateU=`creddy --keyid --cert $keyloc/StateU_ID.pem` |
---|
| 9 | |
---|
| 10 | bob=`creddy --keyid --cert $keyloc/Bob_ID.pem` |
---|
| 11 | mark=`creddy --keyid --cert $keyloc/Mark_ID.pem` |
---|
| 12 | joe=`creddy --keyid --cert $keyloc/Joe_ID.pem` |
---|
| 13 | maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem` |
---|
| 14 | jan=`creddy --keyid --cert $keyloc/Jan_ID.pem` |
---|
| 15 | |
---|
| 16 | stateU_foundingAlumni="[keyid:$stateU].role:foundingAlumni" |
---|
| 17 | bob_prin="[keyid:$bob]" |
---|
| 18 | maryann_prin="[keyid:$maryann]" |
---|
| 19 | joe_prin="[keyid:$joe]" |
---|
| 20 | mark_prin="[keyid:$mark]" |
---|
| 21 | jan_prin="[keyid:$jan]" |
---|
| 22 | |
---|
| 23 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes) |
---|
| 24 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Mark] (no) |
---|
| 25 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no) |
---|
| 26 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (no) |
---|
| 27 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Jan] (yes) |
---|
| 28 | |
---|
| 29 | ## dump all credentials |
---|
| 30 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
---|
| 31 | |
---|
| 32 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes) |
---|
| 33 | echo " " |
---|
[9502c50] | 34 | echo "===good============ stateU.foundingAlumni <- Bob" |
---|
[acf3ff9] | 35 | $eloc/abac_prover_yap --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$bob_prin" |
---|
| 36 | |
---|
| 37 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Mark] (no) |
---|
| 38 | echo " " |
---|
[9502c50] | 39 | echo "===bad============ stateU.foundingAlumni <- Mark" |
---|
[acf3ff9] | 40 | $eloc/abac_prover_yap --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$mark_prin" |
---|
| 41 | |
---|
| 42 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no) |
---|
| 43 | echo " " |
---|
[9502c50] | 44 | echo "===bad============ stateU.foundingAlumni <- Joe" |
---|
[acf3ff9] | 45 | $eloc/abac_prover_yap --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$joe_prin" |
---|
| 46 | |
---|
| 47 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (no) |
---|
| 48 | # asking, isMember(pMaryann,role(pStateU,foundingAlumni),C). |
---|
| 49 | echo " " |
---|
[9502c50] | 50 | echo "===bad============ stateU.foundingAlumni <- Maryann" |
---|
[acf3ff9] | 51 | $eloc/abac_prover_yap --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$maryann_prin" |
---|
| 52 | |
---|
| 53 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Jan] (yes) |
---|
| 54 | echo " " |
---|
[9502c50] | 55 | echo "===good============ stateU.foundingAlumni <- Jan" |
---|
[acf3ff9] | 56 | $eloc/abac_prover_yap --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$jan_prin" |
---|
| 57 | |
---|
| 58 | |
---|