Skip to content

Allow more control of TLS versions & ciphers#7617

Merged
rickbrouwer merged 1 commit intokedacore:mainfrom
joelsmith:kedamain
Apr 23, 2026
Merged

Allow more control of TLS versions & ciphers#7617
rickbrouwer merged 1 commit intokedacore:mainfrom
joelsmith:kedamain

Conversation

@joelsmith
Copy link
Copy Markdown
Contributor

@joelsmith joelsmith commented Apr 7, 2026

Add 2 new env vars KEDA_HTTP_TLS_CIPHER_LIST and KEDA_SERVICE_TLS_CIPHER_LIST to
provide fine-grained control to restrict the cipher suites used by the webhook and gRPC
servers as well as TLS clients in the scalers. Also add KEDA_SERVICE_MIN_TLS_VERSION
to mirror the behovior of KEDA_HTTP_MIN_TLS_VERSION for the gRPC server and webhooks server.

Checklist

@joelsmith joelsmith requested a review from a team as a code owner April 7, 2026 21:27
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

Thank you for your contribution! 🙏

Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected.

While you are waiting, make sure to:

  • Add an entry in our changelog in alphabetical order and link related issue
  • Update the documentation, if needed
  • Add unit & e2e tests for your changes
  • GitHub checks are passing
  • Is the DCO check failing? Here is how you can fix DCO issues

Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient.

Learn more about our contribution guide.

@keda-automation keda-automation requested a review from a team April 7, 2026 21:27
@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented Apr 7, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@joelsmith
Copy link
Copy Markdown
Contributor Author

joelsmith commented Apr 8, 2026

@JorTurFer @zroubalik could one or both of you PTAL? I'm not sure what you'll think of the dichotomy in the PR of HTTP TLS settings and HTTP Service TLS settings. The docs have always said that KEDA_HTTP_MIN_TLS_VERSION is about the scalers making TLS connections, but we were using it for the webhook as well, so my thoughts here were to make one set of settings for the scalers to use as clients and one for the KEDA services (webhook, gRPC) which falls back to the other one if not specified.

Not sure if I have enough privs to kick off E2Es, but I'll try.
/run-e2e external

@rickbrouwer
Copy link
Copy Markdown
Member

rickbrouwer commented Apr 8, 2026

/run-e2e external
Update: You can check the progress here

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds configurable TLS cipher suite lists and a configurable minimum TLS version for the gRPC server, extending existing TLS hardening controls used by the webhook/HTTP path and TLS clients.

Changes:

  • Add parsing/support for KEDA_HTTP_TLS_CIPHER_LIST (and expose it via CreateTLSClientConfig + webhook TLS opts).
  • Add gRPC server support for KEDA_GRPC_MIN_TLS_VERSION and KEDA_GRPC_TLS_CIPHER_LIST.
  • Add unit tests for TLS version parsing and cipher list parsing; update changelog.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/util/tls_config.go Adds cipher list parsing + exported getters; refactors TLS version parsing.
pkg/util/tls_config_test.go Updates min TLS version tests and adds cipher list parsing tests.
pkg/metricsservice/utils/tls.go Makes gRPC TLS config respect env-configured min TLS version + cipher list.
cmd/webhooks/main.go Applies configured cipher list to webhook TLS server config.
CHANGELOG.md Adds entry for new TLS controls (but includes a malformed/duplicate line).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/util/tls_config.go Outdated
Comment thread pkg/util/tls_config.go
Comment thread pkg/metricsservice/utils/tls.go Outdated
Comment thread CHANGELOG.md Outdated
@joelsmith joelsmith force-pushed the kedamain branch 4 times, most recently from 430c73a to 3f19f32 Compare April 13, 2026 18:34
@rickbrouwer
Copy link
Copy Markdown
Member

Typo: GetSerivceTLSCipherList --> GetServiceTLSCipherList

@joelsmith
Copy link
Copy Markdown
Contributor Author

Typo: GetSerivceTLSCipherList --> GetServiceTLSCipherList

Good catch, thanks!

@wozniakjan
Copy link
Copy Markdown
Member

wozniakjan commented Apr 22, 2026

/run-e2e internal
Update: You can check the progress here

@wozniakjan wozniakjan added the Awaiting/2nd-approval This PR needs one more approval review label Apr 22, 2026
@wozniakjan wozniakjan mentioned this pull request Apr 22, 2026
22 tasks
Comment thread pkg/util/tls_config.go
@rickbrouwer rickbrouwer added the waiting-author-response All PR's or Issues where we are waiting for a response from the author label Apr 22, 2026
@rickbrouwer rickbrouwer removed the Awaiting/2nd-approval This PR needs one more approval review label Apr 22, 2026
Add 2 new env vars KEDA_HTTP_TLS_CIPHER_LIST and KEDA_SERVICE_TLS_CIPHER_LIST to
provide fine-grained control to restrict the cipher suites used by the webhook and gRPC
servers as well as TLS clients in the scalers. Also add KEDA_SERVICE_MIN_TLS_VERSION
to mirror the behovior of KEDA_HTTP_MIN_TLS_VERSION for the gRPC server.

Signed-off-by: Joel Smith <joelsmith@redhat.com>
@keda-automation keda-automation requested a review from a team April 22, 2026 19:46
@rickbrouwer
Copy link
Copy Markdown
Member

rickbrouwer commented Apr 23, 2026

/run-e2e internal
Update: You can check the progress here

@rickbrouwer rickbrouwer removed the waiting-author-response All PR's or Issues where we are waiting for a response from the author label Apr 23, 2026
@rickbrouwer rickbrouwer merged commit b74c1cb into kedacore:main Apr 23, 2026
25 checks passed
Abhicodeitout pushed a commit to Abhicodeitout/keda that referenced this pull request May 1, 2026
Add 2 new env vars KEDA_HTTP_TLS_CIPHER_LIST and KEDA_SERVICE_TLS_CIPHER_LIST to
provide fine-grained control to restrict the cipher suites used by the webhook and gRPC
servers as well as TLS clients in the scalers. Also add KEDA_SERVICE_MIN_TLS_VERSION
to mirror the behovior of KEDA_HTTP_MIN_TLS_VERSION for the gRPC server.

Signed-off-by: Joel Smith <joelsmith@redhat.com>
Abhicodeitout pushed a commit to Abhicodeitout/keda that referenced this pull request May 1, 2026
Add 2 new env vars KEDA_HTTP_TLS_CIPHER_LIST and KEDA_SERVICE_TLS_CIPHER_LIST to
provide fine-grained control to restrict the cipher suites used by the webhook and gRPC
servers as well as TLS clients in the scalers. Also add KEDA_SERVICE_MIN_TLS_VERSION
to mirror the behovior of KEDA_HTTP_MIN_TLS_VERSION for the gRPC server.

Signed-off-by: Joel Smith <joelsmith@redhat.com>
Signed-off-by: Abhishek Kumar Kushwaha <abhithegabbar@gmail.com>
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.

5 participants