Go to main content

マニュアルページ セクション 1: ユーザーコマンド

印刷ビューの終了

更新: 2022年7月27日
 
 

kmfcfg(1)

名前

kmfcfg - 鍵管理ポリシーおよびプラグイン構成ユーティリティー

形式

kmfcfg subcommand [option ...]

説明

ユーザーは kmfcfg コマンドを使用すると、鍵管理フレームワーク (KMF) ポリシーデータベースを構成できます。KMF ポリシーデータベース (DB) は、KMF フレームワークから管理される鍵と証明書の使用を制限します。

kmfcfg を使用すると、システムのデフォルトのデータベースファイル /etc/security/kmfpolicy.xml またはユーザー定義のデータベースファイルのポリシー定義を一覧表示、作成、変更、削除、インポート、およびエクスポートできます。

プラグイン構成の場合、ユーザーは kmfcfg を使用して、プラグイン情報の表示、KMF プラグインのインストール/アンインストール、およびプラグインオプションの変更を行えます。

サブコマンド

サポートされているサブコマンドは次のとおりです。

create

ポリシーデータベースファイルに新しいポリシーを追加します。

create サブコマンドの書式は次のとおりです。

kmfcfg create [dbfile=dbfile] policy=policyname
    [ignore-date=true|false]
    [ignore-unknown-eku=true|false]
    [ignore-trust-anchor=true|false]
    [ignore-cert-revoke-responder-timeout=true|false]
    [cert-revoke-responder-timeout=timeout in seconds]
    [trust-intermediate-cas=true|false]
    [max-cert-path-length=max length in cert path]
    [validity-adjusttime=adjusttime]
    [ta-name=trust anchor subject DN | search]
    [ta-serial=trust anchor serial number]
    [http-proxy=URL]
    [http-proxy-none=true|false]
    [ocsp-responder=URL]
    [ocsp-proxy=URL]
    [ocsp-use-cert-responder=true|false]
    [ocsp-response-lifetime=timelimit]
    [ocsp-ignore-response-sign=true|false]
    [ocsp-responder-cert-name=Issuer DN]
    [ocsp-responder-cert-serial=serial number]
    [crl-basefilename=basefilename | search]
    [crl-directory=directory]
    [crl-get-crl-uri=true|false]
    [crl-proxy=URL]
    [crl-ignore-crl-sign=true|false]
    [crl-ignore-crl-date=true|false]
    [bypass-ipsec-policy=true|false]
    [keyusage=digitalSignature | nonRepudiation |
              keyEncipherment | dataEncipherment |
              keyAgreement | keyCertSign |
              cRLSign | encipherOnly | decipherOnly],[...]
    [ekunames=serverAuth | clientAuth |
             codeSigning | emailProtection |
             ipsecEndSystem | ipsecTunnel |
             ipsecUser | timeStamping |
             OCSPSigning],[...]
    [ekuoids=OID,OID,OID...]
    [mapper-name=name of the mapper]
    [mapper-dir=dir where mapper library resides]
    [mapper-path=full pathname of mapper library]
    [mapper-options=mapper options]

create サブコマンドは次のオプションをサポートします。

cert-revoke-responder-timeout=timeout

CRL または OCSP 応答者を待機する最大タイムアウト値 (秒単位) を設定します。デフォルト値は 30 秒です。最大タイムアウト値は 300 秒です。

crl-basefilename=filename | search
crl-directory=directory

これら 2 つの属性は、CRL ファイルの場所を指定するために使用されます。crl-basefilename 属性は CRL ファイルのベースファイル名を表します。crl-directory 属性は、CRL ファイルのディレクトリを表します。デフォルトで現在のディレクトリに設定されています。明示的な CRL ファイル名の代わりに値 search が使用されている場合、KMF は、検証対象の証明書が失効済みかどうかを確認するために、指定された CRL ディレクトリの下にある有効なすべての CRL ファイルを検索します。

If the crl-get-crl-uri attribute is set to true and the crl-basefilename is not specified, the basefilename for the cached CRL file is the basename of the URI used to fetch the CRL file.

If the crl-get-crl-uri attribute is set to false the crl-basefilename needs to be specified to indicate an input CRL file or all possible CRL files under a CRL directory by the search value.crl-get-crl-uri はデフォルトで false に設定されています。

これら 2 つの属性は、ファイルベースの CRL プラグインにのみ適用されます。現在のファイルベースの CRL プラグインは file および pkcs11 キーストアです。

