source: examples/creddy_prover_tests/acme_rockets_rt0/run_query @ 2be9809

mei_rt2mei_rt2_fix_1
Last change on this file since 2be9809 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
RevLine 
[718ad924]1
[9502c50]2# acme_rockets_rt0_typed
[da5afdf]3
[c469edf]4pwd=`pwd`
[08b8da7]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
[34ea038]10keyloc=$pwd
[718ad924]11
12acme=`creddy --keyid --cert $keyloc/Acme_ID.pem`
13coyote=`creddy --keyid --cert $keyloc/Coyote_ID.pem`
14
[da5afdf]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
[9502c50]24#[keyid:Acme].role:preferred_customer <-?- [keyid:Coyote]
[718ad924]25#isMember(pCoyote, role(pAcme,preferred_customer), C).
26echo "  "
[9502c50]27echo "===good============ Acme.preferred_customer <- Coyote"
[da5afdf]28$eloc/abac_prover_yap  --keystore $keyloc \
29      --role "$preferred_customer" --principal "$coyote_prin"
[718ad924]30
[9502c50]31#[keyid:Acme].role:buy_rockets <-?- [keyid:Coyote]
[718ad924]32#isMember(pCoyote, role(pAcme,buy_rockets), C).
33echo "  "
[9502c50]34echo "===good=============== Acme.buy_rockets <- Coyote"
[da5afdf]35$eloc/abac_prover_yap  --keystore $keyloc \
36        --role "$buy_rockets" --principal "$coyote_prin"
[718ad924]37
38## this is not suppose to work
[9502c50]39#[keyid:Acme].role:buy_rockets <-?- [keyid:Acme].role:preferred_customer
[718ad924]40echo "  "
[9502c50]41echo "===bad=============== Acme.buy_rockets <- Acme.preferred_customer"
[da5afdf]42$eloc/abac_prover_yap  --keystore $keyloc \
43        --role "$buy_rockets" --principal "$preferred_customer"
[718ad924]44
[9502c50]45#[keyid:Coyote].role:friend <-?- [keyid:Acme]
[718ad924]46#isMember(pAcme, role(pCoyote,friend), C).
47echo "  "
[9502c50]48echo "===bad=============== Coyote.friend <- Acme"
[da5afdf]49$eloc/abac_prover_yap  --keystore $keyloc \
50        --role "$friend" --principal "$acme_prin"
[718ad924]51
Note: See TracBrowser for help on using the repository browser.