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

Version 0.3.9 returns no roles #50

Closed
quixand opened this issue Aug 1, 2017 · 6 comments
Closed

Version 0.3.9 returns no roles #50

quixand opened this issue Aug 1, 2017 · 6 comments
Labels

Comments

@quixand
Copy link

quixand commented Aug 1, 2017

Hi
ive just installed on a clean debian 9 stretch (vm) install and got the following (some credentials redacted)

$ aws-adfs login --adfs-host myhost.com --profile dev --provider-id urn:amazon:mastersec
2017-08-01 17:17:19,690 [authenticator authenticator.py:authenticate] [16827-MainProcess] [139637160490752-MainThread] - ERROR: Cannot extract saml assertion. Second factor authentication failed?
Username: username
Password:
This account does not have access to any roles

$ aws-adfs --version
0.3.9
$ pip --version
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
$ python --version
Python 2.7.13

So I rolled back with

$ pip install -I aws-adfs==0.3.3
Collecting aws-adfs==0.3.3
...

$ aws-adfs login --adfs-host myhost.com --profile dev --provider-id urn:amazon:mastersec
Please choose the role you would like to assume:

which seemed to fix it. I saw bug #44 I'm guessing its related
thanks

@venth
Copy link
Owner

venth commented Aug 2, 2017

Please check if you have AWS_PROFILE enviromental variable set. If it's set then unset it. If it's feasible perform also: aws-adfs reset --profile=default

Then please repeat the login attempt.

@quixand
Copy link
Author

quixand commented Aug 2, 2017

ok

$ pip install --upgrade aws-adfs
/home/quixand/.local/bin/aws-adfs --version
0.3.9

$ /home/quixand/.local/bin/aws-adfs login --adfs-host myhost.com --profile dev --provider-id urn:amazon:mastersec
This account does not have access to any roles

$ env|grep -i AWS_PROFILE
$

$ /home/quixand/.local/bin/aws-adfs reset --profile=default
Profile: 'default' has been wiped out

$ /home/quixand/.local/bin/aws-adfs login --adfs-host myhost.com --profile dev --provider-id urn:amazon:mastersec
This account does not have access to any roles

rolled it back

$ pip install -I aws-adfs==0.3.3
...
$ /home/nick/.local/bin/aws-adfs --version
0.3.3

$ /home/quixand/.local/bin/aws-adfs login --adfs-host myhost.com --profile dev --provider-id urn:amazon:mastersec
Please choose the role you would like to assume:

thanks for your help with this
nick

@venth
Copy link
Owner

venth commented Aug 3, 2017

Hi, I noticed that in the posted code you use binary from /home/quixand and /home/nick

Is it a typo? Does any hint given by me helped you fix the issue?

@quixand
Copy link
Author

quixand commented Aug 3, 2017

no that was just a failure of my obfuscation find and replace
the real path is /home/nick/.local/bin/aws-adfs.

I discovered this problem because I installed it for the first time on my mac (v10.12.6) and had the same issue, I thought I had done something wrong so installed on a fresh copy of debian stretch in virtualbox and got the same problem. That was when I suspected a bug and came looking here.

@venth venth added the bug label Aug 3, 2017
@venth
Copy link
Owner

venth commented Aug 13, 2017

Hi @quixand,

in order to reproduce the issue, I used the docker container built on the top of Debian stretch version. Relevant files you can find here: Dockerfile and docker-compose.yml

I brought up aws-adfs by command: docker-compose run --rm aws-adfs and login via adfs. Unfortunately (or fortunately), I was able to see all roles assigned to the account.

If I could ask you to help me with investigation of the issue, please use docker description provided by me via gist and after docker-compose run --rm aws-adfs try to login via aws-adfs.

@venth
Copy link
Owner

venth commented Nov 19, 2017

This issue is already solved. The solving commit is: 2178cf5

@venth venth closed this as completed Nov 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants