Project

General

Profile

openac » History » Version 4

Martin Willi, 03.10.2007 23:32
added --debug option

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