-
A TLS JAVA client(using BCFIPS 2.0) is talking to a server which is using Hashicorp Vault issued certificate.
-
The TLS JAVA client(BCFIPS) is doing OCSP validation of the server certificate by sending OCSP request to the vault OCSP responder.
-
The BCFIPS maintains a cache of the OCSP response it gets from the responder.
-
Suppose the TLS java client is trying to make one more connection to the same server after the OCSP interval time (in our case its 12 hours in vault), then BCFIPS is returning error while doing OCSP check of the server cert. The error is "OCSP cache expired."
-
When we investigated this issue and found that the BCFIPS caching logic is not able to evict the expired certificate because of a NULL element present as part of CertID(hashing algorithm) of the OCSP response.
|
if (certID.equals(resp.getCertID())) |
Hashicorp has responded that setting the hash algorithm parameters field to an explicit ASN.1 NULL value is valid
There are other examples of code doing the same:
https://github.com/snowflakedb/gosnowflake/blob/master/ocsp.go#L279
https://github.com/golang/crypto/blob/master/ocsp/ocsp.go
Example here
similarly with [www.microsoft.com]: results here
This behavior your java client is experiencing appears to be due to the way the BCFIPS library is handling the responses.
There needs to be a way to ignore the NULL values when BCFIPS is storing in its responseMap in order to avoid this.
This is blocking us from our fedramp release. Can someone please look into this soon?
A TLS JAVA client(using BCFIPS 2.0) is talking to a server which is using Hashicorp Vault issued certificate.
The TLS JAVA client(BCFIPS) is doing OCSP validation of the server certificate by sending OCSP request to the vault OCSP responder.
The BCFIPS maintains a cache of the OCSP response it gets from the responder.
Suppose the TLS java client is trying to make one more connection to the same server after the OCSP interval time (in our case its 12 hours in vault), then BCFIPS is returning error while doing OCSP check of the server cert. The error is "OCSP cache expired."
When we investigated this issue and found that the BCFIPS caching logic is not able to evict the expired certificate because of a NULL element present as part of CertID(hashing algorithm) of the OCSP response.
bc-java/prov/src/main/java/org/bouncycastle/jce/provider/OcspCache.java
Line 81 in 455ca61
Hashicorp has responded that setting the hash algorithm parameters field to an explicit ASN.1 NULL value is valid
There are other examples of code doing the same:
https://github.com/snowflakedb/gosnowflake/blob/master/ocsp.go#L279
https://github.com/golang/crypto/blob/master/ocsp/ocsp.go
Example here
similarly with [www.microsoft.com]: results here
This behavior your java client is experiencing appears to be due to the way the BCFIPS library is handling the responses.
There needs to be a way to ignore the NULL values when BCFIPS is storing in its responseMap in order to avoid this.
This is blocking us from our fedramp release. Can someone please look into this soon?