-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NCBC-1451: ensure SelectBucket is called for every socket w/rbac
Motivation ---------- When RBAC is used with 5.0 and greater clusters, SelectBucket operation must be called on every connection made to the server or an UnknownError will be returned for any K/V operations. This also applies to connections created after bootstrapping - for example in the case that a node is swapped in and the cluster rebalanced. Modifications ------------- In order to make this work, some refactoring/layering of existing code had to be done. Also, some new properties for passing bucketName and the connections state were added. I would consider this a temporary fix and a more elegant solution should be considered in the future. - Added BucketName property to PoolConfiguration so that it can be passed into SelectBucket from the connection - Moved the SelectBucket code from the CCCP provider to the connection level. - Added CheckedForEnhancedAuthentication property to the connection so we can bypass the SelectBucket operation after its been checked. - Added SupportsEnhancedAuthentication property to ConnectionBase and IConnectionPool - Added code to set the SupportsEnhancedAuthentication property in the CTOR of SharedPooledIOService - Override IConnectionPool.Connections in SharedConnectionPool - "Fixed" SSL and RBAC Results ------- When using RBAC SelectBucket is now called on every connection. Change-Id: I76d4a7aca20e2a68974f818a28a0255bcc3b805f Reviewed-on: http://review.couchbase.org/80149 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Mike Goldsmith <goldsmith.mike@gmail.com>
- Loading branch information
1 parent
4b3ef68
commit b7d5aa4
Showing
16 changed files
with
155 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.