maws 0.2.0 and newer gives an error with a config format of mas 0.1.1 or earlier
Closed this issue · 2 comments
gdestuynder commented
kang@xps13 ~ % $(maws )
2019-12-10:12:45:35 ERROR [app.py:1890] Exception on /redirect_callback [POST]
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/lib/python3.8/site-packages/mozilla_aws_cli/listener.py", line 177, in handle_oidc_redirect_callback
login.get_role_map()
File "/usr/lib/python3.8/site-packages/mozilla_aws_cli/login.py", line 341, in get_role_map
self.role_map = get_roles_and_aliases(
File "/usr/lib/python3.8/site-packages/mozilla_aws_cli/role_picker.py", line 38, in get_roles_and_aliases
role_map = requests.post(endpoint, headers=headers, json=body).json()
File "/usr/lib/python3.8/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 5 (char 4)
Note: this happens no matter what cli option i use
gene1wood commented
This is likely because you are using a post v0.2.0 version of the tool but are using a pre v0.2.0 ~/.maws/config
setting for idtoken_for_roles_url
(that thing you April and I had talked about in that video call). What value do you have in your ~/.maws/config
file for idtoken_for_roles_url
?
gdestuynder commented
my bad! thx