Skip to content

feat(credentials): add provider credential storage drivers#1986

Draft
TaylorMutch wants to merge 1 commit into
mainfrom
1931-credential-drivers-implementation/tm
Draft

feat(credentials): add provider credential storage drivers#1986
TaylorMutch wants to merge 1 commit into
mainfrom
1931-credential-drivers-implementation/tm

Conversation

@TaylorMutch

Copy link
Copy Markdown
Collaborator

Summary

Adds gateway-owned credential storage for Providers v2. New provider credential
writes now persist opaque handles instead of inline secret values, with default
encrypted database storage when no external credential backend is configured and
opt-in Kubernetes Secrets/OpenBao backends for deployments that want dedicated
secret storage.

Related Issue

Related to #1931

Changes

  • Adds a credential driver protobuf contract for store, resolve, delete, list,
    and capability calls.
  • Adds gateway credential runtime support for a single active external
    credential driver, in-tree drivers, and UDS-connected external drivers.
  • Adds the default encrypted database credential store as
    openshell-driver-db-credstore.
  • Adds standalone UDS-capable openshell-driver-kubernetes-secrets and
    openshell-driver-openbao binaries, plus in-tree gateway loading.
  • Updates Providers v2 create/update/delete paths to store new credential values
    through credential storage and persist internal credential_handles.
  • Preserves upgrade compatibility for existing inline/plaintext provider records:
    legacy inline credentials remain readable, config-only updates leave them
    inline, and only newly submitted/rotated credential values move into credential
    storage.
  • Rejects user-supplied provider.credential_handles on provider create/update.
  • Resolves credential handles at runtime for sandbox provider environments,
    provider refresh, and managed inference routes.
  • Updates Helm defaults so no external driver means default encrypted DB
    credential storage, backed by a retained key-encryption-key Secret injected
    into the gateway.
  • Adds Helm/Skaffold values and targeted e2e coverage for Kubernetes Secrets and
    OpenBao credential storage backends.
  • Updates gateway/provider docs, architecture notes, CI labels, and local test
    tasks for credential driver validation.

Default Behavior

Credential drivers are opt-in for external backends. If
[openshell.gateway].credential_drivers is omitted, the gateway uses the default
encrypted database credential store. The submitted secret is encrypted into a
driver-owned credential object outside the provider record, and the provider
record stores only an opaque handle.

The explicit empty list form, credential_drivers = [], is invalid. Operators
should omit the field for default encrypted DB storage or select exactly one
external backend such as kubernetes-secrets or openbao.

Existing provider records that already contain inline plaintext credentials are
still resolved for upgrade compatibility, but new provider creates and credential
updates use credential storage handles.

Testing

  • mise run pre-commit passes after rebase and squash
  • cargo test -p openshell-driver-db-credstore
  • cargo test -p openshell-server grpc::provider::tests --features test-support
  • cargo test -p openshell-server inference::tests --features test-support
  • cargo clippy -p openshell-driver-db-credstore -p openshell-server --all-targets --features test-support -- -D warnings
  • mise run e2e:kubernetes
  • mise run e2e:kubernetes:credential-drivers
  • mise run e2e:rust
  • Docker Python e2e excluding local Landlock tests; one transient TLS reset passed on targeted rerun
  • Podman Rust e2e; one transient cleanup race passed on targeted rerun

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated
  • Gateway configuration docs updated

@copy-pr-bot

copy-pr-bot Bot commented Jun 24, 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.

@github-actions

Copy link
Copy Markdown

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
@TaylorMutch TaylorMutch force-pushed the 1931-credential-drivers-implementation/tm branch from d4055ca to 512ea3d Compare June 24, 2026 05:07
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