]> git.proxmox.com Git - mirror_ovs.git/blame - utilities/ovs-pki.8.in
ovs-dpctl: Make specifying datapath optional for some commands.
[mirror_ovs.git] / utilities / ovs-pki.8.in
CommitLineData
91005f03
BP
1.de IQ
2. br
3. ns
4. IP "\\$1"
5..
064af421
BP
6.TH ovs\-pki 8 "May 2008" "Open vSwitch" "Open vSwitch Manual"
7
8.SH NAME
9ovs\-pki \- OpenFlow public key infrastructure management utility
10
11.SH SYNOPSIS
2562714a
BP
12Each command takes the form:
13.sp
2f446d10 14\fBovs\-pki\fR [\fIoptions\fR] \fIcommand\fR [\fIargs\fR]
064af421 15.sp
2562714a 16The implemented commands and their arguments are:
064af421
BP
17.br
18\fBovs\-pki\fR \fBinit\fR
19.br
2f446d10 20\fBovs\-pki\fR \fBreq\fR \fIname\fR
064af421 21.br
2f446d10 22\fBovs\-pki\fR \fBsign\fR \fIname\fR [\fItype\fR]
064af421 23.br
2f446d10 24\fBovs\-pki\fR \fBreq+sign\fR \fIname\fR [\fItype\fR]
064af421 25.br
2f446d10 26\fBovs\-pki\fR \fBverify\fR \fIname\fR [\fItype\fR]
064af421 27.br
2f446d10 28\fBovs\-pki\fR \fBfingerprint\fR \fIfile\fR
064af421 29.br
2f446d10 30\fBovs\-pki\fR \fBself\-sign\fR \fIname\fR
064af421 31.sp
2f446d10 32Each \fItype\fR above is a certificate type, either \fBswitch\fR
064af421
BP
33(default) or \fBcontroller\fR.
34.sp
35The available options are:
36.br
37[\fB\-k\fR \fItype\fR | \fB\-\^\-key=\fItype\fR]
c8ab9375 38.br
064af421 39[\fB\-B\fR \fInbits\fR | \fB\-\^\-bits=\fInbits\fR]
c8ab9375 40.br
064af421 41[\fB\-D\fR \fIfile\fR | \fB\-\^\-dsaparam=\fIfile\fR]
c8ab9375 42.br
064af421 43[\fB\-b\fR | \fB\-\^\-batch\fR]
c8ab9375 44.br
064af421 45[\fB\-f\fR | \fB\-\^\-force\fR]
c8ab9375 46.br
064af421 47[\fB\-d\fR \fIdir\fR | \fB\-\^\-dir=\fR\fIdir\fR]
c8ab9375 48.br
064af421 49[\fB\-l\fR \fIfile\fR | \fB\-\^\-log=\fIfile\fR]
064af421 50.br
c8ab9375
BP
51[\fB\-h\fR | \fB\-\^\-help\fR]
52.sp
064af421
BP
53Some options do not apply to every command.
54
55.SH DESCRIPTION
56The \fBovs\-pki\fR program sets up and manages a public key
57infrastructure for use with OpenFlow. It is intended to be a simple
58interface for organizations that do not have an established public key
59infrastructure. Other PKI tools can substitute for or supplement the
60use of \fBovs\-pki\fR.
61
62\fBovs\-pki\fR uses \fBopenssl\fR(1) for certificate management and key
63generation.
64
65.SH "OFFLINE COMMANDS"
66
67The following \fBovs\-pki\fR commands support manual PKI
68administration:
69
70.TP
71\fBinit\fR
72Initializes a new PKI (by default in directory \fB@PKIDIR@\fR) and populates
73it with a pair of certificate authorities for controllers and
74switches.
75
76This command should ideally be run on a high\-security machine separate
77from any OpenFlow controller or switch, called the CA machine. The
78files \fBpki/controllerca/cacert.pem\fR and
79\fBpki/switchca/cacert.pem\fR that it produces will need to be copied
80over to the OpenFlow switches and controllers, respectively. Their
81contents may safely be made public.
82
83By default, \fBovs\-pki\fR generates 2048\-bit RSA keys. The \fB\-B\fR
84or \fB\-\^\-bits\fR option (see below) may be used to override the key
85length. The \fB\-k dsa\fR or \fB\-\^\-key=dsa\fR option may be used to use
86DSA in place of RSA. If DSA is selected, the \fBdsaparam.pem\fR file
87generated in the new PKI hierarchy must be copied to any machine on
88which the \fBreq\fR command (see below) will be executed. Its
89contents may safely be made public.
90
91Other files generated by \fBinit\fR may remain on the CA machine.
92The files \fBpki/controllerca/private/cakey.pem\fR and
93\fBpki/switchca/private/cakey.pem\fR have particularly sensitive
94contents that should not be exposed.
95
96.TP
2f446d10
BP
97\fBreq\fR \fIname\fR
98Generates a new private key named \fIname\fR\fB\-privkey.pem\fR and
99corresponding certificate request named \fIname\fR\fB\-req.pem\fR.
064af421
BP
100The private key can be intended for use by a switch or a controller.
101
102This command should ideally be run on the switch or controller that
103will use the private key to identify itself. The file
2f446d10 104\fIname\fR\fB\-req.pem\fR must be copied to the CA machine for signing
064af421
BP
105with the \fBsign\fR command (below).
106
107This command will output a fingerprint to stdout as its final step.
108Write down the fingerprint and take it to the CA machine before
109continuing with the \fBsign\fR step.
110
111When RSA keys are in use (as is the default), \fBreq\fR, unlike the
112rest of \fBovs\-pki\fR's commands, does not need access to a PKI
113hierarchy created by \fBovs\-pki init\fR. The \fB\-B\fR or
114\fB\-\^\-bits\fR option (see below) may be used to specify the number of
115bits in the generated RSA key.
116
117When DSA keys are used (as specified with \fB\-\^\-key=dsa\fR), \fBreq\fR
118needs access to the \fBdsaparam.pem\fR file created as part of the PKI
119hierarchy (but not to other files in that tree). By default,
120\fBovs\-pki\fR looks for this file in \fB@PKIDIR@/dsaparam.pem\fR, but
121the \fB\-D\fR or \fB\-\^\-dsaparam\fR option (see below) may be used to
122specify an alternate location.
123
2f446d10
BP
124\fIname\fR\fB\-privkey.pem\fR has sensitive contents that should not be
125exposed. \fIname\fR\fB\-req.pem\fR may be safely made public.
064af421
BP
126
127.TP
2f446d10
BP
128\fBsign\fR \fIname\fR [\fItype\fR]
129Signs the certificate request named \fIname\fR\fB\-req.pem\fR that was
064af421 130produced in the previous step, producing a certificate named
2f446d10 131\fIname\fR\fB\-cert.pem\fR. \fItype\fR, either \fBswitch\fR (default) or
064af421
BP
132\fBcontroller\fR, indicates the use for which the key is being
133certified.
134
135This command must be run on the CA machine.
136
137The command will output a fingerprint to stdout and request that you
138verify that it is the same fingerprint output by the \fBreq\fR
139command. This ensures that the request being signed is the same one
140produced by \fBreq\fR. (The \fB\-b\fR or \fB\-\^\-batch\fR option
141suppresses the verification step.)
142
2f446d10 143The file \fIname\fR\fB\-cert.pem\fR will need to be copied back to the
064af421
BP
144switch or controller for which it is intended. Its contents may
145safely be made public.
146
147.TP
2f446d10 148\fBreq+sign\fR \fIname\fR [\fItype\fR]
064af421
BP
149Combines the \fBreq\fR and \fBsign\fR commands into a single step,
150outputting all the files produced by each. The
2f446d10 151\fIname\fR\fB\-privkey.pem\fR and \fIname\fR\fB\-cert.pem\fR files must
064af421 152be copied securely to the switch or controller.
2f446d10 153\fIname\fR\fB\-privkey.pem\fR has sensitive contents and must not be
064af421
BP
154exposed in transit. Afterward, it should be deleted from the CA
155machine.
156
157This combined method is, theoretically, less secure than the
158individual steps performed separately on two different machines,
159because there is additional potential for exposure of the private
160key. However, it is also more convenient.
161
162.TP
2f446d10
BP
163\fBverify\fR \fIname\fR [\fItype\fR]
164Verifies that \fIname\fR\fB\-cert.pem\fR is a valid certificate for the
165given \fItype\fR of use, either \fBswitch\fR (default) or
064af421 166\fBcontroller\fR. If the certificate is valid for this use, it prints
2f446d10 167the message ``\fIname\fR\fB\-cert.pem\fR: OK''; otherwise, it prints an
064af421
BP
168error message.
169
170.TP
2f446d10
BP
171\fBfingerprint\fR \fIfile\fR
172Prints the fingerprint for \fIfile\fR. If \fIfile\fR is a
064af421
BP
173certificate, then this is the SHA\-1 digest of the DER encoded version
174of the certificate; otherwise, it is the SHA\-1 digest of the entire
175file.
176
177.TP
2f446d10
BP
178\fBself\-sign\fR \fIname\fR
179Signs the certificate request named \fIname\fB\-req.pem\fR using the
180private key \fIname\fB\-privkey.pem\fR, producing a self-signed
181certificate named \fIname\fB\-cert.pem\fR. The input files should have
064af421
BP
182been produced with \fBovs\-pki req\fR.
183
184Some controllers accept such self-signed certificates.
185
064af421 186.SH OPTIONS
91005f03
BP
187.IP "\fB\-k\fR \fItype\fR"
188.IQ "\fB\-\^\-key=\fItype\fR"
064af421
BP
189For the \fBinit\fR command, sets the public key algorithm to use for
190the new PKI hierarchy. For the \fBreq\fR and \fBreq+sign\fR commands,
191sets the public key algorithm to use for the key to be generated,
192which must match the value specified on \fBinit\fR. With other
193commands, the value has no effect.
194
195The \fItype\fR may be \fBrsa\fR (the default) or \fBdsa\fR.
196
91005f03
BP
197.IP "\fB\-B\fR \fInbits\fR"
198.IQ "\fB\-\^\-bits=\fInbits\fR"
064af421
BP
199Sets the number of bits in the key to be generated. When RSA keys are
200in use, this option affects only the \fBinit\fR, \fBreq\fR, and
201\fBreq+sign\fR commands, and the same value should be given each time.
202With DSA keys are in use, this option affects only the \fBinit\fR
203command.
204
205The value must be at least 1024. The default is 2048.
206
91005f03
BP
207.IP "\fB\-D\fR \fIfile\fR"
208.IQ "\fB\-\^\-dsaparam=\fIfile\fR"
064af421
BP
209Specifies an alternate location for the \fBdsaparam.pem\fR file
210required by the \fBreq\fR and \fBreq+sign\fR commands. This option
211affects only these commands, and only when DSA keys are used.
212
213The default is \fBdsaparam.pem\fR under the PKI hierarchy.
214
91005f03
BP
215.IP "\fB\-b\fR"
216.IQ "\fB\-\^\-batch\fR"
064af421 217Suppresses the interactive verification of fingerprints that the
2562714a 218\fBsign\fR command by default requires.
064af421 219
91005f03
BP
220.IP "\fB\-d\fR \fIdir\fR"
221.IQ "\fB\-\^\-dir=\fR\fIdir\fR"
064af421
BP
222Specifies the location of the PKI hierarchy to be used or created by
223the command (default: \fB@PKIDIR@\fR). All commands, except \fBreq\fR,
224need access to a PKI hierarchy.
225
91005f03
BP
226.IP "\fB\-f\fR"
227.IQ "\fB\-\^\-force\fR"
064af421
BP
228By default, \fBovs\-pki\fR will not overwrite existing files or
229directories. This option overrides this behavior.
230
91005f03
BP
231.IP "\fB\-l\fR \fIfile\fR"
232.IQ "\fB\-\^\-log=\fIfile\fR"
064af421
BP
233Sets the log file to \fIfile\fR. Default:
234\fB@LOGDIR@/ovs\-pki.log\fR.
235
91005f03
BP
236.IP "\fB\-h\fR"
237.IQ "\fB\-\^\-help\fR"
064af421
BP
238Prints a help usage message and exits.
239
240.SH "SEE ALSO"
241
2562714a 242.BR ovs\-controller (8).