Skip to content

[RFC] add kwalled (kde) backend and use it if available #52

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

Closed
wants to merge 1 commit into from

Conversation

bearsh
Copy link

@bearsh bearsh commented Dec 17, 2020

the kwallet (kde) backend communicates through dbus with the kwalletd.
it is modeled after the qtkeychain implementation [1].
like qtkeychain, the keyring backend tries to get the kwallet's
'networkWallet' if this fails the 'secret service' is used as before.
kwallet is tried first as the 'secrets service' may exists on systems
running kde but it's very unlikely kwallet is running on non kde
systems.

[1] https://github.com/frankosterfeld/qtkeychain

the kwallet (kde) backend communicates through dbus with the kwalletd.
it is modeled after the qtkeychain implementation [1].
like qtkeychain, the keyring backend tries to get the kwallet's
'networkWallet' if this fails the 'secret service' is used as before.
kwallet is tried first as the 'secrets service' may exists on systems
running kde but it's very unlikely kwallet is running on non kde
systems.

[1] https://github.com/frankosterfeld/qtkeychain

Signed-off-by: Martin Gysel <[email protected]>
"github.com/godbus/dbus"
"github.com/zalando/go-keyring/secret_service"
kw "github.com/zalando/go-keyring/kwallet"
ss "github.com/zalando/go-keyring/secret_service"
)

type secretServiceProvider struct{}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather add a member typ, which defaults to the current one and can be set to "kwallet" or something like that.
Then you can check in methods of secretServiceProvider, without changing the default as you do right now.

A step further would be to create an interface and separate both types: secretServiceProvider and kwalletProvider.
I think this is the preffered way.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to understand you correctly, the detection of the actual backend should not be done each time a Get/Set/Delete method is called? but still automatically?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes not every time in Get/Set/...

@SoMuchForSubtlety
Copy link

Hi, is this PR still being worked on? If not I could take over if that's OK for you.

I recently switched to this library from https://github.com/99designs/keyring due to macOS issues, and KWalled support is the only thing I'm missing.1

Footnotes

  1. https://github.com/SoMuchForSubtlety/f1viewer/issues/193

@bearsh
Copy link
Author

bearsh commented Nov 6, 2021

Hi, is this PR still being worked on? If not I could take over if that's OK for you.

Sure just do it 😄 (In the past I though I would probaly need to lib for a project but it turned out to be wrong, so I lost my motivation.)

Let me know once you've opened a new PR so I can close this one...

@bearsh
Copy link
Author

bearsh commented Nov 7, 2021

closed in favor of #66

@bearsh bearsh closed this Nov 7, 2021
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

Successfully merging this pull request may close these issues.

3 participants