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
RevLine 
[da5afdf]1
[9502c50]2# acme_friend_rt1_typed
[da5afdf]3
[c469edf]4pwd=`pwd`
5
[5110d42]6eloc=${ABAC_PROVER_PATH}
[c469edf]7keyloc=$pwd
[718ad924]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
[da5afdf]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
[718ad924]22
[9502c50]23#[keyid:Acme].role:friendof([keyid:Roadrunner]) <-?- [keyid:Coyote]
[da5afdf]24echo "  "
[9502c50]25echo "===bad============ Acme.friendOf(Roadrunner) <- Coyote"
[da5afdf]26$eloc/abac_prover_yap  --keystore $keyloc --role "$friendof_roadrunner" --principal "$coyote_prin"
27
[9502c50]28#[keyid:Acme].role:friendof([keyid:Roadrunner]) <-?- [keyid:Jackrabbit]
[da5afdf]29echo "  "
[9502c50]30echo "===good============ Acme.friendOf(Roadrunner) <- Jackrabbit"
[da5afdf]31$eloc/abac_prover_yap  --keystore $keyloc --role "$friendof_roadrunner" --principal "$jackrabbit_prin"
[718ad924]32
[9502c50]33#[keyid:Acme].role:preferred_customer <-?- [keyid:Jackrabbit]
[da5afdf]34echo "  "
[9502c50]35echo "===good============ Acme.preferred_customer <- Jackrabbit"
[da5afdf]36$eloc/abac_prover_yap  --keystore $keyloc --role "$preferred_customer" --principal "$jackrabbit_prin"
[718ad924]37
[9502c50]38#[keyid:Acme].role:preferred_customer <-?- [keyid:Coyote]
[da5afdf]39echo "  "
[9502c50]40echo "===good============ Acme.preferred_customer <- Coyote"
[da5afdf]41$eloc/abac_prover_yap  --keystore $keyloc --role "$preferred_customer" --principal "$coyote_prin"
[718ad924]42
[9502c50]43#[keyid:Acme].role:preferred_customer <-?- [keyid:badCoyote]
[da5afdf]44echo "  "
[9502c50]45echo "===bad============ Acme.preferred_customer <- badCoyote"
[da5afdf]46$eloc/abac_prover_yap  --keystore $keyloc --role "$preferred_customer" --principal "$badcoyote_prin"
[718ad924]47
48
Note: See TracBrowser for help on using the repository browser.