Skip to content

base,rpc: move transport handling to rpcContext#50438

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
tbg:rpc-tenant-2
Jun 25, 2020
Merged

base,rpc: move transport handling to rpcContext#50438
craig[bot] merged 2 commits intocockroachdb:masterfrom
tbg:rpc-tenant-2

Conversation

@tbg
Copy link
Copy Markdown
Member

@tbg tbg commented Jun 19, 2020

This commit moves the TLS-related functionaliy that has piled up on
*base.Config onto a dedicated helper that lives in the rpc package.

This isn't perfect yet, but a good step forward - it is now possible to
reason about the certificate names and locations without having to set
up a full CertificateManager, and *base.Config has lost much of the
mutable state it once had and is much closer to being an actual
"config".

Release note: None

@tbg tbg requested review from bdarnell and nvb June 19, 2020 20:07
@tbg tbg requested a review from a team as a code owner June 19, 2020 20:07
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@bdarnell bdarnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 20 of 20 files at r7.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @bdarnell, @nvanbenschoten, and @tbg)


pkg/security/certificate_manager.go, line 265 at r7 (raw file):

// CACertPath returns the expected file path for the CA certificate.
func (cd CertsLocator) CACertPath() string {

s/cd/cl/g

Copy link
Copy Markdown
Contributor

@nvb nvb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r6, 20 of 20 files at r7.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @nvanbenschoten and @tbg)


pkg/rpc/pg.go, line 16 at r7 (raw file):

// LoadSecurityOptions extends a url.Values with SSL settings suitable for
// the given server config. It returns true if and only if the URL

"It returns true"?

@tbg tbg added the A-multitenancy Related to multi-tenancy label Jun 24, 2020
@tbg tbg force-pushed the rpc-tenant-2 branch 2 times, most recently from c1c0966 to 0e8fe31 Compare June 24, 2020 10:29
@tbg tbg requested review from bdarnell and nvb June 24, 2020 10:35
Copy link
Copy Markdown
Member Author

@tbg tbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @bdarnell and @nvanbenschoten)


pkg/security/certificate_manager.go, line 265 at r7 (raw file):

Previously, bdarnell (Ben Darnell) wrote…

s/cd/cl/g

Done.

Copy link
Copy Markdown
Contributor

@nvb nvb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 19 of 19 files at r9.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @bdarnell)

@tbg tbg force-pushed the rpc-tenant-2 branch 3 times, most recently from 2c8714c to a6e4242 Compare June 25, 2020 16:51
tbg added 2 commits June 25, 2020 22:57
We want to move the certificate handlers off *base.Config, onto
*rpc.Context, so this is a good first step.

Release note: None
This commit moves the TLS-related functionaliy that has piled up on
`*base.Config` onto a dedicated helper that lives in the `rpc` package.

This isn't perfect yet, but a good step forward - it is now possible to
reason about the certificate names and locations without having to set
up a full `CertificateManager`, and `*base.Config` has lost much of the
mutable state it once had and is much closer to being an actual
"config".

Release note: None
@tbg
Copy link
Copy Markdown
Member Author

tbg commented Jun 25, 2020

bors r=nvanbenschoten
TFTRs!

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jun 25, 2020

Build succeeded

@craig craig bot merged commit 01f7967 into cockroachdb:master Jun 25, 2020
@tbg tbg deleted the rpc-tenant-2 branch June 26, 2020 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-multitenancy Related to multi-tenancy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants