Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
Description
If you use the Admin interface to insert an external user
clusterManager.user_upsert(AuthDomain.External, 'TestExternalUser', None, [('bucket_full_access', 'travel-sample')], 'Test External User') |
It will error out with:
couchbase.exceptions.HTTPError: <Key='/settings/rbac/users/external/SampleExternalUser', RC=0x3B[HTTP Operation failed. Inspect status code for details], HTTP Request failed. Examine 'objextra' for full result, Results=1, C Source=(src/http.c,144), OBJ=HttpResult<rc=0x0, value={u'errors': {u'password': u'Found unsupported key password'}}, http_status=400, url=/settings/rbac/users/external/SampleExternalUser>>
|
When examining the HTTP requests, I see that we are sending the password field as "None" or as "" if I put "" in the call above.
It looks like we do not check if the request is for an external user before putting the password field into the request in here https://github.com/couchbase/couchbase-python-client/blob/2d489573fa15e1998dfe8cc7c53565733f7ec71f/couchbase/admin.py#L410
Another issue that came up is that the "_mk_formstr" function in here https://github.com/couchbase/couchbase-python-client/blob/2d489573fa15e1998dfe8cc7c53565733f7ec71f/couchbase/admin.py#L155
should treat None differently. Looks like it is just converting it to a string and sending it as "None" in the HTTP requests.