Development Info
- Merge Request: https://invent.kde.org/friedreich/plasma-desktop/-/compare/master...work%2Fpinpam?from_project_id=2802 Work in Progress
- Merge Request: https://invent.kde.org/friedreich/kscreenlocker/-/compare/master...work%2Fpinpam?from_project_id=2683 Work in Progress
- Merge Request: https://invent.kde.org/friedreich/plasma-workspace/-/compare/master...work%2Fpinpam?from_project_id=2703 Work in Progress
I’m trying to bring native PIN unlock with auto-submit support to the Plasma Screenlocker, mimicking the experience found on Windows.
The Objective
The goal is to allow users to set a numeric PIN in the “Users” KCM, which can then be used to quickly unlock the desktop using a short PIN but still keeping your strong password as a fallback.
This includes:
- Auto-submit: The lockscreen automatically attempts to unlock once the entered PIN length matches the configured length.
- Numeric Keypad: A dedicated keypad UI on the lockscreen for touch and mouse friendliness.
- TPM 2.0 Integration: If TPM 2.0 is available PINs can be saved using the
pinpamPAM module that interacts with the TPM.
Technical Implementation
The feature consists of multiple components:
- Users KCM (
plasma-workspace): A new section to set/change/remove the PIN. - Screenlocker (
kscreenlocker): New configuration entries forPinEnabledandPinLength. - Lockscreen UI (
plasma-desktop): Porting the Plasma Mobile numeric keypad to the desktop Breeze theme and adding the auto-submit logic.
Backend with pinpam (hardware based)
The backend uses pinpam, a PAM module written in Rust that leverages TPM 2.0 for secret storage and lockout management. Since no official Fedora packages are available, I’ve created a COPR repository for it.
Backend using pam_pinlock (software based)
For systems without a TPM, I’m looking at pam_pinlock. I’ve also made a COPR repository available for Fedora users.
Security & Development Status
[!WARNING] Both of these PAM modules are currently in the early stages of development and may not yet meet the security standards required. There is a strong possibility that we will need to invest more into developing a dedicated, robust PAM module.