Skip to content

Commit 26af8af

Browse files
committed
docs: add more docs
1 parent 58aa45e commit 26af8af

3 files changed

Lines changed: 72 additions & 8 deletions

File tree

content/docs/security/yubikey.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ The YubiKey works reliably for everything **outside** of early boot:
1919
- **pam-u2f**: YubiKey touch for `sudo` and GNOME screen unlock
2020

2121

22+
## Yubico Authenticator (OATH/TOTP)
23+
24+
Yubico Authenticator stores TOTP secrets on the YubiKey itself rather than on the device. It requires a smartcard daemon to communicate with the key.
25+
26+
### Install
27+
28+
```bash
29+
sudo pacman -S ccid pcsclite
30+
sudo systemctl enable --now pcscd.socket
31+
```
32+
33+
Then install Yubico Authenticator from Flathub or the CachyOS repository and plug in the YubiKey. The app reads the TOTP credentials directly from the key.
34+
35+
2236
## What Was Attempted: FIDO2 LUKS Unlock
2337

2438
The goal was: plug in YubiKey → touch at boot → LUKS unlocks → desktop. No LUKS password needed.
@@ -124,7 +138,7 @@ account include system-auth
124138
session include system-auth
125139
```
126140

127-
![nano editing /etc/pam.d/sudo with pam_u2f.so configured](/images/yubikey-sudo-config.png)
141+
![nano editing /etc/pam.d/sudo with pam_u2f.so configured](/images/yubikey-sudo-config.avif)
128142

129143
Test without closing the current terminal first:
130144

@@ -133,10 +147,28 @@ sudo echo test
133147
# "Please touch the FIDO authenticator." → touch → done
134148
```
135149

136-
![sudo echo test output showing the YubiKey touch prompt](/images/yubikey-sudo-test.png)
150+
![sudo echo test output showing the YubiKey touch prompt](/images/yubikey-sudo-test.avif)
137151

138152
Without the YubiKey plugged in, it falls through to password as normal.
139153

154+
### Configure graphical sudo (polkit)
155+
156+
GNOME's graphical authentication dialog (shown when changing system settings, printer config, etc.) uses a separate PAM service: `polkit-1`. This file doesn't exist by default on CachyOS, so polkit falls back to password-only.
157+
158+
Create `/etc/pam.d/polkit-1`:
159+
160+
```
161+
#%PAM-1.0
162+
auth sufficient pam_u2f.so cue
163+
auth include system-auth
164+
account include system-auth
165+
session include system-auth
166+
```
167+
168+
The `cue` text prompt does appear in the graphical dialog as well. Touching the YubiKey authenticates without needing to type a password. Without the key plugged in, it falls back to password as usual.
169+
170+
![GNOME polkit dialog showing "Please touch the FIDO authenticator."](/images/yubikey-polkit.avif)
171+
140172
### Configure GNOME lock screen
141173

142174
Edit `/etc/pam.d/gdm-password`:
@@ -153,11 +185,11 @@ session include system-local-login
153185
session optional pam_gnome_keyring.so auto_start
154186
```
155187

156-
![nano editing /etc/pam.d/gdm-password with pam_u2f.so configured](/images/yubikey-gdm-password-config.png)
188+
![nano editing /etc/pam.d/gdm-password with pam_u2f.so configured](/images/yubikey-gdm-password-config.avif)
157189

158190
Lock the screen with `Super+L` and touch the YubiKey to unlock.
159191

160-
![GNOME lock screen showing "Please touch the FIDO authenticator."](/images/yubikey-lockscreen.png)
192+
![GNOME lock screen showing "Please touch the FIDO authenticator."](/images/yubikey-lockscreen.avif)
161193

162194
### How it works
163195

content/docs/security/yubikey.nl.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ De YubiKey werkt betrouwbaar voor alles **buiten** de vroege bootprocessen:
1919
- **pam-u2f**: YubiKey touch voor `sudo` en GNOME-schermvergrendeling
2020

2121

22+
## Yubico Authenticator (OATH/TOTP)
23+
24+
Yubico Authenticator slaat TOTP-geheimen op de YubiKey zelf op in plaats van op het apparaat. Hiervoor is een smartcard-daemon nodig om met de key te communiceren.
25+
26+
### Installatie
27+
28+
```bash
29+
sudo pacman -S ccid pcsclite
30+
sudo systemctl enable --now pcscd.socket
31+
```
32+
33+
Installeer vervolgens Yubico Authenticator via Flathub of de CachyOS-repository en sluit de YubiKey aan. De app leest de TOTP-credentials rechtstreeks van de key.
34+
35+
2236
## Wat Geprobeerd Is: FIDO2 LUKS Ontgrendeling
2337

2438
Het doel was: YubiKey inpluggen → aanraken bij boot → LUKS ontgrendelt → bureaublad. Geen LUKS-wachtwoord nodig.
@@ -124,7 +138,7 @@ account include system-auth
124138
session include system-auth
125139
```
126140

