Skip to content

Fix TLS hostname mismatch by honoring tls-server-name and defaulting to rustls#52

Merged
corka149 merged 3 commits into
pytogo:mainfrom
chenyuem:fix/tls-server-name-rustls
Jan 29, 2026
Merged

Fix TLS hostname mismatch by honoring tls-server-name and defaulting to rustls#52
corka149 merged 3 commits into
pytogo:mainfrom
chenyuem:fix/tls-server-name-rustls

Conversation

@chenyuem

@chenyuem chenyuem commented Jan 27, 2026

Copy link
Copy Markdown
Contributor
  • Summary: Fix TLS hostname mismatch on clusters that require kubeconfig tls-server-name (e.g., AKS private link).
  • Root cause: kube-rs’ OpenSSL backend does not honor tls_server_name, causing hostname verification to fail.
  • Changes:
    • Default to rustls.
    • Enable kube/ring so rustls works without a crypto-provider panic.
    • Explicitly propagate tls-server-name into the resolved client config when missing.
  • Validation: cargo build --release passes locally.

@chenyuem

Copy link
Copy Markdown
Contributor Author

@corka149 I had to touch the workflow to matrix different TLS implementation for different platform. Please feel free to push back if you've got concerns. Thanks!

@corka149 corka149 self-requested a review January 27, 2026 18:03

@corka149 corka149 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.

Looks good to me. @chenyuem thank you for your contribution. 🙂

@corka149 corka149 merged commit 8a8c3c6 into pytogo:main Jan 29, 2026
17 checks passed
@chenyuem

Copy link
Copy Markdown
Contributor Author

Thank you so much for the quick review @corka149 !

@corka149

Copy link
Copy Markdown
Contributor

Version 0.7.6 was released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants