Windows KSP in PKCS#11 s posrednikom PKI

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.

Connection between HSM 2 and PKI Proxy Server, Client and exposed client interfaces.

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.

Možni primeri uporabe te nastavitve so:

  • Code signing

  • Document signing

Nasvet

Za več informacij si oglejte tudi uradno dokumentacijo PKI Proxy.

Predpogoji

  • HSM 2

    • Initialized

    • Provisioned with keys and certificates

  • Windows machine

    • OpenSC PKCS#11 driver installed (only required on the PKI Proxy Server).

Proxy PKI - strežnik

The PKI Proxy server shares the keys and certificates from a HSM 2 for different users.

Namestitev

  1. Download the PKI Proxy 2024 installer from the /n software website.

  2. Odprite namestitveni program in sledite čarovniku za namestitev.

  3. V meniju Start odprite Proxy PKI. Če ste ga namestili na privzeto mesto, ga lahko zaženete tudi z naslednjim ukazom iz pogovornega okna Zaženi ali PowerShell.

    C:\Program Files\PKI Proxy 2024\PKIProxy.exe
    

    Opomba

    Program PKI Proxy se pomanjša v sistemsko vrstico, tudi če je glavno okno zaprto.

Service Configuration

V spodnjih navodilih je konfiguriran posredniški strežnik PKI.

  1. Open the PKI Proxy main window.

  2. Change to the Settings tab.

  3. Make sure the checkbox Enable TLS is checked and an appropriate certificate is used.

  4. Change to the Users tab.

  5. Ustvarite novega uporabnika s klikom na gumb New…. Izberite vrsto avtentikacije, ki jo podpirajo vsi odjemalci.

  6. V menijski vrstici glavnega okna kliknite gumb Start, da zaženete storitev 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.

  1. Prepričajte se, da je odprto glavno okno posredniškega strežnika PKI.

  2. Change to the Certificates tab.

  3. Kliknite gumb New…. To bo odprlo okno Share Certificate.

  4. Kliknite na gumb Select Certificate or Key… (Izberite potrdilo ali ključ…) v oknu Certificate (Potrdilo). To bo odprlo okno Izberite zasebni ključ.

  5. Preklopite na zavihek Varnostni ključ.

  6. 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.

  7. 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.

  8. V polje » « (Vnesite PIN) vnesite PIN za vaš HSM 2.

  9. Click the Open button.

  10. 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.

  11. Za potrditev izbire kliknite gumb OK. S tem se boste vrnili v okno Share Certificate. V oknu bodo zdaj prikazane podrobnosti o izbranem potrdilu.

  12. Kliknite na gumb Dodaj… v oknu Access and Permissions. To bo odprlo okno Izberite uporabnika.

  13. V spustnem meniju izberite obstoječega uporabnika ali ustvarite novega z izbiro Ustvari novega uporabnika…. Za potrditev izbire kliknite gumb OK. Če se odločite za ustvarjanje novega uporabnika, se nato prikaže okno New User (Nov uporabnik).

  14. V oknu Share Certificate se prepričajte, da so dovoljene le zahtevane operacije za potrdilo ali splošni ključ. To lahko spremenite s potrditvenimi polji na dnu okvira Access and Permissions.

  15. Za objavo potrdila kliknite gumb OK. S tem se boste vrnili v glavno okno strežnika PKI Proxy.

  16. Seznam besedila pod Certificate Management zdaj prikazuje objavljeno potrdilo.

Posrednik PKI - odjemalec

Odjemalska orodja strežnika PKI Proxy omogočajo različne načine dostopa do skupnih ključev in potrdil iz strežnika PKI Proxy.

Nasvet

Strežnik PKI Proxy vsebuje odjemalska orodja. Zato je lahko računalnik, na katerem teče strežnik, tudi odjemalec samega sebe.

Namestitev

  1. Prenesite PKI Proxy 2024 - Client Tools s spletne strani /n programske opreme.

  2. Odprite namestitveni program in sledite čarovniku za namestitev.

KSP (Key Storage Provider)

Posrednik PKI Proxy zagotavlja KSP za vmesnik s strežnikom PKI Proxy. KSP omogoča uporabo izvornih API-jev Windows z aplikacijami prek vmesnika CNG (Cryptography API: Next Generation). Za več informacij glejte dokumentacijo PKI Proxy.

PKCS#11

PKI Proxy zagotavlja modul PKCS#11 za vmesnik s strežnikom PKI Proxy. Za več informacij glejte dokumentacijo PKI Proxy.