source: examples/creddy_prover_tests/acme_rockets_rt0/run_query @ 08b8da7

mei_rt2mei_rt2_fix_1
Last change on this file since 08b8da7 was 08b8da7, checked in by Mei <mei@…>, 12 years ago

1) rework examples directory with Makefile
2) update scaling with plotting scripts
3) add more doc in there

  • Property mode set to 100755
File size: 1.7 KB
Line 
1
2# acme_rockets_rt0_typed
3
4pwd=`pwd`
5eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
6if [ "$eloc" = "" ]; then
7  echo "ERROR: abac_prover_yap is not in the search path!!!"
8  exit 1
9fi
10keyloc=$pwd
11
12acme=`creddy --keyid --cert $keyloc/Acme_ID.pem`
13coyote=`creddy --keyid --cert $keyloc/Coyote_ID.pem`
14
15preferred_customer="[keyid:$acme].role:preferred_customer"
16buy_rockets="[keyid:$acme].role:buy_rockets"
17coyote_prin="[keyid:$coyote]"
18friend="[keyid:$acme].role:friend"
19acme_prin="[keyid:$acme]"
20
21## dump all credentials
22$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
23
24#[keyid:Acme].role:preferred_customer <-?- [keyid:Coyote]
25#isMember(pCoyote, role(pAcme,preferred_customer), C).
26echo "  "
27echo "===good============ Acme.preferred_customer <- Coyote"
28$eloc/abac_prover_yap  --keystore $keyloc \
29      --role "$preferred_customer" --principal "$coyote_prin"
30
31#[keyid:Acme].role:buy_rockets <-?- [keyid:Coyote]
32#isMember(pCoyote, role(pAcme,buy_rockets), C).
33echo "  "
34echo "===good=============== Acme.buy_rockets <- Coyote"
35$eloc/abac_prover_yap  --keystore $keyloc \
36        --role "$buy_rockets" --principal "$coyote_prin"
37
38## this is not suppose to work
39#[keyid:Acme].role:buy_rockets <-?- [keyid:Acme].role:preferred_customer
40echo "  "
41echo "===bad=============== Acme.buy_rockets <- Acme.preferred_customer"
42$eloc/abac_prover_yap  --keystore $keyloc \
43        --role "$buy_rockets" --principal "$preferred_customer"
44
45#[keyid:Coyote].role:friend <-?- [keyid:Acme]
46#isMember(pAcme, role(pCoyote,friend), C).
47echo "  "
48echo "===bad=============== Coyote.friend <- Acme"
49$eloc/abac_prover_yap  --keystore $keyloc \
50        --role "$friend" --principal "$acme_prin"
51
Note: See TracBrowser for help on using the repository browser.