Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't save credentials with flatpak and KDE6 #707

Open
Erfboom opened this issue Mar 18, 2024 · 10 comments
Open

Can't save credentials with flatpak and KDE6 #707

Erfboom opened this issue Mar 18, 2024 · 10 comments

Comments

@Erfboom
Copy link

Erfboom commented Mar 18, 2024

I've read on here that the flatpak version of Pithos is supposed to save credentials to ~/.var/app/io.github.Pithos/data/keyrings/, however, regardless if I open Pithos using flatpak --system or flatpak --user, I type in the password and it won't save to that directory.

Using Flatseal I then try to give it talk permissions to org.freedesktop.secrets, but that seems to be depreciated(?) as the flatpak is not supposed to talk to anything outside of its immediate directory as a proper sandbox.

Using the native application built for Opensuse, the same issue occurs. I have gnome-keyring (seahorse), alongside kwallet6, which I understand is the preferred keyring manager. I open up seahorse, unlock the existing wallet with the existing Pithos credentials, try Pithos again, no dice.

I then disabled the KDEWallet system altogether thinking there might be a problem with both gnome and kde, but still no go.

Not sure where to go from here to have either application be able to access the passwords that already existed in the system. I updated my DE from kde5 to kde6 and with it the wallet, so maybe that has something to do with it?

@Erfboom
Copy link
Author

Erfboom commented Mar 18, 2024

Might be my wallet system is busted. I'll close this once I confirm.

@Erfboom Erfboom changed the title Can't save credentials with flatpak and native build using KDE6 Can't save credentials with flatpak and KDE6 Mar 18, 2024
@Erfboom
Copy link
Author

Erfboom commented Mar 18, 2024

Updating my system and doing a reboot fixed the native application not being able to access KWallet. However, the flatpak version remains the same.

@TingPing
Copy link
Member

Unfortunately xdg-desktop-portal depends on gnome-keyring.

KWallet could in theory implement org.freedesktop.impl.portal.Secret but it doesn't currently.

@TingPing
Copy link
Member

Using Flatseal I then try to give it talk permissions to org.freedesktop.secrets, but that seems to be depreciated(?) as the flatpak is not supposed to talk to anything outside of its immediate directory as a proper sandbox.

Adding this permission should bypass the portal and work fine. It is insecure but... oh well.

@Erfboom
Copy link
Author

Erfboom commented Mar 18, 2024 via email

@Erfboom
Copy link
Author

Erfboom commented Apr 22, 2024

Found a fix here: #696

  1. Download seahorse
  2. Create a new Keyring and call it login
  3. Close out of seahorse
  4. Re-open it, unlock the keyring
  5. Open Pithos and enter your credentials.

You should now see the passwords be entered into seahorse successfully. I chose default blowfish encryption.

Not sure if Pithos is expecting something that doesn't exist, or if the keyring in seahorse is incompatible with pithos until it's recreated.

I should note this is with the flatpak version which is now updated to 1.6.2. The credentials broke with the native app despite having previously worked a few days ago, so something in KDE was updated and is not making Pithos happy.

The fix mentioned above worked for the flatpak version.

@Erfboom Erfboom closed this as completed Apr 22, 2024
@Erfboom
Copy link
Author

Erfboom commented Apr 23, 2024

the above fix will indeed fix the pithos password issue, but it will then break everything else. kdewallet disappears when you create a new keyring. everything else needs kdewallet, pithos needs login.

upon reboot, kdewallet will remake itself after you unlock the wallet and the keyring login will disappear.

@Erfboom Erfboom reopened this Apr 23, 2024
@TingPing
Copy link
Member

Not sure if Pithos is expecting something that doesn't exist, or if the keyring in seahorse is incompatible with pithos until it's recreated.

FWIW Pithos isn't really doing anything unique. This is all handled by the libsecret library/gnome-keyring daemon.

@Erfboom
Copy link
Author

Erfboom commented Apr 29, 2024 via email

@TingPing
Copy link
Member

TingPing commented May 1, 2024

Up until recently, the distribution package could make a password, but now
it can't create nor read the KDE wallet even if it's unlocked.

AFAICT KDE 5.97.0 added org.freedesktop.secrets support to KWallet. So that is likely what introduced this issue.

Whether the bug is in KWallet or libsecret I cannot say.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants