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.07k stars 562 forks source link

saml2aws cygwin #260

Closed schittam closed 5 months ago

schittam commented 5 years ago

I am trying saml2aws from cygwin on my windows 7 and unable to configure or login. I get this error. It shows the providers but unable to select.

$ DUMP_CONTENT=true saml2aws configure --verbose time="2018-12-27T09:44:49-05:00" level=debug msg=Running command=configure ? Please choose a provider: [Use arrows to move, type to filter] ❯ ADFS ADFS2 GoogleApps JumpCloud KeyCloak Okta OneLogin bad input error selecting provider file github.com/versent/saml2aws.PromptForConfigurationDetails c:/gopath/src/github.com/versent/saml2aws/input.go:22 github.com/versent/saml2aws/cmd/saml2aws/commands.Configure c:/gopath/src/github.com/versent/saml2aws/cmd/saml2aws/commands/configure.go:40 main.main c:/gopath/src/github.com/versent/saml2aws/cmd/saml2aws/main.go:132 runtime.main C:/go/src/runtime/proc.go:201 runtime.goexit C:/go/src/runtime/asm_amd64.s:1333 failed to input configuration github.com/versent/saml2aws/cmd/saml2aws/commands.Configure c:/gopath/src/github.com/versent/saml2aws/cmd/saml2aws/commands/configure.go:42 main.main c:/gopath/src/github.com/versent/saml2aws/cmd/saml2aws/main.go:132 runtime.main C:/go/src/runtime/proc.go:201 runtime.goexit C:/go/src/runtime/asm_amd64.s:1333

opusmagnum commented 4 years ago

I have the same problem in Cygwin under Windows 10. This place in code looks suspicious for me -- https://github.com/Versent/saml2aws/blob/5a77b954d807b758e9315b1a83d4a453aa10e733/pkg/provider/http.go#L65 According to go-isatty code example -- https://github.com/mattn/go-isatty#usage -- there is a difference between IsTerminal and isCygwinTerminal. In this case the following code block in http.go will not run in Cygwin.