-
Notifications
You must be signed in to change notification settings - Fork 137
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
Add additional tests for OCSP #4547
Conversation
40d02f2
to
b1c875c
Compare
Added tests for non existing certificate and non managed CA. Additionally, fixed a condition which was not working properly.
b1c875c
to
3a0c755
Compare
Kudos, SonarCloud Quality Gate passed! |
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.
Nice! I like how clean things are with Ansible.
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.
Nice use of ansible! Please see my comments/questions below.
@@ -246,6 +246,104 @@ jobs: | |||
echo good > expected | |||
diff expected actual | |||
|
|||
- name: Check OCSP responder with non existing cert |
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.
If I understood correctly this means that if a cert doesn't exist in the CA, the OCSP subsystem wil respond with a "good" status, but the CA's built-in OCSP responder will respond with an "unknown" status. Is this correct? Is it possible to document somewhere (e.g. in wiki) the expected value for each case?
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.
Yes, this is correct. The OCSP has only the list of revoked certificate and if it is not revoked it has no information. For the original specification Good
is the best answer in this case. However, in the update specification (rfc6960) they accept the original behaviour but if possible the status should be revoked or unknown.
I have created this page and linked to OCSPClient page.
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.
@fmarco76 Thanks!
@ladycfu @06shalini FYI
tests/ansible/ocsp/tasks/certificate_self_validation_with_crl.yml
Outdated
Show resolved
Hide resolved
- name: Restart OCSP 2 | ||
community.docker.docker_container_exec: | ||
container: "{{ ocsp_container }}" | ||
command: pki-server restart --wait |
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.
IIRC the server has the ability to auto recover from broken DS connection, so it might not be necessary to restart the server, but it's fine to leave this in.
When LDAP store is used the OCSP can be configured to check certificate using the stored CRL. This is implemented in PR dogtagpki#4545.
8731324
to
b3a6d00
Compare
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.
Thanks for the update! LGTM.
@edewata @ckelleyRH Thanks! |
Sorry, looks like |
I miss it! I have removed it from master now. Very good catch, thanks! |
Added tests for non existing certificate and non managed CA.
Additionally, fixed a condition which was not working properly.