source: examples/access_tests/creddy_prover/s1_run_query @ 11ca336

mei_rt2
Last change on this file since 11ca336 was 2e9455f, checked in by Mei <mei@…>, 11 years ago

1) added namespace
2) tweak ?This,
3) allowing linking role/oset as constraining conditions
4) adding access_tests regression testing that uses GENI's access policy
5) added couple multi contexts regression tests
6) add compression/uncompression calls to abac_encode_string/abac_decode_string
(libstrongwan only allows 512 char for attribute rule storage)
7) add attribute_now option to creddy that takes a whole char string for attribute
rule

  • Property mode set to 100755
File size: 1.6 KB
Line 
1#!/bin/sh
2
3# geni s1_run_query
4# using aba_prover_yap
5
6echo "=====================s1_run_query=================="
7
8pwd=`pwd`
9
10eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'`
11if [ "$eloc" = "" ]; then
12  echo "ERROR: abac_prover_yap is not in the search path!!!"
13  exit 1
14fi
15
16keyloc=$pwd
17
18g=`creddy --keyid --cert $keyloc/G_ID.pem`
19pa=`creddy --keyid --cert $keyloc/PA_ID.pem`
20sa=`creddy --keyid --cert $keyloc/SA_ID.pem`
21
22## dump all credentials
23env ABAC_CN=1 $eloc/abac_prover_yap  --keystore $keyloc --dump s1_creds_dump
24
25## PA.std_ops <- "info"
26#[keyid:PA].oset:std_ops <-?- [string:'info'] (yes)
27role="[keyid:$pa].oset:std_ops"
28prin="[string:'info']"
29echo " "
30echo "===good============ PA.std_ops<-?-info"
31$eloc/abac_prover_yap  --keystore $keyloc --role "$role" --principal "$prin"
32
33#[keyid:G].oset:qualifiedProject <-?- [string:'proj1'] (yes)
34role="[keyid:$g].oset:qualifiedProject"
35prin="[string:'proj1']"
36echo " "
37echo "===good============ G.qualifiedProject<-?-proj1"
38$eloc/abac_prover_yap  --keystore $keyloc --role "$role" --principal "$prin"
39
40#[keyid:G].oset:qualifiedProject <-?- [string:'projX'] (no)
41role="[keyid:$g].oset:qualifiedProject"
42prin="[string:'projX']"
43echo " "
44echo "===bad============ G.qualifiedProject<-?-projX"
45$eloc/abac_prover_yap  --keystore $keyloc --role "$role" --principal "$prin"
46
47#[keyid:SA].oset:inStdProject <-?- [string:'proj1']
48role="[keyid:$sa].oset:inStdProject"
49prin="[string:'proj1']"
50echo " "
51echo "===bad============ SA.inStdProject<-?-proj1"
52$eloc/abac_prover_yap  --keystore $keyloc --role "$role" --principal "$prin"
53
54echo "\n\n"
Note: See TracBrowser for help on using the repository browser.