crl-get-crl-uri=true | false

証明書の検証の一環として、証明書の配布ポイント拡張機能の URI 情報を使用して CRL ファイルを取得し、動的にキャッシュするかどうかを構成します。

この属性はデフォルトで false に設定されています。

crl-ignore-crl-date=true | false

crl-ignore-crl-date が true に設定されている場合、CRL の有効期間は検査されません。

この属性はデフォルトで false に設定されています。

crl-ignore-crl-sign=true | false

If crl-ignore-crl-sign is set to true, the signature of the CRL is not checked.

この属性はデフォルトで false に設定されています。

crl-proxy=URL

crl-get-crl-uritrue に設定されている場合に、CRL ファイルを動的に取得するプロキシサーバーの名前とポートを設定します。この値はグローバル http-proxy の値より優先されます。

ポート番号は省略できます。ポート番号を指定しない場合、デフォルト値は 8080 です。An example crl-proxy setting might be: crl-proxy=webcache.example.com:8080.

dbfile=dbfile

新しいポリシーを追加する DB ファイル。指定しない場合、デフォルトは、システム KMF ポリシーデータベースファイル /etc/security/kmfpolicy.xml になります。

ekuoids=EKUOIDS

定義しているポリシーで必要になる拡張鍵用途 OID のコンマ区切りのリスト。OID は、1.2.3.4 のようにドット表記で表されます。An example ekuoids setting might be: ekuoids=1.2.3.4,9.8.7.6.5.

ekunames=EKUNAMES

定義しているポリシーで必要になる拡張鍵用途名のコンマ区切りリスト。The list of values allowed for EKUNAMES are: serverAuth, clientAuth, codeSigning, emailProtection, ipsecEndSystem, ipsecTunnel, ipsecUser, timeStamping, and OCSPSigning

OCSP、CRL、鍵用途、および拡張鍵用途の検査はデフォルトで無効になっています。これらのいずれかを有効にするには、特定の検査に対して 1 つまたは複数の属性を指定します。たとえば、ocsp-responder 属性を設定すると、OCSP 検査が有効になります。ekuname 属性または ekuoids 属性を設定すると、拡張鍵用途検査が有効になります。

http-proxy=URL

CRL、OCSP 用のサーバーと通信したり証明書をダウンロードしたりするためのプロキシサーバー名とポートを設定します。

ポート番号は省略できます。ポート番号を指定しない場合、デフォルト値は 8080 です。An example crl-proxy setting might be: crl-proxy=webcache.example.com:8080.

ignore-cert-revoke-responder-timeout=true | false

Define the behavior after a cert-revoke-responder-timeout expiration occurs.デフォルト値は false です。これは、cert-revoke-responder-timeout に定義された時間が経過すると、証明書の検証がただちに失敗することを示します。それ以外の場合、この値が true であれば、証明書の検証は CRL 検査または OCSP 検査、あるいはその両方を省略し、検証のために実行される一連の手順の次の手順に進みます。

ignore-date=true | false

このポリシーの日付を無視オプションを設定します。デフォルトではこの値は false です。true を指定した場合、ポリシーは、有効性を評価するときに、証明書で定義されている有効期限を無視します。

ignore-trust-anchor=true | false

このポリシーのトラストアンカーを無視オプションを設定します。デフォルトではこの値は false です。true を指定した場合、ポリシーは、検証時にトラストアンカーを使用して検証対象の証明書の署名を確認しません。

ignore-unknown-eku=true | false

このポリシーの不明な EKU を無視オプションを設定します。デフォルトではこの値は false です。true の場合、ポリシーは、拡張鍵用途拡張機能の認識できない EKU 値を無視します。

keyusage=KUVALUES

定義しているポリシーで必要になる鍵用途値のコンマ区切りリスト。The list of values allowed are: digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment, keyAgreement, keyCertSign, cRLSign, encipherOnly, decipherOnly

mapper-name=name
mapper-dir=directory
mapper-path=path
mapper-options=options

These four options support the certificate to name mapping. mapper-name provides the name of the mapper.For example, the name “cn” represents the mapper object kmf_mapper_cn.so.1. mapper-dir overrides the default mapper directory /lib/crypto. mapper-path specifies the full path to the mapper object. mapper-options is an ASCII-only string of a maximum of 255 bytes long.Its format is mapper specific but mappers are expected to accept a comma separated list of options, for example casesensitive,ignoredomain. mapper-path and mapper-name are mutually exclusive. mapper-dir can be set only if mapper-name is set. mapper-options can be set only if mapper-name or mapper-path is set.上記の誤った設定のいずれかを使用しようとすると、エラーになり、ポリシーデータベースは変更されません。

max-cert-path-length=number

証明書チェーンで許可される証明書の最大の長さを指定します。デフォルト値は 32 です。

ocsp-ignore-response-sign=true | false

この属性を true に設定した場合、OCSP 応答の署名は検証されません。デフォルトではこの値は false です。

ocsp-proxy=URL

OCSP のプロキシサーバー名およびポートを設定します。ポート番号は省略できます。ポート番号を指定しない場合、デフォルト値は 8080 です。An example ocsp-proxy setting might be: ocsp-proxy="webcache.example.com:8080"

この値はグローバル http-proxy の値より優先されます。

ocsp-response-lifetime=timelimit

応答が必要になる freshness 期間を設定します。timelimit は、number-daynumber-hournumber-minute 、または number-second で指定できます。An example ocsp-response-lifetime setting might be:ocsp-response-lifetime=6-hour.

ocsp-responder-cert-name=IssuerDN
ocsp-responder-cert-serial= serialNumber

これらの 2 つの属性は、OCSP 応答者証明書を表します。ocsp-responder-cert-name には、証明書の発行者名を指定します。例については、ta-name オプションを参照してください。The ocsp-responder-cert-serial is for the serial number and must be specified as a hex value, for example, 0x0102030405060708090a0b0c0d0e0f.OCSP 応答者が証明書の発行者とは異なる場合、および OCSP 応答を検証する必要がある場合は、OCSP 応答者の証明書情報を指定するようにしてください。

ocsp-responder=URL

OCSP 検証方法で使用する OCSP 応答者の URL を設定します。For example, ocsp-responder=http://ocsp.example.com/ocsp/status

ocsp-use-cert-responder=true | false

可能な場合は証明書で定義された応答者を常に使用するように、このポリシーを構成します。

policy=policyname

作成されるポリシーレコード。policyname が必要です。

ta-name=trust anchor subject DN | search

ta-name は証明書を検証するために使用されるトラストアンカーを識別します。KMF ポリシーエンジンは、完全な PKIX パス検証を行うのではなく、単に、検証対象の証明書の親であるようにトラストアンカーを扱います。

If an explicit Subject DN is specified, it must be combined with a ta-serial value to uniquely identify the certificate to use.また、識別された証明書は、選択されているキーストアで使用できる必要があります。

明示的な主体名やシリアル番号の代わりに値 search を使用する場合、KMF ポリシーエンジンは、検証対象の証明書の発行者名に一致する証明書を見つけようとし、それを検証に使用します。

search を使用する場合、ta-serial 値は無視されます。

ta-serial=trust anchor serial number

If the ta-name is specified as an explicit subject name, the serial number of that certificate must be indicated by the ta-serial value.シリアル番号は、たとえば ta-serial=0x01020a0b のように、16 進形式で指定する必要があります。

trust-intermediate-cas true | false

このポリシーが trust intermediate に設定されている場合は、信頼チェーンのルートを中間 CA 証明書にすることができます。デフォルトではこの値は false です。true が指定されている場合、チェーンが TA 証明書にアンカーされていないと、証明書の検証は部分的なチェーンに対して続行されます。

validity-adjusttime=adjusttime

証明書の有効期限の開始と終了に対する調整時間を設定します。時間は number-day、number-hour、number-minute、または number-second で指定できます。An example validity-adjusttime setting might be: validity-adjusttime=6-hour. ta-name="Subject DN" ta-serial=serialNumber

これら 2 つの属性は、トラストアンカー証明書を表し、キーストアでトラストアンカーの証明書を見つけるために使用されます。The ta-name is to specify the distinguished name of the trust anchor certificate subject name.For example, ta-name="O=Oracle Corporation, OU=Solaris Security Technologies Group, L=Ashburn, ST=VA, C=US, CN=John Smith".The ta-serial is to specify the serial number of the TA certificate.The serial number must be specified as a hex value, for example, 0x0102030405060708090a0b0c0d0e.これは、発行者 DN とともに、キーストアで TA 証明書を見つけるために使用されます。The trust anchor attributes need to be set if the value of ignore-trust-anchor attribute is false.

delete

