source: examples/creddy_prover_tests/alumni3_rt1/run_query @ 880e924

mei_rt2mei_rt2_fix_1
Last change on this file since 880e924 was 5110d42, checked in by Mei <mei@…>, 12 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: 2.1 KB
Line 
1
2# alumni3_rt1_typed 
3pwd=`pwd`
4
5eloc=${ABAC_PROVER_PATH}
6keyloc=$pwd
7
8stateU=`creddy --keyid --cert $keyloc/StateU_ID.pem`
9
10bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
11mark=`creddy --keyid --cert $keyloc/Mark_ID.pem`
12joe=`creddy --keyid --cert $keyloc/Joe_ID.pem`
13maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem`
14jan=`creddy --keyid --cert $keyloc/Jan_ID.pem`
15
16stateU_foundingAlumni="[keyid:$stateU].role:foundingAlumni"
17bob_prin="[keyid:$bob]"
18maryann_prin="[keyid:$maryann]"
19joe_prin="[keyid:$joe]"
20mark_prin="[keyid:$mark]"
21jan_prin="[keyid:$jan]"
22
23# [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes)
24# [keyid:stateU].role:foundingAlumni <-?- [keyid:Mark] (no)
25# [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no)
26# [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (no)
27# [keyid:stateU].role:foundingAlumni <-?- [keyid:Jan] (yes)
28
29## dump all credentials
30$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
31
32# [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes)
33echo " "
34echo "===good============ stateU.foundingAlumni <- Bob"
35$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$bob_prin"
36
37# [keyid:stateU].role:foundingAlumni <-?- [keyid:Mark] (no)
38echo " "
39echo "===bad============ stateU.foundingAlumni <- Mark"
40$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$mark_prin"
41
42# [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no)
43echo " "
44echo "===bad============ stateU.foundingAlumni <- Joe"
45$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$joe_prin"
46
47# [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (no)
48# asking, isMember(pMaryann,role(pStateU,foundingAlumni),C).
49echo " "
50echo "===bad============ stateU.foundingAlumni <- Maryann"
51$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$maryann_prin"
52
53# [keyid:stateU].role:foundingAlumni <-?- [keyid:Jan] (yes)
54echo " "
55echo "===good============ stateU.foundingAlumni <- Jan"
56$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$jan_prin"
57
58
Note: See TracBrowser for help on using the repository browser.