mei_rt2mei_rt2_fix_1
Last change
on this file since 5f551d3 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 | # fruits_rt2_typed |
---|
3 | |
---|
4 | pwd=`pwd` |
---|
5 | |
---|
6 | eloc=${ABAC_PROVER_PATH} |
---|
7 | keyloc=$pwd |
---|
8 | |
---|
9 | ralphs=`creddy --keyid --cert $keyloc/Ralphs_ID.pem` |
---|
10 | bob=`creddy --keyid --cert $keyloc/Bob_ID.pem` |
---|
11 | mary=`creddy --keyid --cert $keyloc/Mary_ID.pem` |
---|
12 | |
---|
13 | mary_what2eat="[keyid:$mary].oset:what2eat" |
---|
14 | bob_what2eat="[keyid:$bob].oset:what2eat" |
---|
15 | ralphs_apple="[keyid:$ralphs].oset:fruitprice([float:1.50])" |
---|
16 | |
---|
17 | ## dump all credentials |
---|
18 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
---|
19 | |
---|
20 | # [keyid:mary].oset:what2eat <-?- [string:'navel orange'] (yes) |
---|
21 | echo " " |
---|
22 | echo "===good============ mary.what2eat <- navel orange" |
---|
23 | $eloc/abac_prover_yap --keystore $keyloc --oset "$mary_what2eat" --object "[string:'navel orange']" |
---|
24 | |
---|
25 | # [keyid:mary].oset:what2eat <-?- [string:'kiwi'] (yes) |
---|
26 | echo " " |
---|
27 | echo "===good============ mary.what2eat <- kiwi" |
---|
28 | $eloc/abac_prover_yap --keystore $keyloc --oset "$mary_what2eat" --object "[string:'kiwi']" |
---|
29 | |
---|
30 | # [keyid:bob].oset:what2eat <-?- [string:'navel orange'] (no) |
---|
31 | echo " " |
---|
32 | echo "===bad============ bob.what2eat <- navel orange" |
---|
33 | $eloc/abac_prover_yap --keystore $keyloc --oset "$bob_what2eat" --object "[string:'navel orange']" |
---|
34 | |
---|
35 | # [keyid:$ralphs].oset:fruitprice([float:1.50]) <-?- [string:'apple'] (yes) |
---|
36 | echo " " |
---|
37 | echo "===good============ ralphs.fruitprice(1.50) <- apple" |
---|
38 | $eloc/abac_prover_yap --keystore $keyloc --oset "$ralphs_apple" --object "[string:'apple']" |
---|
39 | |
---|
40 | # [keyid:$ralphs].oset:fruitprice([float:1.50]) <-?- [string:'green apple'] (no) |
---|
41 | echo " " |
---|
42 | echo "===bad============ ralphs.fruitprice(1.50) <- green apple" |
---|
43 | $eloc/abac_prover_yap --keystore $keyloc --oset "$ralphs_apple" --object "[string:'green apple']" |
---|
44 | |
---|
45 | |
---|
Note: See
TracBrowser
for help on using the repository browser.