Skip to content

Bind Provider refresh operations and material references to expected resource identities #5966

Backlog

Description

@stevenlee-oai

User Story

I use OpenShell Provider refresh to keep account grants and shared client material inside a Workspace. I need a refresh operation to affect the exact Provider, refresh authorization, and material Secret that my application previously registered.

Problem Statement

Refresh configuration, rotation, and deletion select a Provider by Workspace and Provider name. A configuration's material Secret references also use Secret names. A caller cannot condition the operation on its expected immutable Workspace, Provider, or material Secret identity, or distinguish an earlier refresh authorization from a replacement authorization on the same Provider.

Impact / Why This Matters

If an administrator deletes and recreates a named Provider or Secret, a delayed configure request can write a long-lived grant to the replacement Provider or bind a replacement Secret. On the same Provider, reauthorization can replace the current grant while a delayed rotate or delete still targets the new authorization. Existing request IDs provide replay protection but do not express which registered resource the caller intended.

Proposed Design

Let callers specify the expected identities for the Workspace, Provider, and each shared material Secret during refresh configuration. When replacing, rotating, or deleting refresh configuration, let callers also select the exact refresh authorization or its version. Refuse a request before reading or mutating credential material when any expected identity differs. Keep current request-ID replay behavior. The desired workflow is: record the identity returned when each object is created; configure and operate on that exact registered authorization; explicitly obtain new identities after replacement.

Acceptance Criteria

  • Configuration succeeds against the expected Workspace, Provider, and shared material Secrets.
  • Recreating a Provider or material Secret under the same name causes a stale configuration request to fail before grant storage or Secret binding.
  • Reauthorizing the same Provider causes a stale rotate, replacement, or delete for the previous authorization to fail.
  • Unrelated Providers, Secrets, and refresh authorizations are unaffected.
  • Idempotent request replay remains supported without duplicating credential material.

Alternatives Considered

A GET immediately before mutation cannot condition the server-side operation on the object observed. Unique naming conventions and application-side locks do not protect against authorized object replacement outside the caller. Middleware or interceptors could participate if OpenShell can pass the exact expected and actual identities to the same atomic operation.

Agent Investigation

At upstream commit 1fca4c8b2ee3, refresh RPC requests carry a Provider name, credential key, request ID, and material Secret names. The Gateway resolves a shared Secret to an immutable ID internally, but the caller cannot require the previously registered ID. The refresh implementation creates an authorization epoch on reauthorization; the public request does not select that epoch. Related: Provider CRUD identity #5931, Workspace Secret identity #5961.

Checklist

  • I've reviewed existing issues and the published docs.
  • This is a design proposal, not a "please build this" request.

Activity

  1. added
    state:triage-needed
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions