1 | |
---|
2 | # balltime_rt2_typed |
---|
3 | |
---|
4 | pwd=`pwd` |
---|
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 |
---|
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 | |
---|
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])" |
---|
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 | |
---|
26 | #[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T130000]) <-?- [keyid:john] (yes) |
---|
27 | echo " " |
---|
28 | echo "===good============ league.stadium(access,true,20120128T130000)<-?-john" |
---|
29 | $eloc/abac_prover_yap --keystore $keyloc --role "$stadium_accessT" --principal "$john_prin" |
---|
30 | |
---|
31 | #[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T110000]) <-?- [keyid:mark] (no) |
---|
32 | echo " " |
---|
33 | echo "===bad============ league.stadium(access,true,20120128T110000)<-?-mark" |
---|
34 | $eloc/abac_prover_yap --keystore $keyloc --role "$stadium_accessT2" --principal "$mark_prin" |
---|
35 | |
---|
36 | #[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T080000]) <-?- [keyid:mark] (yes) |
---|
37 | echo " " |
---|
38 | echo "===good============ league.stadium(access,true,20120128T080000)<-?-mark" |
---|
39 | $eloc/abac_prover_yap --keystore $keyloc --role "$stadium_accessT3" --principal "$mark_prin" |
---|
40 | |
---|