PKI プロキシを使用した Windows KSP および PKCS#11¶
This document explains the usage of PKI Proxy with HSM 2. PKI Proxy enables the usage of HSM 2 through the native Microsoft Windows APIs. For this purpose, PKI Proxy includes a KSP (Key Storage Provider) that enables its use via the CNG (Cryptography API: Next Generation) interface. Additionally it provides PKCS#11 access to the HSM 2, but this should only be used if your setup requires it for example if you need the additional authentication features of PKI Proxy, or if you need to access it from a remote machine running an application that only supports PKCS#11. In all other cases use the PKCS#11 driver from the OpenSC project directly.
The deployment of HSM 2 with PKI Proxy looks like this.
The HSM 2 is connected via its USB interface to the PKI Proxy server. PKI Proxy uses the OpenSC PKCS#11 driver to connect to the HSM 2 and access its keys and certificates. Clients to the PKI Proxy use the REST API of the PKI Proxy server to access the keys and certificates. Applications on the client can either use the native Windows API or a PKCS#11 driver. PKI Proxy server and client can be executed on the same computer.
このセットアップの使用例としては、以下のようなものが考えられる:
Code signing
Document signing
Tip
詳細については、`PKI Proxyの公式文書<https://cdn.nsoftware.com/help/PK1/app/default.htm>`__ も参照してください。
前提条件¶
HSM 2
Initialized
Provisioned with keys and certificates
Windows machine
OpenSC PKCS#11 driver installed (only required on the PKI Proxy Server).
PKI プロキシ - サーバ¶
The PKI Proxy server shares the keys and certificates from a HSM 2 for different users.
インストール¶
Download the PKI Proxy 2024 installer from the /n software website.
インストーラーを開き、インストールウィザードに従ってください。
スタート]メニューから PKI プロキシを開きます。既定の場所にインストールした場合は、[Run] ダイアログまたは PowerShell から以下のコマンドで実行することもできます。
C:\Program Files\PKI Proxy 2024\PKIProxy.exe注釈
PKI Proxy は、メインウィンドウが閉じていても、システムトレイに最小化されます。
Service Configuration¶
以下の手順は、PKI プロキシを構成するものです。
Open the PKI Proxy main window.
Change to the Settings tab.
Make sure the checkbox Enable TLS is checked and an appropriate certificate is used.
Change to the Users tab.
New... ボタンをクリックして、新規ユーザを作成します。すべてのクライアントでサポートされている認証タイプを選択します。
メイン・ウィンドウのメニュー・バーで、[Start] ボタンをクリックして、PKI プロキシ・サービスを開始します。
Publish Certificates from the HSM 2¶
In the following we configure which certificates from the HSM 2 are made available through PKI Proxy.
PKI プロキシのメイン・ウィンドウが開いていることを確認します。
Change to the Certificates tab.
New... ボタンをクリックする。Share Certificate ウィンドウが開きます。
ウィンドウの**証明書** フレームの**証明書または鍵の選択...** ボタンをクリックします。これにより**Select a Private Key** ウィンドウが開きます。
Security Key タブに変更する。
Click the Browse... button and select the OpenSC PKCS#11 driver library file. The text field PKCS#11 Library now shows the path to the library file.
From the dropdown menu Security Key (PKCS#11) choose the slot which contains the certificate. The listed slots depend on your configuration of the HSM 2.
テキストフィールド「**」の「PIN** 」に、HSM 2のPINを入力してください。
Click the Open button.
The text list below Certificates now shows a list of the available certificates and generic keys on the HSM 2. Select the certificate or generic key you want to share with PKI Proxy.
OK ボタンをクリックして選択を確定します。これにより、Share Certificate ウィンドウに戻ります。ウィンドウには、選択した証明書の詳細が表示されます。
ウィンドウの**Access and Permissions** フレームの**Add...** ボタンをクリックする。これにより、Select user ウィンドウが開きます。
ドロップダウンメニューから既存のユーザーを選択するか、Create New User... を選択して新規ユーザーを作成する。OK ボタンをクリックして選択を確定します。新規ユーザーの作成を選択した場合、New User ウィンドウが表示されます。
Share Certificate ウィンドウに戻って、証明書またはジェネリック・キーに必要な操作のみを許可することも確認する。これは、Access and Permissions フレームの下部にあるチェックボックスで変更できます。
OK ボタンをクリックして、証明書を公開します。これにより、PKI Proxy のメイン・ウィンドウに戻ります。
証明書管理 の下のテキストリストには、公開された証明書が表示されるようになりました。
PKI プロキシ - クライアント¶
PKI プロキシ・クライアント・ツールは、PKI プロキシ・サーバから共有鍵および証明書にアクセスするため のさまざまな方法を提供する。
Tip
PKI プロキシ・サーバには、クライアント・ツールが含まれている。したがって、サーバを実行するマシンは、それ自体がクライアントになることもできる。
インストール¶
`/n ソフトウェアの Web サイト<https://www.nsoftware.com/pkiproxy/download>`__ から*PKI Proxy 2024 - Client Tools* をダウンロードする。
インストーラーを開き、インストールウィザードに従ってください。
KSP (Key Storage Provider)¶
PKI Proxy は、PKI Proxy サーバとのインタフェースとして KSP を提供する。KSP を使用すると、CNG (Cryptography API: Next Generation) インタフェースを通じて、Windows ネイティブ API をアプリケーションで使用できるようになる。詳細については、`PKI Proxy documentation<https://cdn.nsoftware.com/help/PK1/app/nsoftware.PKIProxy.htm#pg_runningksp>`__ を参照してください。
ピーケーシーエスナンバーイレブン¶
PKI Proxy は、PKI Proxy サーバとインタフェースするための PKCS#11 モジュールを提供します。詳細については、`PKI Proxy documentation<https://cdn.nsoftware.com/help/PK1/app/nsoftware.PKIProxy.htm#pg_runningpkcs11>`__ を参照してください。