kedacore / http-add-on

Add-on for KEDA to scale HTTP workloads
https://kedacore.github.io/http-add-on/
Apache License 2.0
373 stars 97 forks source link

feat: support setting multiple TLS certs for different domains on the interceptor proxy #1116

Closed wozniakjan closed 3 months ago

wozniakjan commented 3 months ago

https://github.com/kedacore/http-add-on/pull/928 added rudimentary support for interceptor data path TLS. A major limitation is that it allows only a single cert/key pair, meaning that user must have all their domains as SANs in this single cert. In Kubernetes, this is rarely the case. Frequently each Ingress has a dedicated cert.

This PR adds a new ENV variable KEDA_HTTP_PROXY_TLS_CERT_STORE_PATHS where users can define a comma-separated list of directories that will be recursively searched for any valid cert/key pairs. Currently, two naming patterns are supported

The matching between certs and requests is performed during the TLS ClientHello message, where the SNI service name is compared to SANs provided in each cert and the first matching cert will be used for the rest of the TLS handshake.

Checklist