mei_rt2mei_rt2_fix_1
Last change
on this file since 7211a95 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
|
Rev | Line | |
---|
[9502c50] | 1 | |
---|
| 2 | # fruits_rt2_typed |
---|
[c586a3c] | 3 | |
---|
| 4 | pwd=`pwd` |
---|
| 5 | |
---|
[5110d42] | 6 | eloc=${ABAC_PROVER_PATH} |
---|
[c586a3c] | 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 | |
---|
[36b100a] | 20 | # [keyid:mary].oset:what2eat <-?- [string:'navel orange'] (yes) |
---|
| 21 | echo " " |
---|
[9502c50] | 22 | echo "===good============ mary.what2eat <- navel orange" |
---|
[36b100a] | 23 | $eloc/abac_prover_yap --keystore $keyloc --oset "$mary_what2eat" --object "[string:'navel orange']" |
---|
[c586a3c] | 24 | |
---|
[d5bbd3e] | 25 | # [keyid:mary].oset:what2eat <-?- [string:'kiwi'] (yes) |
---|
| 26 | echo " " |
---|
[9502c50] | 27 | echo "===good============ mary.what2eat <- kiwi" |
---|
[d5bbd3e] | 28 | $eloc/abac_prover_yap --keystore $keyloc --oset "$mary_what2eat" --object "[string:'kiwi']" |
---|
| 29 | |
---|
[36b100a] | 30 | # [keyid:bob].oset:what2eat <-?- [string:'navel orange'] (no) |
---|
| 31 | echo " " |
---|
[9502c50] | 32 | echo "===bad============ bob.what2eat <- navel orange" |
---|
[36b100a] | 33 | $eloc/abac_prover_yap --keystore $keyloc --oset "$bob_what2eat" --object "[string:'navel orange']" |
---|
[c586a3c] | 34 | |
---|
| 35 | # [keyid:$ralphs].oset:fruitprice([float:1.50]) <-?- [string:'apple'] (yes) |
---|
[36b100a] | 36 | echo " " |
---|
[9502c50] | 37 | echo "===good============ ralphs.fruitprice(1.50) <- apple" |
---|
[c586a3c] | 38 | $eloc/abac_prover_yap --keystore $keyloc --oset "$ralphs_apple" --object "[string:'apple']" |
---|
| 39 | |
---|
[36b100a] | 40 | # [keyid:$ralphs].oset:fruitprice([float:1.50]) <-?- [string:'green apple'] (no) |
---|
| 41 | echo " " |
---|
[9502c50] | 42 | echo "===bad============ ralphs.fruitprice(1.50) <- green apple" |
---|
[36b100a] | 43 | $eloc/abac_prover_yap --keystore $keyloc --oset "$ralphs_apple" --object "[string:'green apple']" |
---|
| 44 | |
---|
[c586a3c] | 45 | |
---|
Note: See
TracBrowser
for help on using the repository browser.