127-
![nano met /etc/pam.d/sudo geconfigureerd voor pam_u2f.so](/images/yubikey-sudo-config.png)
141+
![nano met /etc/pam.d/sudo geconfigureerd voor pam_u2f.so](/images/yubikey-sudo-config.avif)
128142

129143
Test eerst zonder de huidige terminal te sluiten:
130144

@@ -133,10 +147,28 @@ sudo echo test
133147
# "Please touch the FIDO authenticator." → aanraken → klaar
134148
```
135149

136-
![sudo echo test output met de YubiKey touch-prompt](/images/yubikey-sudo-test.png)
150+
![sudo echo test output met de YubiKey touch-prompt](/images/yubikey-sudo-test.avif)
137151

138152
Zonder YubiKey ingeplugd valt het terug op wachtwoord.
139153

154+
### Grafische sudo configureren (polkit)
155+
156+
De grafische authenticatiedialoog van GNOME (verschijnt bij het wijzigen van systeeminstellingen, printerinstellingen, etc.) gebruikt een aparte PAM-service: `polkit-1`. Dit bestand bestaat standaard niet op CachyOS, waardoor polkit terugvalt op wachtwoord-only.
157+
158+
Maak `/etc/pam.d/polkit-1` aan:
159+
160+
```
161+
#%PAM-1.0
162+
auth sufficient pam_u2f.so cue
163+
auth include system-auth
164+
account include system-auth
165+
session include system-auth
166+
```
167+
168+
De `cue` tekstprompt verschijnt ook in de grafische dialoog. De YubiKey aanraken authenticeert zonder wachtwoord te hoeven typen. Zonder YubiKey ingeplugd valt hij terug op wachtwoord.
169+
170+
![GNOME polkit-dialoog met "Please touch the FIDO authenticator."](/images/yubikey-polkit.avif)
171+
140172
### GNOME-schermvergrendeling configureren
141173

142174
Bewerk `/etc/pam.d/gdm-password`:
@@ -153,11 +185,11 @@ session include system-local-login
153185
session optional pam_gnome_keyring.so auto_start
154186
```
155187

156-
![nano met /etc/pam.d/gdm-password geconfigureerd voor pam_u2f.so](/images/yubikey-gdm-password-config.png)
188+
![nano met /etc/pam.d/gdm-password geconfigureerd voor pam_u2f.so](/images/yubikey-gdm-password-config.avif)
157189

158190
Vergrendel het scherm met `Super+L` en raak de YubiKey aan om te ontgrendelen.
159191

160-
![GNOME-vergrendelscherm met "Please touch the FIDO authenticator."](/images/yubikey-lockscreen.png)
192+
![GNOME-vergrendelscherm met "Please touch the FIDO authenticator."](/images/yubikey-lockscreen.avif)
161193

162194
### Hoe het werkt
163195

static/images/yubikey-polkit.png

37.7 KB
Loading

0 commit comments

Comments
 (0)