mate-desktop / mate-polkit

Authentication Agent for PolicyKit and MATE
https://mate-desktop.org
Other
14 stars 14 forks source link

Confusing "Authenticate" button when using pam_u2f #64

Open WhyNotHugo opened 3 years ago

WhyNotHugo commented 3 years ago

Description

I'm using mate-polkit as my polkit agent. I have it set up to work with my Yubikey using pam_u2f.

So when I'm prompted to authorise, I have to tap my yubikey and that all works fine. There's no password-typing involved.

Actual behaviour

The prompt that I get has an "Authenticate" button, which does nothing when clicked and is a bit confusing (even though I know it does nothing, sometimes I click it instead of tapping my yubikey :man_facepalming:

image

Expected behaviour

When not requesting a password, the "Authenticate" button should not be present; only "Cancel" makes sense here.

Steps to reproduce the behaviour

You'll need to configure pam_u2f. This is my /etc/pam.d/polkit-1:

#%PAM-1.0

auth       sufficient   pam_u2f.so authfile=/etc/u2f_mappings
auth       include      system-auth
account    include      system-auth
password   include      system-auth
session    include      system-auth

If you don't have a key plugged in, the popup still shows but closes right away. So you can at least get a glimpse of the issue without a Yubikey.

I'm also not sure why it won't ask for a password when there's no key present though, that should suffice and it's what sudo does.

Package version

mate-polkit 1.26.0

Linux Distribution

ArchLinux

phisch commented 3 months ago

I do get asked for a password when there is no key present. But I'd like the authenticate button to be hidden when it is asking for confirmation through the security key.

Edit: I'm not sure if this is mate specific, or just generally polkit related.