Skip to content

xds: implement requireClientCertificate semantics #6948

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

Merged
merged 4 commits into from
Apr 21, 2020

Conversation

sanjaypujare
Copy link
Contributor

No description provided.

@sanjaypujare sanjaypujare requested a review from creamsoup April 20, 2020 17:15
protected void setClientAuthValues(
SslContextBuilder sslContextBuilder, CertificateValidationContext localCertValidationContext)
throws CertificateException, IOException, CertStoreException {
checkState(server);
Copy link
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
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
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
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

Copy link
Contributor

@creamsoup creamsoup left a comment

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