DESCRIPTION

JVMCBC-394 Add support for username/password auth in support of RBAC

Motivation
----------
Allow rbac user/password authentication support.

Changes
-------
1. Memcached connection negotiation also includes select_bucket command
for rbac users. Added additional handler for this in KeyValueEndpoint.
2. Internal protected apis (in Service and EnpointFactory classes) are broken
to includeusername.
3. Public interfaces (in Requests and Endpoint classes) are retained by
adding an additional overload with username.
4. Connection string allows username to be set.
5. Bucket configs additionally store username.

Results
-------
Requests to core-io can now include username. Specific rbac tests are covered in
java-client as current tests inherently test the changes.

Change-Id: Iaead9cffa9e40c2924f963a5958f3ba1518ffa65


COMMENTS

author: Marques Ellis
date: 2017-03-24 06:20:04.972000000

Uploaded patch set 17.

-------------------------------------
author: Marques Ellis
date: 2017-03-24 06:30:39.726000000

Patch Set 17: Verified+1

-------------------------------------
author: Natasha Sullivan
date: 2017-03-24 16:43:04.944000000

Patch Set 17: Code-Review-1

(8 comments)

Line:27, src/main/java/com/couchbase/client/core/config/loader/Loader.java -> maybe deprecate?

Line:99, src/main/java/com/couchbase/client/core/endpoint/ServerFeatures.java -> just for fun - do we know what 0x07 is? :D .. and 0x02...

Line:46, src/main/java/com/couchbase/client/core/config/refresher/Refresher.java -> maybe deprecate?

Line:143, src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueSelectBucketHandler.java -> could be omitted if the handler is only added on demand (see other comment)

Line:105, src/test/java/com/couchbase/client/core/utils/ConnectionStringTest.java -> can you add some assertion to other tests that show username is null in those cases?

Line:71, src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueEndpoint.java -> I wonder if we should handle this handler like the others, the feature handler dynamically adds them to the pipeline if the feature is negotiated? then you'd also save the check on the user event

Line:86, src/main/java/com/couchbase/client/core/config/refresher/AbstractRefresher.java -> can't this method just call the other overload?

Line:148, src/main/java/com/couchbase/client/core/config/refresher/AbstractRefresher.java -> private final probably?

-------------------------------------
author: Marques Ellis
date: 2017-03-24 20:37:17.782000000

Patch Set 17:

(5 comments)

Line:27, src/main/java/com/couchbase/client/core/config/loader/Loader.java -> yes

Line:99, src/main/java/com/couchbase/client/core/endpoint/ServerFeatures.java -> 2 - TLS, 7 - XERROR

Line:46, src/main/java/com/couchbase/client/core/config/refresher/Refresher.java -> yes

Line:105, src/test/java/com/couchbase/client/core/utils/ConnectionStringTest.java -> yes

Line:86, src/main/java/com/couchbase/client/core/config/refresher/AbstractRefresher.java -> yes

-------------------------------------
