mei_rt2
Last change
on this file since f89b991 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.0 KB
|
Rev | Line | |
---|
[10e1588] | 1 | |
---|
[9502c50] | 2 | # file_read_rt2_typed |
---|
[10e1588] | 3 | |
---|
[c469edf] | 4 | pwd=`pwd` |
---|
[08b8da7] | 5 | eloc=`which abac_prover_yap | sed 's/\/abac_prover_yap//'` |
---|
| 6 | if [ "$eloc" = "" ]; then |
---|
| 7 | echo "ERROR: abac_prover_yap is not in the search path!!!" |
---|
| 8 | exit 1 |
---|
| 9 | fi |
---|
[c469edf] | 10 | keyloc=$pwd |
---|
[10e1588] | 11 | |
---|
| 12 | alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem` |
---|
| 13 | bob=`creddy --keyid --cert $keyloc/Bob_ID.pem` |
---|
| 14 | maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem` |
---|
| 15 | alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem` |
---|
| 16 | |
---|
| 17 | read_fileA="[keyid:$alpha].role:read([urn:'file://fileA'])" |
---|
| 18 | bob_prin="[keyid:$bob]" |
---|
| 19 | maryann_prin="[keyid:$maryann]" |
---|
| 20 | |
---|
[9502c50] | 21 | ## dump all credentials -- |
---|
[e88c95b] | 22 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
---|
[10e1588] | 23 | |
---|
| 24 | #[keyid:Alpha].role:read([urn:'file://fileA']) <-?- [keyid:Bob] (yes) |
---|
[36b100a] | 25 | echo " " |
---|
[9502c50] | 26 | echo "===good============ alpha.read(fileA) <- Bob" |
---|
[10e1588] | 27 | $eloc/abac_prover_yap --keystore $keyloc --role "$read_fileA" --principal "$bob_prin" |
---|
| 28 | |
---|
| 29 | #[keyid:Alpha].role:read([urn:'file://fileA']) <-?- [keyid:Maryann] (no) |
---|
[36b100a] | 30 | echo " " |
---|
[9502c50] | 31 | echo "===bad============ alpha.read(fileA) <- Maryann" |
---|
[10e1588] | 32 | $eloc/abac_prover_yap --keystore $keyloc --role "$read_fileA" --principal "$maryann_prin" |
---|
| 33 | |
---|
Note: See
TracBrowser
for help on using the repository browser.