-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Support tls-server-name for rustls #1054
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1054 +/- ##
==========================================
- Coverage 72.47% 72.46% -0.01%
==========================================
Files 65 65
Lines 4847 4849 +2
==========================================
+ Hits 3513 3514 +1
- Misses 1334 1335 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial comments, but i like the general approach!
have you tested this with teleport (from the original bug report) or something else where this results in an improvement?
/// If set, apiserver certificate will be validated to contain this string | ||
/// (instead of hostname or IP address from the url). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the Config
option exposed here is now technically only used to signal whether to opt-in to extra rustls behaviour. If i understand correctly it might be worth either:
- pass the
tls_server_name
into whatever is needed on the openssl side - raise an issue to support tls_server_name on openssl (and reference it here)
Do you think that makes sense? I can imagine this property being useful on both tls stacks (outside of the rustls hack), but afaikt it also isn't really needed except to grant more security/strictness in the certificate validation stage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll raise an issue about supporting tls_server_name
after merge so we remember.
I think this is very good now 👍 Have left one doc/issue follow-up suggestion for the property (given it's only actually half-supported), and we should at least document that somewhere. Other than that, if it's updated, and DCO'd etc I'm very happy with this! |
Hey @MikailBag , you ok with rebasing this with |
Signed-off-by: Eirik A <sszynrae@gmail.com>
Signed-off-by: Eirik A <sszynrae@gmail.com>
@MikailBag sorry to keep pinging you, but this should just be missing DCO check, are you able to sync and rebase according to the check so we can get this into the release? |
Going to redo this pr to get some movement on a 0.77 release. |
Replaced by #1104 |
Motivation
Note that this PR currently is in RFC state. It depends on not-yet-released
hyper-rustls
version, and can be splitted into several PRs. Also we may want to make new workaround opt-in instead of opt-out and so on.Partially solves #991 ("partially" because the same thing should be repeated for openssl).
Should improve #1003, as with new workaround
kube-rs+rustls
will work for every control plane (both in-cluster and outside) as long as apiserver certificate containskubernetes.default.svc
SAN. This is less strict assumption thatincluster_dns
does (i.e. we no longer assume thatkubernetes.default.svc
actually resolves to the apiserver IP), and I expect it to hold for the most control plane architectures. And as long as apiserver has at least one DNS SAN entry, it will be possible to connect to such a cluster with manualtls-server-name
modification.Solution
This PR does following partially independent things:
tls-server-name
in config loading.tls-server-name
to rustls if enabled.tls-server-name
tokubernetes.default-svc
if rustls is in use.