mei_rt2mei_rt2_fix_1
Last change
on this file since 08b8da7 was
08b8da7,
checked in by Mei <mei@…>, 12 years ago
|
1) rework examples directory with Makefile
2) update scaling with plotting scripts
3) add more doc in there
|
-
Property mode set to
100755
|
File size:
1.3 KB
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | # access_rt2_typed |
---|
4 | |
---|
5 | pwd=`pwd` |
---|
6 | |
---|
7 | eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'` |
---|
8 | if [ "$eloc" = "" ]; then |
---|
9 | echo "ERROR: abac_prover_yap is not in the search path!!!" |
---|
10 | exit 1 |
---|
11 | fi |
---|
12 | |
---|
13 | keyloc=$pwd |
---|
14 | |
---|
15 | alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem` |
---|
16 | bob=`creddy --keyid --cert $keyloc/Bob_ID.pem` |
---|
17 | joe=`creddy --keyid --cert $keyloc/Joe_ID.pem` |
---|
18 | |
---|
19 | bob_prin="[keyid:$bob]" |
---|
20 | |
---|
21 | access_fileA="[keyid:$alpha].role:access([string:'Read'],[urn:'file//fileA'])" |
---|
22 | team_proj2="[keyid:$alpha].role:team([string:'proj2'])" |
---|
23 | bob_prin="[keyid:$bob]" |
---|
24 | joe_prin="[keyid:$joe]" |
---|
25 | |
---|
26 | ## dump all credentials |
---|
27 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
---|
28 | |
---|
29 | # double check |
---|
30 | #creddy --roles --cert Alpha_access_qFqP__alpha_team_qP_attr.der |
---|
31 | |
---|
32 | #[keyid:Alpha].role:access([string:'Read'],[urn:'file//fileA']) <-?- [keyid:bob] (yes) |
---|
33 | echo " " |
---|
34 | echo "===good============ Alpha.access(Read,fileA)<-?-Bob" |
---|
35 | $eloc/abac_prover_yap --keystore $keyloc --role "$access_fileA" --principal "$bob_prin" |
---|
36 | |
---|
37 | echo " " |
---|
38 | echo "===bad============ Alpha.access(Read,fileA)<-?-Joe" |
---|
39 | $eloc/abac_prover_yap --keystore $keyloc --role "$access_fileA" --principal "$joe_prin" |
---|
40 | |
---|
41 | echo " " |
---|
42 | echo "===good============ Alpha.team(proj2)<-?-Joe" |
---|
43 | #[keyid:alpha].role:team([string:'proj2'])<-[keyid:Joe] |
---|
44 | $eloc/abac_prover_yap --keystore $keyloc --role "$team_proj2" --principal "$joe_prin" |
---|
45 | |
---|
Note: See
TracBrowser
for help on using the repository browser.