Skip to content

BC-FIPS 2.0 cache eviction throws error when using Hashicorp Vault OCSP responder. #1789

Description

@revanthalampally
  1. A TLS JAVA client(using BCFIPS 2.0) is talking to a server which is using Hashicorp Vault issued certificate.

  2. The TLS JAVA client(BCFIPS) is doing OCSP validation of the server certificate by sending OCSP request to the vault OCSP responder.

  3. The BCFIPS maintains a cache of the OCSP response it gets from the responder.

  4. 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."

  5. 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.

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    support requestCommunity assistance requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions