-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Use internal server certificate for peering TLS #14796
Conversation
|
0dc9c45
to
2d0f5b6
Compare
0d6d338
to
b15d415
Compare
2d0f5b6
to
39e77e8
Compare
return b.srv.tlsConfigurator.GRPCManualCAPems(), nil | ||
// GetTLSMaterials returns the TLS materials for the dialer to dial the acceptor using TLS. | ||
// It returns the server name to validate, and the CA certificate to validate with. | ||
func (b *PeeringBackend) GetTLSMaterials(generatingToken bool) (string, []string, error) { |
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'm probably missing something, but am not seeing the code for falling back to the manually configured
certs. Where does that happen?
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.
Good catch! We decided to not have that fallback anymore. Since Connect is now required when generating tokens we're just always going to use the internally managed cert.
If someone wants to adjust details about how the CA is managed they can do that by updating the Connect CA config.
I updated the PR description to remove the fallback message.
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.
Awesome, thank you
A previous commit introduced an internally-managed server certificate to use for peering-related purposes. Now the peering token has been updated to match that behavior: - The server name matches the structure of the server cert - The CA PEMs correspond to the Connect CA Note that if Conect is disabled, and by extension the Connect CA, we fall back to the previous behavior of returning the manually configured certs and local server SNI. Several tests were updated to use the gRPC TLS port since they enable Connect by default. This means that the peering token will embed the Connect CA, and the dialer will expect a TLS listener.
By requiring Connect and a gRPC TLS listener we can automatically configure TLS for all peering control-plane traffic.
39e77e8
to
3034df6
Compare
Description
#14485 and #14556 introduced an internally-managed server certificate
to use for peering-related purposes.
Now the peering token has been updated to match that behavior:
Testing & Reproduction steps
PR Checklist