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

Remove default cert approval callback in PKIClient #4809

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

edewata
Copy link
Contributor

@edewata edewata commented Jul 25, 2024

Previously the PKIClient class had a default cert approval callback which would only warn the user if it receives a cert with a BAD_CERT_DOMAIN but still allow it, or ask the user whether to trust an UNTRUSTED_ISSUER.

On the client side (e.g. CLI, console) this is fine since the user is actively interacting with the application, but on the server side (e.g. authenticators) there are no users constantly monitoring the logs so the cert verification needs to be more stringent.

To resolve the issue, the default cert approval callback in PKIClient has been removed such that certs with BAD_CERT_DOMAIN or UNTRUSTED_ISSUER will automatically be rejected. On the server side PKIClient will be used without a cert approval callback. On the client side it will be used with an interactive callback.

Previously some of ACME tests were using the default issuer URL which contains localhost.localdomain hostname so it actually generated BAD_CERT_DOMAIN errors. They have been updated to use the proper CA hostname.

Previously the PKIClient class had a default cert approval
callback which would only warn the user if it receives a cert
with a BAD_CERT_DOMAIN but still allow it, or ask the user
whether to trust an UNTRUSTED_ISSUER.

On the client side (e.g. CLI, console) this is fine since the
user is actively interacting with the application, but on the
server side (e.g. authenticators) there are no users constantly
monitoring the logs so the cert verification needs to be more
stringent.

To resolve the issue, the default cert approval callback in
PKIClient has been removed such that certs with BAD_CERT_DOMAIN
or UNTRUSTED_ISSUER will automatically be rejected. On the server
side PKIClient will be used without a cert approval callback. On
the client side it will be used with an interactive callback.

Previously some of ACME tests were using the default issuer URL
which contains localhost.localdomain hostname so it actually
generated BAD_CERT_DOMAIN errors. They have been updated to use
the proper CA hostname.
@edewata edewata requested a review from fmarco76 July 25, 2024 00:01
Copy link

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 Jul 25, 2024

@fmarco76 Thanks!

@edewata edewata merged commit 7f3390c into dogtagpki:master Jul 25, 2024
146 of 156 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