source: examples/scaling_tests/haystack/fruit_prover/base/QUERY @ f30b1e9

abac0-leakabac0-meimei-idmei-rt0-nmei_rt0tvf-new-xml
Last change on this file since f30b1e9 was 7e3f5e2, checked in by Mei <mei@…>, 12 years ago

1) converted daisychain scaling tests

  • Property mode set to 100755
File size: 1.7 KB
Line 
1
2# number of credentials, 3 + 6 + 3 x #VAL#
3
4# fruits_rt2_typed
5
6keyloc=`pwd`
7eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
8if [ "$eloc" = "" ]; then
9  echo "ERROR: abac_prover_yap is not in the search path!!!"
10  exit 1
11fi
12
13ralphs=`creddy --keyid --cert $keyloc/Ralphs_ID.pem`
14bob=`creddy --keyid --cert $keyloc/Bob_ID.pem`
15mary=`creddy --keyid --cert $keyloc/Mary_ID.pem`
16
17mary_what2eat="[keyid:$mary].oset:what2eat"
18bob_what2eat="[keyid:$bob].oset:what2eat"
19ralphs_apple="[keyid:$ralphs].oset:fruitprice([float:1.50])"
20
21## dump all credentials
22$eloc/abac_prover_yap  --keystore $keyloc --dump creds_dump
23
24# [keyid:mary].oset:what2eat <-?- [string:'navel orange'] (yes)
25echo " "
26echo "===good============ mary.what2eat <- navel orange"
27$eloc/abac_prover_yap  --keystore $keyloc --oset "$mary_what2eat" --object "[string:'navel orange']"
28
29# [keyid:mary].oset:what2eat <-?- [string:'kiwi'] (yes)
30echo " "
31echo "===good============ mary.what2eat <- kiwi"
32$eloc/abac_prover_yap  --keystore $keyloc --oset "$mary_what2eat" --object "[string:'kiwi']"
33
34# [keyid:bob].oset:what2eat <-?- [string:'navel orange'] (no)
35echo " "
36echo "===bad============ bob.what2eat <- navel orange"
37$eloc/abac_prover_yap  --keystore $keyloc --oset "$bob_what2eat" --object "[string:'navel orange']"
38
39# [keyid:$ralphs].oset:fruitprice([float:1.50]) <-?- [string:'apple'] (yes)
40echo " "
41echo "===good============ ralphs.fruitprice(1.50) <- apple"
42$eloc/abac_prover_yap  --keystore $keyloc --oset "$ralphs_apple" --object "[string:'apple']"
43
44# [keyid:$ralphs].oset:fruitprice([float:1.50]) <-?- [string:'green apple'] (no)
45echo " "
46echo "===bad============ ralphs.fruitprice(1.50) <- green apple"
47$eloc/abac_prover_yap  --keystore $keyloc --oset "$ralphs_apple" --object "[string:'green apple']"
48
49
Note: See TracBrowser for help on using the repository browser.