Project

General

Profile

openac » History » Version 3

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

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