1 | |
---|
2 | rm -rf creds_dump |
---|
3 | |
---|
4 | pwd=`pwd` |
---|
5 | |
---|
6 | #eloc=/home/mei/Deter/abac/libabac |
---|
7 | eloc=$pwd/../../libabac |
---|
8 | #keyloc=/home/mei/Deter/abac/examples/balltime_rt2_typed |
---|
9 | keyloc=$pwd |
---|
10 | |
---|
11 | league=`creddy --keyid --cert $keyloc/League_ID.pem` |
---|
12 | john=`creddy --keyid --cert $keyloc/John_ID.pem` |
---|
13 | mark=`creddy --keyid --cert $keyloc/Mark_ID.pem` |
---|
14 | |
---|
15 | stadium_accessT="[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T130000])" |
---|
16 | stadium_accessT2="[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T110000])" |
---|
17 | stadium_accessT3="[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T080000])" |
---|
18 | |
---|
19 | john_prin="[keyid:$john]" |
---|
20 | mark_prin="[keyid:$mark]" |
---|
21 | |
---|
22 | ## dump all credentials |
---|
23 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
---|
24 | |
---|
25 | #[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T130000]) <-?- [keyid:john] (yes) |
---|
26 | echo " " |
---|
27 | echo "===good============ league.stadium(access,true,20120128T130000)<-?-john yap " |
---|
28 | $eloc/abac_prover_yap --keystore $keyloc --role "$stadium_accessT" --principal "$john_prin" |
---|
29 | |
---|
30 | #[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T110000]) <-?- [keyid:mark] (no) |
---|
31 | echo " " |
---|
32 | echo "===bad============ league.stadium(access,true,20120128T110000)<-?-mark yap " |
---|
33 | $eloc/abac_prover_yap --keystore $keyloc --role "$stadium_accessT2" --principal "$mark_prin" |
---|
34 | |
---|
35 | #[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T080000]) <-?- [keyid:mark] (yes) |
---|
36 | echo " " |
---|
37 | echo "===good============ league.stadium(access,true,20120128T080000)<-?-mark yap " |
---|
38 | $eloc/abac_prover_yap --keystore $keyloc --role "$stadium_accessT3" --principal "$mark_prin" |
---|
39 | |
---|