Project

General

Profile

openac » History » Version 7

Tobias Brunner, 14.04.2014 13:01

1 4 Martin Willi
h1. openac
2 4 Martin Willi
3 7 Tobias Brunner
> The *openac* command was removed with [[5.1.3]] as its functionality is now provided by the [[IpsecPkiAcert|pki --acert]] command.
4 4 Martin Willi
5 4 Martin Willi
*openac* is intended to be used by an _Authorization Authority (AA)_ to generate and sign X.509 attribute
6 4 Martin Willi
certificates. Currently only the inclusion of _group attributes_ is supported. An attribute certificate is linked
7 1 Martin Willi
to a holder by including the issuer and serial number of the holder's X.509 certificate.
8 2 Martin Willi
9 4 Martin Willi
10 4 Martin Willi
h3. Parameters
11 4 Martin Willi
12 1 Martin Willi
The following command line options are supported:
13 1 Martin Willi
14 6 Tobias Brunner
_--help_
15 6 Tobias Brunner
16 1 Martin Willi
p(. display the usage message.
17 1 Martin Willi
18 6 Tobias Brunner
_--version_
19 6 Tobias Brunner
20 1 Martin Willi
p(. display the version of _openac_.
21 1 Martin Willi
22 6 Tobias Brunner
_--optionsfrom <filename>_
23 6 Tobias Brunner
24 1 Martin Willi
p(. adds the contents of the file to the argument list. If _<filename>_ is a relative path then the
25 1 Martin Willi
    file is searched in the _/etc/openac_ directory.
26 1 Martin Willi
27 6 Tobias Brunner
_--debug <level>_
28 6 Tobias Brunner
29 5 Tobias Brunner
p(. sets the debug level to 0 (none), 1 (normal), 2 (more), 3 (raw), and 4 (private), the default level being 1.
30 1 Martin Willi
31 6 Tobias Brunner
_--quiet_
32 6 Tobias Brunner
33 5 Tobias Brunner
p(. By default _openac_ logs all control output both to syslog and stderr. With the --quiet option no
34 1 Martin Willi
    output is written to stderr.
35 1 Martin Willi
36 6 Tobias Brunner
_--days <days>_
37 6 Tobias Brunner
38 5 Tobias Brunner
p(. Validity of the X.509 attribute certificate in days. If neither the --days nor the --hours option
39 5 Tobias Brunner
    is specified then a default validity interval of 1 day is assumed. The --days option can be
40 1 Martin Willi
    combined with the --hours option.
41 1 Martin Willi
42 6 Tobias Brunner
_--hours <hours>_
43 6 Tobias Brunner
44 5 Tobias Brunner
p(. Validity of the X.509 attribute certificate in hours. If neither the --hours nor the --days option
45 1 Martin Willi
    is specified then a default validity interval of 24 hours is assumed. The --hours option can be
46 1 Martin Willi
    combined with the --days option.
47 1 Martin Willi
48 6 Tobias Brunner
_--startdate YYYYMMDDHHMMSSZ_
49 6 Tobias Brunner
50 1 Martin Willi
p(. defines the _notBefore_ date when the X.509 attribute certificate becomes valid. The date _YYYYMMDDHHMMSS_
51 1 Martin Willi
    must be specified in UTC (Zulu time).  If the --startdate option is not specified then
52 1 Martin Willi
    the current time is taken as a default.
53 5 Tobias Brunner
54 6 Tobias Brunner
_--stopdate YYYYMMDDHHMMSSZ_
55 6 Tobias Brunner
56 1 Martin Willi
p(. defines the _notAfter_ date when the X.509 attribute certificate will expire. The date _YYYYMMDDHHMMSS_
57 5 Tobias Brunner
    must be specified in UTC (Zulu time). If the --stopdate option is not specified then the default
58 5 Tobias Brunner
    _notAfter_ value is computed by adding the validity interval specified by the --days and/or
59 1 Martin Willi
    --days options to the _notBefore_ date.
60 1 Martin Willi
61 6 Tobias Brunner
_--cert <certfile>_
62 6 Tobias Brunner
63 1 Martin Willi
p(. specifies  the  file  containing the X.509 certificate of the Authorization Authority.
64 1 Martin Willi
    Thanks to the automatic format recognition the certificate can be stored either in PEM or DER format.
65 1 Martin Willi
66 6 Tobias Brunner
_--key <keyfile>_
67 6 Tobias Brunner
68 1 Martin Willi
p(. specifies the encrypted file containing the private RSA key of the Authoritzation Authority.
69 1 Martin Willi
    The private key is stored in PKCS#1 format.
70 5 Tobias Brunner
71 6 Tobias Brunner
_--password <password>_
72 6 Tobias Brunner
73 1 Martin Willi
p(. specifies the password with which the private RSA keyfile defined by the --key option has been
74 1 Martin Willi
    protected. If the option is missing then the password is prompted for on the command line.
75 5 Tobias Brunner
76 6 Tobias Brunner
_--usercert <certfile>_
77 6 Tobias Brunner
78 1 Martin Willi
p(. specifies file containing the X.509 certificate of the user to which the generated attribute
79 5 Tobias Brunner
    certificate will apply. Thanks to the automatic format recognition the certificate file can be
80 5 Tobias Brunner
    stored either in PEM or DER format.
81 2 Martin Willi
82 6 Tobias Brunner
_--groups <attr1>,<attr2>_
83 6 Tobias Brunner
84 5 Tobias Brunner
p(. specifies a comma-separated list of _group attributes_ that will go into the X.509 attribute
85 5 Tobias Brunner
    certificate.
86 2 Martin Willi
87 6 Tobias Brunner
_--out <filename>_
88 6 Tobias Brunner
89 5 Tobias Brunner
p(. specifies the file where the generated X.509 attribute certificate will be stored to in binary
90 2 Martin Willi
    DER format.
91 2 Martin Willi
92 4 Martin Willi
93 4 Martin Willi
h3. Examples
94 4 Martin Willi
95 5 Tobias Brunner
Common options can be stored in a file and be loaded via the --optionsfrom parameter:
96 4 Martin Willi
<pre>
97 2 Martin Willi
moon# cat /etc/openac/default.conf
98 2 Martin Willi
--cert /etc/ipsec.d/aacerts/aaCert.pem
99 2 Martin Willi
--key /etc/openac/aaKey.pem
100 2 Martin Willi
--hours 8
101 4 Martin Willi
</pre>
102 2 Martin Willi
103 4 Martin Willi
First the attribute certificate for _carol_ is generated. She is member of the
104 4 Martin Willi
_Research_ group.
105 4 Martin Willi
<pre>
106 2 Martin Willi
moon# ipsec openac --optionsfrom default.conf --usercert /etc/openac/carolCert.pem \
107 2 Martin Willi
                   --groups Research --out /etc/ipsec.d/acerts/carolAC.pem
108 2 Martin Willi
  loaded private key file '/etc/openac/aaKey.pem' (1675 bytes)
109 2 Martin Willi
  loaded signer cert file '/etc/ipsec.d/aacerts/aaCert.pem' (1505 bytes)
110 2 Martin Willi
  loaded user cert file '/etc/openac/carolCert.pem' (1493 bytes)
111 2 Martin Willi
  file '/etc/openac/serial' does not exist yet - serial number set to 01
112 2 Martin Willi
  written attribute cert file '/etc/ipsec.d/acerts/carolAC.pem' (784 bytes)
113 2 Martin Willi
  serial number is 01
114 4 Martin Willi
</pre>
115 1 Martin Willi
116 4 Martin Willi
The second attribute certificate is issued to _dave_ who belongs to the _Sales_
117 4 Martin Willi
and _Accounting_ groups.
118 4 Martin Willi
<pre>
119 1 Martin Willi
moon# ipsec openac --optionsfrom default.conf --usercert /etc/openac/daveCert.pem \
120 1 Martin Willi
                   --groups "Sales, Accounting" --out /etc/ipsec.d/acerts/daveAC.pem
121 1 Martin Willi
  loaded private key file '/etc/openac/aaKey.pem' (1675 bytes)
122 1 Martin Willi
  loaded signer cert file '/etc/ipsec.d/aacerts/aaCert.pem' (1505 bytes)
123 1 Martin Willi
  loaded user cert file '/etc/openac/daveCert.pem' (1493 bytes)
124 1 Martin Willi
  written attribute cert file '/etc/ipsec.d/acerts/daveAC.pem' (787 bytes)
125 1 Martin Willi
  serial number is 02
126 4 Martin Willi
</pre>