1 | #!/bin/sh |
---|
2 | # |
---|
3 | # |
---|
4 | #Acme runs a testbed. They've delegated the authority to create |
---|
5 | #experiments to all their partners. The Globotron company is one such |
---|
6 | #partner. |
---|
7 | # |
---|
8 | # Acme.experiment_create <- Acme.partner.experiment_create |
---|
9 | # |
---|
10 | #Globotron has delegated the authority to anyone an admin thinks is a |
---|
11 | #'power user'. |
---|
12 | # |
---|
13 | # Globotron.experiment_create <- Globotron.admin.power_user |
---|
14 | # |
---|
15 | #Alice is an admin, and her friend Bob is a power user: |
---|
16 | # |
---|
17 | # Globotron.admin <- Alice |
---|
18 | # Alice.power_user <- Bob |
---|
19 | # |
---|
20 | #From these credentials, it is possible to construct a proof graph |
---|
21 | #showing that Acme.experiment_create <- Bob. |
---|
22 | # |
---|
23 | #Note that there is a one-to-one correspondence with each credential |
---|
24 | #above and the attribute certificates below. |
---|
25 | # |
---|
26 | |
---|
27 | # experiment_create_rt0_typed |
---|
28 | |
---|
29 | creddy --generate --cn Acme |
---|
30 | creddy --generate --cn Globotron |
---|
31 | creddy --generate --cn Alice |
---|
32 | creddy --generate --cn Bob |
---|
33 | |
---|
34 | #[keyid:Acme].role:experiment_create <- [keyid:Acme].role:partner.role:experiment_create |
---|
35 | creddy --attribute \ |
---|
36 | --issuer Acme_ID.pem --key Acme_private.pem --role experiment_create \ |
---|
37 | --subject-cert Acme_ID.pem --subject-role partner.experiment_create \ |
---|
38 | --out Acme_experiment_create__Acme_partner_experiment_create_attr.der |
---|
39 | |
---|
40 | #[keyid:Acme].role:partner <- [keyid:Globotron] |
---|
41 | creddy --attribute \ |
---|
42 | --issuer Acme_ID.pem --key Acme_private.pem --role partner \ |
---|
43 | --subject-cert Globotron_ID.pem \ |
---|
44 | --out Acme_partner__Globotron_attr.der |
---|
45 | |
---|
46 | #[keyid:Globotron].role:expriment_create <- [keyid:Globotron].role:admin.role:power_user |
---|
47 | creddy --attribute \ |
---|
48 | --issuer Globotron_ID.pem --key Globotron_private.pem --role experiment_create \ |
---|
49 | --subject-cert Globotron_ID.pem --subject-role admin.power_user \ |
---|
50 | --out Globotron_experiment_create__Globotron_admin_power_user_attr.der |
---|
51 | |
---|
52 | #[keyid:Globotron].role:admin <- [keyid:Alice] |
---|
53 | creddy --attribute \ |
---|
54 | --issuer Globotron_ID.pem --key Globotron_private.pem --role admin \ |
---|
55 | --subject-cert Alice_ID.pem \ |
---|
56 | --out Globotron_admin__Alice_attr.der |
---|
57 | |
---|
58 | #[keyid:Alice].role:power_user <- [keyid:Bob] |
---|
59 | creddy --attribute \ |
---|
60 | --issuer Alice_ID.pem --key Alice_private.pem --role power_user \ |
---|
61 | --subject-cert Bob_ID.pem \ |
---|
62 | --out Alice_power_user__Bob_attr.der |
---|
63 | |
---|
64 | |
---|