fix(providers): keep refresh credential handles stable - #2780
Conversation
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
E2E Test AttestationLocal E2E tests passed. CI does not currently run this Podman scenario, so this comment serves as the verification record.
Test SummaryTests Executed
The test uses a fake issuer that invalidates each old access token. A single long-running workload succeeds initially, survives 12 token rotations with its original environment, and then fails closed after explicit refresh reconfiguration; a newly executed process succeeds with the replacement handle. |
|
/ok to test a505e8d |
|
Label |
Replaced with a focused inline review comment.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
|
/ok to test 4bbd69b |
Summary
Keep gateway-managed refresh credentials usable by long-running sandbox processes when their short-lived access tokens rotate. Workloads now receive an opaque, identity-stable handle whose resolver value advances to the current token, while explicit refresh reconfiguration and authorization-boundary changes revoke the old handle.
Related Issue
Closes #2777
Changes
Deviations from Plan
None — implemented as planned.
Testing
mise run pre-commitpassesmise run testpassesmise run cipassescargo test -p openshell-corepassescargo test -p openshell-serverpassescargo test -p openshell-supervisor-networkpassesprovider_refresh_handlespasses through 12 token rotations and verifies explicit reconfiguration revocationTests added:
e2e/rust/tests/provider_refresh_handles.rscovers a long-running Podman process through 12 rotations and a reauthorization boundary.Checklist
Documentation updated:
architecture/sandbox.md: stable handle data flow and revocation invariants.docs/sandboxes/providers-v2.mdx: workload behavior, authorization epochs, and rollout guidance..agents/skills/openshell-cli/SKILL.md: refresh lifecycle guidance for CLI workflows.