feat: add --tls-min-version flag to proxy server#820
Conversation
|
Welcome @tesshuflower! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tesshuflower 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 |
|
Hi @tesshuflower. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
/ok-to-test |
af4f871 to
3c59e63
Compare
|
Can you rebase on the latest? |
Co-authored-by: xuezhaojun <xuezhaokeepgoing@gmail.com>
3c59e63 to
1a8c0d0
Compare
Sure thing, done! |
This was originally opened as #815 but I think got closed mistakenly - reopening
Summary
--tls-min-versionflag to the proxy server, allowing dynamic configuration of the minimum TLS versiongetTLSConfig()VersionTLS10,VersionTLS11,VersionTLS12,VersionTLS13(defaults toVersionTLS12when not specified, maintaining backward compatibility)Motivation
The proxy server currently hardcodes
tls.VersionTLS12as the minimum TLS version. This makes it impossible for operators to enforce stricter TLS policies (e.g., TLS 1.3 only) or to align with platform-wide TLS security profiles. Adding this flag allows the minimum TLS version to be configured at startup, similar to the existing--cipher-suitesflag.Changes
pkg/util/net.goTLSVersionsmap andGetTLSVersion()helper functioncmd/server/app/options/options.goTLSMinVersionfield,--tls-min-versionflag, validation, and printcmd/server/app/server.gogetTLSConfig()to accept and use dynamic TLS min versioncmd/server/app/options/options_test.goTest plan
TestDefaultServerOptionspasses — verifiesTLSMinVersiondefaults to""TestValidatepasses — coversVersionTLS12,VersionTLS13, and invalid version🤖 Generated with Claude Code