指定されたポリシー名に一致したポリシーを削除します。システムのデフォルトポリシー (default) は削除できません。

delete サブコマンドの書式は次のとおりです。

kmfcfg delete [dbfile=dbfile] policy=policyname

delete サブコマンドは次のオプションをサポートします。

dbfile=dbfile

指定されたファイルからポリシー定義を読み込みます。If dbfile is not specified, the default is the system KMF policy database file: /etc/security/kmfpolicy.xml.

policy=policyname

削除するポリシーの名前。システムデータベースを使用する場合、policyname が必要です。

export

あるポリシーデータベースファイルから別のポリシーデータベースファイルに、ポリシーをエクスポートします。

export サブコマンドの書式は次のとおりです。

kmfcfg export policy=policyname outfile=newdbfile [dbfile=dbfile]

export サブコマンドは次のオプションをサポートします。

dbfile=dbfile

エクスポートしたポリシーが読み込まれる DB ファイル。dbfile が指定されていない場合、デフォルトは、システム KMF ポリシーデータベースファイル /etc/security/kmfpolicy.xml になります。

outfile=outputdbfile

エクスポートしたポリシーが保存される DB。

policy=policyname

エクスポートされるポリシーレコード。

help

kmfcfg コマンドのヘルプを表示します。

help サブコマンドの書式は次のとおりです。

kmfcfg help
import

あるポリシーデータベースファイルから別のポリシーデータベースファイルに、ポリシーをインポートします。

import サブコマンドの書式は次のとおりです。

kmfcfg import policy=policyname infile=inputdbfile [dbfile=dbfile]

import サブコマンドは次のオプションをサポートします。

dbfile=outdbfile

新しいポリシーを追加する DB ファイル。指定しない場合、デフォルトは、システム KMF ポリシーデータベースファイル /etc/security/kmfpolicy.xml になります。

infile=inputdbfile

ポリシーの読み込み元の DB ファイル。

policy=policyname

インポートされるポリシーレコード。

list

引数がない場合、デフォルトのシステムデータベースから、すべてのポリシー定義を一覧表示します。

list サブコマンドの書式は次のとおりです。

kmfcfg list [dbfile=dbfile] [policy=policyname]

list サブコマンドは次のオプションをサポートします。

dbfile=dbfile

指定されたファイルからポリシー定義を読み込みます。指定しない場合、デフォルトは、システム KMF ポリシーデータベースファイル /etc/security/kmfpolicy.xml になります。

policy=policyname

指定された名前に一致したポリシーのポリシー定義のみを表示します。

modify

指定された名前に一致したポリシーを変更します。システムのデフォルトポリシー (default) は変更できません。

modify サブコマンドの書式は次のとおりです。

kmfcfg modify [dbfile=dbfile] policy=policyname
    [ignore-date=true|false]
    [ignore-unknown-eku=true|false]
    [ignore-trust-anchor=true|false]
    [ignore-cert-revoke-responder-timeout=true|false]
    [cert-revoke-responder-timeout=timeout in seconds]
    [trust-intermediate-cas=true|false]
    [max-cert-path-length=max length in cert path]
    [validity-adjusttime=adjusttime]
    [ta-name=trust anchor subject DN]
    [ta-serial=trust anchor serial number]
    [http-proxy=URL]
    [http-proxy-none=true|false]
    [ocsp-responder=URL]
    [ocsp-proxy=URL]
    [ocsp-use-cert-responder=true|false]
    [ocsp-response-lifetime=timelimit]
    [ocsp-ignore-response-sign=true|false]
    [ocsp-responder-cert-name=Issuer DN]
    [ocsp-responder-cert-serial=serial number]
    [ocsp-none=true|false]
    [crl-basefilename=basefilename | search]]
    [crl-directory=directory]
    [crl-get-crl-uri=true|false]
    [crl-proxy=URL]
    [crl-ignore-crl-sign=true|false]
    [crl-ignore-crl-date=true|false]
    [crl-none=true|false]
    [bypass-ipsec-policy=true|false]
    [keyusage=digitalSignature | nonRepudiation |
              keyEncipherment | dataEncipherment |
              keyAgreement | keyCertSign |
              cRLSign | encipherOnly | decipherOnly],[...]
    [keyusage-none=true|false]
    [ekunames=serverAuth | clientAuth | codeSigning |
             emailProtection | ipsecEndSystem | ipsecTunnel |
             ipsecUser | timeStamping | OCSPSigning],[...]
    [ekuoids=OID,OID,OID]
    [eku-none=true|false]
    [mapper-name=name of the mapper]
    [mapper-dir=dir where mapper library resides]
    [mapper-path=full pathname of mapper library]
    [mapper-options=mapper options]

