pam: flexible authenticator support
rework the internals of the pam support to facilitiate more flexible backends. this should be backwards compatible for the time being as only internals change.
it's largely straight forward. instead of having an interactive / noninteractive split we now have an active / fingerprint split (for the purposes of public PamAuthenticators API they map 1:1). both new types are mutable which allows us to switch between different active configurations (pam, face, u2f, smartcard ...) or disable the fingerprint entirely.
the way this works from a UX perspective is that the user can select the type of authentication they want to use and then we'll switch the relevant authenticator in as active. this means the new authenticator takes over the prompting and stuff, allowing us to very flexibly add more type configuration even when they require prompting because we only ever have one active type. this gets augmented by the fingerprint handling which may be active on any number of types as secondary log in option. this is for convenience more than anything.
because we now switch authenticators at will that means we also need them to cancel! pam_fprint has basic support for this by handling SIGINT. we double down on this by actively sending SIGINT when cancelling an authenticator.
to assist with visualizing this a new PAMAuthenticatorModel is being introduced which describes the available authenticators for visualization
Requirements
- this mr
- plasma-workspace!6542 (merged)
- plasma-desktop!3689 (merged)
- for fingerprint: (pam_)fprint
- for smartcard: enrolled smart card cert
- for face: (pam_)howdy
- for u2f: pam_u2f for yubikey and friends
Testing
Create ~/.config/kscreenlockerrc with
[Authenticators]
Smartcard=true
Fingerprint=true
Face=true
Universal2Factor=trueCopy /etc/pam.d/kde-smartcard to kde-face and kde-u2f
Replace the pam_pkcs11.so rule in kde-face with:
-auth required pam_howdy.soReplace the pam_pkcs11.so rule in kde-u2f with:
-auth required pam_u2f.so cuePart of kde-linux/kde-linux#665