source: examples/creddy_prover_tests/acme_friend_rt1/run_query @ 2cdbe49

mei_rt2mei_rt2_fix_1
Last change on this file since 2cdbe49 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.8 KB
Line 
1
2# acme_friend_rt1_typed
3
4pwd=`pwd`
5
6eloc=${ABAC_PROVER_PATH}
7keyloc=$pwd
8
9roadrunner=`creddy --keyid --cert $keyloc/Roadrunner_ID.pem`
10acme=`creddy --keyid --cert $keyloc/Acme_ID.pem`
11coyote=`creddy --keyid --cert $keyloc/Coyote_ID.pem`
12jackrabbit=`creddy --keyid --cert $keyloc/Jackrabbit_ID.pem`
13
14friendof_roadrunner="[keyid:$acme].role:friendOf([keyid:$roadrunner])"
15coyote_prin="[keyid:$coyote]"
16badcoyote_prin="[keyid:bad]"
17preferred_customer="[keyid:$acme].role:preferred_customer"
18jackrabbit_prin="[keyid:$jackrabbit]"
19
20## dump all credentials
21$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
22
23#[keyid:Acme].role:friendof([keyid:Roadrunner]) <-?- [keyid:Coyote]
24echo "  "
25echo "===bad============ Acme.friendOf(Roadrunner) <- Coyote"
26$eloc/abac_prover_yap  --keystore $keyloc --role "$friendof_roadrunner" --principal "$coyote_prin"
27
28#[keyid:Acme].role:friendof([keyid:Roadrunner]) <-?- [keyid:Jackrabbit]
29echo "  "
30echo "===good============ Acme.friendOf(Roadrunner) <- Jackrabbit"
31$eloc/abac_prover_yap  --keystore $keyloc --role "$friendof_roadrunner" --principal "$jackrabbit_prin"
32
33#[keyid:Acme].role:preferred_customer <-?- [keyid:Jackrabbit]
34echo "  "
35echo "===good============ Acme.preferred_customer <- Jackrabbit"
36$eloc/abac_prover_yap  --keystore $keyloc --role "$preferred_customer" --principal "$jackrabbit_prin"
37
38#[keyid:Acme].role:preferred_customer <-?- [keyid:Coyote]
39echo "  "
40echo "===good============ Acme.preferred_customer <- Coyote"
41$eloc/abac_prover_yap  --keystore $keyloc --role "$preferred_customer" --principal "$coyote_prin"
42
43#[keyid:Acme].role:preferred_customer <-?- [keyid:badCoyote]
44echo "  "
45echo "===bad============ Acme.preferred_customer <- badCoyote"
46$eloc/abac_prover_yap  --keystore $keyloc --role "$preferred_customer" --principal "$badcoyote_prin"
47
48
Note: See TracBrowser for help on using the repository browser.