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
RevLine 
[10e1588]1
[9502c50]2
3# access_rt2_typed
[10e1588]4
[c469edf]5pwd=`pwd`
6
[08b8da7]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
[c469edf]13keyloc=$pwd
[10e1588]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
[9806e76]21access_fileA="[keyid:$alpha].role:access([string:'Read'],[urn:'file//fileA'])"
[10e1588]22team_proj2="[keyid:$alpha].role:team([string:'proj2'])"
23bob_prin="[keyid:$bob]"
24joe_prin="[keyid:$joe]"
25
[7b548fa]26## dump all credentials
[e88c95b]27$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
[10e1588]28
[8bd77b5]29# double check
30#creddy  --roles --cert Alpha_access_qFqP__alpha_team_qP_attr.der
31
[9806e76]32#[keyid:Alpha].role:access([string:'Read'],[urn:'file//fileA']) <-?- [keyid:bob] (yes)
[36b100a]33echo " "
[9502c50]34echo "===good============ Alpha.access(Read,fileA)<-?-Bob"
[10e1588]35$eloc/abac_prover_yap  --keystore $keyloc --role "$access_fileA" --principal "$bob_prin"
36
[36b100a]37echo " "
[9502c50]38echo "===bad============ Alpha.access(Read,fileA)<-?-Joe"
[10e1588]39$eloc/abac_prover_yap  --keystore $keyloc --role "$access_fileA" --principal "$joe_prin"
40
[36b100a]41echo " "
[9502c50]42echo "===good============ Alpha.team(proj2)<-?-Joe"
[5110d42]43#[keyid:alpha].role:team([string:'proj2'])<-[keyid:Joe]
[e88c95b]44$eloc/abac_prover_yap  --keystore $keyloc --role "$team_proj2" --principal "$joe_prin"
[10e1588]45
Note: See TracBrowser for help on using the repository browser.