mei_rt2mei_rt2_fix_1
Last change
on this file since 2cdbe49 was
f824a9e,
checked in by Mei <mei@…>, 12 years ago
|
1) add more doc to python_tests
|
-
Property mode set to
100755
|
File size:
1.4 KB
|
Rev | Line | |
---|
[718ad924] | 1 | #!/bin/sh |
---|
[9502c50] | 2 | # |
---|
[2c01913] | 3 | # The example makes use of 2 principals, Acme and Coyote. |
---|
| 4 | # |
---|
| 5 | # This example shows a very simple delegation of roles by Acme. Acme's |
---|
| 6 | # buy_rockets role includes all of Acme's preferred customers. The example |
---|
| 7 | # creates the principals and 2 credentials. Credential 1 encodes the policy |
---|
| 8 | # that all of Acme's preferred customers can buy rockets from Acme and |
---|
| 9 | # Credential 2 defines the Coyote as an Acme preferred customer. |
---|
| 10 | |
---|
[9502c50] | 11 | # The ./run_query script issues queries to show that the Coyote is both a preferred |
---|
[2c01913] | 12 | # customer and can buy rockets. Two invalid queries are also made, checking if |
---|
| 13 | # Acme is the Coyote's friend, which it isn't and whether a query about |
---|
| 14 | # something other than a principal works (it doesn't). |
---|
| 15 | |
---|
[f824a9e] | 16 | # acme_rockets_rt0 |
---|
[ef4daa7] | 17 | |
---|
[718ad924] | 18 | creddy --generate --cn Acme |
---|
[ef4daa7] | 19 | creddy --generate --cn Coyote |
---|
| 20 | |
---|
[718ad924] | 21 | #[keyid:Acme].role:buy_rockets <- [keyid:Acme].role:preferred_customer |
---|
[2c01913] | 22 | # Credential 1 |
---|
[ef4daa7] | 23 | creddy --attribute \ |
---|
| 24 | --issuer Acme_ID.pem --key Acme_private.pem --role buy_rockets \ |
---|
| 25 | --subject-cert Acme_ID.pem --subject-role preferred_customer \ |
---|
| 26 | --out Acme_buy_rockets__Acme_preferred_customer_attr.der |
---|
| 27 | |
---|
[718ad924] | 28 | #[keyid:Acme].role:preferred_customer <- [keyid:Coyote] |
---|
[2c01913] | 29 | # Credential 2 |
---|
[ef4daa7] | 30 | creddy --attribute \ |
---|
| 31 | --issuer Acme_ID.pem --key Acme_private.pem --role preferred_customer \ |
---|
| 32 | --subject-cert Coyote_ID.pem \ |
---|
| 33 | --out Acme_preferred_customer__Coyote_attr.der |
---|
[718ad924] | 34 | |
---|
Note: See
TracBrowser
for help on using the repository browser.