Skip to content

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

Open
TaylorMutch wants to merge 2 commits into
mainfrom
1931-credential-drivers-implementation/tm
Open

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

Conversation

@TaylorMutch

@TaylorMutch TaylorMutch commented Jun 24, 2026

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 or Vault 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-vault 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
    Vault credential storage backends. The local Vault e2e path deploys OpenBao as
    a Vault-compatible fixture.
  • 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 vault.

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

  • cargo check -p openshell-driver-vault -p openshell-server
  • mise run pre-commit
  • mise run helm:test
  • mise run e2e:kubernetes:credential-drivers
  • mise run e2e:rust
  • mise run e2e:podman - provider/default credential coverage passed before
    the suite failed in sandbox_create_with_no_keep_cleans_up_after_tty_command;
    isolated rerun of OPENSHELL_E2E_PODMAN_TEST=sandbox_lifecycle mise run e2e:podman reproduced the same Podman cleanup failure.

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

@TaylorMutch TaylorMutch force-pushed the 1931-credential-drivers-implementation/tm branch from d4055ca to 512ea3d Compare June 24, 2026 05:07
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
@TaylorMutch TaylorMutch force-pushed the 1931-credential-drivers-implementation/tm branch from 512ea3d to 153b455 Compare June 24, 2026 18:59
@johntmyers johntmyers added this to the OpenShell Beta milestone Jun 24, 2026
@TaylorMutch TaylorMutch marked this pull request as ready for review June 24, 2026 20:24
@TaylorMutch TaylorMutch added the test:e2e Requires end-to-end coverage label Jun 24, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied for 153b455. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
@TaylorMutch TaylorMutch force-pushed the 1931-credential-drivers-implementation/tm branch from 3036d2f to 77061f3 Compare June 25, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants