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