-
Notifications
You must be signed in to change notification settings - Fork 39
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
ansible-scylla-node: Allow the user to use a same certificate for all the nodes #427
ansible-scylla-node: Allow the user to use a same certificate for all the nodes #427
Conversation
…set of nodes If the user provides certificates for at least one node, then the user should either provide certificates for all the other nodes or provide the CA used, otherwise the role would generate its own CA which would of course be different than the one used by the user. The main change in this patch is that now the user is allowed to provide certs for the nodes without having to provide a CA, as long as the certificates are provided for all the nodes.
So far this role allowed the user to provide a parent folder (localhost_cert_path) for the certificates but would always create the certificates and keys in `{{ localhost_cert_path }}/ssl/{{ hostname }}`, with fixed names {{ hostname }}.crt and {{ hostname }}.pem, what prevented us from being able to use a single certificate for all the nodes without having to create a folder for every single node in the cluster with a same crt and key files. With the changes in this patch, the 'localhost_cert_path' will indicate the complete path to the crt file and a variable 'localhost_cert_key_path' was also added, this way the user can save the key in a different path, if necessary. By having a 'localhost_cert_path' which is not a function of '{{ hostname }}', the user will now be able to have a single certificate for the whole cluster. The patch also tries to use the old defaults in the ssl task in case 'localhost_cert_path' and 'localhost_cert_key_path' are not set in ordre to still support clusters that were relying on the old defaults.
so with wildcard certificate support I guess #151 could be closed too |
The issue above is still relevant when we are using certificates generated by this role, but it's out of the scope of the current PR |
7865f0e
to
e7cc31e
Compare
So far we were considering that the CA would always be used as a truststore, but since the CA is not mandatory, this wouldn't always work. From now on, let's have a dedicated file for the truststore and use the CA as truststore only if the CA exists and if a dedicated truststore is not given.
This is necessary since the scylla.yaml.j2 file uses variables '_localhost_cert_path', '_localhost_cert_key_path' and '_truststore_exists', which are defined only in the ssl task.
e7cc31e
to
4445f0a
Compare
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.
thnx for the truststore resolution!
No description provided.