Enable secchan, ofp-discover to update /etc/resolv.conf.
[sliver-openvswitch.git] / utilities / ofp-pki.8.in
1 .TH ofp\-pki 8 "May 2008" "OpenFlow" "OpenFlow Manual"
2
3 .SH NAME
4 ofp\-pki \- OpenFlow public key infrastructure management utility
5
6 .SH SYNOPSIS
7 \fBofp\-pki\fR [\fIOPTIONS\fR] \fICOMMAND\fR [\fIARGS\fR]
8 .sp
9 Stand-alone commands with their arguments:
10 .br
11 \fBofp\-pki\fR \fBinit\fR
12 .br
13 \fBofp\-pki\fR \fBreq\fR \fINAME\fR
14 .br
15 \fBofp\-pki\fR \fBsign\fR \fINAME\fR [\fITYPE\fR]
16 .br
17 \fBofp\-pki\fR \fBreq+sign\fR \fINAME\fR [\fITYPE\fR]
18 .br
19 \fBofp\-pki\fR \fBverify\fR \fINAME\fR [\fITYPE\fR]
20 .br
21 \fBofp\-pki\fR \fBfingerprint\fR \fIFILE\fR
22 .sp
23 The following additional commands manage an online PKI:
24 .br
25 \fBofp\-pki\fR \fBls\fR [\fIPREFIX\fR] [\fITYPE\fR]
26 .br
27 \fBofp\-pki\fR \fBflush\fR [\fITYPE\fR]
28 .br
29 \fBofp\-pki\fR \fBreject\fR \fIPREFIX\fR [\fITYPE\fR]
30 .br
31 \fBofp\-pki\fR \fBapprove\fR \fIPREFIX\fR [\fITYPE\fR]
32 .br
33 \fBofp\-pki\fR \fBprompt\fR [\fITYPE\fR]
34 .br
35 \fBofp\-pki\fR \fBexpire\fR [\fIAGE\fR]
36 .sp
37 Each \fITYPE\fR above is a certificate type, either \fBswitch\fR
38 (default) or \fBcontroller\fR.
39 .sp
40 The available options are:
41 .br
42 [\fB-d\fR \fIDIR\fR | \fB--dir=\fR\fIDIR\fR] [\fB-f\fR | \fB--force\fR] [\fB-b\fR | \fB--batch\fR] [\fB-l\fR \fIFILE\fR | \fB--log=\fIFILE\fR] [\fB-h\fR | \fB--help\fR]
43
44 .SH DESCRIPTION
45 The \fBofp\-pki\fR program sets up and manages a public key
46 infrastructure for use with OpenFlow.  It is intended to be a simple
47 interface for organizations that do not have an established public key
48 infrastructure.  Other PKI tools can substitute for or supplement the
49 use of \fBofp\-pki\fR.
50
51 \fBofp\-pki\fR uses \fBopenssl\fR(1) for certificate management and key
52 generation.
53
54 .SH "OFFLINE COMMANDS"
55
56 The following \fBofp\-pki\fR commands support manual PKI
57 administration:
58
59 .TP
60 \fBinit\fR
61 Initializes a new PKI (by default in directory \fB@pkidir@\fR) and populates
62 it with a pair of certificate authorities for controllers and
63 switches.
64
65 This command should ideally be run on a high-security machine separate
66 from any OpenFlow controller or switch, called the CA machine.  The
67 files \fBpki/controllerca/cacert.pem\fR and
68 \fBpki/switchca/cacert.pem\fR that it produces will need to be copied
69 over to the OpenFlow switches and controllers, respectively.  Their
70 contents may safely be made public.
71
72 Other files generated by \fBinit\fR may remain on the CA machine.
73 The files \fBpki/controllerca/private/cakey.pem\fR and
74 \fBpki/switchca/private/cakey.pem\fR have particularly sensitive
75 contents that should not be exposed.
76
77 .TP
78 \fBreq\fR \fINAME\fR
79 Generates a new private key named \fINAME\fR\fB-privkey.pem\fR and
80 corresponding certificate request named \fINAME\fR\fB-req.pem\fR.
81 The private key can be intended for use by a switch or a controller.
82
83 This command should ideally be run on the switch or controller that
84 will use the private key to identify itself.  The file
85 \fINAME\fR\fB-req.pem\fR must be copied to the CA machine for signing
86 with the \fBsign\fR command (below).  
87
88 This command will output a fingerprint to stdout as its final step.
89 Write down the fingerprint and take it to the CA machine before
90 continuing with the \fBsign\fR step.
91
92 \fINAME\fR\fB-privkey.pem\fR has sensitive contents that should not be
93 exposed.  \fINAME\fR\fB-req.pem\fR may be safely made public.
94
95 .TP
96 \fBsign\fR \fINAME\fR [\fITYPE\fR]
97 Signs the certificate request named \fINAME\fR\fB-req.pem\fR that was
98 produced in the previous step, producing a certificate named
99 \fINAME\fR\fB-cert.pem\fR.  \fITYPE\fR, either \fBswitch\fR (default) or
100 \fBcontroller\fR, indicates the use for which the key is being
101 certified.
102
103 This command must be run on the CA machine.
104
105 The command will output a fingerprint to stdout and request that you
106 verify that it is the same fingerprint output by the \fBreq\fR
107 command.  This ensures that the request being signed is the same one
108 produced by \fBreq\fR.  (The \fB-b\fR or \fB--batch\fR option
109 suppresses the verification step.)
110
111 The file \fINAME\fR\fB-cert.pem\fR will need to be copied back to the
112 switch or controller for which it is intended.  Its contents may
113 safely be made public.
114
115 .TP
116 \fBreq+sign\fR \fINAME\fR [\fITYPE\fR]
117 Combines the \fBreq\fR and \fBsign\fR commands into a single step,
118 outputting all the files produced by each.  The
119 \fINAME\fR\fB-privkey.pem\fR and \fINAME\fR\fB-cert.pem\fR files must
120 be copied securely to the switch or controller.
121 \fINAME\fR\fB-privkey.pem\fR has sensitive contents and must not be
122 exposed in transit.  Afterward, it should be deleted from the CA
123 machine.
124
125 This combined method is, theoretically, less secure than the
126 individual steps performed separately on two different machines,
127 because there is additional potential for exposure of the private
128 key.  However, it is also more convenient.
129
130 .TP
131 \fBverify\fR \fINAME\fR [\fITYPE\fR]
132 Verifies that \fINAME\fR\fB-cert.pem\fR is a valid certificate for the
133 given \fITYPE\fR of use, either \fBswitch\fR (default) or
134 \fBcontroller\fR.  If the certificate is valid for this use, it prints
135 the message ``\fINAME\fR\fB-cert.pem\fR: OK''; otherwise, it prints an
136 error message.
137
138 .TP
139 \fBofp\-pki\fR \fBfingerprint\fR \fIFILE\fR
140 Prints the fingerprint for \fIFILE\fR.  If \fIFILE\fR is a
141 certificate, then this is the SHA-1 digest of the DER encoded version
142 of the certificate; otherwise, it is the SHA-1 digest of the entire
143 file.
144
145 .SH "ONLINE COMMANDS"
146
147 An OpenFlow PKI can be administered online, in conjunction with
148 .BR ofp-pki-cgi (8)
149 and a web server such as Apache:
150
151 .IP \(bu
152 The web server exports the contents of the PKI via HTTP.  All files in
153 a PKI hierarchy files may be made public, except for the files
154 \fBpki/controllerca/private/cakey.pem\fR and
155 \fBpki/switchca/private/cakey.pem\fR, which must not be exposed.
156
157 .IP \(bu
158 \fBofp\-pki\-cgi\fR allows newly generated certificate requests for
159 controllers and switches to be uploaded into the
160 \fBpki/controllerca/incoming\fR and \fBpki/switchca/incoming\fR
161 directories, respectively.  Uploaded certificate requests are stored
162 in those directories under names of the form
163 \fIFINGERPRINT\fB-req.pem\fR, which \fIFINGERPRINT\fR is the SHA-1
164 hash of the file.
165
166 .IP \(bu
167 These \fBofp\-pki\fR commands allow incoming certificate requests to
168 be approved or rejected, in a form are suitable for use by humans or
169 other software.
170
171 .PP
172 The following \fBofp\-pki\fR commands support online administration:
173
174 .TP
175 \fBofp\-pki\fR \fBls\fR [\fIPREFIX\fR] [\fITYPE\fR]
176 Lists all of the incoming certificate requests of the given \fITYPE\fR
177 (either \fBswitch\fR, the default, or \fBcontroller\fR).  If
178 \fIPREFIX\fR, which must be at least 4 characters long, is specified,
179 it causes the list to be limited to files whose names begin with
180 \fIPREFIX\fR.  This is useful, for example, to avoid typing in an
181 entire fingerprint when checking that a specific certificate request
182 has been received.
183
184 .TP
185 \fBofp\-pki\fR \fBflush\fR [\fITYPE\fR]
186 Deletes all certificate requests of the given \fITYPE\fR.
187
188 .TP
189 \fBofp\-pki\fR \fBreject\fR \fIPREFIX\fR [\fITYPE\fR]
190 Rejects the certificate request whose name begins with \fIPREFIX\fR,
191 which must be at least 4 characters long, of the given type (either
192 \fBswitch\fR, the default, or \fBcontroller\fR).  \fIPREFIX\fR must
193 match exactly one certificate request; its purpose is to allow the
194 user to type fewer characters, not to match multiple certificate
195 requests.
196
197 .TP
198 \fBofp\-pki\fR \fBapprove\fR \fIPREFIX\fR [\fITYPE\fR]
199 Approves the certificate request whose name begins with \fIPREFIX\fR,
200 which must be at least 4 characters long, of the given \fITYPE\fR
201 (either \fBswitch\fR, the default, or \fBcontroller\fR).  \fIPREFIX\fR
202 must match exactly one certificate request; its purpose is to allow
203 the user to type fewer characters, not to match multiple certificate
204 requests.
205
206 The command will output a fingerprint to stdout and request that you
207 verify that it is correct.  (The \fB-b\fR or \fB--batch\fR option
208 suppresses the verification step.)
209
210 .TP
211 \fBofp\-pki\fR \fBprompt\fR [\fITYPE\fR]
212 Prompts the user for each incoming certificate request of the given
213 \fITYPE\fR (either \fBswitch\fR, the default, or \fBcontroller\fR).
214 Based on the certificate request's fingerprint, the user is given the
215 option of approving, rejecting, or skipping the certificate request.
216
217 .TP
218 \fBofp\-pki\fR \fBexpire\fR [\fIAGE\fR]
219
220 Rejects all the incoming certificate requests, of either type, that is
221 older than \fIAGE\fR, which must in one of the forms \fIN\fBs\fR,
222 \fIN\fBmin\fR, \fIN\fBh\fR, \fIN\fBday\fR.  The default is \fB1day\fR.
223
224 .SH OPTIONS
225 .TP
226 [\fB-d\fR \fIDIR\fR | \fB--dir=\fR\fIDIR\fR]
227 Specifies the location of the PKI hierarchy to be used or created by
228 the command (default: \fB@pkidir@\fR).  All commands, except \fBreq\fR,
229 need access to a PKI hierarchy.
230
231 .TP
232 [\fB-f\fR | \fB--force\fR]
233 By default, \fBofp\-pki\fR will not overwrite existing files or
234 directories.  This option overrides this behavior.
235
236 .TP
237 [\fB-b\fR | \fB--batch\fR]
238 Suppresses the interactive verification of fingerprints that the
239 \fBsign\fR command by default requires.
240
241 .TP
242 [\fB-l\fR \fIFILE\fR | \fB--log=\fIFILE\fR]
243 Sets the log file to \fIFILE\fR.  If \fIFILE\fR starts with \fB/\fR,
244 it is taken as an absolute path; otherwise it is relative to the PKI
245 hierarchy.  Default: \fBofp-pki.log\fR.
246
247 .TP
248 [\fB-h\fR | \fB--help\fR]
249 Prints a help usage message and exits.
250
251 .SH "SEE ALSO"
252
253 .BR ofp-pki-cgi (8),
254 .BR dpctl (8),
255 .BR switch (8),
256 .BR secchan (8),
257 .BR controller (8)