How to automatically mount an encrypted drive when attached

I use an several encrypted usb drives to share and backup my personal data. Some are encrypted with bitlocker and some with luks. In my workflow I typically attach them at runtime.

Ideally, I would like the partitions to be both, unlocked and mounted at my dedicated mount point without any password or passphrase interaction.

This is what I tired so far:

  1. A rather dangerous approach assembles some passwords and commands in some script. Properly protecting the script from unwanted access and granting NOSUDO access would yield a one-click-solution for mounting the drive (and all it’s partitions). This works fine, but is generally not recommended to my understanding.

  2. Employing /etc/crypttab in order to detect the partitions by UUID would do the unlocking part:
    mobi_usb PARTUUID=47119ece-19e8-423c-add4-20af5e57f527 /etc/cryptsetup-keys.d/mobi-bitlocker.key bitlk,nofail

    A counterpart /etc/fstab entry:
    mobi_usb /mnt/org/mobi auto nosuid,nodev,nofail,x-systemd.automount 0 0

    should do the second part, but does not seem to run. Hence, my partition wants to be mounted automatically at /run/media/<user>/<partition>and requires user password interaction in order to be mounted there.

  3. Controlling unlocking and mounting completely from KDE Plasma would require checking the respective encrypted volumes in the settings under ”Device Auto-mount”. This magically also looks at the /etc/fstab entry above and mounts the partition to the dedicated location. But the user would be prompted for the passphrase on each attach, though it’s value is pre-filled from kwallet.

    Long story short: How can I achieve this without password/ passphrase interaction and of course without clicking?

Can’t edit my post….

Update for 2)

If I set the fstab entry to /dev/mapper/mobi_usb /mnt/org/mobi auto users,nosuid,nodev,nofail,x-systemd.automount 0 0 this would unlock and correctly mount the partition to the dediacted target mount point. My bad, sorry. However, in this case I encounter issues when trying to unmount with dolphin. The file browser would simply freeze. No unmount possible from desktop environment. Maybe some fstab options wrong/missing?

Finally, I’d highly appreciate an configuration approach purely from desktop environment. Is this possible:

  1. auto unlock at attach
  2. automount to dedicated mount point
  3. no password/passphrase/click
  4. no fiddling with fstab/crypttab