Conversation
…mode Adds backchannel_token_delivery_mode to the admin client API (GraphQL _create_client/_update_client/Client, gRPC/REST CreateClient/UpdateClient/ Client). "poll" registers the client for CIBA (OpenID CIBA Core 1.0 §4), "" removes it, omitted leaves it unchanged; any other value is refused. Stored as the CIBA grant URN in the existing grant_types column (written by every backend's full-record UpdateClient), so no schema change. Other grant types on the row are preserved. Dynamic registration still accepts only authorization_code/refresh_token, so it cannot enable CIBA. Nothing reads the flag yet; the CIBA endpoints follow in the next PR and are additionally gated server-wide by --enable-ciba.
…(beta) Implements phase 4a of the CIBA design (authorizerdev/docs#112), off by default behind --enable-ciba and a per-client opt-in. - POST /oauth/bc-authorize (CIBA Core 1.0 §7): service accounts only; login_hint (user id) or id_token_hint (signature verified, aud must contain the client, accepted up to 30 days expired per §14); required binding_message (≤64 chars, no Cc/Cf); RFC 9396 authorization_details limited to --ciba-authorization-details-types; exactly one external resource (never Authorizer itself); no authorizer: scopes. Unknown, revoked, out-of-org, capped and blocked users get the same answer and the same storage round trips (timing probe test). - GET/POST /oauth/bc-approve: session cookie only (ValidateBrowserSession, never bearer); step-up via --ciba-step-up-max-age and no magic-link sessions, reusing forceReauth's revocation (now revokeBrowserSession) and the SAML-style /app login detour (isCibaApproveURL in the login UI); single-use per-render form token bound to the session plus an Origin check; approve / deny (1h block) / deny-and-block (24h). - CIBA grant at /oauth/token: authorization_pending, slow_down (+5s), expired_token, access_denied, single redemption. Issues a 5-minute delegated token (act.sub = agent, aud = resource, authorization_details and ciba{req,msg,approved_at} claims, no sid so it cannot authenticate at Authorizer) and a scope-redacted ID token (amr from the approving sign-in). Token response carries scope and authorization_details (RFC 9396 §7). - Channels: ciba_approval email template and user.approval_requested webhook, sent in the background. - Discovery fields, audit events (ciba.*), metrics, startup validation (TLS --url per §7) and warnings (no SMTP, magic-link-only sign-in, own origin missing from --allowed-origins). - Client assertion aud: issuer/token/backchannel URLs accepted at the backchannel endpoint when expected_aud is one of them (CIBA §7.1). Tests: integration (poll flow, approval page auth/CSRF/step-up, deny and block, caps, org boundary, unknown users, validation, id_token_hint, timing probe), unit, release smoke against the real binary.
…air caps, atomic stores From the implementation security review: - High: token exchange accepted a CIBA access token as subject_token and minted a token for any resource without authorization_details or the ciba claim, with a fresh lifetime. Refuse subject tokens carrying a ciba or authorization_details claim (regression test fails without it). - Medium: the cross-client per-user total counted undeliverable requests, so one agent (blocked, out of org, over its own cap) could silence all others. Count only deliverable requests; the other path reads the counter so both paths make one storage round trip. - Medium: on DynamoDB and Cassandra/ScyllaDB the database memory store's SetCacheNX is an upsert, so single redemption and first decision were not atomic. --enable-ciba now requires --redis-url there. - Low: resource check compares hosts only (scheme, port, trailing dot ignored); authorization_details labelled as the agent's unverified description; Zl/Zp refused; TTLs floored at 1s; user.* variables passed to the ciba_approval email; Root.tsx doc comment back in place.
lakhansamani
force-pushed
the
feat/ciba-poll
branch
from
November 30, 2026 10:26
9f911f5 to
ae84d1b
Compare
lakhansamani
force-pushed
the
feat/ciba-dashboard
branch
from
November 30, 2026 10:26
29d136f to
b4e1696
Compare
TestCIBACaps took the email count right after three requests, while the third email could still be sending in the background, so a late email was counted as a fourth (flaky in CI). Wait for all three first.
- Clients: "Human approval (CIBA)" switch on create/edit, sent as
backchannel_token_delivery_mode ("poll" / ""), and a CIBA badge in
the list.
- Webhooks: user.approval_requested event.
- Email templates: ciba_approval event, with its variables (agent_name,
binding_message, approval_url, expires_in_minutes, resource) shown only
for that event, which has no verification_url.
lakhansamani
force-pushed
the
feat/ciba-dashboard
branch
from
November 30, 2026 10:48
b4e1696 to
6fd9a7e
Compare
backchannel_token_delivery_mode="poll" is refused for a client that is not a service account (the backchannel endpoint rejects every other kind) and for one whose allowed_scopes lack openid (every CIBA request must include it), including when an update removes openid from a CIBA client. Found in review.
…into feat/ciba-poll
… blocks, MFA detour - Enumeration: undeliverable requests now increment a shadow counter instead of reading the total, so every path makes the same storage calls. On the database memory store (the default without Redis) IncrementCache is several statements, so known users were measurably slower. New TestCIBAUserCanBeAskedStorageParity records the calls for deliverable, unknown, revoked, blocked, capped and out-of-org users and requires them identical; it fails on the previous code. - Resource check: same host AND port is Authorizer (default ports 80/443 count as one, trailing dot and case ignored). Host-only comparison refused every API on localhost, so local development could not work. - Deny-and-block uses its own 24h key, so a later plain deny cannot shorten it; a failed block write is logged at warn. - Sign-in detour carries mfa_required/mfa_methods/mfa_gate to /app, so a social or SSO login stopped for MFA continues instead of looping. - --ciba-poll-interval minimum is 2 (1 made exact one-second polling get slow_down on the in-memory store). - Tests: CIBA flow and approve/deny race on the database memory store; approve after expiry; plain deny blocks and cannot shorten a 24h block; revoked user indistinguishable when polled; bearer test uses the request's own user's token; background sends are drained instead of slept on before 'nothing was sent' assertions.
…ters The design (§10) puts the new events in the audit filters; they were missing, including ciba.expired from #958. CIBA decisions are recorded against the agent's service account, so that resource type is filterable too.
Merged
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.
Phase 4a, part 3a. Stacked on #954.
backchannel_token_delivery_mode("poll"/""), with help text saying it also needs--enable-cibaandopenidin the allowed scopes; a CIBA badge in the clients list.user.approval_requestedin the event picker.ciba_approvalevent. The variable picker shows its variables (agent_name,binding_message,approval_url,expires_in_minutes,resource) only for that event, and hidesverification_urlthere.Verified:
tsc --noEmitclean,vitest run50/50,vite buildok, Prettier clean.Update: the audit log filters now list the six CIBA events (including
ciba.expiredfrom #958) and theservice_accountresource type, which CIBA decisions are recorded against. Design §10 called for this, and it was missing.