Skip to content

Conversation

@hc-github-team-secure-vault-core
Copy link
Collaborator

Backport

This PR is auto-generated from #25912 to be assessed for backporting due to the inclusion of the label backport/1.16.x.

🚨

Warning automatic cherry-pick of commits failed. If the first commit failed,
you will see a blank no-op commit below. If at least one commit succeeded, you
will see the cherry-picked commits up to, not including, the commit where
the merge conflict occurred.

The person who merged in the original PR is:
@stevendpclark
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.

merge conflict error: POST https://api.github.com/repos/hashicorp/vault/merges: 409 Merge conflict []

The below text is copied from the body of the original PR.


Support OCSP responses without a NextUpdate value set within cert-auth OCSP verification. Responses without a NextUpdate value are allowed based on RFC6960 Section 4.2.2.1

Previous to this fix, if OCSP checks were enabled and an OCSP response didn't contain a NextUpdate value, cert auth logins would fail with a message similar to

no chain matching all constraints could be found for this login certificate; additionally got errors during verification: 1 error occurred:
* invalid validity: producedAt: 2024-02-29 17:06:00 +0000 UTC, thisUpdate: 2024-02-29 17:06:03 +0000 UTC, nextUpdate: 0001-01-01 00:00:00 +0000 UTC

Now OCSP responses without a NextUpdate field set will be allowed, the response will not be cached, as mentioned in the RFC, a lack of a NextUpdate field means there is newer revocation information available all the time.

Additional checks that the ThisUpdate field does contain a proper timestamp and is before then the current time have also been added within the list of verifications performed for us to trust an OCSP response.

A new cert auth configuration has been introduced called ocsp_this_update_max_ttl, with a default of 0. If this field is greater than 0, cert-auth will enforce an OCSP response's ThisUpdate field is less than the configured value. This can be used to avoid accepting older OCSP response values based on policies. We have avoided enforcing this by default for backwards compatibility reasons.


Overview of commits

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 18, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Mar 18, 2024
@github-actions
Copy link

github-actions bot commented Mar 18, 2024

CI Results:
All Go tests succeeded! ✅

* Support OCSP responses without a NextUpdate value set

 - Validate that the ThisUpdate value is
   properly prior to our current time and
   if NextUpdate is set that, ThisUpdate is
   before NextUpdate.
 - If we don't have a value for NextUpdate just compare against ThisUpdate.

* Add ocsp_this_update_max_ttl support to cert auth

 - Allow configuring a maximum TTL of the OCSP response based on the
   ThisUpdate time like OpenSSL does
 - Add test to validate that we don't cache OCSP responses with no NextUpdate

* Add cl

* Add missing ` in docs

* Rename ocsp_this_update_max_ttl to ocsp_this_update_max_age

* Missed a few TTL references

* Fix error message
@stevendpclark stevendpclark force-pushed the backport/stevendpclark/vault-24614-ocsp-no-nextupdate/uniquely-outgoing-goshawk branch from 18d39c1 to 5009d77 Compare March 19, 2024 12:47
@stevendpclark stevendpclark self-assigned this Mar 19, 2024
@stevendpclark stevendpclark added this to the 1.16.0 milestone Mar 19, 2024
@stevendpclark stevendpclark marked this pull request as ready for review March 19, 2024 12:49
@stevendpclark stevendpclark requested a review from a team as a code owner March 19, 2024 12:49
@stevendpclark stevendpclark enabled auto-merge (squash) March 19, 2024 13:01
@github-actions
Copy link

Build Results:
All builds succeeded! ✅

@stevendpclark stevendpclark merged commit eda36e9 into release/1.16.x Mar 19, 2024
@stevendpclark stevendpclark deleted the backport/stevendpclark/vault-24614-ocsp-no-nextupdate/uniquely-outgoing-goshawk branch March 19, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants