-
Notifications
You must be signed in to change notification settings - Fork 140
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 pkispawn to verify admin cert #4951
Conversation
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.
The overall changes look good but there are several failing CI related to this. Installation of subsystems with external certificates cannot validate them although they are released from the CA.
Hmm.. let me take a look. |
The pki nss-cert-verify has been added to verify that a cert is issued by a trusted CA. The cert can be provided in an NSS database, in a file, or via standard input. The PKITrustManager class has been moved into pki-common.jar such that it can be used by the CLI. This class is not yet officially supported so it's not necessary to provide an upgrade script. The NSSDatabase.verify_cert() has been added to verify a cert using pki nss-cert-verify. The PKIDeployer.import_system_certs() and setup_admin_cert() have been modified to verify the admin cert provided during installation. The test for installing CA with existing certs has been updated to install the CA with a self-signed admin cert (which should fail), then install it again with a CA-signed cert (which should work).
|
@fmarco76 I've updated the code to verify the admin cert after importing the cert chain so it should work now. Please see the updated PR. Thanks! |
# Import admin cert after importing the cert chain so that | ||
# it can be verified. | ||
|
||
if subsystem.name in ['kra', 'ocsp']: |
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.
I'm actually not sure why in the original code the admin cert import was only done for KRA & OCSP and not for TKS & TPS. It's possible that this code is actually redundant since the same tests for TKS & TPS seem to be working just fine without it. We can clean it up separately later.
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.
LGTM
@fmarco76 Thanks! |
The
pki nss-cert-verify
has been added to verify that a cert is issued by a trusted CA. The cert can be provided in an NSS database, in a file, or via standard input.The
PKITrustManager
class has been moved intopki-common.jar
such that it can be used by the CLI. This class is not yet officially supported so it's not necessary to provide an upgrade script.The
NSSDatabase.verify_cert()
has been added to verify a cert usingpki nss-cert-verify
.The
PKIDeployer.import_system_certs()
andsetup_admin_cert()
have been modified to verify the admin cert provided during installation.The test for installing CA with existing certs has been updated to install the CA with a self-signed admin cert (which should fail), then install it again with a CA-signed cert (which should work).
https://github.com/edewata/pki/blob/install/docs/changes/v11.6.0/API-Changes.adoc
https://github.com/edewata/pki/blob/install/docs/changes/v11.6.0/Packaging-Changes.adoc