You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An auth module for what lets someone in without a password: sudo's password, the SSH keys in the agent, polkit's admin actions and the keyring. Everything is forgotten once the screen locks, by default, with Mochi's lock, hyprlock started by the power module, or anything logind locks. SSH keys and the keyring can be kept 1, 4 or 8 hours from when they were entered, a lock or not, or until logging out; sudo and polkit for their own timeout. It's off until "auth" is added to modules, like the lock screen, since it takes over the session's password prompts. A lock screen set up with 0.2.1 forgets them on locking only once "auth" is added.
Admin passwords on the island: the auth module is the session's polkit agent, so when pkexec, systemctl, run0 or an app needs an admin action, the island asks, saying which program asks and why, with a choice of user when several may allow it. polkit's own helper checks the password. Only one agent answers a session: the home-manager module's polkitAgent.enable turns off hyprpolkitagent; polkit = false in [module.auth] leaves polkit to another agent.
The keyring's passwords on the island: Mochi is gnome-keyring's prompter, in place of GNOME's gcr-prompter, for unlocking a keyring, a new keyring's password and the SSH key passphrases gcr's agent asks for. The password goes back encrypted with gcr's key exchange. keyring = false in [module.auth] leaves them to gcr-prompter.
mochi-askpass asks on the island for sudo -A and ssh, as SUDO_ASKPASS and SSH_ASKPASS, which the home-manager module's askpass.enable sets. Both options are off by default. For an SSH key's passphrase, the prompt picks how long the key stays in the agent: until locked, 1, 4 or 8 hours, or until logout. ssh's yes or no questions and notices, like touching a security key, show as such.
Security
Only the island answers a password prompt or a yes or no question. Another program of the user's can't answer one with mochi ipc auth answer, even one that connects to mochid as the UI.
What the prompts can't stop: any program of the user's can run mochi-askpass, or ask for a keyring password over the session bus, and gets what's typed in. Every askpass and gcr-prompter work this way too. Mochi's askpass prompt names the program, as the kernel says it, and warns when it runs from a folder the user can write to, didn't go through mochi-askpass, exited before the prompt showed, or its answer could reach another program; a root one has to be sudo asking with -A. Mochi checks again before the answer goes out, and keeps it if anything changed. Its command line is the program's own to set; its name isn't. Keyring prompts don't say who asks yet. See the auth module.
Changed
0.2.1's forget_* settings in [module.lock] are remember_* in [module.auth] now. A config that still has them starts, and the lock module warns about them.