infoblox-client: Auth regression between 0.4.22 and 0.4.23
After this commit: https://github.com/infobloxopen/infoblox-client/commit/d85e570f6540efcd20c404897101a56c4257876a
I am able to login, but unable to perform write operations.
Example test script:
#!/usr/bin/env python3
from infoblox_client import connector
from infoblox_client import objects
params = {
'host': 'some-hostname',
'username': 'some-username',
'password': 'some-password',
}
record = 'some.domain.example.com'
conn = connector.Connector(params)
existing = objects.ARecord.search(conn, name=record)
if existing:
existing.delete()
objects.ARecord.create(conn, name=record, ip='1.2.3.4', ttl=60)
Traceback:
Traceback (most recent call last):
File "/home/ubuntu/c.py", line 15, in <module>
existing = objects.ARecord.search(conn, name=record)
File "/home/ubuntu/r/infoblox-client/foo/lib/python3.7/site-packages/infoblox_client/objects.py", line 365, in search
connector, **kwargs)
File "/home/ubuntu/r/infoblox-client/foo/lib/python3.7/site-packages/infoblox_client/objects.py", line 359, in _search
max_results=max_results)
File "/home/ubuntu/r/infoblox-client/foo/lib/python3.7/site-packages/infoblox_client/connector.py", line 49, in callee
return func(*args, **kwargs)
File "/home/ubuntu/r/infoblox-client/foo/lib/python3.7/site-packages/infoblox_client/connector.py", line 289, in get_object
extattrs, proxy_flag=True)
File "/home/ubuntu/r/infoblox-client/foo/lib/python3.7/site-packages/infoblox_client/connector.py", line 325, in _handle_get_object
return self._get_object(obj_type, url)
File "/home/ubuntu/r/infoblox-client/foo/lib/python3.7/site-packages/infoblox_client/connector.py", line 336, in _get_object
self._validate_authorized(r)
File "/home/ubuntu/r/infoblox-client/foo/lib/python3.7/site-packages/infoblox_client/connector.py", line 177, in _validate_authorized
raise ib_ex.InfobloxBadWAPICredential(response='')
infoblox_client.exceptions.InfobloxBadWAPICredential: Infoblox IPAM is misconfigured: infoblox_username and infoblox_password are incorrect.
Python 3.7.5rc1
Venv list:
Babel==2.7.0
certifi==2019.9.11
chardet==3.0.4
debtcollector==1.22.0
idna==2.8
infoblox-client==0.4.23
iso8601==0.1.12
msgpack==0.6.2
netaddr==0.7.19
netifaces==0.10.9
oslo.config==6.11.1
oslo.context==2.23.0
oslo.i18n==3.24.0
oslo.log==3.44.1
oslo.serialization==2.29.2
oslo.utils==3.41.2
pbr==5.4.3
pkg-resources==0.0.0
pyinotify==0.9.6
pyparsing==2.4.2
python-dateutil==2.8.0
pytz==2019.3
PyYAML==5.1.2
requests==2.22.0
rfc3986==1.3.2
six==1.12.0
stevedore==1.31.0
urllib3==1.25.6
wrapt==1.11.2
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (4 by maintainers)
I can also confirm, I am experiencing this issue with the latest release.