-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Support tls-server-name field from kubeconfig for SNI #4402
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1 similar comment
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@copilot rebase this PR to pick up the automated changes |
|
@copilot can you try rebasing again? Thanks |
I've successfully rebased the PR on the latest master (commit bc72931). All merge conflicts have been resolved (updated fields to use |
Implement support for
tls-server-namefield from kubeconfiggetTlsServerName()method toKubeConfigclass to read the field from cluster configurationtlsServerNamefield and setter toApiClientclassApiClient.applySslSettings()to use customHostnameVerifierwhentlsServerNameis setClientBuilder.kubeconfig()to passtlsServerNametoApiClientSummary
This PR adds support for the
tls-server-namefield from kubeconfig files, which is used to specify an alternative hostname for TLS certificate verification. This is needed when the server's certificate CN/SAN doesn't match the URL hostname (common with Teleport and other proxy services).Implementation Details:
getTlsServerName()to read the fieldHostnameVerifierthat verifies against the specified TLS server name (usingprotectedvisibility to match updated codebase)How it works:
When a kubeconfig contains
tls-server-name, the client will verify the server's certificate against that name instead of the hostname in the URL. The implementation uses OkHttp's built-in hostname verifier but substitutes the configured TLS server name.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.