openac » History » Version 2
Martin Willi, 23.09.2007 09:33
added two examples
1 | 1 | Martin Willi | = openac = |
---|---|---|---|
2 | 1 | Martin Willi | |
3 | 1 | Martin Willi | '''openac''' is intended to be used by an ''Authorization Authority (AA)'' to generate and sign X.509 attribute |
4 | 1 | Martin Willi | certificates. Currently only the inclusion of ''group attributes'' is supported. An attribute certificate is linked |
5 | 1 | Martin Willi | to a holder by including the issuer and serial number of the holder's X.509 certificate. |
6 | 1 | Martin Willi | |
7 | 2 | Martin Willi | === Parameters === |
8 | 1 | Martin Willi | The following command line options are supported: |
9 | 1 | Martin Willi | |
10 | 1 | Martin Willi | ''--help'' |
11 | 1 | Martin Willi | display the usage message. |
12 | 1 | Martin Willi | |
13 | 1 | Martin Willi | ''--version'' |
14 | 1 | Martin Willi | display the version of ''openac''. |
15 | 1 | Martin Willi | |
16 | 1 | Martin Willi | ''--optionsfrom <filename>'' |
17 | 1 | Martin Willi | adds the contents of the file to the argument list. If ''<filename>'' is a relative path then the |
18 | 1 | Martin Willi | file is searched in the ''/etc/openac'' directory. |
19 | 1 | Martin Willi | |
20 | 1 | Martin Willi | ''--quiet'' |
21 | 1 | Martin Willi | By default ''openac'' logs all control output both to syslog and stderr. With the ''--quiet'' option no |
22 | 1 | Martin Willi | output is written to stderr. |
23 | 1 | Martin Willi | |
24 | 1 | Martin Willi | ''--days <days>'' |
25 | 1 | Martin Willi | Validity of the X.509 attribute certificate in days. If neither the ''--days'' nor the ''--hours'' option |
26 | 1 | Martin Willi | is specified then a default validity interval of 1 day is assumed. The ''--days'' option can be |
27 | 1 | Martin Willi | combined with the ''--hours'' option. |
28 | 1 | Martin Willi | |
29 | 1 | Martin Willi | ''--hours <hours>'' |
30 | 1 | Martin Willi | Validity of the X.509 attribute certificate in hours. If neither the ''--hours'' nor the ''--days'' option |
31 | 1 | Martin Willi | is specified then a default validity interval of 24 hours is assumed. The ''--hours'' option can be |
32 | 1 | Martin Willi | combined with the ''--days'' option. |
33 | 1 | Martin Willi | |
34 | 1 | Martin Willi | ''--startdate YYYYMMDDHHMMSSZ'' |
35 | 1 | Martin Willi | defines the ''notBefore'' date when the X.509 attribute certificate becomes valid. The date ''YYYYMMDDHHMMSS'' |
36 | 1 | Martin Willi | must be specified in UTC (Zulu time). If the ''--startdate'' option is not specified then |
37 | 1 | Martin Willi | the current time is taken as a default. |
38 | 1 | Martin Willi | |
39 | 1 | Martin Willi | ''--stopdate YYYYMMDDHHMMSSZ'' |
40 | 1 | Martin Willi | defines the ''notAfter'' date when the X.509 attribute certificate will expire. The date ''YYYYMMDDHHMMSS'' |
41 | 1 | Martin Willi | must be specified in UTC (Zulu time). If the ''--stopdate'' option is not specified then the default |
42 | 1 | Martin Willi | ''notAfter'' value is computed by adding the validity interval specified by the ''--days'' and/or |
43 | 1 | Martin Willi | ''--days'' options to the ''notBefore'' date. |
44 | 1 | Martin Willi | |
45 | 1 | Martin Willi | ''--cert <certfile>'' |
46 | 1 | Martin Willi | specifies the file containing the X.509 certificate of the Authorization Authority. |
47 | 1 | Martin Willi | Thanks to the automatic format recognition the certificate can be stored either in PEM or DER format. |
48 | 1 | Martin Willi | |
49 | 1 | Martin Willi | ''--key <keyfile>'' |
50 | 1 | Martin Willi | specifies the encrypted file containing the private RSA key of the Authoritzation Authority. |
51 | 1 | Martin Willi | The private key is stored in PKCS#1 format. |
52 | 1 | Martin Willi | |
53 | 1 | Martin Willi | ''--password <password>'' |
54 | 1 | Martin Willi | specifies the password with which the private RSA keyfile defined by the ''--key'' option has been |
55 | 1 | Martin Willi | protected. If the option is missing then the password is prompted for on the command line. |
56 | 1 | Martin Willi | |
57 | 1 | Martin Willi | ''--usercert <certfile>'' |
58 | 1 | Martin Willi | specifies file containing the X.509 certificate of the user to which the generated attribute |
59 | 1 | Martin Willi | certificate will apply. Thanks to the automatic format recognition the certificate file can be |
60 | 1 | Martin Willi | stored either in PEM or DER format. |
61 | 1 | Martin Willi | |
62 | 1 | Martin Willi | ''--groups <attr1>,<attr2>'' |
63 | 1 | Martin Willi | specifies a comma-separated list of ''group attributes'' that will go into the X.509 attribute |
64 | 1 | Martin Willi | certificate. |
65 | 1 | Martin Willi | |
66 | 1 | Martin Willi | ''--out <filename> |
67 | 1 | Martin Willi | specifies the file where the generated X.509 attribute certificate will be stored to in binary |
68 | 1 | Martin Willi | DER format. |
69 | 2 | Martin Willi | |
70 | 2 | Martin Willi | === Examples === |
71 | 2 | Martin Willi | Common options can be stored in a file and be loaded via the ''--optionsfrom'' parameter: |
72 | 2 | Martin Willi | {{{ |
73 | 2 | Martin Willi | moon# cat /etc/openac/default.conf |
74 | 2 | Martin Willi | --cert /etc/ipsec.d/aacerts/aaCert.pem |
75 | 2 | Martin Willi | --key /etc/openac/aaKey.pem |
76 | 2 | Martin Willi | --hours 8 |
77 | 2 | Martin Willi | }}} |
78 | 2 | Martin Willi | |
79 | 2 | Martin Willi | First the attribute certificate for ''carol'' is generated. She is member of the |
80 | 2 | Martin Willi | ''Research'' group. |
81 | 2 | Martin Willi | {{{ |
82 | 2 | Martin Willi | moon# ipsec openac --optionsfrom default.conf --usercert /etc/openac/carolCert.pem \ |
83 | 2 | Martin Willi | --groups Research --out /etc/ipsec.d/acerts/carolAC.pem |
84 | 2 | Martin Willi | loaded private key file '/etc/openac/aaKey.pem' (1675 bytes) |
85 | 2 | Martin Willi | loaded signer cert file '/etc/ipsec.d/aacerts/aaCert.pem' (1505 bytes) |
86 | 2 | Martin Willi | loaded user cert file '/etc/openac/carolCert.pem' (1493 bytes) |
87 | 2 | Martin Willi | file '/etc/openac/serial' does not exist yet - serial number set to 01 |
88 | 2 | Martin Willi | written attribute cert file '/etc/ipsec.d/acerts/carolAC.pem' (784 bytes) |
89 | 2 | Martin Willi | serial number is 01 |
90 | 2 | Martin Willi | }}} |
91 | 2 | Martin Willi | |
92 | 2 | Martin Willi | The second attribute certificate is issued to ''dave'' who belongs to the ''Sales'' |
93 | 2 | Martin Willi | and ''Accounting'' groups. |
94 | 2 | Martin Willi | {{{ |
95 | 2 | Martin Willi | moon# ipsec openac --optionsfrom default.conf --usercert /etc/openac/daveCert.pem \ |
96 | 2 | Martin Willi | --groups "Sales, Accounting" --out /etc/ipsec.d/acerts/daveAC.pem |
97 | 2 | Martin Willi | loaded private key file '/etc/openac/aaKey.pem' (1675 bytes) |
98 | 2 | Martin Willi | loaded signer cert file '/etc/ipsec.d/aacerts/aaCert.pem' (1505 bytes) |
99 | 2 | Martin Willi | loaded user cert file '/etc/openac/daveCert.pem' (1493 bytes) |
100 | 2 | Martin Willi | written attribute cert file '/etc/ipsec.d/acerts/daveAC.pem' (787 bytes) |
101 | 2 | Martin Willi | serial number is 02 |
102 | 2 | Martin Willi | }}} |