Closed jacobmorzinski-cmt closed 3 years ago
When I use version 2.0.0 of the onelogin package, my client objects silently fail to get_saml_assertion() and return None.
client
get_saml_assertion()
None
I think there is a bug in onelogin/api/util/urlbuilder.py
get_version_id() has code that directly indexes dict keys. This worked in old python, but does not work in modern python:
get_version_id()
resource = resource_data.keys()[0] resource_values = resource_data.values()[0]
In modern python, a 'dict_keys' object is not subscriptable, and will raise an error.
get_version_id() ought to use list() before trying to call subscripts on the dict keys or values:
list()
resource = list(resource_data.keys())[0] resource_values = list(resource_data.values())[0]
I am experiencing this bug in onelogin-aws-assume-role, which breaks for me when I use it with onelogin==2.0.0. Changing urlbuilder.py as described above fixes the issue for me.
Update: a new version has been released, onelogin==2.0.1, which does wrap the dict_keys objects in list(). This can be closed.
When I use version 2.0.0 of the onelogin package, my
client
objects silently fail toget_saml_assertion()
and returnNone
.I think there is a bug in onelogin/api/util/urlbuilder.py
get_version_id()
has code that directly indexes dict keys. This worked in old python, but does not work in modern python:In modern python, a 'dict_keys' object is not subscriptable, and will raise an error.
get_version_id()
ought to uselist()
before trying to call subscripts on the dict keys or values:I am experiencing this bug in onelogin-aws-assume-role, which breaks for me when I use it with onelogin==2.0.0. Changing urlbuilder.py as described above fixes the issue for me.