save-failure-html always gives TypeError
See original GitHub issueI always get this when trying to use the --save-failure-html
argument:
$ aws-google-auth --role-arn arn:aws:iam::666666666:role/sso/sso-xxxxxxxx --duration 43200 --profile xx-xxxx --keyring --save-failure-html
Failed to import U2F libraries, U2F login unavailable. Other methods can still continue.
Open the Google App, and tap 'Yes' on the prompt to sign in ...
SAML lookup failed, storing failure page to 'saml.html' to assist with debugging.
Traceback (most recent call last):
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/google.py", line 284, in parse_saml
saml_element = parsed.find('input', {'name': 'SAMLResponse'}).get('value')
AttributeError: 'NoneType' object has no attribute 'get'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/max.williams/Library/Python/3.6/bin/aws-google-auth", line 11, in <module>
sys.exit(main())
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/__init__.py", line 232, in main
cli(cli_args)
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/__init__.py", line 66, in cli
process_auth(args, config)
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/__init__.py", line 192, in process_auth
saml_xml = google_client.parse_saml()
File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/google.py", line 290, in parse_saml
out.write(self.session_state.text.encode('utf-8'))
TypeError: write() argument must be str, not bytes
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
The aws-google-auth from cevoaustralia - Coder Social Home
Provides AWS STS credentials based on Google Apps SAML SSO auth (what a jumble!) ... --save-failure-html Write HTML failure responses to file for ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Merging the fix to master - it looks like it was a defect with python3 and the save flag fix.
This was fixed. Thanks @stevemac007!