[da5afdf] | 1 | |
---|
[9502c50] | 2 | # acme_friend_rt1_typed |
---|
[da5afdf] | 3 | |
---|
[c469edf] | 4 | pwd=`pwd` |
---|
| 5 | |
---|
[5110d42] | 6 | eloc=${ABAC_PROVER_PATH} |
---|
[c469edf] | 7 | keyloc=$pwd |
---|
[718ad924] | 8 | |
---|
| 9 | roadrunner=`creddy --keyid --cert $keyloc/Roadrunner_ID.pem` |
---|
| 10 | acme=`creddy --keyid --cert $keyloc/Acme_ID.pem` |
---|
| 11 | coyote=`creddy --keyid --cert $keyloc/Coyote_ID.pem` |
---|
| 12 | jackrabbit=`creddy --keyid --cert $keyloc/Jackrabbit_ID.pem` |
---|
| 13 | |
---|
[da5afdf] | 14 | friendof_roadrunner="[keyid:$acme].role:friendOf([keyid:$roadrunner])" |
---|
| 15 | coyote_prin="[keyid:$coyote]" |
---|
| 16 | badcoyote_prin="[keyid:bad]" |
---|
| 17 | preferred_customer="[keyid:$acme].role:preferred_customer" |
---|
| 18 | jackrabbit_prin="[keyid:$jackrabbit]" |
---|
| 19 | |
---|
| 20 | ## dump all credentials |
---|
| 21 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
---|
[718ad924] | 22 | |
---|
[9502c50] | 23 | #[keyid:Acme].role:friendof([keyid:Roadrunner]) <-?- [keyid:Coyote] |
---|
[da5afdf] | 24 | echo " " |
---|
[9502c50] | 25 | echo "===bad============ Acme.friendOf(Roadrunner) <- Coyote" |
---|
[da5afdf] | 26 | $eloc/abac_prover_yap --keystore $keyloc --role "$friendof_roadrunner" --principal "$coyote_prin" |
---|
| 27 | |
---|
[9502c50] | 28 | #[keyid:Acme].role:friendof([keyid:Roadrunner]) <-?- [keyid:Jackrabbit] |
---|
[da5afdf] | 29 | echo " " |
---|
[9502c50] | 30 | echo "===good============ Acme.friendOf(Roadrunner) <- Jackrabbit" |
---|
[da5afdf] | 31 | $eloc/abac_prover_yap --keystore $keyloc --role "$friendof_roadrunner" --principal "$jackrabbit_prin" |
---|
[718ad924] | 32 | |
---|
[9502c50] | 33 | #[keyid:Acme].role:preferred_customer <-?- [keyid:Jackrabbit] |
---|
[da5afdf] | 34 | echo " " |
---|
[9502c50] | 35 | echo "===good============ Acme.preferred_customer <- Jackrabbit" |
---|
[da5afdf] | 36 | $eloc/abac_prover_yap --keystore $keyloc --role "$preferred_customer" --principal "$jackrabbit_prin" |
---|
[718ad924] | 37 | |
---|
[9502c50] | 38 | #[keyid:Acme].role:preferred_customer <-?- [keyid:Coyote] |
---|
[da5afdf] | 39 | echo " " |
---|
[9502c50] | 40 | echo "===good============ Acme.preferred_customer <- Coyote" |
---|
[da5afdf] | 41 | $eloc/abac_prover_yap --keystore $keyloc --role "$preferred_customer" --principal "$coyote_prin" |
---|
[718ad924] | 42 | |
---|
[9502c50] | 43 | #[keyid:Acme].role:preferred_customer <-?- [keyid:badCoyote] |
---|
[da5afdf] | 44 | echo " " |
---|
[9502c50] | 45 | echo "===bad============ Acme.preferred_customer <- badCoyote" |
---|
[da5afdf] | 46 | $eloc/abac_prover_yap --keystore $keyloc --role "$preferred_customer" --principal "$badcoyote_prin" |
---|
[718ad924] | 47 | |
---|
| 48 | |
---|