mei_rt2mei_rt2_fix_1
Last change
on this file since 1621520 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.2 KB
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | # access_rt2_typed |
---|
4 | |
---|
5 | pwd=`pwd` |
---|
6 | |
---|
7 | eloc=${ABAC_PROVER_PATH} |
---|
8 | keyloc=$pwd |
---|
9 | |
---|
10 | alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem` |
---|
11 | bob=`creddy --keyid --cert $keyloc/Bob_ID.pem` |
---|
12 | joe=`creddy --keyid --cert $keyloc/Joe_ID.pem` |
---|
13 | |
---|
14 | bob_prin="[keyid:$bob]" |
---|
15 | |
---|
16 | access_fileA="[keyid:$alpha].role:access([string:'Read'],[urn:'file//fileA'])" |
---|
17 | team_proj2="[keyid:$alpha].role:team([string:'proj2'])" |
---|
18 | bob_prin="[keyid:$bob]" |
---|
19 | joe_prin="[keyid:$joe]" |
---|
20 | |
---|
21 | ## dump all credentials |
---|
22 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
---|
23 | |
---|
24 | # double check |
---|
25 | #creddy --roles --cert Alpha_access_qFqP__alpha_team_qP_attr.der |
---|
26 | |
---|
27 | #[keyid:Alpha].role:access([string:'Read'],[urn:'file//fileA']) <-?- [keyid:bob] (yes) |
---|
28 | echo " " |
---|
29 | echo "===good============ Alpha.access(Read,fileA)<-?-Bob" |
---|
30 | $eloc/abac_prover_yap --keystore $keyloc --role "$access_fileA" --principal "$bob_prin" |
---|
31 | |
---|
32 | echo " " |
---|
33 | echo "===bad============ Alpha.access(Read,fileA)<-?-Joe" |
---|
34 | $eloc/abac_prover_yap --keystore $keyloc --role "$access_fileA" --principal "$joe_prin" |
---|
35 | |
---|
36 | echo " " |
---|
37 | echo "===good============ Alpha.team(proj2)<-?-Joe" |
---|
38 | #[keyid:alpha].role:team([string:'proj2'])<-[keyid:Joe] |
---|
39 | $eloc/abac_prover_yap --keystore $keyloc --role "$team_proj2" --principal "$joe_prin" |
---|
40 | |
---|
Note: See
TracBrowser
for help on using the repository browser.