source: examples/access_rt2_typed/rr @ 4b8e1c9

mei_rt2mei_rt2_fix_1meiyap-rt1rt2
Last change on this file since 4b8e1c9 was 7b548fa, checked in by Mei <mei@…>, 13 years ago

1) add time static constraint
2) add example balltime_rt2_typed
3) change the way that time is being kept

from 20120228T080000 to time(2012,2,28,8,0,0) and
the constraint check is via compare(op,time1,time2)

  • Property mode set to 100755
File size: 1.2 KB
Line 
1
2rm -rf creds_dump
3
4pwd=`pwd`
5
6#eloc=/home/mei/Deter/abac/libabac
7eloc=$pwd/../../libabac
8#keyloc=/home/mei/Deter/abac/examples/access_rt2_typed
9keyloc=$pwd
10
11alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
12bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
13joe=`creddy --keyid --cert $keyloc/Joe_ID.pem`
14
15bob_prin="[keyid:$bob]"
16
17access_fileA="[keyid:$alpha].role:access([string:'read'],[urn:'file//fileA'])"
18team_proj2="[keyid:$alpha].role:team([string:'proj2'])"
19bob_prin="[keyid:$bob]"
20joe_prin="[keyid:$joe]"
21
22## dump all credentials
23$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
24
25#[keyid:Alpha].role:access([string:'read'],[urn:'file//fileA']) <-?- [keyid:bob] (yes)
26echo " "
27echo "===good============ Alpha.access(read,fileA)<-?-Bob  yap "
28$eloc/abac_prover_yap  --keystore $keyloc --role "$access_fileA" --principal "$bob_prin"
29
30echo " "
31echo "===bad============ Alpha.access(read,fileA)<-?-Joe  yap "
32$eloc/abac_prover_yap  --keystore $keyloc --role "$access_fileA" --principal "$joe_prin"
33
34echo " "
35echo "===good============ Alpha.team(proj2)<-?-Joe  yap "
36#[keyid:alpha].oset:team([string:'proj2'])<-[keyid:Joe]
37$eloc/abac_prover_yap  --keystore $keyloc --role "$team_proj2" --principal "$joe_prin"
38
Note: See TracBrowser for help on using the repository browser.