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

Signature verification failure with error "revocation status is unknown" #959

Open
yizha1 opened this issue Jun 7, 2024 · 5 comments
Open
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@yizha1
Copy link
Contributor

yizha1 commented Jun 7, 2024

What is not working as expected?

Use notation verify command to verify an image signed with a CA issued certificate. The certificate chain contains intermediate CA certificate and root CA certificate. Here is the log captured using -d and -v flags (Note: The trust policy verification level is set to permissive, so the error is just logged)

2024-06-06T09:13:39.1090940Z time="2024-06-06T09:13:39Z" level=debug msg="error for certificate #2 in chain with subject *** for server "http://ocsp.***.com/ocsp\": exceeded timeout threshold of 0.00 seconds for OCSP check"
2024-06-06T09:13:39.1092428Z time="2024-06-06T09:13:39Z" level=debug msg="error for certificate #1 in chain with subject *** for server "http://ocsp.***.com/ocsp\": exceeded timeout threshold of 0.00 seconds for OCSP check"
2024-06-06T09:13:39.1093376Z time="2024-06-06T09:13:39Z" level=warning msg="revocation validation failed with validation action set to "logged". Failure reason: signing certificate with subject "***" revocation status is unknown"

However, when using the following openssl command in the same environment, the ocsp verification works.

openssl ocsp -issuer chain.pem -cert leaf.pem -url http://ocsp.xxx.com/ocsp -CAfile chain.pem -no_nonce

During troubleshooting, we found the same openssl ocsp command does not work without -no_nonce , the result was Responder Error: unauthorized (6)

openssl ocsp -issuer chain.pem -cert leaf.pem -url http://ocsp.xxx.com/ocsp -CAfile chain.pem

What did you expect to happen?

First, the revocation checking should work as the openssl command works in the same environment. Based on the tried flags for openssl, my guess is nonce may not be probably handled in the OCSP request and response.
Second, the log should be improved, the timeout is confusing, what is timeout? It looks like the connection to OCSP responder is timeout, but it can also mean the revocation result is not fetched within an expected time, but the connection with the server is established. 0.00 in the log is strange as well. revocation status is unknown is also too general, not help to understand the problem and how to mitigate it.

How can we reproduce it?

The steps are simple, just use notation verify to verify a signed image. But the certificates cannot be shared in this issue.

Describe your environment

Linux OS

What is the version of your Notation CLI or Notation Library?

Notation/1.0.0

@yizha1 yizha1 added bug Something isn't working triage Need to triage labels Jun 7, 2024
@yizha1
Copy link
Contributor Author

yizha1 commented Jun 7, 2024

@priteshbandi would you mind checking this issue, as it is related to the OCSP work you did previously? Thanks.

@priteshbandi
Copy link
Contributor

Due to a limitation in golang ocsp library, we are unable to pass the nonce in the ocsp request, as discussed here. Consequently, we are not including the nonce.

The error message stating 1exceeded timeout threshold of 0.00 seconds for OCSP check1 is misleading because we are not explicitly setting a timeout in the error message; therefore, it defaults to 0.00 seconds (see source).

It appears there may be another underlying issue. Could you please provide the certificate you are using? If it's a private certificate with a private ocsp endpoint, are there any errors on the server side?

@yizha1
Copy link
Contributor Author

yizha1 commented Jun 8, 2024

Thanks @priteshbandi for your prompt response.

If the OCSP responder passes the nonce, can we handle it? The openssl command only works when explicitly specifying the flag -no_nonce.

I will check whether it is possible to get any server logs. If the certificates cannot be shared, is there any other way to do troubleshooting on Notation side?

@yizha1 yizha1 self-assigned this Jun 12, 2024
@yizha1 yizha1 removed the triage Need to triage label Jun 12, 2024
@yizha1
Copy link
Contributor Author

yizha1 commented Jun 12, 2024

Updates: Requested OCSP responder logs

Copy link

This issue is stale because it has been opened for 60 days with no activity. Remove stale label or comment. Otherwise, it will be closed in 30 days.

@github-actions github-actions bot added the Stale label Aug 12, 2024
@yizha1 yizha1 removed the Stale label Aug 26, 2024
@yizha1 yizha1 modified the milestone: Discuss Sep 9, 2024
@yizha1 yizha1 added the wontfix This will not be worked on label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
Status: Todo
Development

No branches or pull requests

2 participants