-
Notifications
You must be signed in to change notification settings - Fork 69
Add watcher for upstreams TLS certificates #716
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
Conversation
4fea880
to
44abbae
Compare
Why only the traces endpoint? Can't we make it available but opt-in to every signal? |
Yes! I will extend this to all endpoints :) |
412c763
to
917d08c
Compare
9d6176f
to
5b99c12
Compare
Signed-off-by: Ruben Vargas <[email protected]>
de6c05e
to
a1957e6
Compare
Signed-off-by: Ruben Vargas <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your work, @rubenvp8510.
This mostly looks good to me, I just have left a few minor comments regarding some documentation in the codebase. With them handled I think we'll be good to merge, imho.
Signed-off-by: Ruben Vargas <[email protected]>
@douglascamata Sorry for the late response. this is ready for review again. Thank you very much! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor things left, imho.
type UpstreamOptions struct { | ||
cert *stdtls.Certificate | ||
ca []byte | ||
certReloader *rbacproxytls.CertReloader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could improve the name here to try to make things easier to understand. *rbacproxytls.CertReloader
is a certificate reloader for the tenants MTLS certs. So maybe UpstreamOptions.certReloader
could be named UpstreamOptions.tenantsCertReloader
.
Without this it makes me wonder: why there is a certReloader
and a caReloader
here? Both are certs! This makes me also confused about the separate startCertReloader
and startCAReloader
.
This brings me to wonder about the name of the struct itself. What is "upstream" in UpstreamOptions
? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why tenantsCertReloader
? I don't see where the tenants are involved here. Upstream means all upstream services for logs/metrics/traces. At least is the terminology that is used in all the gateway. for instance:
File containing the TLS client key to authenticate against upstream logs servers. Leave blank to disable mTLS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Humm, I see. So I got it wrong. Probably we could clarify this. There are many certs everywhere, and reloaders for them, so things are confusing.
Signed-off-by: Ruben Vargas <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR adds a watcher for the certificates so in case of rotation, the certificates will be reloaded.
Added flags to disable/enable this per signal, and in the general server