source: examples/creddy_prover_tests/experiment_create_rt0/run_query @ 880e924

mei_rt2mei_rt2_fix_1
Last change on this file since 880e924 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.3 KB
Line 
1
2# experiment_create_rt0_typed
3
4pwd=`pwd`
5
6eloc=${ABAC_PROVER_PATH}
7keyloc=$pwd
8
9acme=`creddy --keyid --cert $keyloc/Acme_ID.pem`
10alice=`creddy --keyid --cert $keyloc/Alice_ID.pem`
11bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
12globotron=`creddy --keyid --cert $keyloc/Globotron_ID.pem`
13
14glob_admin="[keyid:$globotron].role:admin"
15alice_prin="[keyid:$alice]"
16bob_prin="[keyid:$bob]"
17experiment_create="[keyid:$acme].role:experiment_create"
18
19## dump all credentials
20$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
21
22#[keyid:Globotron].role:admin <-?- [keyid:Alice]
23#isMember(pAlice, role(pGlobotron,admin), C).
24echo " "
25echo "===good=============== Globotron.admin <- Alice"
26$eloc/abac_prover_yap  --keystore $keyloc \
27             --role "$glob_admin" --principal "$alice_prin"
28
29#[keyid:Globotron].role:admin <-?- [keyid:Bob]
30#isMember(pBob, role(pGlobotron,admin), C).
31echo " "
32echo "===bad=============== Globotron.admin <- Bob"
33$eloc/abac_prover_yap  --keystore $keyloc \
34             --role "$glob_admin" --principal "$bob_prin"
35
36#[keyid:Acme].role:experiment_create <-?- [keyid:Bob]
37#isMember(pBob, role(pAcme,experiment_create), C).
38echo " "
39echo "===good=============== Acme.experiment_create <- Bob"
40$eloc/abac_prover_yap  --keystore $keyloc \
41             --role "$experiment_create" --principal "$bob_prin"
42
43
Note: See TracBrowser for help on using the repository browser.