source: examples/creddy_prover_tests/acme_rockets_intersection_rt0/run_query @ 1621520

mei_rt2mei_rt2_fix_1
Last change on this file since 1621520 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.6 KB
Line 
1
2# acme_rockets_intersection_rt0_typed
3
4pwd=`pwd`
5
6eloc=${ABAC_PROVER_PATH}
7keyloc=$pwd
8
9acme=`creddy --keyid --cert $keyloc/Acme_ID.pem`
10batman=`creddy --keyid --cert $keyloc/Batman_ID.pem`
11coyote=`creddy --keyid --cert $keyloc/Coyote_ID.pem`
12
13buy_rockets="[keyid:$acme].role:buy_rockets"
14coyote_prin="[keyid:$coyote]"
15batman_prin="[keyid:$batman]"
16bad_buy_rockets="[keyid:$acme].role:bad_buy_rockets"
17bad_buy_rockets2="[keyid:99$acme].role:buy_rockets"
18
19## dump all credentials
20$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
21
22#[keyid:Acme].role:buy_rockets <-?- [keyid:Coyote]
23#isMember(pCoyote, role(pAcme,buy_rockets), C).
24echo "  "
25echo "===good============ Acme.buy_rockets <- Coyote"
26$eloc/abac_prover_yap  --keystore $keyloc \
27              --role "$buy_rockets" --principal "$coyote_prin"
28
29#[keyid:Acme].role:bad_buy_rockets <-?- [keyid:Coyote]
30#isMember(pCoyote, role(pAcme,bad_buy_rockets), C).
31echo "  "
32echo "===bad============ Acme.bad_buy_rockets <- Coyote"
33$eloc/abac_prover_yap  --keystore $keyloc \
34              --role "$bad_buy_rockets" --principal "$coyote_prin"
35
36#[keyid:Acme99].role:buy_rockets <-?- [keyid:Coyote]
37#isMember(pCoyote99, role(99pAcme,buy_rockets), C).
38echo "  "
39echo "===bad============ 99Acme.buy_rockets <- Coyote"
40$eloc/abac_prover_yap  --keystore $keyloc \
41              --role "$bad_buy_rockets2" --principal "$coyote_prin"
42
43#Acme.buy_rockets <-?- Batman
44#[keyid:Acme].role:buy_rockets <-?- [keyid:Batman]
45#isMember(pBatman, role(pAcme,buy_rockets), C).
46echo "  "
47echo "===bad=============== Acme.buy_rockets <- Batman"
48$eloc/abac_prover_yap  --keystore $keyloc \
49              --role "$buy_rockets" --principal "$batman_prin"
50
51
Note: See TracBrowser for help on using the repository browser.