source: examples/fruits_rt2_typed/rr @ 9806e76

mei_rt2mei_rt2_fix_1meiyap-rt1rt2
Last change on this file since 9806e76 was d5bbd3e, checked in by Mei <mei@…>, 12 years ago

1) add alumni2_rt1_typed

(target static range constraint)

2) add another rule for fruits example
3) add target static range constraint handling for string & urn

  • Property mode set to 100755
File size: 1.7 KB
Line 
1rm -rf creds_dump
2
3pwd=`pwd`
4
5#eloc=/home/mei/Deter/abac/libabac
6eloc=$pwd/../../libabac
7#keyloc=/home/mei/Deter/abac/examples/fruits_rt2_typed
8keyloc=$pwd
9
10ralphs=`creddy --keyid --cert $keyloc/Ralphs_ID.pem`
11bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
12mary=`creddy --keyid --cert $keyloc/Mary_ID.pem`
13
14mary_what2eat="[keyid:$mary].oset:what2eat"
15bob_what2eat="[keyid:$bob].oset:what2eat"
16ralphs_apple="[keyid:$ralphs].oset:fruitprice([float:1.50])"
17
18## dump all credentials
19$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
20
21# [keyid:mary].oset:what2eat <-?- [string:'navel orange'] (yes)
22echo " "
23echo "===good============ mary.what2eat <- navel orange yap "
24$eloc/abac_prover_yap  --keystore $keyloc --oset "$mary_what2eat" --object "[string:'navel orange']"
25
26# [keyid:mary].oset:what2eat <-?- [string:'kiwi'] (yes)
27echo " "
28echo "===good============ mary.what2eat <- kiwi yap "
29$eloc/abac_prover_yap  --keystore $keyloc --oset "$mary_what2eat" --object "[string:'kiwi']"
30
31# [keyid:bob].oset:what2eat <-?- [string:'navel orange'] (no)
32echo " "
33echo "===bad============ bob.what2eat <- navel orange yap "
34$eloc/abac_prover_yap  --keystore $keyloc --oset "$bob_what2eat" --object "[string:'navel orange']"
35
36# [keyid:$ralphs].oset:fruitprice([float:1.50]) <-?- [string:'apple'] (yes)
37echo " "
38echo "===good============ ralphs.fruitprice(1.50) <- apple yap "
39$eloc/abac_prover_yap  --keystore $keyloc --oset "$ralphs_apple" --object "[string:'apple']"
40
41
42# [keyid:$ralphs].oset:fruitprice([float:1.50]) <-?- [string:'green apple'] (no)
43echo " "
44echo "===bad============ ralphs.fruitprice(1.50) <- green apple yap "
45$eloc/abac_prover_yap  --keystore $keyloc --oset "$ralphs_apple" --object "[string:'green apple']"
46
47
Note: See TracBrowser for help on using the repository browser.