source: tests/creddy_prover_tests/acme_rockets_intersection_rt0/run_query

Last change on this file was 4f79997, checked in by Mei <mei@…>, 11 years ago

1) add a new scaling test -haystack/ralphs
2) tweak some libabac code here and there

  • Property mode set to 100755
File size: 1.5 KB
Line 
1#!/usr/bin/env sh
2
3. ${TESTDIR}/test_util.sh
4if [ -z "${TESTDIR}" ] ; then
5    TESTDIR=../..
6fi
7
8keyloc=`pwd`
9
10acme=`$eloc/creddy --keyid --cert $keyloc/Acme_ID.pem`
11batman=`$eloc/creddy --keyid --cert $keyloc/Batman_ID.pem`
12coyote=`$eloc/creddy --keyid --cert $keyloc/Coyote_ID.pem`
13
14buy_rockets="$acme.buy_rockets"
15coyote_prin="$coyote"
16batman_prin="$batman"
17bad_buy_rockets="$acme.bad_buy_rockets"
18bad_buy_rockets2="99$acme.buy_rockets"
19
20echo "===good============ Acme.buy_rockets <- Coyote"
21runTest creddy_prover_test/acme_rockets_intersection_rt0 test1 \
22  "$ploc/abac_prover --keystore $keyloc --role $buy_rockets --principal $coyote_prin" \
23  0 \
24  "simple rt0 query"
25
26echo "===bad============ Acme.bad_buy_rockets <- Coyote"
27runTest creddy_prover_test/acme_rockets_intersection_rt0 test2 \
28  "$ploc/abac_prover  --keystore $keyloc --role $bad_buy_rockets --principal $coyote_prin" \
29  1 \
30  "expected failure, query fail with unfound role but should return with partial proof"
31
32echo "===bad============ 99Acme.buy_rockets <- Coyote"
33runTest creddy_prover_test/acme_rockets_intersection_rt0 test3 \
34  "$ploc/abac_prover  --keystore $keyloc --role $bad_buy_rockets2 --principal $coyote_prin" \
35  1 \
36  "expected failure, query fail with none existing issuer principal"
37
38echo "===bad=============== Acme.buy_rockets <- Batman"
39runTest creddy_prover_test/acme_rockets_intersection_rt0 test4 \
40  "$ploc/abac_prover  --keystore $keyloc --role $buy_rockets --principal $batman_prin" \
41  1 \
42  "expected failure, query fail with none existing target principal"
43
Note: See TracBrowser for help on using the repository browser.