Skip to content

feat: make OCSP timeout configurable via --ocsp-timeout flag - #1366

Open
shashankvarma499 wants to merge 1 commit into
notaryproject:mainfrom
shashankvarma499:add-ocsp-timeout
Open

feat: make OCSP timeout configurable via --ocsp-timeout flag#1366
shashankvarma499 wants to merge 1 commit into
notaryproject:mainfrom
shashankvarma499:add-ocsp-timeout

Conversation

@shashankvarma499

Copy link
Copy Markdown

Description

The OCSP HTTP client timeout in the revocation validator is hardcoded to 2 seconds, which is too short for environments with high-latency OCSP responders (e.g. slow or high-latency networks), causing frequent verification timeouts.

This change introduces a --ocsp-timeout flag on notation verify and notation blob verify, allowing users to override the default 2 second timeout. The default behavior is unchanged.

Changes

  • Add a DefaultOCSPTimeout constant and thread an ocspTimeout parameter through NewRevocationValidator.
  • Add the --ocsp-timeout flag (default 2s) to notation verify and notation blob verify.
  • Update the sign commands to pass the default timeout.
  • Update the command specs and unit tests.

Fixes #976

Verification

  • go build ./...
  • go vet ./...
  • go test ./internal/revocation/... ./cmd/notation/internal/verify/... ./cmd/notation/...

The OCSP HTTP client timeout was hardcoded to 2 seconds, which is
insufficient for environments with high-latency OCSP responders. Add a
--ocsp-timeout flag to 'notation verify' and 'notation blob verify' so
users can override the default 2 second timeout.

Fixes notaryproject#976

Signed-off-by: Shashank Varma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OCSP timeout threshold is 2 seconds

1 participant