Repository navigation
Conversation
Propose workspace-scoped secrets that provider refresh configuration can reference, so one shared OAuth client secret rotates for every provider. Refs #5563. Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Add a workspace-scoped Secret resource whose value is stored through the credential issuer under a new WorkspaceSecret owner kind and is never returned by Get or List. Each secret declares immutable, normalized token endpoints it may be sent to. Creation is gated behind the default-off enable_workspace_secrets setting and a workspace-secrets membership capability, reusing the sandbox-update activation check. Updates stage a new value and delete the superseded handle; deletes tombstone the record and a periodic sweep retries any backend cleanup. Workspace deletion is blocked while secrets exist. Refs #5563 Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Let ConfigureProviderRefresh take secret material from a workspace secret by name. The gateway binds each key to the secret's immutable ID in a refresh-state annotation, which older gateways preserve, and requires the key in secret_material_keys so those gateways reject the request and refuse to mint without it. Only secret material can be referenced, never a key the minter rotates per provider. The token endpoint a mint will call must be one the secret allows; the minter re-checks it before sending and refuses redirects for requests carrying a workspace secret. Mints read the secret's current value and re-read the record once if an update raced them. DeleteSecret refuses while a refresh references the secret, and the new InlineProviderRefreshSecrets RPC copies referenced values into provider-owned material without disturbing a rotated refresh token. Refs #5563 Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Return a workspace secret's value to operators, or to OIDC workspace admins whose token carries the literal secret:reveal scope on a gateway that enforces scopes. openshell:all, unscoped OIDC gateways, user mTLS certificates, and local development identities are rejected in the handler, independent of middleware scope handling. The RPC is disabled unless enable_secret_reveal is set, and every call is audited. Group the workspace secret settings under WorkspaceSecretsConfig. Refs #5563 Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Add openshell secret create, update, get, list, and delete. Values come from an environment variable or a file and are never printed. Add --material-secret to provider refresh configure, which also lists each referenced key in secret_material_keys, and provider refresh inline-secrets for unwinding references. Refs #5563 Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Describe shared secret material for provider refresh, the enable_workspace_secrets and enable_secret_reveal gateway settings with activation and rollback steps, and the new secret scopes. Refs #5563 Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-5699.docs.buildwithfern.com/openshell |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add workspace secrets: named, workspace-scoped values that provider refresh configuration can reference as minting material, so one shared OAuth client secret rotates for every provider that uses it. OpenShell never injects them into sandboxes. The first commit adds the design RFC; the rest implement it.
Related Issue
Closes #5563
Changes
rfc/NNNN-workspace-secrets/): design, threat model, activation and rollback. The RFC number is still a placeholder until one is assigned on Support shared non-injectable secret references and authorized control-plane reads #5563.CreateSecret/GetSecret/ListSecrets/UpdateSecret/DeleteSecret.WorkspaceSecretowner kind and never returned by Get or List.allowed_endpoints.openshell.storage.secret.v1package; the frozenstorage.v1schema is unchanged.enable_workspace_secretssetting and aworkspace_secrets_protocolmembership capability, reusing the sandbox-update check. Workspace deletion is blocked while secrets exist.ConfigureProviderRefreshRequest.material_secrets(key → secret name).secret_material_keys, so older gateways reject the request instead of ignoring it.refresh_token.DeleteSecretrefuses while a refresh references the secret.InlineProviderRefreshSecretscopies values into provider-owned material and keeps a rotated refresh token.ProviderCredentialRefreshStatus.material_secretsreports the references.enable_secret_revealis set. The handler accepts operator mTLS, or OIDC workspace admins with the literalsecret:revealscope on a scope-enforcing gateway;openshell:all, unscoped OIDC, user mTLS, and local-dev identities are rejected. Every call is audited.openshell secret create|update|get|list|delete, which reads values from--value-envor--value-file.provider refresh configure --material-secret KEY=SECRET.provider refresh inline-secrets.enable_workspace_secrets,enable_secret_reveal, activation and rollback), workspace scopes, and theopenshell-cliskill.Not in this PR:
aws_sts_assume_role. These are rejected until the STS client enforces the same endpoint and redirect rules.client_secret_basic(Support OAuth client_secret_basic and resource indicators for refresh providers #5663).Release Notes
Operators can store a shared secret once with
openshell secret createand reference it from many providers' refresh configuration with--material-secret. Updating the secret reaches every provider at its next refresh. The feature is off until a gateway setsenable_workspace_secrets.Testing
cargo clippy --workspace --all-targets -D warnings,cargo fmt,buf lint,mise run sdk:ts:ci, and markdownlint on the changed docs and RFC.openshell-server,openshell-credential-issuer,openshell-core,openshell-cli,openshell-sdk, andopenshell-gateway-interceptors.openshell-serverandopenshell-corefail inside my local sandbox; I reran them outside it and they pass.ssh_identity::default_credential_store_persists_key_across_runtime_reconstruction, which writes under~/.local/state.refresh_token, missing secret, disallowed endpoint, tenant override, and activation off.Checklist