1 | This example demonstrates intersections. |
---|
2 | |
---|
3 | In order to buy rockets from Acme, you must be BOTH a preferred customer |
---|
4 | AND a WarnerBros character. In this example, the following query will be |
---|
5 | successful: |
---|
6 | |
---|
7 | Acme.buy_rockets <-?- Coyote |
---|
8 | |
---|
9 | The following query will fail (because Batman does not have the |
---|
10 | attribute WarnerBros.character): |
---|
11 | |
---|
12 | Acme.buy_rockets <-?- Batman |
---|
13 | |
---|
14 | Acme.buy_rockets <- Acme.preferred_customer & WarnerBros.character |
---|
15 | Acme.preferred_customer <- Coyote |
---|
16 | Acme.preferred_customer <- Batman |
---|
17 | WarnerBrothers.character <- Coyote |
---|
18 | |
---|
19 | creddy --generate --cn Acme |
---|
20 | |
---|
21 | creddy --generate --cn WarnerBros |
---|
22 | |
---|
23 | creddy --generate --cn Coyote |
---|
24 | |
---|
25 | creddy --generate --cn Batman |
---|
26 | |
---|
27 | creddy --attribute \ |
---|
28 | --issuer Acme_ID.pem --key Acme_private.pem --role buy_rockets \ |
---|
29 | --subject-cert Acme_ID.pem --subject-role preferred_customer \ |
---|
30 | --subject-cert WarnerBros_ID.pem --subject-role character \ |
---|
31 | --out Acme_buy_rockets__Acme_preferred_customer_and_WarnerBros_character_attr.der |
---|
32 | |
---|
33 | creddy --attribute \ |
---|
34 | --issuer Acme_ID.pem --key Acme_private.pem --role preferred_customer \ |
---|
35 | --subject-cert Coyote_ID.pem \ |
---|
36 | --out Acme_preferred_customer__Coyote_attr.der |
---|
37 | |
---|
38 | creddy --attribute \ |
---|
39 | --issuer Acme_ID.pem --key Acme_private.pem --role preferred_customer \ |
---|
40 | --subject-cert Batman_ID.pem \ |
---|
41 | --out Acme_preferred_customer__Batman_attr.der |
---|
42 | |
---|
43 | creddy --attribute \ |
---|
44 | --issuer WarnerBros_ID.pem --key WarnerBros_private.pem --role character \ |
---|
45 | --subject-cert Coyote_ID.pem \ |
---|
46 | --out WarnerBros_character__Coyote_attr.der |
---|