Commit Graph

4 Commits

Author SHA1 Message Date
Jacob Hoffman-Andrews e7bf6383d8
rocsp: improve stats (#6257)
For multiSource, split out checkSecondary's metrics into their own
counter. Treat NotFound as a separate error type (so we can more
clearly distinguish the half-hourly pattern of fetches for expired
certificates).

In redisSource, add a histogram for the ages of responses fetched from
cache (regardless of whether they are served or not). This parallels
ocsp_respond_ages in ocsp/responder.go, but may show ages beyond the
compliance limit, even under normal operations, because it is checked
before signAndServe is called.
2022-07-28 21:49:38 -07:00
Jacob Hoffman-Andrews d988c39123
ocsp/responder/redis: serve stale responses if live signing fails (#6243) 2022-07-21 12:08:53 -07:00
Jacob Hoffman-Andrews 3b09571e70
ocsp-responder: add LiveSigningPeriod (#6237)
Previously we used "ExpectedFreshness" to control how frequently the
Redis source would request re-signing of stale entries. But that field
also controls whether multi_source is willing to serve a MariaDB
response. It's better to split these into two values.
2022-07-20 15:36:38 -07:00
Jacob Hoffman-Andrews 29724cb0b7
ocsp/responder: update Redis source to use live signing (#6207)
This enables ocsp-responder to talk to the RA and request freshly signed
OCSP responses.

ocsp/responder/redis_source is moved to ocsp/responder/redis/redis_source.go
and significantly modified. Instead of assuming a response is always available
in Redis, it wraps a live-signing source. When a response is not available,
it attempts a live signing.

If live signing succeeds, the Redis responder returns the result right away
and attempts to write a copy to Redis on a goroutine using a background
context.

To make things more efficient, I eliminate an unneeded ocsp.ParseResponse
from the storage path. And I factored out a FakeResponse helper to make
the unittests more manageable.

Commits should be reviewable one-by-one.

Fixes #6191
2022-07-18 10:47:14 -07:00