Skip to content

fix(credentials)!: Bind delegated credential subjects#495

Merged
dcramer merged 1 commit into
mainfrom
codex/credential-subject-binding
Jun 3, 2026
Merged

fix(credentials)!: Bind delegated credential subjects#495
dcramer merged 1 commit into
mainfrom
codex/credential-subject-binding

Conversation

@dcramer

@dcramer dcramer commented Jun 3, 2026

Copy link
Copy Markdown
Member

Follow-up to #493. Trusted plugin dispatch now accepts only the stable unbound credential subject shape from plugin code; Junior binds that subject to the Slack DM destination inside the runtime before persisting a dispatch record.

Junior Impact

Scheduled Junior tasks keep durable state as {type,userId,allowedWhen} and no longer store long-lived signatures. When heartbeat dispatches a due run, core signs the subject for the exact Slack DM destination and verifies it locally before storing the dispatch.

Credential Boundary

Plugin registrations no longer have a credential-subject binding opt-in, and plugin input cannot provide a binding. Runtime-bound dispatch records and sandbox egress contexts are the only places bindings exist, so delegated user OAuth lookup remains separate from the system actor.

No Dispatch-Time Slack Lookup

Dispatch does not call Slack conversations.info to re-verify the user. It relies on the already verified Slack DM context that produced the unbound subject and the runtime-owned signature added at dispatch creation.

Breaking Change

AgentPluginCredentialSubject no longer accepts caller-provided binding, JuniorPluginRegistrationInput no longer accepts credential-subject binding flags, and persisted system credential subjects without a runtime binding are invalid.

Refs #449

@vercel

vercel Bot commented Jun 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jun 3, 2026 11:39am

Request Review

Comment thread packages/junior/src/chat/agent-dispatch/validation.ts
Comment thread packages/junior/src/chat/credentials/context.ts Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 489a62a. Configure here.

Comment thread packages/junior-scheduler/src/plugin.ts Outdated
Make trusted plugin credential subjects an unbound plugin API shape and bind them inside the dispatch runtime before persistence.

Persisted dispatch records and sandbox egress contexts now require runtime-bound subjects, while scheduler task state keeps only the stable unbound subject.

BREAKING CHANGE: AgentPluginCredentialSubject no longer accepts caller-provided bindings, plugin registrations no longer support credential-subject binding flags, and persisted system credential subjects must carry a runtime binding.

Refs #449

Co-Authored-By: GPT-5 Codex <codex@openai.com>
@dcramer dcramer force-pushed the codex/credential-subject-binding branch from f89be19 to 73e3f0d Compare June 3, 2026 11:38
@dcramer dcramer changed the title fix(credentials): Bind delegated credential subjects fix(credentials)!: Bind delegated credential subjects Jun 3, 2026
@dcramer dcramer marked this pull request as ready for review June 3, 2026 11:48
@dcramer dcramer merged commit a5f26b7 into main Jun 3, 2026
16 checks passed
@dcramer dcramer deleted the codex/credential-subject-binding branch June 3, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant