Skip to content

Trace One Protected Request

This tutorial shows how to prove what happened during one protected request. You will find the request, inspect the session context, review audit events, and trace the final decision.

The flow assumes you already completed Protect Your First Real API and Connect Your App with the SDK.

Open the Console:

Terminal window
caracal console

Use these Console entries:

EntryUse it for
auditFind recent authorization and action-result events.
request traceExplain one request ID.
agent sessionFind the tracked agent session for the selected zone.
authority sessionInspect underlying authority sessions and parent relationships.

Record the request ID from the SDK, Gateway, STS error, audit event, or Console trace.

Open audit. The live audit view opens recent events immediately and supports request details, request tracing, advanced filters, reload, and pause/resume.

A Gateway-routed protected call usually produces:

Event classWhat it proves
Authorization eventSTS evaluated policy for the app, resource, scopes, agent session state, and delegation context.
Action-result eventGateway verified and routed the request, then recorded the upstream result.

If you see authorization events without matching action-result events, check whether the call reached the Gateway. For connector-verified services, confirm the service writes its own result audit after mandate verification.

Pick an audit event with a request ID. Press the trace action on the selected event in audit, or open request trace and paste the request ID.

The request trace should show:

  • application and execution session;
  • resource and requested scopes;
  • policy set version and policy rules involved;
  • allow, deny, or partial decision;
  • diagnostics from policy evaluation;
  • delegation edge constraints when present.

Use the request trace as the source of truth for why a request got its result. If an app behaves differently than expected, compare the trace against the active policy set, resource configuration, and runtime profile.

If the request used delegated authority, open delegation and inspect the edge:

FieldWhy it matters
Source sessionThe session that granted authority.
Target sessionThe session allowed to use the delegated permission.
ScopesThe narrowed actions.
TTL and hop limitsThe lifetime and graph depth of the permission.
Resource constraintsThe targets the delegated permission can affect.

Use Implement Multi-Agent Delegation when you need to design or debug delegation flows.

Revoking a session, grant, delegation edge, or zone/application emergency state invalidates authority anchored to it. Gateway-routed calls check revocation before accepting a request and while streaming responses. Audit records revocation events and marks interrupted action results.

You can now trace one protected request from application identity to policy decision, Gateway action, delegation context, and revocation state.

Continue with Choose Your Production Integration Path.