1 | |
---|
2 | # experiment_create_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 | alice=`creddy --keyid --cert $keyloc/Alice_ID.pem` |
---|
11 | bob=`creddy --keyid --cert $keyloc/Bob_ID.pem` |
---|
12 | globotron=`creddy --keyid --cert $keyloc/Globotron_ID.pem` |
---|
13 | |
---|
14 | glob_admin="[keyid:$globotron].role:admin" |
---|
15 | alice_prin="[keyid:$alice]" |
---|
16 | bob_prin="[keyid:$bob]" |
---|
17 | experiment_create="[keyid:$acme].role:experiment_create" |
---|
18 | |
---|
19 | ## dump all credentials |
---|
20 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
---|
21 | |
---|
22 | #[keyid:Globotron].role:admin <-?- [keyid:Alice] |
---|
23 | #isMember(pAlice, role(pGlobotron,admin), C). |
---|
24 | echo " " |
---|
25 | echo "===good=============== Globotron.admin <- Alice" |
---|
26 | $eloc/abac_prover_yap --keystore $keyloc \ |
---|
27 | --role "$glob_admin" --principal "$alice_prin" |
---|
28 | |
---|
29 | #[keyid:Globotron].role:admin <-?- [keyid:Bob] |
---|
30 | #isMember(pBob, role(pGlobotron,admin), C). |
---|
31 | echo " " |
---|
32 | echo "===bad=============== Globotron.admin <- Bob" |
---|
33 | $eloc/abac_prover_yap --keystore $keyloc \ |
---|
34 | --role "$glob_admin" --principal "$bob_prin" |
---|
35 | |
---|
36 | #[keyid:Acme].role:experiment_create <-?- [keyid:Bob] |
---|
37 | #isMember(pBob, role(pAcme,experiment_create), C). |
---|
38 | echo " " |
---|
39 | echo "===good=============== Acme.experiment_create <- Bob" |
---|
40 | $eloc/abac_prover_yap --keystore $keyloc \ |
---|
41 | --role "$experiment_create" --principal "$bob_prin" |
---|
42 | |
---|
43 | |
---|