Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move all pki-verification calls from sdk-Verify() to pki-specific #29342

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kitography
Copy link
Contributor

VerifyCertifcate(...); update sdk-Verify to allow multiple chains, but validate that at least one of those chains is valid.

Description

This updates the "Verify" call in the SDK to allow multiple chains, but do more enforcement to check that at least one of those chains is valid.

  • Note that this is used by the sdk call ParsePEMBundle which has usages in:
    -- builtin/logical/database/credentials.go ; line 269
    -- physical/cassandra/cassandra.go ; line 201
    -- plugins/database/influxdb/connection_producer.go ; line 97
    This also updates calls inside the PKI secrets engine to use the configurable VerifyCertificate call rather than the sdk-version which lacks the context that Verify includes.

TODO only if you're a HashiCorp employee

  • Backport Labels: If this fix needs to be backported, use the appropriate backport/ label that matches the desired release branch. Note that in the CE repo, the latest release branch will look like backport/x.x.x, but older release branches will be backport/ent/x.x.x+ent.
  • ENT Breakage: If this PR either 1) removes a public function OR 2) changes the signature
    of a public function, even if that change is in a CE file, double check that
    applying the patch for this PR to the ENT repo and running tests doesn't
    break any tests. Sometimes ENT only tests rely on public functions in CE
    files.
    -- This doesn't change the signature of any function.
  • Jira: If this change has an associated Jira, it's referenced either
    in the PR description, commit message, or branch name.

VerifyCertifcate(...); update sdk-Verify to allow multiple chains,
but validate that at least one of those chains is valid.
@kitography kitography added backport/ent/1.16.x+ent Changes are backported to 1.16.x+ent backport/1.18.x backport/ent/1.17.x+ent Changes are backported to 1.17.x+ent labels Jan 10, 2025
@kitography kitography added this to the 1.19.0-rc milestone Jan 10, 2025
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Jan 10, 2025
Copy link

CI Results: failed ❌
Failures:

Test Type Package Test Logs
standard builtin/credential/cert TestCRLFetch view test results
standard builtin/credential/cert TestCert_RoleResolveOCSP view test results
standard builtin/logical/pki TestVerify_chained_name_constraints view test results
standard sdk/helper/certutil TestIgnoreCSRSigning view test results
standard sdk/helper/certutil TestIgnoreCSRSigning/ignore-csr-enabled view test results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/ent/1.16.x+ent Changes are backported to 1.16.x+ent backport/ent/1.17.x+ent Changes are backported to 1.17.x+ent backport/1.18.x 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.

1 participant