source: examples/creddy_prover_tests/file_read_rt2/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.0 KB
Line 
1
2# file_read_rt2_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
12alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
13bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
14maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem`
15alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
16
17read_fileA="[keyid:$alpha].role:read([urn:'file://fileA'])"
18bob_prin="[keyid:$bob]"
19maryann_prin="[keyid:$maryann]"
20
21## dump all credentials --
22$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
23
24#[keyid:Alpha].role:read([urn:'file://fileA']) <-?- [keyid:Bob] (yes)
25echo " "
26echo "===good============ alpha.read(fileA) <- Bob"
27$eloc/abac_prover_yap  --keystore $keyloc --role "$read_fileA" --principal "$bob_prin"
28
29#[keyid:Alpha].role:read([urn:'file://fileA']) <-?- [keyid:Maryann] (no)
30echo " "
31echo "===bad============ alpha.read(fileA) <- Maryann"
32$eloc/abac_prover_yap  --keystore $keyloc --role "$read_fileA" --principal "$maryann_prin"
33
Note: See TracBrowser for help on using the repository browser.