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

emacs eterm configure: failed to input configuration: error selecting provider file: bad input #400

Closed
xee5ch opened this issue Jan 14, 2020 · 8 comments · Fixed by #576
Closed

Comments

@xee5ch
Copy link

xee5ch commented Jan 14, 2020

Similar to #341, I get the following error with saml2aws configure -a test in emacs with eterm and multi-term shell emulator, I get the following error the moment I press the up/down buttons to select the IdP type.

$ saml2aws configure -a test
? Please choose a provider:  [Use arrows to move, type to filter]
❯ ADFS
  ADFS2
  Akamai
  AzureAD
  F5APM
  GoogleApps
  JumpCloud
failed to input configuration: error selecting provider file: bad input
@wolfeidau
Copy link
Contributor

I need to see if this is caused by the library I am using for term input. Would you mind testing one of their examples?

https://github.com/AlecAivazis/survey/tree/v1.8.7

Cheers

@ErgaBerga
Copy link

ErgaBerga commented Feb 4, 2020

@wolfeidau I'm getting the same error on Linux Mint 19.3 Tricia (based on Ubuntu 18.04.3 LTS).

When I run 'saml2aws configure' and press enter on ADFS I get "failed to input configuration: error selecting provider file: bad input". I assume this is the same issue as listed above.

$ saml2aws configure
? Please choose a provider: ### pressed enter here on default ADFS
failed to input configuration: error selecting provider file: bad input

I found a workaround that if I hold the down arrow and loop around the list and then hit enter on ADFS it works. I have to press the down arrow multiple times on each prompt to get through the UI.

I have run the requested examples from https://github.com/AlecAivazis/survey/tree/v1.8.7 as below:

$ sudo apt-get install git golang-go
$ go get gopkg.in/AlecAivazis/survey.v1
$ cd ~/go/src/gopkg.in/AlecAivazis/survey.v1/

$ go run examples/simple.go
? What is your name? Go Run Examples/Validation.Go
? Choose a color: red
Go Run Examples/Validation.Go chose red.
$ go run examples/validation.go
? What is your name? Blah
X Sorry, your reply was invalid: You entered not foo, not 'foo'.
? Enter 'foo': foo
$ go run examples/longlist.go
? Choose a letter: a
you chose a. ###--- Note this appears to be the same list UI and pressing enter on the default works fine here.

I can reproduce the error by moving my ~/.saml2aws file out of the way and rerunning saml2aws configure. Having an empty file there also causes the error.

$ mv ~/.saml2aws ~/tmp/
$ saml2aws configure
? Please choose a provider: ###pressed enter here
failed to input configuration: error selecting provider file: bad input
$ mv ~/tmp/.saml2aws ~/
$ saml2aws configure ###pressed enter ~6 times
? Please choose a provider: ADFS
? Please choose an MFA Auto
? AWS Profile saml
? URL ###myurl prefilled here
? Username ###myuser prefilled here
? Password
No password supplied

account {
URL: ###myurl posted here
Username: ###myuser posted here
Provider: ADFS
MFA: Auto
SkipVerify: false
AmazonWebservicesURN: urn:amazon:webservices
SessionDuration: 3600
Profile: saml
RoleARN:
}

Configuration saved for IDP account: default

@w13k
Copy link

w13k commented Mar 24, 2020

I have the same issue on my MacBook running on Catalina, zsh and saml2aws version 2.24.0. I've tried the workaround from @ErgaBerga and it worked. But still not the best situation.

@stobias123
Copy link

also seeing this on osx+zsh

@aditya-mittal
Copy link

Have noticed this on MacOs Mojave, zsh and saml2aws version 2.27.0. Trying the work-around suggested by @ErgaBerga worked for me.

@str3tch
Copy link

str3tch commented Nov 9, 2020

Yep this tool does not work for me on Mac, Catalina and zsh

▶ saml2aws configure
? Please choose a provider:
failed to input configuration: error selecting provider file: bad input
                                                                                                                             
▶ saml2aws configure
? Please choose a provider: ADFS2
? Please choose an MFA
failed to input configuration: error selecting mfa: bad input
                                                                                                                                
Projects/Code                                                                                                                                     
▶ saml2aws configure
? Please choose a provider: ADFS
? Please choose an MFA
failed to input configuration: error selecting mfa: bad input

@jpedro
Copy link

jpedro commented Nov 19, 2020

I created a trash profile using GoogleApps and some random username and password. After that I configured it properly with the correct ADFS and it just worked. I'm guessing the 1st configure created the files correctly.

Commands and output:

$ saml2aws configure
? Please choose a provider: GoogleApps
? AWS Profile saml
? URL wergh
? Username asdfgh
? Password ******
? Confirm ******
account {
  URL: wergh
  Username: asdfgh
  Provider: GoogleApps
  MFA: Auto
  SkipVerify: false
  AmazonWebservicesURN: urn:amazon:webservices
  SessionDuration: 3600
  Profile: saml
  RoleARN:
  Region:
}
Configuration saved for IDP account: default

$ saml2aws configure
? Please choose a provider: ADFS
? Please choose an MFA Auto
? AWS Profile saml
? URL https://az2sts.REDACTED.com/adfs/ls/IdpInitiatedSignon.aspx
? Username user.name@REDACTED.com
? Password *****************
? Confirm *****************
account {
  URL: https://az2sts.REDACTED.com/adfs/ls/IdpInitiatedSignon.aspx
  Username: user.name@REDACTED.com
  Provider: ADFS
  MFA: Auto
  SkipVerify: false
  AmazonWebservicesURN: urn:amazon:webservices
  SessionDuration: 3600
  Profile: saml
  RoleARN:
  Region:
}
Configuration saved for IDP account: default

@pizeyt
Copy link

pizeyt commented Feb 16, 2021

Using Windows 10 and git-bash:

$ saml2aws --version
2.28.0
$ saml2aws configure
? Please choose a provider: [Use arrows to move, type to filter]

ADFS
ADFS2
Akamai
AzureAD
F5APM
GoogleApps
JumpCloud
failed to input configuration: error selecting provider file: bad input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants