Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBG-738: Support use of cacert without certpath/keypath for DCP bootstrap #4538

Merged
merged 1 commit into from Mar 20, 2020

Conversation

sarathkumarsivan
Copy link
Contributor

During DCP setup, SG/cbdatasource makes an initial bucket connection, then opens the DCP streams. The initial bucket connection only specifies the cacert if an x.509 cert is also specified (certpath/keypath). If a certpath isn't specified, the cacert isn't provided, and InsecureSkipVerify is set to true. However, the subsequent 'open stream' requests use the cacert and set InsecureSkipVerify=false, even if certpath/keypath isn't specified. The initial bootstrap should be fixed to use the same approach and change needs to be applied at the below three places:

  1. While creating CBGT index definitions for the specified buckets
    createCBGTIndex: https://github.com/couchbase/sync_gateway/blob/master/base/dcp_sharded.go#L129

  2. While starting the DCP feed
    StartDCPFeed: https://github.com/couchbase/sync_gateway/blob/master/base/dcp_receiver.go#L285
    StartCbgtCbdatasourceFeed: https://github.com/couchbase/sync_gateway/blob/master/base/dcp_dest.go#L446

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 61.845% when pulling 023b521 on CBG-738 into 962ff96 on master.

@adamcfraser adamcfraser merged commit 8ed74f7 into master Mar 20, 2020
@adamcfraser adamcfraser deleted the CBG-738 branch March 20, 2020 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants