source: examples/creddy_prover_tests/payraise_rt1/run_query @ 7211a95

mei_rt2mei_rt2_fix_1
Last change on this file since 7211a95 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: 1013 bytes
Line 
1
2# raise_rt1_typed
3
4pwd=`pwd`
5
6eloc=${ABAC_PROVER_PATH}
7keyloc=$pwd
8
9alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem`
10
11bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
12maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem`
13joe=`creddy --keyid --cert $keyloc/Joe_ID.pem`
14
15alpha_payRaise="[keyid:$alpha].role:payRaise"
16
17bob_prin="[keyid:$bob]"
18maryann_prin="[keyid:$maryann]"
19joe_prin="[keyid:$joe]"
20
21# [keyid:alpha].role:payRaise <-?- [keyid:Maryann] (yes)
22# [keyid:alpha].role:payRaise <-?- [keyid:Joe] (yes)
23
24## dump all credentials
25$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
26
27# [keyid:alpha].role:payRaise <-?- [keyid:Joe] (no)
28echo " "
29echo "===bad============ alpha.payRaise <- Joe"
30$eloc/abac_prover_yap  --keystore $keyloc --role "$alpha_payRaise" --principal "$joe_prin"
31
32# [keyid:alpha].role:payRaise <-?- [keyid:Maryann] (yes)
33echo " "
34echo "===good============ alpha.payRaise <- Maryann"
35$eloc/abac_prover_yap  --keystore $keyloc --role "$alpha_payRaise" --principal "$maryann_prin"
36
37
Note: See TracBrowser for help on using the repository browser.