Skip to content

feat(secrets): config-driven certificate vending backend#2881

Draft
wminckler wants to merge 1 commit into
NVIDIA:mainfrom
wminckler:k8s-certs
Draft

feat(secrets): config-driven certificate vending backend#2881
wminckler wants to merge 1 commit into
NVIDIA:mainfrom
wminckler:k8s-certs

Conversation

@wminckler

Copy link
Copy Markdown
Contributor

Make certificate vending a selectable, config-driven backend instead of hardcoding it to the credential store's Vault client. This decouples PKI issuance from credential storage and lays the seam for future non-Vault (e.g. k8s/local-CA) backends.

  • Introduce CertBackend { SharedVault | DedicatedVault } + factory create_certificate_provider. SharedVault (the default) reuses the credential Vault client, so existing deployments are unchanged.
  • DedicatedVault requires address / pki_mount_location / pki_role_name, no env fallback, and an empty-string guard, so a partial config fails fast at startup instead of silently re-pointing at the credential Vault.
  • Add a [certificates] TOML section on CarbideConfig with a validating conversion; selecting dedicated_vault without its settings will error.
  • Resolve SPIFFE identity once from the site config and share it across backends so certs mint under the same identity namespace.

Tests: config parse/convert (shared, dedicated, missing-section, missing-field, unknown-field) and empty-required-field rejection.

Related issues

#2880

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

Make certificate vending a selectable, config-driven backend instead of
hardcoding it to the credential store's Vault client. This decouples PKI
issuance from credential storage and lays the seam for future non-Vault
(e.g. k8s/local-CA) backends.

- Introduce CertBackend { SharedVault | DedicatedVault } + factory
  create_certificate_provider. SharedVault (the default) reuses the
  credential Vault client, so existing deployments are unchanged.
- DedicatedVault is safe-by-construction: required non-Option address /
  pki_mount_location / pki_role_name, no VAULT_* env fallback, and an
  empty-string guard, so a partial config fails fast at startup instead
  of silently re-pointing at the credential Vault.
- Add a [certificates] TOML section on CarbideConfig with a validating
  conversion; selecting dedicated_vault without its settings errors.
- Resolve SPIFFE identity once from the site config and share it across
  backends so certs mint under the same identity namespace.

Tests: config parse/convert (shared, dedicated, missing-section,
missing-field, unknown-field) and empty-required-field rejection.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@copy-pr-bot

copy-pr-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a8adc2b2-fe44-427d-b984-cfb9af4bf95d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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.

1 participant