source: examples/creddy_prover_tests/experiment_create_rt0/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.3 KB
RevLine 
[718ad924]1
[9502c50]2# experiment_create_rt0_typed
[da5afdf]3
[c469edf]4pwd=`pwd`
5
[5110d42]6eloc=${ABAC_PROVER_PATH}
[c469edf]7keyloc=$pwd
[718ad924]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
[da5afdf]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
[9502c50]22#[keyid:Globotron].role:admin <-?- [keyid:Alice]
[718ad924]23#isMember(pAlice, role(pGlobotron,admin), C).
24echo " "
[9502c50]25echo "===good=============== Globotron.admin <- Alice"
[da5afdf]26$eloc/abac_prover_yap  --keystore $keyloc \
27             --role "$glob_admin" --principal "$alice_prin"
[718ad924]28
[9502c50]29#[keyid:Globotron].role:admin <-?- [keyid:Bob]
[718ad924]30#isMember(pBob, role(pGlobotron,admin), C).
31echo " "
[9502c50]32echo "===bad=============== Globotron.admin <- Bob"
[da5afdf]33$eloc/abac_prover_yap  --keystore $keyloc \
34             --role "$glob_admin" --principal "$bob_prin"
[718ad924]35
[9502c50]36#[keyid:Acme].role:experiment_create <-?- [keyid:Bob]
[718ad924]37#isMember(pBob, role(pAcme,experiment_create), C).
38echo " "
[9502c50]39echo "===good=============== Acme.experiment_create <- Bob"
[da5afdf]40$eloc/abac_prover_yap  --keystore $keyloc \
41             --role "$experiment_create" --principal "$bob_prin"
[718ad924]42
43
Note: See TracBrowser for help on using the repository browser.