Skip to content

xds: implement requireClientCertificate semantics - #6948

Merged
sanjaypujare merged 4 commits into
grpc:masterfrom
sanjaypujare:xds-client-auth-mode
Apr 21, 2020
Merged

xds: implement requireClientCertificate semantics#6948
sanjaypujare merged 4 commits into
grpc:masterfrom
sanjaypujare:xds-client-auth-mode

Conversation

@sanjaypujare

Copy link
Copy Markdown
Contributor

No description provided.

@sanjaypujare
sanjaypujare requested a review from creamsoup April 20, 2020 17:15
Comment thread xds/src/main/java/io/grpc/xds/internal/sds/SslContextProvider.java Outdated
protected void setClientAuthValues(
SslContextBuilder sslContextBuilder, CertificateValidationContext localCertValidationContext)
throws CertificateException, IOException, CertStoreException {
checkState(server);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: should have a meaningful message.
btw, this class is rather confusing (and errorprone). it should be split into 2 different classes (server and client). can it be done? how hard to change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We had this discussion before. UpstreamTlsContext and DownstreamTlsContext are quite similar but there is no common abstraction to use. So I ended up using the generic K to eliminate code duplication. Splitting into server & client classes is definitely possible but I suspect there will be code duplication. Do you have better ideas?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah i thought we discussed this before.
i think code dup is better than error prone / confusing nature of current structure. we can still share some code as static or protected in parent method.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay I will add a TODO for this suggestion and in the list of pending PRs

@creamsoup creamsoup left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one nit otherwise LGTM.

@sanjaypujare
sanjaypujare merged commit a649737 into grpc:master Apr 21, 2020
@sanjaypujare
sanjaypujare deleted the xds-client-auth-mode branch April 21, 2020 00:04
dfawley pushed a commit to dfawley/grpc-java that referenced this pull request Jan 15, 2021
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants