-
Notifications
You must be signed in to change notification settings - Fork 91
[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
Conversation
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]>
56190c5
to
db1c3c8
Compare
"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{} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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/...
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 |
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... |
closed in favor of #66 |
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