source: examples/creddy_prover_tests/balltime_rt2/run_query @ e205b49

mei_rt2mei_rt2_fix_1
Last change on this file since e205b49 was 5110d42, checked in by Mei <mei@…>, 13 years ago

1) reorganized the test directory to include python tests
2) attribute via api and principal via api from python scripts is

working (although there is a annoying seg fault at the very end
that must be related to something not been dup()ed.. need to wait
for c example to debug it)

3) able to query via api
4) replicated access_rt2 example in python and the query result matches
5) expanded api to make it easier to generate rt2 structure

  • Property mode set to 100755
File size: 1.5 KB
Line 
1
2# balltime_rt2_typed
3
4pwd=`pwd`
5
6eloc=${ABAC_PROVER_PATH}
7keyloc=$pwd
8
9league=`creddy --keyid --cert $keyloc/League_ID.pem`
10john=`creddy --keyid --cert $keyloc/John_ID.pem`
11mark=`creddy --keyid --cert $keyloc/Mark_ID.pem`
12
13stadium_accessT="[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T130000])"
14stadium_accessT2="[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T110000])"
15stadium_accessT3="[keyid:$league].role:stadium([string:'access'],[boolean:true],[time:20120228T080000])"
16
17john_prin="[keyid:$john]"
18mark_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)
24echo " "
25echo "===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)
29echo " "
30echo "===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)
34echo " "
35echo "===good============ league.stadium(access,true,20120128T080000)<-?-mark"
36$eloc/abac_prover_yap  --keystore $keyloc --role "$stadium_accessT3" --principal "$mark_prin"
37
Note: See TracBrowser for help on using the repository browser.