„Windows“ KSP ir PKCS#11 su PKI tarpininku¶
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.
Galimi šios sąrankos naudojimo atvejai:
Code signing
Document signing
Patarimas
Daugiau informacijos taip pat rasite oficialioje PKI tarpinio serverio dokumentacijoje.
Būtinosios sąlygos¶
HSM 2
Initialized
Provisioned with keys and certificates
Windows machine
OpenSC PKCS#11 driver installed (only required on the PKI Proxy Server).
PKI tarpinis serveris - serveris¶
The PKI Proxy server shares the keys and certificates from a HSM 2 for different users.
Įrengimas¶
Download the PKI Proxy 2024 installer from the /n software website.
Atidarykite diegimo programą ir vykdykite diegimo vedlio nurodymus.
Pradžios meniu atidarykite „PKI Proxy“. Jei jį įdiegėte į numatytąją vietą, taip pat galite paleisti šia komanda iš paleisti dialogo lango arba PowerShell.
C:\Program Files\PKI Proxy 2024\PKIProxy.exePastaba
„PKI Proxy“ sumažės į sistemos dėklą, net jei pagrindinis langas yra uždarytas.
Service Configuration¶
Toliau pateiktose instrukcijose konfigūruojamas PKI tarpinis serveris.
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.
Sukurkite naują naudotoją spustelėję mygtuką New…. Pasirinkite autentifikavimo tipą, kurį palaiko visi klientai.
Pagrindinio lango meniu juostoje spustelėkite mygtuką Start, kad paleistumėte PKI Proxy paslaugą.
Publish Certificates from the HSM 2¶
In the following we configure which certificates from the HSM 2 are made available through PKI Proxy.
Įsitikinkite, kad atidarytas pagrindinis „PKI Proxy“ langas.
Change to the Certificates tab.
Spustelėkite New… mygtuką. Atsidarys Akcijų sertifikato langas.
Spustelėkite Select Certificate or Key… (pasirinkti sertifikatą arba raktą…) mygtuką, esantį lango Certificate rėmelyje. Taip bus atvertas Select a Private Key (pasirinkti privatų raktą) langas.
Pereikite į skirtuką Saugumo raktas.
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.
Teksto laukelyje „ “ („Įveskite HSM 2 PIN kodą“) įveskite savo HSM 2 PIN kodą.
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.
Norėdami patvirtinti pasirinkimą, spustelėkite mygtuką OK. Taip grįšite į akcijų sertifikato langą. Dabar lange bus rodoma išsami informacija apie pasirinktą sertifikatą.
Spustelėkite Add… mygtuką, esantį lango Access and Permissions rėmelyje. Bus atvertas Pasirinkite naudotoją langas.
Iš išskleidžiamojo meniu pasirinkite esamą naudotoją arba sukurkite naują, pasirinkę Create New User…. Norėdami patvirtinti pasirinkimą, spustelėkite OK mygtuką . Jei pasirinksite sukurti naują naudotoją, po to bus rodomas New User (Naujas naudotojas) langas.
Grįžę į Share Certificate langą taip pat įsitikinkite, kad sertifikatui arba bendrajam raktui leistos tik reikiamos operacijos. Tai galima pakeisti naudojant žymimuosius langelius, esančius lango Access and Permissions rėmelio apačioje.
Norėdami paskelbti sertifikatą, spustelėkite mygtuką OK. Taip grįšite į pagrindinį PKI proxy langą.
Po Certificate Management esančiame teksto sąraše dabar rodomas paskelbtas sertifikatas.
PKI tarpinis serveris - klientas¶
„PKI Proxy“ kliento įrankiais galima įvairiais būdais pasiekti bendrus raktus ir sertifikatus iš „PKI Proxy“ serverio.
Patarimas
PKI proxy serveryje yra kliento įrankiai. Taigi kompiuteris, kuriame veikia serveris, gali būti ir klientas sau pačiam.
Įrengimas¶
Atsisiųskite PKI Proxy 2024 - Client Tools iš /n programinės įrangos svetainės.
Atidarykite diegimo programą ir vykdykite diegimo vedlio nurodymus.
KSP (Key Storage Provider)¶
„PKI Proxy“ pateikia KSP, skirtą sąsajai su „PKI Proxy“ serveriu palaikyti. KSP leidžia naudoti „Windows“ vietines API su taikomosiomis programomis per CNG (Cryptography API: Next Generation) sąsają. Daugiau informacijos rasite PKI Proxy dokumentacijoje.
PKCS#11¶
„PKI Proxy“ pateikia PKCS#11 modulį, skirtą sąsajai su „PKI Proxy“ serveriu. Daugiau informacijos rasite PKI Proxy dokumentacijoje.