1 | |
---|
2 | # acme_rockets_intersection_rt0_typed |
---|
3 | |
---|
4 | pwd=`pwd` |
---|
5 | |
---|
6 | eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'` |
---|
7 | if [ "$eloc" = "" ]; then |
---|
8 | echo "ERROR: abac_prover_yap is not in the search path!!!" |
---|
9 | exit 1 |
---|
10 | fi |
---|
11 | keyloc=$pwd |
---|
12 | |
---|
13 | acme=`creddy --keyid --cert $keyloc/Acme_ID.pem` |
---|
14 | batman=`creddy --keyid --cert $keyloc/Batman_ID.pem` |
---|
15 | coyote=`creddy --keyid --cert $keyloc/Coyote_ID.pem` |
---|
16 | |
---|
17 | buy_rockets="[keyid:$acme].role:buy_rockets" |
---|
18 | coyote_prin="[keyid:$coyote]" |
---|
19 | batman_prin="[keyid:$batman]" |
---|
20 | bad_buy_rockets="[keyid:$acme].role:bad_buy_rockets" |
---|
21 | bad_buy_rockets2="[keyid:99$acme].role:buy_rockets" |
---|
22 | |
---|
23 | ## dump all credentials |
---|
24 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
---|
25 | |
---|
26 | #[keyid:Acme].role:buy_rockets <-?- [keyid:Coyote] |
---|
27 | #isMember(pCoyote, role(pAcme,buy_rockets), C). |
---|
28 | echo " " |
---|
29 | echo "===good============ Acme.buy_rockets <- Coyote" |
---|
30 | $eloc/abac_prover_yap --keystore $keyloc \ |
---|
31 | --role "$buy_rockets" --principal "$coyote_prin" |
---|
32 | |
---|
33 | #[keyid:Acme].role:bad_buy_rockets <-?- [keyid:Coyote] |
---|
34 | #isMember(pCoyote, role(pAcme,bad_buy_rockets), C). |
---|
35 | echo " " |
---|
36 | echo "===bad============ Acme.bad_buy_rockets <- Coyote" |
---|
37 | $eloc/abac_prover_yap --keystore $keyloc \ |
---|
38 | --role "$bad_buy_rockets" --principal "$coyote_prin" |
---|
39 | |
---|
40 | #[keyid:Acme99].role:buy_rockets <-?- [keyid:Coyote] |
---|
41 | #isMember(pCoyote99, role(99pAcme,buy_rockets), C). |
---|
42 | echo " " |
---|
43 | echo "===bad============ 99Acme.buy_rockets <- Coyote" |
---|
44 | $eloc/abac_prover_yap --keystore $keyloc \ |
---|
45 | --role "$bad_buy_rockets2" --principal "$coyote_prin" |
---|
46 | |
---|
47 | #Acme.buy_rockets <-?- Batman |
---|
48 | #[keyid:Acme].role:buy_rockets <-?- [keyid:Batman] |
---|
49 | #isMember(pBatman, role(pAcme,buy_rockets), C). |
---|
50 | echo " " |
---|
51 | echo "===bad=============== Acme.buy_rockets <- Batman" |
---|
52 | $eloc/abac_prover_yap --keystore $keyloc \ |
---|
53 | --role "$buy_rockets" --principal "$batman_prin" |
---|
54 | |
---|
55 | |
---|