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

Question: Possible running secret-service in WSL2 #4254

Closed
ryan-dyer opened this issue Jul 1, 2019 · 4 comments
Closed

Question: Possible running secret-service in WSL2 #4254

ryan-dyer opened this issue Jul 1, 2019 · 4 comments

Comments

@ryan-dyer
Copy link

Please use the following bug reporting template to help produce issues which are actionable and reproducible, including all command-line steps necessary to induce the failure condition. Please fill out all the fields! Issues with missing or incomplete issue templates will be closed.

If you have a feature request, please post to the UserVoice.

If this is a console issue (a problem with layout, rendering, colors, etc.), please post to the console issue tracker.

Important: Do not open GitHub issues for Windows crashes (BSODs) or security issues. Please direct all Windows crashes and security issues to secure@microsoft.com. Ideally, please configure your machine to capture minidumps, repro the issue, and send the minidump from "C:\Windows\minidump".

Please fill out the below information:

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Microsoft Windows [Version 10.0.18922.1000]

  • What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
    Attempting to get gnome-keyring working in WSL2.
    Running:
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.2 LTS
    Release: 18.04
    Codename: bionic
    I have installed dbus, libsecret-1.0, libsecret-tools, and gnome-keyring.
    Specifically I am trying:

 secret-tool store --label=test key value
Password:
** Message: 12:19:21.107: Remote error from secret service: org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.Secret.Collection' on object at path /org/freedesktop/secrets/collection/login
secret-tool: No such interface 'org.freedesktop.Secret.Collection' on object at path /org/freedesktop/secrets/collection/login

See our contributing instructions for assistance.

@therealkenc
Copy link
Collaborator

therealkenc commented Jul 1, 2019

The usual dbus session goodness that is normally in place with a common Ubuntu graphical install with xdm/gdm/lightdm (or similar) isn't in place with a (typical) WSL setup. You've also have no systemd-logind alive.

Your question is basically this reddit.

I made an effort to prove that answer wrong (it is) but too lazy on a Canada Day to take it to completion. Including as far as I got here for posterity so I don't lose it. Maybe someone highly motivated will iterate.

Other way to go is get systemd running (ref #994) and fire up xrdp. After logging into the session, you'll almost certainly get a nice pretty credentials popup out of secret-tool, because gnome-keyring-daemon will be living in its happy place.

Calling defeat for the day on a CLI solution tho. Bonne chance.

@oryandunn
Copy link

@therealkenc thanks for taking a shot at this. I tried following along with your solution, but ran into one issue after another, and I don't have the knowledge base to make it further than you did.

My frustrations follow.. I'm not sure why we need all that just to store a password securely. For now, I think my script will just have to prompt each time for the password. It was curious to me why plain text netrc files were a thing, and they unfortunately make some sense given the state of things...

From all the research I've done, this seems to be an issue with using secret-tool on any headless Linux system (but I could be wrong). If that's the case, it's quite shocking that a command line only solution for something as basic as credential storage doesn't exist. I also tried using the python3 keyring module, but that had it's own issues, and I suspect it'd ultimately boil down to the same errors that secret-tool runs into, since the python keyring uses the same secret service api.

@therealkenc
Copy link
Collaborator

this seems to be an issue with using secret-tool on any headless Linux system (but I could be wrong)

Ref this (although it is pretty stale circa 2015). It would take a drill-down into libsecret to figure out what it would take.

@therealkenc
Copy link
Collaborator

Calling defeat for the day on a CLI solution tho. Bonne chance.

The OP scenario works out of the box with WSLg. It would be a pretty deep rabbit hole to get a text-based (tty) keyring password prompt set up. I am sure it can be done; people probably do it with cloud scenarios. Punt getting that much working on WSL to discussion as it is a userspace thing. There wasn't a WSL actionable on this one, notwithstanding feature-request GUI solution gnome-keyring. If you fire up Firefox (or similar) you get the same sort of keyring prompt.

image

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

3 participants