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

aws-google-auth is failing on ubuntu 20.04.4 LTS #249

Closed shiremathatuptycs closed 2 years ago

shiremathatuptycs commented 2 years ago

Python 3.8.10 aws-google-auth 0.0.37 aws-cli/2.5.5 Python/3.9.11 Linux/5.14.0-1032-oem exe/x86_64.ubuntu.20 prompt/off

Ubuntu version

Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal

/:~/.docker$ aws-google-auth -p uptycs-dev -k -l debug INFO:root:aws_google_auth: SAML cache not found Google Password: DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.google.com:443 DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /o/saml2/initsso?idpid=C03mzkxd1&spid=683304850450&forceauthn=false HTTP/1.1" 302 0 DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/saml2/initsso?idpid%3DC03mzkxd1%26spid%3D683304850450%26forceauthn%3Dfalse%26from_login%3D1%26as%3DLL2km7c_YKSLXWKwPVyoECAM6NkAIWYKvKqpO0o_smc&followup=https://accounts.google.com/o/saml2/initsso?idpid%3DC03mzkxd1%26spid%3D683304850450%26forceauthn%3Dfalse%26from_login%3D1%26as%3DLL2km7c_YKSLXWKwPVyoECAM6NkAIWYKvKqpO0o_smc&ltmpl=popup&oauth=1&faa=1&sarp=1&scc=1 HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 200 None Please visit the following URL to view your CAPTCHA: https://accounts.google.com/Captcha?v=2&ctoken=AAWk9lSpNaIfAYylusLYFpGU8zgeQZrNhFowcF5wZQCC5oLs-Lojr_swgkDT44uB9NRZRwc7xJ9Dxz_iXcYuUVeaizW0ap9IBHm-QcqM_8OgMKsRj4PFQEqhgvTAdTKoplmhSVDSvwCZG6GEl2Mjzk4VZJXDBI2DJPp-vx0GMZqfAPYzhbrEvXamLG2mt9iz_Efh8VS3osx9 Captcha (case insensitive): loingenors DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 302 245 DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /signin/rejected?rrk=88&hl=en-GB HTTP/1.1" 200 None ERROR:root:'NoneType' object has no attribute 'find_all' Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/aws_google_auth/init.py", line 79, in cli process_auth(args, config) File "/usr/local/lib/python3.8/dist-packages/aws_google_auth/init.py", line 243, in process_auth google_client.do_login() File "/usr/local/lib/python3.8/dist-packages/aws_google_auth/google.py", line 291, in do_login sess = self.handle_captcha(sess, payload) File "/usr/local/lib/python3.8/dist-packages/aws_google_auth/google.py", line 432, in handle_captcha for tag in form.find_all('input'): AttributeError: 'NoneType' object has no attribute 'find_all'

ezeqme commented 2 years ago

Python 3.8.10 aws-google-auth 0.0.37 aws-cli/2.5.5 Python/3.9.11 Linux/5.14.0-1032-oem exe/x86_64.ubuntu.20 prompt/off

Ubuntu version

Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal

/:~/.docker$ aws-google-auth -p uptycs-dev -k -l debug INFO:root:aws_google_auth: SAML cache not found Google Password: DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.google.com:443 DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /o/saml2/initsso?idpid=C03mzkxd1&spid=683304850450&forceauthn=false HTTP/1.1" 302 0 DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/saml2/initsso?idpid%3DC03mzkxd1%26spid%3D683304850450%26forceauthn%3Dfalse%26from_login%3D1%26as%3DLL2km7c_YKSLXWKwPVyoECAM6NkAIWYKvKqpO0o_smc&followup=https://accounts.google.com/o/saml2/initsso?idpid%3DC03mzkxd1%26spid%3D683304850450%26forceauthn%3Dfalse%26from_login%3D1%26as%3DLL2km7c_YKSLXWKwPVyoECAM6NkAIWYKvKqpO0o_smc&ltmpl=popup&oauth=1&faa=1&sarp=1&scc=1 HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 200 None Please visit the following URL to view your CAPTCHA: https://accounts.google.com/Captcha?v=2&ctoken=AAWk9lSpNaIfAYylusLYFpGU8zgeQZrNhFowcF5wZQCC5oLs-Lojr_swgkDT44uB9NRZRwc7xJ9Dxz_iXcYuUVeaizW0ap9IBHm-QcqM_8OgMKsRj4PFQEqhgvTAdTKoplmhSVDSvwCZG6GEl2Mjzk4VZJXDBI2DJPp-vx0GMZqfAPYzhbrEvXamLG2mt9iz_Efh8VS3osx9 Captcha (case insensitive): loingenors DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 302 245 DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /signin/rejected?rrk=88&hl=en-GB HTTP/1.1" 200 None ERROR:root:'NoneType' object has no attribute 'find_all' Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/aws_google_auth/init.py", line 79, in cli process_auth(args, config) File "/usr/local/lib/python3.8/dist-packages/aws_google_auth/init.py", line 243, in process_auth google_client.do_login() File "/usr/local/lib/python3.8/dist-packages/aws_google_auth/google.py", line 291, in do_login sess = self.handle_captcha(sess, payload) File "/usr/local/lib/python3.8/dist-packages/aws_google_auth/google.py", line 432, in handle_captcha for tag in form.find_all('input'): AttributeError: 'NoneType' object has no attribute 'find_all'

See the solution presented at https://github.com/cevoaustralia/aws-google-auth/issues/248, seems to be the same issue.

stevemac007 commented 2 years ago

Resolved with release https://github.com/cevoaustralia/aws-google-auth/releases/tag/0.0.38