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

Update pki-server cert-create #4612

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Update pki-server cert-create #4612

merged 1 commit into from
Nov 15, 2023

Conversation

edewata
Copy link
Contributor

@edewata edewata commented Nov 15, 2023

The pki-server cert-create has been updated to simplify creating a system cert. It will use the server's NSS database directly and RSNv3 serial numbers so it can be used before the CA subsystem is created or when the server is down. It will use the CSR in /etc/pki/pki-tomcat/certs and store the new cert in that folder as well.

The tests for installing CA with existing NSS database and HSM have been updated to use this command.

https://github.com/dogtagpki/pki/wiki/PKI-Server-Certificate-CLI
https://github.com/edewata/pki/blob/cli/docs/changes/v11.5.0/Tools-Changes.adoc

The pki-server cert-create has been updated to simplify creating
a system cert. It will use the server's NSS database directly and
RSNv3 serial numbers so it can be used before the CA subsystem is
created or when the server is down. It will use the CSR in
/etc/pki/pki-tomcat/certs and store the new cert in that folder
as well.

The tests for installing CA with existing NSS database and HSM
have been updated to use this command.
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

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. I have just a note.

In the PR #4584 the idea was to remove certificates from CS.cfg and move in the folder <instance>conf/certs folder if they cannot be retrieved/stored in other places. Therefore, the current commands are not using/reading certificate from that folder if they are in the NSSDB.
If I get correctly in this case we store the certificate in the DB and in the folder. We could drop the second.
However, it is not a real issue so feel free to merge.

@edewata
Copy link
Contributor Author

edewata commented Nov 15, 2023

@fmarco76 Thanks! I'll merge this PR but feel free to continue the discussion.

Yes, this command will store the new cert in /etc/pki/pki-tomcat/certs because the next command will import the cert into NSS database:
https://github.com/edewata/pki/blob/cli/.github/workflows/ca-existing-nssdb-test.yml#L64-L69
After that we can remove the cert from that folder, or just ignore it because we will not use it for anything else.

In the next PR I'm going replace the import command with pki-server cert-import since we already have that command. Alternatively we can add a --import option to pki-server cert-create so it will import the cert immediately without creating a file.

@edewata edewata merged commit 3f50096 into dogtagpki:master Nov 15, 2023
132 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