Windows KSP un PKCS#11 ar 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.
Iespējamie šīs konfigurācijas izmantošanas gadījumi ir šādi:
Code signing
Document signing
Padoms
Lai iegūtu vairāk informācijas, lūdzu, skatiet arī oficiālo PKI Proxy dokumentāciju.
Priekšnosacījumi¶
HSM 2
Initialized
Provisioned with keys and certificates
Windows machine
OpenSC PKCS#11 driver installed (only required on the PKI Proxy Server).
PKI starpniekserveris - serveris¶
The PKI Proxy server shares the keys and certificates from a HSM 2 for different users.
Uzstādīšana¶
Download the PKI Proxy 2024 installer from the /n software website.
Atveriet instalēšanas programmu un izpildiet instalēšanas vedņa norādījumus.
Atveriet PKI Proxy no sākuma izvēlnes. Ja tas ir instalēts noklusējuma atrašanās vietā, varat to palaist arī ar šādu komandu no Run dialoglodziņa vai PowerShell.
C:\Program Files\PKI Proxy 2024\PKIProxy.exePiezīme
Programma PKI Proxy tiks minimizēta sistēmas teknē, pat ja galvenais logs ir aizvērts.
Service Configuration¶
Tālāk sniegtajos norādījumos ir konfigurēts PKI starpniekserveris.
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.
Izveidojiet jaunu lietotāju, noklikšķinot uz pogas New…. Izvēlieties autentifikācijas veidu, ko atbalsta visi klienti.
Galvenā loga izvēlnes joslā noklikšķiniet uz pogas Start, lai palaistu PKI Proxy pakalpojumu.
Publish Certificates from the HSM 2¶
In the following we configure which certificates from the HSM 2 are made available through PKI Proxy.
Pārliecinieties, ka ir atvērts galvenais logs PKI Proxy.
Change to the Certificates tab.
Noklikšķiniet uz pogas New…. Atvērsies Akciju sertifikāta logs.
Noklikšķiniet uz Izvēlieties sertifikātu vai atslēgu… pogas, kas atrodas loga Sertifikāts rāmī. Tādējādi tiks atvērts Izvēlieties privāto atslēgu logs.
Pāriet uz cilni Drošības atslēga.
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.
Teksta laukā „ **” („Ievadiet PIN kodu”)**(„PIN kods”) ievadiet sava HSM 2 PIN kodu.
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.
Lai apstiprinātu izvēli, noklikšķiniet uz pogas OK. Tādējādi jūs atgriezīs atpakaļ uz Akciju sertifikāta logu. Tagad logā tiks parādīta informācija par izvēlēto sertifikātu.
Noklikšķiniet uz Add… pogas Access and Permissions loga rāmī. Tādējādi tiks atvērts Izvēlieties lietotāju logs.
Izlaižamajā izvēlnē izvēlieties esošo lietotāju vai izveidojiet jaunu lietotāju, izvēloties Izveidot jaunu lietotāju…. Lai apstiprinātu izvēli, noklikšķiniet uz pogas OK. Ja izvēlaties izveidot jaunu lietotāju, pēc tam tiks parādīts New User logs.
Atpakaļ Share Certificate logā pārliecinieties arī par to, vai atļautas tikai nepieciešamās darbības sertifikātam vai vispārējai atslēgai. To var mainīt, izmantojot izvēles rūtiņas Piekļuve un atļaujas rāmja apakšā.
Lai publicētu sertifikātu, noklikšķiniet uz pogas OK. Pēc tam jūs atgriezīs atpakaļ galvenajā PKI Proxy logā.
Tagad teksta sarakstā zem Sertifikātu pārvaldība ir redzams publicētais sertifikāts.
PKI starpniekserveris - klients¶
PKI Proxy klienta rīki nodrošina dažādus veidus, kā piekļūt kopīgajām atslēgām un sertifikātiem no PKI Proxy servera.
Padoms
PKI Proxy serverī ir klienta rīki. Tādējādi mašīna, kurā darbojas serveris, var būt arī pati sev klients.
Uzstādīšana¶
Lejupielādējiet PKI Proxy 2024 - Client Tools no /n programmatūras vietnes.
Atveriet instalēšanas programmu un izpildiet instalēšanas vedņa norādījumus.
KSP (Key Storage Provider)¶
PKI Proxy nodrošina KSP saskarnei ar PKI Proxy serveri. KSP ļauj izmantot vietējās Windows API ar lietojumprogrammām, izmantojot CNG (Cryptography API: Next Generation) saskarni. Sīkāku informāciju skatīt PKI Proxy dokumentācijā.
PKCS#11¶
PKI Proxy nodrošina PKCS#11 moduli saskarnei ar PKI Proxy serveri. Lai iegūtu vairāk informācijas, lūdzu, skatiet PKI Proxy dokumentāciju.