[7b548fa] | 1 | |
---|
[9502c50] | 2 | # balltime_rt2_typed |
---|
[7b548fa] | 3 | |
---|
| 4 | pwd=`pwd` |
---|
[08b8da7] | 5 | eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'` |
---|
| 6 | if [ "$eloc" = "" ]; then |
---|
| 7 | echo "ERROR: abac_prover_yap is not in the search path!!!" |
---|
| 8 | exit 1 |
---|
| 9 | fi |
---|
[7b548fa] | 10 | keyloc=$pwd |
---|
| 11 | |
---|
| 12 | league=`creddy --keyid --cert $keyloc/League_ID.pem` |
---|
| 13 | john=`creddy --keyid --cert $keyloc/John_ID.pem` |
---|
| 14 | mark=`creddy --keyid --cert $keyloc/Mark_ID.pem` |
---|
| 15 | |
---|
[4b8e1c9] | 16 | stadium_accessT="[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T130000])" |
---|
| 17 | stadium_accessT2="[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T110000])" |
---|
| 18 | stadium_accessT3="[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T080000])" |
---|
[7b548fa] | 19 | |
---|
| 20 | john_prin="[keyid:$john]" |
---|
| 21 | mark_prin="[keyid:$mark]" |
---|
| 22 | |
---|
| 23 | ## dump all credentials |
---|
| 24 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
---|
| 25 | |
---|
[4b8e1c9] | 26 | #[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T130000]) <-?- [keyid:john] (yes) |
---|
[7b548fa] | 27 | echo " " |
---|
[9502c50] | 28 | echo "===good============ league.stadium(access,true,20120128T130000)<-?-john" |
---|
[7b548fa] | 29 | $eloc/abac_prover_yap --keystore $keyloc --role "$stadium_accessT" --principal "$john_prin" |
---|
| 30 | |
---|
[4b8e1c9] | 31 | #[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T110000]) <-?- [keyid:mark] (no) |
---|
[7b548fa] | 32 | echo " " |
---|
[9502c50] | 33 | echo "===bad============ league.stadium(access,true,20120128T110000)<-?-mark" |
---|
[7b548fa] | 34 | $eloc/abac_prover_yap --keystore $keyloc --role "$stadium_accessT2" --principal "$mark_prin" |
---|
| 35 | |
---|
[4b8e1c9] | 36 | #[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T080000]) <-?- [keyid:mark] (yes) |
---|
[7b548fa] | 37 | echo " " |
---|
[9502c50] | 38 | echo "===good============ league.stadium(access,true,20120128T080000)<-?-mark" |
---|
[7b548fa] | 39 | $eloc/abac_prover_yap --keystore $keyloc --role "$stadium_accessT3" --principal "$mark_prin" |
---|
| 40 | |
---|