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