Skip to main content

Step-up API

Turns a recoverable refusal into a question for the person who consented. Both routes return 404 unless the control plane runs with AGENTIC_AUTH_STEP_UP_ENABLED=true, which in turn requires AGENTIC_AUTH_CONSENT_GRANULARITY_ENABLED=true.

With step-up on, a recoverable deny from POST /v1/authorize (SCOPE_NOT_CONSENTED) already carries the challenge in its step_up field, so most callers never call the first route.

POST /v1/consent/step-up​

Raises a challenge for a refusal that has already been recorded.

Bearer: admin. Raising a challenge grants nothing.

Request body (StepUpRequest):

{"session_id": "...", "blocked_action_id": "..."}

The data class, target, hop and reason are all read from the refusal's audit row, never from the request. The session's pinned policy is checked first: if the policy could never grant the widening, the call fails now rather than after someone approves it.

Response: 201 (StepUpChallenge)

{
"challenge_id": "...",
"session_id": "...",
"blocked_action_id": "...",
"blocked_hop": 2,
"target": "mcp://kb.internal/search",
"data_class": "kb.internal",
"reason": "SCOPE_NOT_CONSENTED",
"expires_at": "2026-11-01T10:05:00Z"
}

challenge_id is single use, and only its SHA-256 is stored. It expires after AGENTIC_AUTH_STEP_UP_CHALLENGE_TTL_SECONDS (default 300).

POST /v1/consent/step-up/complete​

Records the person's answer.

Bearer: the consenting person's credential, never the agent's. With a human IdP configured (AGENTIC_AUTH_PRINCIPAL_IDP_*), that is an ID token from it, and its sub is recorded as the approver. Without one, the admin token stands in and the approver is recorded as admin. The session's own grant is refused: an agent that could approve its own widening would make the control a formality.

Request body (StepUpComplete):

{"challenge_id": "...", "approved": true}

Response: 200 (StepUpGrantRead): the session_id, blocked_action_id, target, data_class, approved, and approved_by / approved_at or declined_at. On an approval the session now covers that data class and the chain can resume from the blocked hop. On a decline the original refusal stands. A second answer to the same challenge fails, even inside its lifetime.