modify サブコマンドは、create サブコマンドと同じオプションを多数サポートします。For descriptions of shared options, see the create subcommand.

modify サブコマンドは次の固有のオプションをサポートします。

crl-none=true | false

crl-nonetrue に設定されている場合、CRL 検査が無効になります。この属性が true に設定されている場合、ほかの CRL 属性は設定できません。

dbfile=[dbfile]

ポリシーを変更するデータベースファイル。指定しない場合、デフォルトは、システム KMF ポリシーデータベースファイル /etc/security/kmfpolicy.xml になります。

eku-none=true | false

eku-nonetrue に設定されている場合、拡張鍵用途検査が無効になります。The extended key usage attributes, ekuname and ekuoids cannot be set at the same time if eku-none is set to true.

keyusage-none=true | false

keyusage-none が true に設定されている場合、鍵用途検査が無効になります。

この属性が true に設定されている場合、keyusage 属性は同時に設定できません。

http-proxy-none=true | false

http-proxy-none を true に設定した場合、グローバル http-proxy がプロキシなしにリセットされます。

bypass-ipsec-policy=true | false

bypass-ipsec-policy を true に設定した場合、KMF によって開始されたネットワーク接続で、グローバル IPsec ポリシーのバイパスが試みられます。この操作には sys_ip_config 特権が必要となります。この特権がなくても、ベストエフォートに基づいて接続が試みられます。

ocsp-none=true | false

ocsp-none が true に設定されている場合、OCSP 検査が無効になります。この属性が true に設定されている場合、ほかの OCSP 属性は同時に設定されません。

policy=policyname

変更するポリシーの名前。policyname が必要です。システム KMF ポリシーデータベースの default ポリシーは変更できません。

Plugin Subcommands

install keystore=keystore_name modulepath=pathname [option=option_str]

プラグインをシステムにインストールします。modulepath フィールドには、KMF プラグイン共有ライブラリオブジェクトへのパス名を指定します。pathname が完全パス名として指定されない場合、共有ライブラリオブジェクトは、/lib/security/$ISA/ を基準とした相対パスであるとみなされます。The ISA token is replaced by an implementation defined directory name which defines the pathname relative to the calling program's instruction set architecture.

list plugin

KMF プラグイン情報を表示します。

plugin キーワードがない場合、「サブコマンド」セクションで説明したように、kmfcfg list はポリシー情報を表示します。

modify plugin keystore=keystore_name option=option_str

plugin オプションを変更します。plugin オプションはプラグインが定義し、プラグインが具体的に解釈するので、このコマンドは任意のオプション文字列を受け入れます。

plugin キーワードがない場合、「サブコマンド」セクションで説明したように、kmfcfg modify はポリシー構成を更新します。

uninstall keystore=keystore_name

keystore_name のプラグインをアンインストールします。

使用例 1 新しいポリシーの作成

次の例は、IPSEC と呼ばれる新しいポリシーをシステムデータベース内に作成します。

$ kmfcfg create dbfile=ipsec.xml policy=IPSEC \
ignore-trust-anchor=true \
ocsp-use-cert-responder=true \
keyusage=keyAgreement,keyEncipherment,dataEncipherment \
ekunames=ipsecTunnel,ipsecUser

終了ステータス

次の終了ステータスが返されます。

0

正常終了。

> 0

An error occurred.

ファイル

/etc/security/kmfpolicy.xml

デフォルトのシステムポリシーデータベース

属性

次の属性については、attributes(7) を参照してください。

属性タイプ
属性値
使用条件
system/core-os
インタフェースの安定性
不確実

関連項目

attributes(7)

History

The bypass-ipsec-policy, cert-revoke-responder-timeout, http-proxy, http-proxy-none, ignore-cert-revoke-responder-timeout, max-cert-path-length, and trust-intermediate-cas attributes were added in Oracle Solaris 11.2.0.

The mapper-dir, mapper-name, mapper-path, and mapper-options attributes were added in Solaris 11.0.

Plugin support, including the install, list plugin, modify plugin, and uninstall subcommands, was added in Solaris 11.0.

The kmfcfg command and all other subcommands & attributes were added in Solaris 10 8/07 (Update 4).