source: examples/creddy_prover_tests/alumni3_rt1/run_query @ a0c1772

mei_rt2mei_rt2_fix_1
Last change on this file since a0c1772 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: 2.1 KB
RevLine 
[acf3ff9]1
[9502c50]2# alumni3_rt1_typed 
[acf3ff9]3pwd=`pwd`
4
[5110d42]5eloc=${ABAC_PROVER_PATH}
[acf3ff9]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 " "
[9502c50]34echo "===good============ stateU.foundingAlumni <- Bob"
[acf3ff9]35$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$bob_prin"
36
37# [keyid:stateU].role:foundingAlumni <-?- [keyid:Mark] (no)
38echo " "
[9502c50]39echo "===bad============ stateU.foundingAlumni <- Mark"
[acf3ff9]40$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$mark_prin"
41
42# [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no)
43echo " "
[9502c50]44echo "===bad============ stateU.foundingAlumni <- Joe"
[acf3ff9]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 " "
[9502c50]50echo "===bad============ stateU.foundingAlumni <- Maryann"
[acf3ff9]51$eloc/abac_prover_yap  --keystore $keyloc --role "$stateU_foundingAlumni" --principal "$maryann_prin"
52
53# [keyid:stateU].role:foundingAlumni <-?- [keyid:Jan] (yes)
54echo " "
[9502c50]55echo "===good============ stateU.foundingAlumni <- Jan"
[acf3ff9]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.