MacOS Accesso con utente locale¶
Compatible Nitrokeys |
|||||||
---|---|---|---|---|---|---|---|
✓ active |
⨯ inactive |
⨯ inactive |
⨯ inactive |
⨯ inactive |
⨯ inactive |
⨯ inactive |
⨯ inactive |
This document explains how to use the PIV smart card of a Nitrokey 3 for local user logon on MacOS. It is available as of firmware version 1.8 and higher.
Prerequisiti¶
The following setup was used at the time of writing this guide:
MacOS 15.6 (Sequoia)
nitropy 0.10.0
Nitrokey 3 with PIV smart card, firmware version 1.8.1
Configure smartcard logon for local use¶
Si presume che l’applet PIV di Nitrokey sia resettata in fabbrica. Tuttavia, anche la sovrascrittura di chiavi e certificati dovrebbe funzionare.
È più facile usare i comandi nitropy nk3 piv
quando PIN, PUK e chiave di gestione non sono stati modificati, perché in tal caso si applicano i valori predefiniti. Si presume quindi che non siano ancora stati modificati. Nel caso in cui lo abbiate già fatto, dovrete fornirli dove necessario.
Generate a key and a certificate in PIV slot 9a:
nitropia nk3 piv –experimental generate-key –key 9a –algo nistp256 –subject-name «CN=Foo Bar» –subject-alt-name-upn «foo@bar.com»
Generate a key and a certificate in PIV slot 9d:
nitropia nk3 piv –experimental generate-key –key 9d –algo nistp256 –subject-name «CN=Foo Bar» –subject-alt-name-upn «foo@bar.com»
Verificare che Nitrokey abbia ora i certificati negli slot 9a e 9d:
nitropia nk3 piv –esperimento lista-certificati
Verificare che Nitrokey venga riconosciuto dal sistema e che vengano trovate le identità:
sc_auth identities
This should print something like this:
SmartCard: com.apple.pivtoken:<nitrokey serial number>
Unpaired identities:
someId <username> - Zertifikat zur PIV-Authentifizierung (<CN>)
A questo punto, scollegare il Nitrokey e ricollegarlo. Il sistema operativo dovrebbe riconoscere Nitrokey come smartcard PIV e suggerire l’associazione con l’utente attualmente connesso.
Confermare, potrebbe essere necessario inserire il PIN PIV per alcune firme iniziali e potrebbe anche essere necessario inserire la password per consentire l’importazione del certificato PIV nel portachiavi di MacOS.
Verificare che l’identità PIV sia stata accoppiata con l’utente MacOS locale:
sc_auth list
This should print something like this:
Hash: someId
Fatto. Ora dovreste essere in grado di accedere al vostro Mac con Nitrokey utilizzando il PIN PIV.