MacOS ローカルユーザーでのログイン¶
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.
前提条件¶
The following setup was used at the time of writing this guide:
MacOS 15.6(セコイア)
nitropy 0.10.0
Nitrokey 3 with PIV smart card, firmware version 1.8.1
Configure smartcard logon for local use¶
ニトロキーの PIV アプレットは工場出荷時にリセットされているものと仮定する。しかし、鍵や証明書の上書きも機能するはずである。
PIN、PUK、管理キーが最初に変更されていない場合は、nitropy nk3 piv
コマンドを使用する方が簡単です。デフォルト値が適用されるからです。なぜなら、デフォルト値が適用されるからです。すでに変更している場合は、必要な箇所を指定してください。
Generate a key and a certificate in PIV slot 9a:
ニトロピ 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:
ニトロピ nk3 piv --experimental generate-key --key 9d --algo nistp256 --subject-name "CN=Foo Bar" --subject-alt-name-upn "foo@bar.com"
ニトロキーのスロット9aと9dに証明書があることを確認する:
ニトロピ nk3 piv --実験リスト-証明書
ニトロキーがシステムに認識され、IDが見つかることを確認する:
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>)
ニトロキーを抜いて、もう一度差し込んでください。オペレーティングシステムはニトロキーをPIVスマートカードとして認識し、現在ログインしているユーザーとのペアリングを提案するはずです。
また、PIV証明書をMacOSキーチェーンにインポートするためのパスワードを入力する必要がある場合もあります。
PIV ID がローカルの MacOS ユーザと正常にペアリングされていることを確認する:
sc_auth list
This should print something like this:
Hash: someId
完了です。これで、PIV PINを使用してニトロキーでMacにログインできるようになります。