You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix proxysql-ca.pem leaking key of intermediate CA - #2797
The playbook secret-store-generate-internal-tls.yml has been creating proxysql-ca.pem by copying OS-TLS-INT.pem. This file contains key of intermediate CA, resulting leaking the key to controller hosts if ProxySQL is enabled.
Fixed by changing the source to OS-TLS-INT.crt which only has the certificate of intermediate CA.
Added playbook and documentation for rotating intermediate CA issuer.
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
Walkthrough
The ProxySQL CA copy task now reads OS-TLS-INT.crt. A new playbook disables the OS-TLS-INT engine on the seed and controllers, then imports secret-store deployment playbooks. The configuration guide and release note describe rotation and certificate regeneration.
Changes: Intermediate CA handling
Layer / File(s)
Summary
ProxySQL CA source and release note etc/kayobe/ansible/secret-store/secret-store-generate-internal-tls.yml, releasenotes/notes/fix-proxysql-ca-leaking-int-ca-key-1582ce565a584ef3.yaml
The ProxySQL CA copy task uses OS-TLS-INT.crt as its source. The release note describes the reported intermediate CA key leak and the rotation and certificate-regeneration steps.
Issuer rotation playbook and instructions etc/kayobe/ansible/secret-store/secret-store-rotate-intermediate-issuer.yml, doc/source/configuration/openbao.rst
The playbook disables the OS-TLS-INT engine on the seed and controllers, then imports the seed and overcloud deployment playbooks. The guide describes issuer rotation, re-encrypting OS-TLS-INT.pem, and regenerating and deploying TLS certificates.
sequenceDiagram
participant Rotation as Rotation playbook
participant Seed as Seed OpenBao
participant Controllers as Controller OpenBao
participant Deployment as Secret-store deployment playbooks
Rotation->>Seed: Disable OS-TLS-INT using the root token
Rotation->>Controllers: Disable OS-TLS-INT using the root token
Rotation->>Deployment: Import seed and overcloud deployment playbooks
Loading
Merge Risk: Moderate · previous review a8e0a
The change stops new deployments from copying the intermediate CA key to controllers. The suggested remediation for existing systems does not clearly remove trust in the exposed key, and the rotation instructions can leave the regenerated key unencrypted for some layouts. Tighten the release note and documentation before merging.
Pre-merge checks: 2
Check name
Status
Explanation
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Security & Privacy · Quick win
Add the vault and environment paths to the rotation encrypt step, and warn that rotation disables the old issuer.
The rotation section gives only the openbao/ path for encrypting OS-TLS-INT.pem. The other sections of this document also give the vault/ path and the environments/$KAYOBE_ENVIRONMENT/ paths. Users of Hashicorp Vault or environments who follow this section can leave the new intermediate CA key unencrypted in Git. Add the same path variants here.
The rotation playbook disables the OS-TLS-INT PKI secret engine on the seed and the controllers. The old issuer is unavailable until new certificates are generated and deployed. Add a warning in the same form as the one in "Certificates deployment".
Suggested fix
Users can rotate the intermediate CA issuer with
``secret-store-rotate-intermediate-issuer.yml`` playbook.
+.. warning::++ The rotation disables the ``OS-TLS-INT`` secret engine on the seed and the+ controllers. The old issuer is unavailable until new certificates are+ generated and deployed.+
.. code-block:: bash
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/secret-store/secret-store-rotate-intermediate-issuer.yml
This will regenerate intermediate CA certificate files ``OS-TLS-INT.crt`` and
``OS-TLS-INT.pem``.
Make sure to encrypt ``OS-TLS-INT.pem`` again.
.. code-block:: bash
ansible-vault encrypt --vault-password-file ~/vault.pass $KAYOBE_CONFIG_PATH/openbao/OS-TLS-INT.pem
+ ansible-vault encrypt --vault-password-file ~/vault.pass $KAYOBE_CONFIG_PATH/vault/OS-TLS-INT.pem+ ansible-vault encrypt --vault-password-file ~/vault.pass $KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/openbao/OS-TLS-INT.pem+ ansible-vault encrypt --vault-password-file ~/vault.pass $KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/vault/OS-TLS-INT.pem
Committable suggestion
IMPORTANT
Review the replacement and indentation, then test before committing.
The reason will be displayed to describe this comment to others. Learn more.
Major · Security & Privacy · Heavy lift
Document that rotation does not revoke the exposed intermediate CA.
The release note presents secret-store-rotate-intermediate-issuer.yml as the remediation for an existing proxysql-ca.pem. That playbook disables the OS-TLS-INT PKI engine. It does not revoke the previous intermediate certificate.
Certificates already signed with the exposed key remain valid until they expire. Controllers trust the root CA, so they can accept these certificates unless revocation is enforced. A holder of the leaked key can therefore issue certificates that controllers accept.
Update the release note to state this limit. Name the step that removes trust in the previous intermediate. If that step does not exist, add it to the rotation procedure.
The playbook ``secret-store-generate-internal-tls.yml`` has been
creating ``proxysql-ca.pem`` by copying ``OS-TLS-INT.pem``.
This file contains key of intermediate CA, resulting leaking the key to
controller hosts if ProxySQL is enabled.
Fixed by changing the source to ``OS-TLS-INT.crt`` which only has the
certificate of intermediate CA.
Added playbook and documentation for rotating intermediate CA issuer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The playbook
secret-store-generate-internal-tls.ymlhas been creatingproxysql-ca.pemby copyingOS-TLS-INT.pem. This file contains key of intermediate CA, resulting leaking the key to controller hosts if ProxySQL is enabled.Fixed by changing the source to
OS-TLS-INT.crtwhich only has the certificate of intermediate CA.Added playbook and documentation for rotating intermediate CA issuer.