cevoaustralia / aws-google-auth

Provides AWS STS credentials based on Google Apps SAML SSO auth (what a jumble!)
MIT License
537 stars 181 forks source link

Stopped working circa 4/10/2020 #179

Closed sinkr closed 4 years ago

sinkr commented 4 years ago

Some people get Invalid username or password.

I get:

ERROR:root:'NoneType' object has no attribute 'get' Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aws_google_auth-0.0.34-py3.7.egg/aws_google_auth/__init__.py", line 75, in cli process_auth(args, config) File "/usr/local/lib/python3.7/site-packages/aws_google_auth-0.0.34-py3.7.egg/aws_google_auth/__init__.py", line 222, in process_auth google_client.do_login() File "/usr/local/lib/python3.7/site-packages/aws_google_auth-0.0.34-py3.7.egg/aws_google_auth/google.py", line 235, in do_login passwd_challenge_url = 'https://accounts.google.com' + form.get('action') AttributeError: 'NoneType' object has no attribute 'get'

Passwords are verified correct, I've tried no cache, I've tried adding a new account, and I've tried resetting my Google password all to no avail.

It looks like Google changed something. Let me know how I can help diagnose it.

dgccdna commented 4 years ago

I figured it was different but the other ticket was closed as a duplicate and was hoping I was wrong. Maybe we should reopen it?

My problem only happens with one of my accounts, unfortunately the one with more usage. I don't get captcha prompts, just this Javascript error page. Maybe there's an anti csrf thing missing?

On Fri, May 1, 2020, 10:48 PM Bruno da Silva Valenga < notifications@github.com> wrote:

Hey @dgccdna https://github.com/dgccdna . I don't reckon that problem that you're having is the same that I solved :(( Maybe this step is not cover by the package yet. It's happen because google does changes every time and I was wondering some of could be just a test A/B because is not everyone is getting the same issue with you. Try to debug the code and doing the same steps manually using a Rest API Client like Insomnia or postman.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cevoaustralia/aws-google-auth/issues/179#issuecomment-622673734, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOWARSEOUKRGOM7SH4ZTDO3RPOX3RANCNFSM4MFVUYTA .

mandeep-bal commented 4 years ago

Hey @brunodasilvalenga The pull request work for me initially. However after some time i am getting an error while running any command - An error occurred (ExpiredToken) when calling the ListBuckets operation: The provided token has expired.

Starting aws-google-auth again reset the expiration for another one hour but the commands are still not working and showing the above error.

Looking into .aws i can see config.lock, credentials.lock and saml_cache.lock files along with normal files.

Should i try removing .aws folder?? i have tried using --no-cache option.

jkvgo commented 4 years ago

@brunodasilvalenga's fix worked for me. Here's how you can use it:

git clone https://github.com/brunodasilvalenga/aws-google-auth.git
cd aws-google-auth
git checkout fix-google-captcha
pip install -e . --user

Confirmed this one worked for me. Thanks!

jkvgo commented 4 years ago

Hey @mandeep-bal I also encountered this after my initial token expired. I just went to .aws/config and removed google_config.bg_response = None and it worked. Still monitoring if it will happen once the token expires again. Hope that helps!

riccardofreixo commented 4 years ago

@brunodasilvalenga's PR fixed the problem for us: https://github.com/cevoaustralia/aws-google-auth/issues/179#issuecomment-620612105

sinkr commented 4 years ago

When will @brunodasilvalenga‘s PR get merged?

stevemac007 commented 4 years ago

Merged and released as part of 0.0.36 - hopefully this squashes most of the current pain points.

brunodasilvalenga commented 4 years ago

Awesome! Thanks @stevemac007