Bug 488235 - Authentication is unnecessarily/pointlessly required to mount LUKS drive Plasma Desktop
Summary: Authentication is unnecessarily/pointlessly required to mount LUKS drive Plas...
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 6.0.5
Platform: NixOS Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-09 02:40 UTC by m1vri31c
Modified: 2024-06-11 10:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Authentication Pop-up (90.42 KB, image/png)
2024-06-09 02:40 UTC, m1vri31c
Details

Note You need to log in before you can comment on or make changes to this bug.
Description m1vri31c 2024-06-09 02:40:40 UTC
Created attachment 170283 [details]
Authentication Pop-up

SUMMARY
Whenever a luks encrypted drive is plugged in – the ones I've tested have been btrfs – the window pops up to enter your password, the drive is mounted, and then a second window pops up asking for authentication. I always just press cancel because it's already mounted. 

STEPS TO REPRODUCE
1. Format external drive with btrfs and luks
2. Make sure auto-mount settings in Plasma are set to auto-mount that drive
3. Unmount the drive then plug it in

OBSERVED RESULT
Window opens to enter password, the drive is mounted. Then another window pops up asking for authentication to mount the drive – SCREENSHOT ATTACHED.
Whether this is registered as mounted is inconsistent – sometimes it will appear unmounted in the Disks and Devices system tray widget, sometimes it will appear mounted, and Dolphin is similarly inconsistent. Sometimes you will need to click the device in dolphin to "mount" it and no authentication is required. But the drive is mounted and files can be accessed.

EXPECTED RESULT
Window opens to enter password, then drive is mounted, like mounting the drive manually.

SOFTWARE/OS VERSIONS
NixOS 24.11 (unstable channel)
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0 
Qt Version: 6.7.1

ADDITIONAL INFORMATION
Has happened since I started using Plasma 5 on Debian 12 earlier this year (now am using NixOS and still having the issue).
Comment 1 Nate Graham 2024-06-10 18:05:37 UTC
Cannot reproduce on Fedora 40. Perhaps Polkit rules differ between distros here?

Regardless, the fact that the authentication dialog is pointless because the disk was already mounted is probably a bug in our code.
Comment 2 m1vri31c 2024-06-11 10:06:51 UTC
Some more info:

I wondered if it was a problem with my configuration since I was using the same Home folder on Debian and NixOS, so I made a new user, and that user had the same issue. However, that user was unable to manually mount the drive (not an issue I've seen before), even though auto-mount behavior (asking for authentication despite drive being mounted) was the same. When mounting manually, I was able to enter the encryption password, but the drive did not display as mounted in Disks and Devices, and clicking on the drive in Dolphin did not prompt for the password (presumably because I had just entered it when mounting from Disks and Devices), but I could not access the drive.

I format my drives using KDE Partition Manager.