# balltime_rt2_typed pwd=`pwd` eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'` if [ "$eloc" = "" ]; then echo "ERROR: abac_prover_yap is not in the search path!!!" exit 1 fi keyloc=$pwd league=`creddy --keyid --cert $keyloc/League_ID.pem` john=`creddy --keyid --cert $keyloc/John_ID.pem` mark=`creddy --keyid --cert $keyloc/Mark_ID.pem` stadium_accessT="[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T130000])" stadium_accessT2="[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T110000])" stadium_accessT3="[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T080000])" john_prin="[keyid:$john]" mark_prin="[keyid:$mark]" ## dump all credentials $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump #[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T130000]) <-?- [keyid:john] (yes) echo " " echo "===good============ league.stadium(access,true,20120128T130000)<-?-john" $eloc/abac_prover_yap --keystore $keyloc --role "$stadium_accessT" --principal "$john_prin" #[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T110000]) <-?- [keyid:mark] (no) echo " " echo "===bad============ league.stadium(access,true,20120128T110000)<-?-mark" $eloc/abac_prover_yap --keystore $keyloc --role "$stadium_accessT2" --principal "$mark_prin" #[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T080000]) <-?- [keyid:mark] (yes) echo " " echo "===good============ league.stadium(access,true,20120128T080000)<-?-mark" $eloc/abac_prover_yap --keystore $keyloc --role "$stadium_accessT3" --principal "$mark_prin"