-
Notifications
You must be signed in to change notification settings - Fork 342
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
Add TLS support for Pacemaker Remote connections #3759
Conversation
For Pacemaker Remote connections, both ends are daemons and will therefore read the TLS environment variables out of the sysconfig file. However, one end is a client and one end is a server. So using that to decide where to read the variables is not helpful. Instead, just try both locations regardless of which end of the connection we're checking. If the PCMK_ version of a variable isn't set, try the CIB_ version instead.
This fixes a double free that can happen in the Pacemaker Remote code paths but that didn't turn up in the remote CIB testing.
If the right environment variables are set in the sysconfig file, enable TLS certificates on the server side of a Pacemaker Remote node connection. This works exactly like the remote CIB operation support did, except here the remote node is the server and the cluster is the client. Name your certs appropriately. Ref T365
If the right environment variables are set in the sysconfig file, enable TLS certificates on the client (cluster) side of a Pacemaker Remote node connection. Because we have both sync and async versions of everything, this has to be done in two different places. Fix T365
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.
looking good
I think pcmk__new_tls_session()
can now add ANON/PSK only when needed
Move the authorization key settings below the X509 settings to de-emphasize them, and mention the preference for using X509 certificates in the comment block.
If we're not setting up a TLS connection that uses anon credentials, don't add the anon priority. Similarly, only add the PSK priorities if we're setting up a TLS connection that uses PSK credentials.
I think the testing has been sufficient enough to backport this to 3.0 |
- The location of a file containing trusted Certificate Authorities, used to | ||
verify client or server certificates. This file must be in PEM format and | ||
must be readable by Pacemaker daemons (that is, it must allow read permissions | ||
to either the |CRM_DAEMON_USER| user or the |CRM_DAEMON_GROUP| group). |
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.
Is this correct? The controller and executor both run as root, and I don't think any other daemons need access
Tested:
I did not explicitly test expirations or CRLs, but it's the exact same code as on the remote CIB connections and both worked there so I have no reason to think they wouldn't work here.