source: examples/creddy_prover_tests/access_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.3 KB
Line 
1
2
3# access_rt2_typed
4
5pwd=`pwd`
6
7eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
8if [ "$eloc" = "" ]; then
9  echo "ERROR: abac_prover_yap is not in the search path!!!"
10  exit 1
11fi
12
13keyloc=$pwd
14
15alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
16bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
17joe=`creddy --keyid --cert $keyloc/Joe_ID.pem`
18
19bob_prin="[keyid:$bob]"
20
21access_fileA="[keyid:$alpha].role:access([string:'Read'],[urn:'file//fileA'])"
22team_proj2="[keyid:$alpha].role:team([string:'proj2'])"
23bob_prin="[keyid:$bob]"
24joe_prin="[keyid:$joe]"
25
26## dump all credentials
27$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
28
29# double check
30#creddy  --roles --cert Alpha_access_qFqP__alpha_team_qP_attr.der
31
32#[keyid:Alpha].role:access([string:'Read'],[urn:'file//fileA']) <-?- [keyid:bob] (yes)
33echo " "
34echo "===good============ Alpha.access(Read,fileA)<-?-Bob"
35$eloc/abac_prover_yap  --keystore $keyloc --role "$access_fileA" --principal "$bob_prin"
36
37echo " "
38echo "===bad============ Alpha.access(Read,fileA)<-?-Joe"
39$eloc/abac_prover_yap  --keystore $keyloc --role "$access_fileA" --principal "$joe_prin"
40
41echo " "
42echo "===good============ Alpha.team(proj2)<-?-Joe"
43#[keyid:alpha].role:team([string:'proj2'])<-[keyid:Joe]
44$eloc/abac_prover_yap  --keystore $keyloc --role "$team_proj2" --principal "$joe_prin"
45
Note: See TracBrowser for help on using the repository browser.