Versent / saml2aws

CLI tool which enables you to login and retrieve AWS temporary credentials using a SAML IDP
https://github.com/Versent/saml2aws
MIT License
2.08k stars 562 forks source link

Error storing password in keyring on WSL #561

Open agloyd01 opened 4 years ago

agloyd01 commented 4 years ago

I'm trying to run this in the Windows Subsystem for Linux on my Windows laptop. I know I can run this directly on Windows, but I get a different issue, which I may raise here.

The full error is this: error storing password in keychain: No such interface 'org.freedesktop.DBus.Properties' on object at path /

I've tried a lot of things to get dbus working in WSL, including installing the full Ubuntu libraries for the GUI. I've installed gnome-keyring and ran the command /etc/init.d/dbus start to make sure the daemon is running.

Does anybody know if it's possible to get this to work in WSL? If not, I'll give up and either run a full Ubuntu VM or open an issue for the error that I get in Windows.

GoFightNguyen commented 4 years ago

same error, WSL2

paulo-silva commented 4 years ago

same error too 😞

mohelm commented 3 years ago

same here, but i use ubuntu 20.04

annashch-insitro commented 3 years ago

Any updates on this?

brettcrowell commented 3 years ago

In case it helps anyone else, I was able to get around this by setting up X11 forwarding from WSL2 to my Windows machine (in my case, using VcXsrv).

It seems like Ubuntu in WSL2 is relying on the ability to launch a prompt for the keyring (both during initialization and later use) without a fallback to the command line as it used to do.

The Run GUI applications in WSL with X11 Forwarding section of this post describes how to configure VcXsrv.

jmc000 commented 3 years ago

Thanks @brettcrowell ! Indeed WSL is not set for interface, to be able to run the graphical applications for the keyring you need to install an external X server for Windows, like VcXsrv or Xming.

Then launch the Xlaunch app and set parameters: display number:0 on the 1st grid, nothing to change on second grid, with WSL2 all the options of the third grid must be checked

Then in Ubuntu terminal edit .bashrc file and add: export DISPLAY=$(grep -oP "(?<=nameserver ).+" /etc/resolv.conf):0 and export LIBGL_ALWAYS_INDIRECT=1 at the end of the file

1davidmichael commented 3 years ago

This continues to be a problem for me but I have set SAML2AWS_DISABLE_KEYCHAIN in my profile so it completely disables the keychain authentication. Typically my session is set to 8-12 hours which is usually enough for a workday and I only have to type my password in once in the morning.

FeLvi-zzz commented 3 years ago

You can execute EXE file on WSL1/2, so you may want to download and use binary for windows on WSL.

martimors commented 3 years ago

I'm suddenly facing this issue as well. Did anyone find a solution other than disabling keychain?

dsayan154 commented 3 years ago

@dingobar For me, installing vcxsrv on Windows 10 and setting the DISPLAY variable export DISPLAY=$(grep -oP "(?<=nameserver ).+" /etc/resolv.conf):0 works.

KPLauritzen commented 3 years ago

You can execute EXE file on WSL1/2, so you may want to download and use binary for windows on WSL.

I'm doing the same. Using saml2aws.exe, installed on my Windows host. You need ~/.aws symlinked to /mnt/c/Users//.aws because saml2aws.exe will set your credentials for your windows user.