Commit Graph

1 Commits

Author SHA1 Message Date
Andrew Gabbitas cbd24db64b
Add ocsp-responder redis lookup support (#5800)
This is the first step in moving OCSP responses from mysql to redis.

Adds support for parallel lookups to mysql and redis. The mysql source
remains the source of truth. If the secondaryLookup [redis] succeeds,
compare against the primaryLookup [mysql] and return if they concur
that the status is the same and the redis source is at least as fresh
as mysql.

There are checks on the database response for `certStatus.IsExpired`,
`certStatus.OCSPLastUpdated.IsZero()` and
`!src.filter.responseMatchesIssuer`.

The expired check isn't necessary for redis because the response will
be set with a ttl and drop out of redis when it reaches the ttl, and
delivering a response for an expired certificate until that happens
isn't a problem. 

The `certStatus.OCSPLastUpdated.IsZero()` check is a MySQL check that
isn't needed in redis.

The `responseMatchesIssuer` check is important and will need to be
checked in some form before MySQL is no longer the source of truth.
There is another project to check issuer for responses and isn't scoped
for this change.
2021-12-06 10:47:05 -07:00