Skip to content
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

feat: Use self-signed certs for TLS (between components and between k8s and KEDA) #4091

Merged
merged 12 commits into from
Jan 12, 2023

Conversation

JorTurFer
Copy link
Member

@JorTurFer JorTurFer commented Jan 11, 2023

Signed-off-by: Jorge Turrado [email protected]

This PR adds support for using TLS between KEDA components with client authentication,not just for encrypting the traffic, the client MUST authenticate itself using its own certificate. This reduces the risk of exposing metrics ignoring the cluster RBAC (if the operator grpc server doesn't have authentication, everyone could connect to it and get metric values, ignoring the cluster RBAC required for querying the metrics server).
This PR also register the injected certificates in the metrics server and exposes the tls cert instead of self-generating it on every restart. Now using the injected certificate (from our self-signed cert), we can (and we do) patch the apiservice manifest to include the caBundle, removing insecureSkipTLSVerify and trusting in the CA

Checklist

Fixes #3931

Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
@JorTurFer JorTurFer requested a review from a team as a code owner January 11, 2023 23:09
@JorTurFer
Copy link
Member Author

JorTurFer commented Jan 11, 2023

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

Signed-off-by: Jorge Turrado <[email protected]>
@JorTurFer
Copy link
Member Author

JorTurFer commented Jan 11, 2023

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

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

Looking really great, just a few nits

cmd/adapter/main.go Outdated Show resolved Hide resolved
pkg/certificates/certificate_manager.go Outdated Show resolved Hide resolved
@JorTurFer
Copy link
Member Author

JorTurFer commented Jan 12, 2023

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

@JorTurFer JorTurFer enabled auto-merge (squash) January 12, 2023 11:46
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

Great work!

@JorTurFer JorTurFer merged commit 83aff92 into kedacore:main Jan 12, 2023
@JorTurFer JorTurFer deleted the use-certs branch January 12, 2023 15:07
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.

Encrypted communication between gRPC Server & Clients
2 participants