Description
Temp fix for: MB-16964
Note that QueryRequest.AddCredentials will not work until MB-16964 is resolved. This fix will use the credentials passed into Cluster.OpenBucket(user, pass) as the N1QL query credentials, adding them to the HTTP header, and sent the server.
- If the bucket name in the query does not match the the bucket that was opened and auth'd, then the query will failed with "Authorization Failed"
- If you try to use QueryRequest.AddCredentials, you will receive "creds has to be of type array of
{ user, pass }
"
Once MB-16964 is released as a server fix, AddCredentials will work for all versions of the server in which the fix applies-for server versions 4.0.0, etc this work around will apply.
Attachments
For Gerrit Dashboard: NCBC-1039 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
57474,2 | NCBC-1039: Force QueryClient to use HTTP Auth for N1QL queries | master | couchbase-net-client | Status: MERGED | +2 | +1 |
57820,5 | NCBC-1039: Part 2 - Force QueryClient to use HTTP Auth for N1QL queries | master | couchbase-net-client | Status: MERGED | +2 | +1 |