source: examples/balltime_rt2_typed/rr @ 7b548fa

mei_rt2mei_rt2_fix_1meiyap-rt1rt2
Last change on this file since 7b548fa was 7b548fa, checked in by Mei <mei@…>, 12 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.5 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/balltime_rt2_typed
9keyloc=$pwd
10
11league=`creddy --keyid --cert $keyloc/League_ID.pem`
12john=`creddy --keyid --cert $keyloc/John_ID.pem`
13mark=`creddy --keyid --cert $keyloc/Mark_ID.pem`
14
15stadium_accessT="[keyid:$league].role:stadium([string:'access'],[time:20120228T130000])"
16stadium_accessT2="[keyid:$league].role:stadium([string:'access'],[time:20120228T110000])"
17stadium_accessT3="[keyid:$league].role:stadium([string:'access'],[time:20120228T080000])"
18
19john_prin="[keyid:$john]"
20mark_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'],[time:20120228T130000]) <-?- [keyid:john] (yes)
26echo " "
27echo "===good============ league.stadium(access,20120128T130000]<-?-john  yap "
28$eloc/abac_prover_yap  --keystore $keyloc --role "$stadium_accessT" --principal "$john_prin"
29
30#[keyid:$league].role:stadium([string:'access'],[time:20120228T110000]) <-?- [keyid:mark] (no)
31echo " "
32echo "===bad============ league.stadium(access,20120128T110000]<-?-mark  yap "
33$eloc/abac_prover_yap  --keystore $keyloc --role "$stadium_accessT2" --principal "$mark_prin"
34
35#[keyid:$league].role:stadium([string:'access'],[time:20120228T080000]) <-?- [keyid:mark] (yes)
36echo " "
37echo "===good============ league.stadium(access,20120128T080000]<-?-mark  yap "
38$eloc/abac_prover_yap  --keystore $keyloc --role "$stadium_accessT3" --principal "$mark_prin"
39
Note: See TracBrowser for help on using the repository browser.