Skip to content

Commit 73ed735

Browse files
orolhawiondaringer
authored andcommitted
adds documentation for local user logon on macos
1 parent cb799d3 commit 73ed735

File tree

2 files changed

+71
-1
lines changed

2 files changed

+71
-1
lines changed

source/components/nitrokeys/features/piv/guides/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Guides
1010
client_logon_with_active_directory.rst
1111
tls-client-authentication-with-internet-information-services-and-active-directory.rst
1212
tls-client-authentication-with-internet-information-services.rst
13-
13+
local_user_logon_on_macos.rst
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
MacOS Login with local user
2+
==================================
3+
4+
.. product-table:: nk3
5+
6+
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.
7+
8+
Prerequisites
9+
-------------
10+
11+
The following setup was used at the time of writing this guide:
12+
13+
- MacOS 15.6 (Sequoia)
14+
- nitropy 0.10.0
15+
- Nitrokey 3 with PIV smart card.
16+
17+
Configure smartcard logon for local use
18+
------------------------------------------------------------
19+
20+
It is assumed that the PIV applet on the Nitrokey is factory-reset. However, overwriting keys and certs should also work.
21+
22+
It is easier to use ``nitropy nk3 piv`` commands when PIN, PUK and management key are not changed in the first place, because then default values apply. So we assume that you did not change them yet. In case you already did you must provide them where necessary.
23+
24+
1. Generate a key and a certificate in PIV slot 9a:
25+
26+
.. code-block:: bash
27+
28+
nitropy nk3 piv --experimental generate-key --key 9a --algo nistp256 --subject-name "CN=Foo Bar" --subject-alt-name-upn "[email protected]"
29+
30+
2. Generate a key and a certificate in PIV slot 9d:
31+
32+
.. code-block:: bash
33+
34+
nitropy nk3 piv --experimental generate-key --key 9d --algo nistp256 --subject-name "CN=Foo Bar" --subject-alt-name-upn "[email protected]"
35+
36+
3. Verify that the Nitrokey now has certificates in slots 9a and 9d:
37+
38+
.. code-block:: bash
39+
40+
nitropy nk3 piv --experimental list-certificates
41+
42+
4. Verify that the Nitrokey is recognized by the system and that identities are found:
43+
44+
.. code-block:: bash
45+
46+
sc_auth identities
47+
48+
This should print something like this:
49+
50+
::
51+
52+
SmartCard: com.apple.pivtoken:<nitrokey serial number>
53+
Paired identities which are used for authentication:
54+
someId <username> - Zertifikat zur PIV-Authentifizierung (<CN>)
55+
56+
5. Now unplug the Nitrokey and plug it in again. The operating system should recognize the Nitrokey as a PIV smartcard and suggest to pair with the user that is currently logged in.
57+
6. Confirm, you may need to enter the PIV PIN for some initial signing and you may also need to enter you password to allow the PIV certificate to be imported into MacOS keychain.
58+
7. Verify that the PIV identity is successfully paired with the local MacOS user:
59+
60+
.. code-block:: bash
61+
62+
sc_auth list
63+
64+
This should print something like this:
65+
66+
::
67+
68+
Hash: someId
69+
70+
8. Done. You should now be able to log into your Mac with your Nitrokey by using the PIV PIN.

0 commit comments

Comments
 (0)