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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
|
🌿 Preview your docs: https://nvidia-preview-pr-5699.docs.buildwithfern.com/openshell |
- Refuse InlineProviderRefreshSecrets while a mint is in progress or committing, so replacing the refresh state cannot make the mint discard a rotated refresh token. A mint that starts later still loses the version-checked write to it. - Re-read the workspace after inserting a secret and undo the insert if the workspace was deleted meanwhile, so no secret or staged value outlives it. - Page the cleanup sweep through every secret instead of rereading the first 1000, so later tombstones and superseded handles are reached. - Reject configure-time keys such as refresh_before_seconds as secret references even when a profile marks them secret. - Show workspace-secret bindings in provider refresh status output. Refs #5563 Signed-off-by: Mrunal Patel <[email protected]>
Point operators at the MATERIAL_SECRETS status column, note that inlining waits for an in-progress mint, and describe how an older gateway mints copied values after a downgrade. Update the RFC to match. Refs #5563 Signed-off-by: Mrunal Patel <[email protected]>
|
/ok to test 739e763 |
|
Label |
- Keep secrets whose deletion did not finish visible in Get and List, with their deletion time set, so list pages stay full. Reject updates to them, and let CreateSecret finish an interrupted deletion of the same name instead of failing with already exists. The CLI shows them as deleting. - Check the RevealSecret principal and workspace role before the enable_secret_reveal setting, so unauthorized callers cannot probe it. - Record provider and credential targets in the InlineProviderRefreshSecrets audit event. - Re-read a referenced secret once when inlining races an update, and queue any handle a copied value replaces for deletion. Refs #5563 Signed-off-by: Mrunal Patel <[email protected]>
Refs #5563 Signed-off-by: Mrunal Patel <[email protected]>
|
/ok to test 3bcfa18 |
PR Review StatusThe initial review found no blocking issues in the workspace-secret lifecycle, endpoint restrictions, refresh bindings, or reveal authorization. The test mirror now matches this head after Blocking findings:
Carried findings:
Non-blocking suggestions:
Gator metadata
|
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. rust-sdk — No explicit risk acceptance foundraw::proto::open_shell_server::OpenShell now requires create_secret, get_secret, list_secrets, update_secret, delete_secret, reveal_secret, and inline_provider_refresh_secrets.
2. rust-sdk — No explicit risk acceptance foundConfigureProviderRefreshRequest and ProviderCredentialRefreshStatus gain material_secrets, which existing complete Rust struct literals and exhaustive patterns omitted.
3. typescript-sdk — No explicit risk acceptance foundThe exported generated ConfigureProviderRefreshRequest and ProviderCredentialRefreshStatus types gain a required materialSecrets map property.
Review details
Advisory review; publication gates are unchanged. |
Rename the RFC folder and title from the placeholder, move it to review, and link the implementation PR. Refs #5563 Signed-off-by: Mrunal Patel <[email protected]>
|
/ok to test 159e797 |
PR Review StatusI checked @mrunalp’s latest commit assigning workspace secrets to RFC 0024 and moving the RFC to review. The independent follow-up review found no blocking issues in that delta; the prior implementation review remains intact. The test mirror now matches this head, and Branch Checks, Helm Lint, and E2E are running. Blocking findings:
Carried findings:
Gator metadata
|
|
/ok to test 9080a2c |
PR Review StatusI checked @mrunalp’s fix for the pending-create cleanup race, including both publication and cleanup winning, cleanup retries, workspace replacement, and the added regression tests. The test mirror now matches this head after Blocking findings:
Carried findings:
Gator metadata
|
…ecrets/mrunalp Resolve the schema inventory conflict with #4732 by combining the RPC counts and recomputing the reviewed public fingerprint. Adapt to #5668, which added Basic client authentication to OAuth refresh: count a client_secret supplied by a workspace secret as present when validating token_endpoint_auth_method, and test a Basic mint whose client secret comes from a workspace secret. Update the new request_token test and refresh request literal for the merged signatures. Signed-off-by: Mrunal Patel <[email protected]>
|
/ok to test 1e6801f |
PR Review StatusI checked @mrunalp’s merge resolving the schema inventory conflict and adapting workspace-secret references to OAuth Basic client authentication, including the new mint regression test. The independent Critical-only integration review found no new blocking issues; earlier reviews remain intact and The merge conflict is cleared. The test mirror now matches this head after Blocking findings:
Carried findings:
Gator metadata
|
…ecrets/mrunalp Take main's generated default handlers (#5733) in the CLI test servers, which drops this branch's hand-written secret RPC stubs there. Combine the audit imports with #5612, and record the refreshed provider for InlineProviderRefreshSecrets the same way as ConfigureProviderRefresh and RotateProviderCredential. Signed-off-by: Mrunal Patel <[email protected]>
|
/ok to test 0dba818 |
PR Review StatusI checked @mrunalp’s merge of main’s generated test handlers and audit updates, including the retained CLI test behavior and provider identity recorded after inlining refresh secrets. The independent Critical-only integration review found no new blocking issues; earlier review history remains intact and The test mirror now matches this head after Blocking findings:
Carried findings:
Gator metadata
|
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/0024-workspace-secrets/): design, threat model, activation and rollback.CreateSecret/GetSecret/ListSecrets/UpdateSecret/DeleteSecret.WorkspaceSecretowner kind and never returned by Get or List.refresh_uselists the normalized token endpoints the value may be sent to. Without it a secret is reveal-only and cannot be referenced from refresh.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. Only mTLS operators may call it (auth_mode: "operator", as forGetProviderCredentials), checked before the setting so other callers learn nothing. OIDC user access is deferred and recorded in the RFC. 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.token_endpoint_auth_method = client_secret_basic(feat(providers): support basic client auth and resource in OAuth refresh #5668), aclient_secretfrom a workspace secret passes configure validation and is sent only in the Basic header.Checklist