1 | |
---|
2 | # acme_friend_rt1_typed |
---|
3 | |
---|
4 | pwd=`pwd` |
---|
5 | |
---|
6 | eloc=${ABAC_PROVER_PATH} |
---|
7 | keyloc=$pwd |
---|
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 | |
---|
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 |
---|
22 | |
---|
23 | #[keyid:Acme].role:friendof([keyid:Roadrunner]) <-?- [keyid:Coyote] |
---|
24 | echo " " |
---|
25 | echo "===bad============ Acme.friendOf(Roadrunner) <- Coyote" |
---|
26 | $eloc/abac_prover_yap --keystore $keyloc --role "$friendof_roadrunner" --principal "$coyote_prin" |
---|
27 | |
---|
28 | #[keyid:Acme].role:friendof([keyid:Roadrunner]) <-?- [keyid:Jackrabbit] |
---|
29 | echo " " |
---|
30 | echo "===good============ Acme.friendOf(Roadrunner) <- Jackrabbit" |
---|
31 | $eloc/abac_prover_yap --keystore $keyloc --role "$friendof_roadrunner" --principal "$jackrabbit_prin" |
---|
32 | |
---|
33 | #[keyid:Acme].role:preferred_customer <-?- [keyid:Jackrabbit] |
---|
34 | echo " " |
---|
35 | echo "===good============ Acme.preferred_customer <- Jackrabbit" |
---|
36 | $eloc/abac_prover_yap --keystore $keyloc --role "$preferred_customer" --principal "$jackrabbit_prin" |
---|
37 | |
---|
38 | #[keyid:Acme].role:preferred_customer <-?- [keyid:Coyote] |
---|
39 | echo " " |
---|
40 | echo "===good============ Acme.preferred_customer <- Coyote" |
---|
41 | $eloc/abac_prover_yap --keystore $keyloc --role "$preferred_customer" --principal "$coyote_prin" |
---|
42 | |
---|
43 | #[keyid:Acme].role:preferred_customer <-?- [keyid:badCoyote] |
---|
44 | echo " " |
---|
45 | echo "===bad============ Acme.preferred_customer <- badCoyote" |
---|
46 | $eloc/abac_prover_yap --keystore $keyloc --role "$preferred_customer" --principal "$badcoyote_prin" |
---|
47 | |
---|
48 | |
---|