Unleashed v1.4
[unleashed.git] / share / man / man1 / kmfcfg.1
blobc42643c270eaf8dab84da88d39e3cedd3e276420
1 '\" te
2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH KMFCFG 1 "Feb 3, 2009"
7 .SH NAME
8 kmfcfg \- Key Management Policy and Plugin Configuration Utility
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBkmfcfg\fR \fIsubcommand\fR [\fIoption\fR ...]
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The \fBkmfcfg\fR command allows users to configure Key Management Framework
19 (KMF) policy databases. The KMF policy database (DB) restricts the use of keys
20 and certificates that are managed through the KMF framework.
21 .sp
22 .LP
23 \fBkmfcfg\fR provides the ability to list, create, modify, delete, import and
24 export policy definitions either in the system default database file
25 \fB/etc/security/kmfpolicy.xml\fR or a user-defined database file.
26 .sp
27 .LP
28 For plugin configuration, \fBkmfcfg\fR allows users to display plugin
29 information, install or uninstall a KMF plugin, and modify the plugin option.
30 .SH SUBCOMMANDS
31 .sp
32 .LP
33 The following subcommands are supported:
34 .sp
35 .ne 2
36 .na
37 \fB\fBcreate\fR\fR
38 .ad
39 .sp .6
40 .RS 4n
41 Adds a new policy into the policy database file.
42 .sp
43 The format for the \fBcreate\fR subcommand is as follows:
44 .sp
45 .in +2
46 .nf
47 create [dbfile=\fIdbfile\fR] policy=\fIpolicyname\fR
48     [ignore-date=true|false]
49     [ignore-unknown-eku=true|false]
50     [ignore-trust-anchor=true|false]
51     [validity-adjusttime=\fIadjusttime\fR]
52     [ta-name=trust anchor subject DN]
53     [ta-serial=trust anchor serial number]
54     [ocsp-responder=\fIURL\fR]
55     [ocsp-proxy=\fIURL\fR]
56     [ocsp-use-cert-responder=true|false]
57     [ocsp-response-lifetime=timelimit]
58     [ocsp-ignore-response-sign=true|false]
59     [ocsp-responder-cert-name=Issuer DN]
60     [ocsp-responder-cert-serial=\fIserial number\fR]
61     [crl-basefilename=\fIbasefilename\fR]
62     [crl-directory=\fIdirectory\fR]
63     [crl-get-crl-uri=true|false]
64     [crl-proxy=\fIURL\fR]
65     [crl-ignore-crl-sign=true|false]
66     [crl-ignore-crl-date=true|false]
67     [keyusage=digitalSignature|nonRepudiation
68               |keyEncipherment | dataEncipherment |
69               keyAgreement |keyCertSign |
70               cRLSign | encipherOnly | decipherOnly],[...]
71     [ekunames=serverAuth | clientAuth |
72              codeSigning | emailProtection |
73              ipsecEndSystem | ipsecTunnel |
74              ipsecUser | timeStamping |
75              OCSPSigning],[...]
76     [ekuoids=\fIOID,OID,OID...\fR]
77 .fi
78 .in -2
79 .sp
81 The \fBcreate\fR subcommand supports the following options:
82 .sp
83 .ne 2
84 .na
85 \fB\fBcrl-basefilename=\fR\fIfilename\fR\fR
86 .ad
87 .br
88 .na
89 \fB\fBcrl-directory=\fR\fIdirectory\fR\fR
90 .ad
91 .sp .6
92 .RS 4n
93 These two attributes are used to specify the location for CRL files. The
94 \fBcrl-basefilename\fR attribute represents the base filename for a CRL file.
95 The \fBcrl-directory\fR attribute represents the directory for CRL files, which
96 defaults to the current directory.
97 .sp
98 If the \fBcrl-get-crl-uri\fR attribute is set to \fBtrue\fR and the
99 \fBcrl-basefilename\fR is not specified, the \fBbasefilename\fR for the cached
100 CRL file is the basename of the URI used to fetch the CRL file.
102 If the \fBcrl-get-crl-uri\fR attribute is set to \fBfalse\fR the
103 \fBcrl-basefilename\fR needs to be specified to indicate an input CRL file. The
104 setting for \fBcrl-get-crl-uri\fR is \fBfalse\fR by default.
106 These two attributes only apply to the file-based CRL plugins. The current
107 file-based CRL plugins are \fBfile\fR and \fBpkcs11\fR keystores. For the
108 \fBnss\fR keystore, the CRL location is always the NSS internal database.
112 .ne 2
114 \fB\fBcrl-get-crl-uri=true | false\fR\fR
116 .sp .6
117 .RS 4n
118 Configure if a CRL file is fetched and cached dynamically as part of the
119 certificate validation, using the URI information from the certificate's
120 distribution points extension.
122 The default for this attribute is \fBfalse\fR.
126 .ne 2
128 \fB\fBcrl-ignore-crl-date=true | false\fR\fR
130 .sp .6
131 .RS 4n
132 If \fBcrl-ignore-crl-date\fR is set to true, the validity time period of the
133 CRL is not checked.
135 The default for this attribute is \fBfalse\fR.
139 .ne 2
141 \fB\fBcrl-ignore-crl-sign=true | false\fR\fR
143 .sp .6
144 .RS 4n
145 If \fBcrl-ignore-crl-sign\fR is set to \fBtrue\fR, the signature of the CRL is
146 not checked.
148 The default for this attribute is \fBfalse\fR.
152 .ne 2
154 \fB\fBcrl-proxy=\fR \fIURL\fR\fR
156 .sp .6
157 .RS 4n
158 Sets the proxy server name and port for dynamically retrieving a CRL file when
159 \fBcrl-get-crl-uri\fR is set to \fBtrue\fR.
161 The port number is optional. If the port number is not specified, the default
162 value is \fB8080\fR. An example \fBcrl-proxy\fR setting might be:
163 \fBcrl-proxy=webcache.sfbay:8080\fR.
167 .ne 2
169 \fB\fBdbfile=\fR\fIdbfile\fR\fR
171 .sp .6
172 .RS 4n
173 The DB file to add the new policy. If not specified, the default is the system
174 KMF policy database file \fB/etc/security/kmfpolicy.xml\fR.
178 .ne 2
180 \fB\fBekuoids=\fR\fIEKUOIDS\fR\fR
182 .sp .6
183 .RS 4n
184 A comma separated list of Extended Key Usage OIDs that are required by the
185 policy being defined. The OIDs are expressed in \fBdot notation\fR, for
186 example, \fB1.2.3.4\fR. An example \fBekuoids\fR setting might be:
187 \fBekuoids=1.2.3.4,9.8.7.6.5\fR.
191 .ne 2
193 \fB\fBekunames=\fR\fIEKUNAMES\fR\fR
195 .sp .6
196 .RS 4n
197 A comma separated list of Extended Key Usage names that are required by the
198 policy being defined. The list of values allowed for \fIEKUNAMES\fR are:
199 \fBserverAuth\fR, \fBclientAuth\fR, \fBcodeSigning\fR, \fBemailProtection\fR,
200 \fBipsecEndSystem\fR, \fBipsecTunnel\fR, \fBipsecUser\fR, \fBtimeStamping\fR,
201 and \fBOCSPSigning\fR
203 The OCSP, CRL, key usage and extended key usage checkings are off by default.
204 To turn on any one of them, specify one or more attributes for the particular
205 checking. For example, if the \fBocsp-responder\fR attribute is set, then the
206 OCSP checking is turned on. If the \fBekuname\fR attribute or the \fBekuoids\fR
207 attribute is set, then the extended key usage checking is turned on.
211 .ne 2
213 \fB\fBignore-date=true | false\fR\fR
215 .sp .6
216 .RS 4n
217 Set the \fBIgnore Date\fR option for this policy. By default this value is
218 \fBfalse\fR. If \fBtrue\fR is specified, the policy ignores the validity
219 periods defined in the certificates when evaluating their validity.
223 .ne 2
225 \fB\fBignore-unknown-eku=true | false\fR\fR
227 .sp .6
228 .RS 4n
229 Set the \fBIgnore Unknown EKU\fR option for this policy. By default this value
230 is \fBfalse\fR. If \fBtrue\fR, the policy ignores any unrecognized EKU values
231 in the Extended Key Usage extension.
235 .ne 2
237 \fB\fBignore-trust-anchor=true | false\fR\fR
239 .sp .6
240 .RS 4n
241 Set the \fBIgnore Trust Anchor\fR option for this policy. By default this value
242 is \fBfalse\fR. If \fBtrue\fR is specified, the policy does not verify the
243 signature of the subject certificate using trust anchor certificate at
244 validation.
248 .ne 2
250 \fB\fBkeyusage=\fR\fIKUVALUES\fR\fR
252 .sp .6
253 .RS 4n
254 A comma separated list of key usage values that are required by the policy
255 being defined. The list of values allowed are: \fBdigitalSignature\fR,
256 \fBnonRepudiation\fR, \fBkeyEncipherment\fR, \fBdataEncipherment\fR,
257 \fBkeyAgreement\fR, \fBkeyCertSign\fR, \fBcRLSign\fR, \fBencipherOnly\fR,
258 \fBdecipherOnly\fR
262 .ne 2
264 \fB\fBocsp-ignore-response-sign=true | false\fR\fR
266 .sp .6
267 .RS 4n
268 If this attribute is set to \fBtrue\fR, the signature of the OCSP response is
269 not verified. This attribute value is default to \fBfalse\fR.
273 .ne 2
275 \fB\fBocsp-proxy=\fR\fIURL\fR\fR
277 .sp .6
278 .RS 4n
279 Set the proxy server name and port for OCSP. The port number is optional. If
280 the port number is not specified, the default value is 8080. An example
281 \fBocsp-proxy\fR setting might be: \fBocsp-proxy="webcache.sfbay:8080"\fR
285 .ne 2
287 \fB\fBocsp-response-lifetime=\fR\fItimelimit\fR\fR
289 .sp .6
290 .RS 4n
291 Set the \fBfreshness\fR period that a response must be. The \fItimelimit\fR can
292 be specified by \fInumber-day\fR, \fInumber-hour\fR, \fInumber-minute\fR, or
293 \fInumber-second\fR. An example \fBocsp-response-lifetime\fR setting might
294 be:\fBocsp-response-lifetime=6-hour\fR.
298 .ne 2
300 \fB\fBocsp-responder-cert-name=\fR\fIIssuerDN\fR\fR
304 \fB\fBocsp-responder-cert-serial=\fR\fIserialNumber\fR\fR
306 .sp .6
307 .RS 4n
308 These two attributes represent the OCSP responder certificate. The
309 \fBocsp-responder-cert-name\fR is to specify the issuer name of the
310 certificate. See the \fBta-name\fR option for example. The
311 \fIocsp-responder-cert-serial\fR is for the serial number and must be specified
312 as a hex value, for example, \fB0x0102030405060708090a0b0c0d0e0f\fR. If an OCSP
313 responder is different from the issuer of the certificate and if the OCSP
314 response needs to be verified, an OCSP responder certificate information should
315 be provided.
319 .ne 2
321 \fB\fBocsp-responder=\fR\fIURL\fR\fR
323 .sp .6
324 .RS 4n
325 Set the OCSP responder URL for use with the OCSP validation method. For
326 example, \fBocsp-responder=http://ocsp.verisign.com/ocsp/status\fR
330 .ne 2
332 \fBo\fBcsp-use-cert-responder=true | fals\fRe\fR
334 .sp .6
335 .RS 4n
336 Configure this policy to always use the responder defined in the certificate
337 itself if possible.
341 .ne 2
343 \fB\fBpolicy=\fR\fIpolicyname\fR\fR
345 .sp .6
346 .RS 4n
347 The policy record to be created. \fIpolicyname\fR is required.
351 .ne 2
353 \fB\fBvalidity-adjusttime=\fR\fIadjusttime\fR\fR
355 .sp .6
356 .RS 4n
357 Set the adjust time for both ends of validity period for a certificate. The
358 time can be specified by \fInumber-day, number-hour, number-minute, or
359 number-second\fR. An example \fBvalidity-adjusttime\fR setting might be:
360 \fBvalidity-adjusttime=6-hour. ta-name="Subject DN" ta-serial=serialNumber\fR
362 These two attributes represent the trust anchor certificate and are used to
363 find the trust anchor certificate in the keystore. The \fIta-name\fR is to
364 specify the distinguished name of the trust anchor certificate subject name.
365 For example, \fBta-name="O=Sun Microsystems Inc., \ OU=Solaris Security
366 Technologies Group, \ L=Ashburn, ST=VA, C=US, CN=John Smith"\fR The serial
367 number of the TA certificate. This, along with the Issuer DN, is used to find
368 the TA certificate in the keystore. The serial number must be specified as a
369 hex value, for example, \fB0x0102030405060708090a0b0c0d0e\fR The trust anchor
370 attributes need to be set, if the value of \fBignore-trust-anchor\fR attribute
371 is false.
377 .ne 2
379 \fB\fBdelete\fR\fR
381 .sp .6
382 .RS 4n
383 Deletes any policy matching the indicated policy name. The system default
384 policy (\fBdefault\fR) cannot be deleted.
386 The format for the \fBdelete\fR subcommand is as follows:
388 .in +2
390 delete [dbfile=\fIdbfile\fR] policy=\fIpolicyname\fR
392 .in -2
395 The \fBdelete\fR subcommand supports the following options:
397 .ne 2
399 \fBdbfile=\fIdbfile\fR\fR
401 .RS 21n
402 Read policy definitions from the indicated file. If \fIdbfile\fR is not
403 specified, , the default is the system KMF policy database file:
404 \fB/etc/security/kmfpolicy.xml\fR.
408 .ne 2
410 \fBpolicy=\fIpolicyname\fR\fR
412 .RS 21n
413 The name of the policy to delete. \fIpolicyname\fR is required, if using the
414 system database.
420 .ne 2
422 \fB\fBexport\fR\fR
424 .sp .6
425 .RS 4n
426 Exports a policy from one policy database file to another policy database file.
428 The format for the \fBexport\fR subcommand is as follows:
430 .in +2
432 kmfcfg export policy=\fIpolicyname\fR outfile=\fInewdbfile\fR [dbfile=\fIdbfile\fR]
434 .in -2
437 The \fBexport\fR subcommand supports the following options:
439 .ne 2
441 \fBdbfile=\fIdbfile\fR\fR
443 .RS 24n
444 The DB file where the exported policy is read. If \fIdbfile\fR is not
445 specified, the default is the system KMF policy database file:
446 \fB/etc/security/kmfpolicy.xml\fR.
450 .ne 2
452 \fBoutfile=\fIoutputdbfile\fR\fR
454 .RS 24n
455 The DB file where the exported policy is stored.
459 .ne 2
461 \fBpolicy=\fIpolicyname\fR\fR
463 .RS 24n
464 The policy record to be exported.
470 .ne 2
472 \fB\fBhelp\fR\fR
474 .sp .6
475 .RS 4n
476 Displays help for the \fBkmfcfg\fR command.
478 The format for the \fBhelp\fR subcommand is as follows:
480 .in +2
482 help
484 .in -2
490 .ne 2
492 \fB\fBimport\fR\fR
494 .sp .6
495 .RS 4n
496 Imports a policy from one policy database file to another policy database file.
498 The format for the \fBimport\fR subcommand is as follows:
500 .in +2
502 kmfcfg import policy=\fIpolicyname\fR infile=\fIinputdbfile\fR [dbfile=\fIdbfile\fR]
504 .in -2
507 The \fBimport\fR subcommand supports the following options:
509 .ne 2
511 \fBpolicy=\fIpolicyname\fR\fR
513 .RS 22n
514 The policy record to be imported.
518 .ne 2
520 \fBinfile=\fIinputdbfile\fR\fR
522 .RS 22n
523 The DB file to read the policy from.
527 .ne 2
529 \fBdbfile=\fIoutdbfile\fR\fR
531 .RS 22n
532 The DB file to add the new policy. If not specified, the default is the system
533 KMF policy database file \fB/etc/security/kmfpolicy.xml\fR.
539 .ne 2
541 \fB\fBlist\fR\fR
543 .sp .6
544 .RS 4n
545 Without arguments, lists all policy definitions from the default system
546 database.
548 The format for the \fBlist\fR subcommand is as follows:
550 .in +2
552 list [dbfile=\fIdbfile\fR] [policy=\fIpolicyname\fR]
554 .in -2
557 The \fBlist\fR subcommand supports the following options:
559 .ne 2
561 \fBdbfile=\fIdbfile\fR\fR
563 .RS 21n
564 Reads policy definitions from the indicated file. If not specified, the default
565 is the system KMF policy database file \fB/etc/security/kmfpolicy.xml\fR.
569 .ne 2
571 \fBpolicy=\fIpolicyname\fR\fR
573 .RS 21n
574 Only display policy definition for the named policy.
580 .ne 2
582 \fB\fBmodify\fR\fR
584 .sp .6
585 .RS 4n
586 Modifies any policy matching the indicated name. The system default policy
587 (\fBdefault\fR) cannot be modified.
589 The format for the \fBmodify\fR subcommand is as follows:
591 .in +2
593 modify [dbfile=\fIdbfile\fR] policy=\fIpolicyname\fR
594     [ignore-date=true|false]
595     [ignore-unknown-eku=true|false]
596     [ignore-trust-anchor=true|false]
597     [validity-adjusttime=\fIadjusttime\fR]
598     [ta-name=trust anchor subject DN]
599     [ta-serial=trust anchor serial number]
600     [ocsp-responder=\fIURL\fR]
601     [ocsp-proxy=\fIURL\fR]
602     [ocsp-use-cert-responder=true|false]
603     [ocsp-response-lifetime=timelimit]
604     [ocsp-ignore-response-sign=true|false]
605     [ocsp-responder-cert-name=Issuer DN]
606     [ocsp-responder-cert-serial=serial number]
607     [ocsp-none=true|false]
608     [crl-basefilename=\fIbasefilename\fR]
609     [crl-directory=\fIdirectory\fR]
610     [crl-get-crl-uri=true|false]
611     [crl-proxy=URL]
612     [crl-ignore-crl-sign=true|false]
613     [crl-ignore-crl-date=true|false]
614     [crl-none=true|false]
615     [keyusage=digitalSignature| nonRepudiation
616               |keyEncipherment | dataEncipherment |
617               keyAgreement |keyCertSign |
618               cRLSign | encipherOnly | decipherOnly],[...]
619     [keyusage-none=true|false]
620     [ekunames=serverAuth | clientAuth |
621              codeSigning | emailProtection |
622              ipsecEndSystem | ipsecTunnel |
623              ipsecUser | timeStamping |
624              OCSPSigning],[...]
625     [ekuoids=OID,OID,OID]
626     [eku-none=true|false]
628 .in -2
631 The \fBmodify\fR subcommand supports many of the same options as the
632 \fBcreate\fR subcommand. For descriptions of shared options, see the create
633 subcommand.
635 The \fBmodify\fR subcommand supports the following unique options:
637 .ne 2
639 \fB\fBcrl-none=true | false\fR\fR
641 .RS 30n
642 If \fBcrl-none\fR is set to \fBtrue\fR, CRL checking is turned off. If this
643 attribute is set to \fBtrue\fR, other CRL attributes cannot be set.
647 .ne 2
649 \fBdfile=[\fIdbfile\fR]\fR
651 .RS 30n
652 The database file to modify a policy. If not specified, the default is the
653 system KMF policy database file \fB/etc/security/kmfpolicy.xml\fR.
657 .ne 2
659 \fBeku-none=true | false\fR
661 .RS 30n
662 If \fBeku-none\fR is set to \fBtrue\fR, extended key usage checking is turned
663 off. The extended key usage attributes, \fBekuname\fR and \fBekuoids\fR cannot
664 be set at the same time if \fBeku-none\fR is set to \fBtrue\fR.
668 .ne 2
670 \fBkeyusage-none=true | false\fR
672 .RS 30n
673 If \fBkeyusage-none\fR is set to true, key usage checking is turned off.
675 The \fBkeyusage\fR attribute cannot be set at the same time if this attribute
676 is set to \fBtrue\fR.
680 .ne 2
682 \fBocsp-none=true | false\fR
684 .RS 30n
685 If \fBocsp-none\fR is set to true, OCSP checking is turned off. Any other OCSP
686 attribute is not set at the same time if this attribute is set to \fBtrue\fR.
690 .ne 2
692 \fBpolicy=\fIpolicyname\fR\fR
694 .RS 30n
695 The name of the policy to modify. \fIpolicyname\fR is required.
696 The \fBdefault\fR policy in the system KMF policy database cannot be modified.
701 .SS "Plugin Subcommands"
703 .ne 2
705 \fB\fBinstall keystore=\fR\fIkeystore_name\fR \fBmodulepath=\fR\fIpathname\fR\e
706 \fB[option=\fR\fIoption_str\fR\fB]\fR\fR
708 .sp .6
709 .RS 4n
710 Install a plugin into the system. The \fBmodulepath\fR field specifies the
711 pathname to a KMF plugin shared library object. If \fIpathname\fR is not
712 specified as an absolute pathname, shared library objects are assumed to be
713 relative to \fB/lib/security/$ISA/\fR. The \fBISA\fR token is replaced by an
714 implementation defined directory name which defines the pathname relative to
715 the calling program's instruction set architecture.
719 .ne 2
721 \fB\fBlist plugin\fR\fR
723 .sp .6
724 .RS 4n
725 Display KMF plugin information.
727 Without the \fBplugin\fRkeyword, \fBkmfcfg list\fR shows the policy information
728 as described in the \fBSUBCOMMANDS\fR section.
732 .ne 2
734 \fB\fBmodify plugin keystore=\fR\fIkeystore_name\fR
735 \fBoption=\fR\fIoption_str\fR\fR
737 .sp .6
738 .RS 4n
739 Modify the \fBplugin\fR option. The \fBplugin\fR option is defined by the
740 plugin and is interpreted by the plugin specifically, therefore this command
741 accepts any option string.
743 Without the \fBplugin\fR keyword, \fBkmfcfg modify\fR updates the policy
744 configuration as described in the \fBSUBCOMMANDS\fR section.
748 .ne 2
750 \fB\fBuninstall keystore=\fR\fIkeystore_name\fR\fR
752 .sp .6
753 .RS 4n
754 Uninstall the plugin with the \fIkeystore_name\fR.
757 .SH EXAMPLES
759 \fBExample 1 \fRCreating a New Policy
762 The following example creates a new policy called IPSEC in the system database:
765 .in +2
767 $ kmfcfg create IPSEC \e
768 ignore-trust-anchor=true \e
769 ocsp-use-cert-responder=true \e
770 keyusage=keyAgreement,keyEncipherment,dataEncipherment \e
771 ekuname=ipsecTunnel,ipsecUser
773 .in -2
776 .SH EXIT STATUS
779 The following exit values are returned:
781 .ne 2
783 \fB\fB0\fR\fR
785 .RS 6n
786 Successful completion.
790 .ne 2
792 \fB\fB>0\fR\fR
794 .RS 6n
795 An error occurred.
798 .SH FILES
800 .ne 2
802 \fB\fB/etc/security/kmfpolicy.xml\fR\fR
804 .sp .6
805 .RS 4n
806 Default system policy database
809 .SH ATTRIBUTES
812 See \fBattributes\fR(5) for descriptions of the following attributes:
817 box;
818 c | c
819 l | l .
820 ATTRIBUTE TYPE  ATTRIBUTE VALUE
822 Interface Stability     Uncommitted
825 .SH SEE ALSO
828 \fBattributes\fR(5)