Windows KSP și PKCS#11 cu PKI Proxy¶
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.
Cazurile posibile de utilizare a acestei configurații sunt:
Code signing
Document signing
Sfat
Vă rugăm să consultați și documentația oficială PKI Proxy pentru mai multe informații.
Condiții prealabile¶
HSM 2
Initialized
Provisioned with keys and certificates
Windows machine
OpenSC PKCS#11 driver installed (only required on the PKI Proxy Server).
PKI Proxy - Server¶
The PKI Proxy server shares the keys and certificates from a HSM 2 for different users.
Instalare¶
Download the PKI Proxy 2024 installer from the /n software website.
Deschideți programul de instalare și urmați expertul de instalare.
Deschideți PKI Proxy din meniul Start. Dacă l-ați instalat în locația implicită, îl puteți rula și cu următoarea comandă din dialogul Run sau din PowerShell.
C:\Program Files\PKI Proxy 2024\PKIProxy.exeNotă
PKI Proxy se va minimiza în tava sistemului, chiar dacă fereastra principală este închisă.
Service Configuration¶
Instrucțiunile de mai jos configurează PKI Proxy.
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.
Creați un utilizator nou făcând clic pe butonul New…. Alegeți un tip de autentificare care este acceptat de toți clienții.
În bara de meniu a ferestrei principale, faceți clic pe butonul Start pentru a porni serviciul PKI Proxy.
Publish Certificates from the HSM 2¶
In the following we configure which certificates from the HSM 2 are made available through PKI Proxy.
Asigurați-vă că fereastra principală PKI Proxy este deschisă.
Change to the Certificates tab.
Faceți clic pe butonul New…. Se va deschide fereastra Certificat de acțiuni.
Faceți clic pe butonul Select Certificate or Key…, în cadrul Certificate al ferestrei. Se va deschide fereastra Select a Private Key.
Treceți la fila Cheie de securitate.
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.
În câmpul de text „ PIN ”, introduceți codul PIN pentru HSM 2.
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.
Faceți clic pe butonul OK pentru a confirma selecția. Veți reveni la fereastra Certificat de acțiuni. Fereastra va afișa acum detaliile certificatului selectat.
Faceți clic pe butonul Add…, în cadrul Access and Permissions al ferestrei. Se va deschide fereastra Select user.
Selectați un utilizator existent din meniul derulant sau creați unul nou alegând Create New User…. Faceți clic pe butonul OK pentru a confirma selecția. Dacă alegeți să creați un utilizator nou, fereastra New User va fi afișată ulterior.
Înapoi în fereastra Share Certificate asigurați-vă, de asemenea, că permiteți numai operațiunile necesare pentru certificat sau cheie generică. Acest lucru poate fi modificat cu casetele de selectare din partea de jos a cadrului Access and Permissions.
Faceți clic pe butonul OK pentru a publica certificatul. Acest lucru vă va aduce înapoi în fereastra principală a PKI Proxy.
Lista de texte de sub Certificate Management afișează acum certificatul publicat.
PKI Proxy - Client¶
Instrumentele client PKI Proxy oferă diferite modalități de a accesa cheile partajate și certificatele de la un server PKI Proxy.
Sfat
Serverul PKI Proxy conține instrumentele client. Prin urmare, mașina care rulează serverul poate fi, de asemenea, un client pentru sine.
Instalare¶
Descărcați PKI Proxy 2024 - Client Tools de pe site-ul /n software.
Deschideți programul de instalare și urmați expertul de instalare.
KSP (Key Storage Provider)¶
PKI Proxy oferă un KSP pentru interfața cu serverul PKI Proxy. KSP permite utilizarea API-urilor native Windows cu aplicații, prin interfața CNG (Cryptography API: Next Generation). Vă rugăm să consultați documentația PKI Proxy pentru mai multe informații.
PKCS#11¶
PKI Proxy oferă un modul PKCS#11 pentru interfața cu serverul PKI Proxy. Vă rugăm să consultați documentația PKI Proxy pentru mai multe informații.