Files
chandra/docs/keyring.md
T

30 lines
1.5 KiB
Markdown

# Keyring unlock
Apps reach the system keychain through `org.freedesktop.secrets` on the session bus.
`chandra-session` uses the per-user systemd bus so it finds the secret service that is already
running there (gnome-keyring or oo7-daemon). It does not unlock anything itself: the login
password is only available while you log in, so unlocking is the login manager's PAM stack's job.
If the keychain stays locked (apps ask for the password, or `keepsecret` shows it locked), the
stack your login manager uses does not hand the password to your secret service. Check which
stack that is: `loginctl show-session <id> -p Service` (for example `plasmalogin`), and look in
`/etc/pam.d/<service>` and `/usr/lib/pam.d/<service>`.
For oo7 (`oo7-daemon`, module `pam_oo7.so`) add, next to the existing keyring lines:
```
-auth optional pam_oo7.so
-password optional pam_oo7.so
-session optional pam_oo7.so auto_start
```
For gnome-keyring the equivalents are `pam_gnome_keyring.so` (`use_authtok` on the password line,
`auto_start` on the session line). Put overrides in `/etc/pam.d`, not `/usr/lib/pam.d`, so package
updates don't replace them. Log in again afterwards; the unlock only happens at login.
Check with: `busctl --user get-property org.freedesktop.secrets
/org/freedesktop/secrets/aliases/default org.freedesktop.Secret.Collection Locked` (`b false`).
Limits: the keyring's password must match the login password, and autologin (no password typed)
can't unlock it.