Skip to content
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

Fix pki_server_external_certs_path #4944

Merged
merged 2 commits into from
Jan 31, 2025
Merged

Fix pki_server_external_certs_path #4944

merged 2 commits into from
Jan 31, 2025

Conversation

edewata
Copy link
Contributor

@edewata edewata commented Jan 30, 2025

Previously if the pki_server_pkcs12_path was not specified the external certs specified in pki_server_external_certs_path would not be imported either. This is incorrect since these parameters are unrelated.

To address the issue the code that imports the external certs in PKIDeployer.import_server_pkcs12() has been moved into import_external_certs() which will always be invoked during installation. The update_external_certs_conf() has been merged into this method as well.

The PKIInstance.load_external_certs() has been modified to add the external cert using add_external_cert() to avoid creating duplicate entries in the external_certs.conf.

The PKIInstance.store_external_certs() has been modified to remove the external_certs.conf if it's empty.

The test for CA cloning with LDAPS connection has been updated to create a CA, add an external cert, clone the CA, remove and reinstall the clone, then remove the external cert.

In the future the pki_server_external_certs_path param and the pki-server instance-externalcert-* commands might be deprecated and eventually removed since there are other ways to deal with external certs without having to maintain external_certs.conf.

Previously if the pki_server_pkcs12_path was not specified
the external certs specified in pki_server_external_certs_path
would not be imported either. This is incorrect since these
parameters are unrelated.

To address the issue the code that imports the external certs
in PKIDeployer.import_server_pkcs12() has been moved into
import_external_certs() which will always be invoked during
installation. The update_external_certs_conf() has been merged
into this method as well.

The PKIInstance.load_external_certs() has been modified to add
the external cert using add_external_cert() to avoid creating
duplicate entries in the external_certs.conf.

The PKIInstance.store_external_certs() has been modified to
remove the external_certs.conf if it's empty.

In the future the pki_server_external_certs_path param and the
pki-server instance-externalcert-* commands might be deprecated
and eventually removed since there are other ways to deal with
external certs without having to maintain external_certs.conf.
The test for CA cloning with LDAPS connection has been updated
to create a CA, add an external cert, clone the CA, remove and
reinstall the clone, then remove the external cert.
@edewata edewata requested a review from fmarco76 January 30, 2025 18:29
Copy link
Member

@fmarco76 fmarco76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@edewata
Copy link
Contributor Author

edewata commented Jan 31, 2025

@fmarco76 Thanks!

@edewata edewata merged commit 0a88a9b into dogtagpki:master Jan 31, 2025
164 of 172 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants