2016-03-01 22:18:26 |
Brad Pokorny |
description |
When using PKI, there are certain cases the user.Token constructor is called with the default __init__ value of None. The _is_pki_token passes None for the token on to the Keystone client, and an unexpected error occurs:
2016-02-25 00:35:38.979840 Failed to create user from domain scoped token.
If the token is None, we know it's not pki and should not make an extra call to the Keystone client to check. |
When using PKI, there are certain cases the user.Token constructor is called with the default __init__ value of None. The _is_pki_token passes None for the token on to the Keystone client, and an unexpected error occurs:
File "/home/dmhorizon/django_openstack_auth/openstack_auth/user.py", line 94, in __init__
if self._is_pki_token(self.unscoped_token):
File "/home/dmhorizon/django_openstack_auth/openstack_auth/user.py", line 120, in _is_pki_token
return (keystone_cms.is_ans1_token(token)
File "/home/dmhorizon/django_openstack_auth/.tox/py27/local/lib/python2.7/site-packages/debtcollector/removals.py", line 242, in wrapper
return f(*args, **kwargs)
File "/home/dmhorizon/django_openstack_auth/.tox/py27/local/lib/python2.7/site-packages/keystoneclient/common/cms.py", line 314, in is_ans1_token
return is_asn1_token(token)
File "/home/dmhorizon/django_openstack_auth/.tox/py27/local/lib/python2.7/site-packages/keystoneclient/common/cms.py", line 303, in is_asn1_token
return token[:3] == PKI_ASN1_PREFIX
TypeError: 'NoneType' object has no attribute '__getitem__'
If the token is None, we know it's not pki and should not make an extra call to the Keystone client to check. |
|