mei_rt2mei_rt2_fix_1
Last change
on this file since 4b46680 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:
932 bytes
|
Rev | Line | |
---|
[10e1588] | 1 | |
---|
[9502c50] | 2 | # file_read_rt2_typed |
---|
[10e1588] | 3 | |
---|
[c469edf] | 4 | pwd=`pwd` |
---|
| 5 | |
---|
[5110d42] | 6 | eloc=${ABAC_PROVER_PATH} |
---|
[c469edf] | 7 | keyloc=$pwd |
---|
[10e1588] | 8 | |
---|
| 9 | alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem` |
---|
| 10 | bob=`creddy --keyid --cert $keyloc/Bob_ID.pem` |
---|
| 11 | maryann=`creddy --keyid --cert $keyloc/Maryann_ID.pem` |
---|
| 12 | alpha=`creddy --keyid --cert $keyloc/Alpha_ID.pem` |
---|
| 13 | |
---|
| 14 | read_fileA="[keyid:$alpha].role:read([urn:'file://fileA'])" |
---|
| 15 | bob_prin="[keyid:$bob]" |
---|
| 16 | maryann_prin="[keyid:$maryann]" |
---|
| 17 | |
---|
[9502c50] | 18 | ## dump all credentials -- |
---|
[e88c95b] | 19 | $eloc/abac_prover_yap --keystore $keyloc --dump creds_dump |
---|
[10e1588] | 20 | |
---|
| 21 | #[keyid:Alpha].role:read([urn:'file://fileA']) <-?- [keyid:Bob] (yes) |
---|
[36b100a] | 22 | echo " " |
---|
[9502c50] | 23 | echo "===good============ alpha.read(fileA) <- Bob" |
---|
[10e1588] | 24 | $eloc/abac_prover_yap --keystore $keyloc --role "$read_fileA" --principal "$bob_prin" |
---|
| 25 | |
---|
| 26 | #[keyid:Alpha].role:read([urn:'file://fileA']) <-?- [keyid:Maryann] (no) |
---|
[36b100a] | 27 | echo " " |
---|
[9502c50] | 28 | echo "===bad============ alpha.read(fileA) <- Maryann" |
---|
[10e1588] | 29 | $eloc/abac_prover_yap --keystore $keyloc --role "$read_fileA" --principal "$maryann_prin" |
---|
| 30 | |
---|
Note: See
TracBrowser
for help on using the repository browser.