11

Revocation, Audit, and Observability

Source: How Enterprise Authentication and Authorization Work in an Agent Platform, sections 30 and 35; preserves the generated-application revocation model migrated from the former Sharing, Roles, and Revocation lesson.

The enterprise problem and today’s slice

Enterprise problem: Removing a user or connector in an admin screen does not stop cached decisions, live sessions, subscriptions, signed URLs, child agents, or queued jobs, and fragmented logs cannot prove when access actually ended.

Whole-course context: The incoming evidence is an immutable deployment with separate provider grants, workload/network controls, generated-app roles, and per-call decision IDs; today makes changes to that authority converge measurably.

Today’s slice: We design versioned revocation, immediate high-risk rechecks, cancellation propagation, cross-boundary lineage, redacted audit events, metrics, and security-information-and-event-management export across all three authorization planes.

End-of-day evidence: A revocation run records the request time, first confirmed denial, every convergence leg, unaffected positive controls, residual limits, complete actor chain, policy versions, and immutable trace and event identifiers.

Still unsolved: The adversarial threat suite, release-blocking acceptance thresholds, staged production rollout, rollback drills, and final retirement evidence remain deferred.

Customer use cases

A revoked grant can remain effective through many independently cached paths, so a database update is not the customer outcome. These use cases require observed convergence and an audit narrative that an investigator can reconstruct without exposing secrets.

Use case IDActorCustomer jobSuccess outcomeDenial or recovery evidence
D11-UC-01Enterprise security administratorRevoke a provider project member, preview link, generated-app audience grant, connector, deployment, approval, or entire app during active workEvery controllable cache, session, stream, signed URL, run, child run, and queued side effect reaches the target denial within its stated objective while unrelated grants stay activePer-leg probes capture request and first-denial times, stale-version rejects, cancellations, unaffected positive controls, and honest statements that downloads and screenshots cannot be recalled
D11-UC-02Security operations investigatorReconstruct an authorization incident from app request through provider decision, runtime, tool gateway, connector, and downstream resultOne redacted lineage joins session, run, model, retrieval, intent, decision, approval, protocol, downstream, and child-run identifiers and exports to the enterprise SIEMMissing-lineage, late-event, and secret-canary checks alert; denied and successful controls remain distinguishable without raw prompts, tokens, cookies, or document bodies

Authorization freshness is risk-based. Low-risk reads use short run tokens, periodic membership revalidation, and bounded policy caches. High-risk writes recheck current membership, deployment status, connector state, approval state, app grant version, and exact argument digest immediately before execution, then obtain a fresh downstream token.

Actor-centred user stories

“Revoked” and “audited” are not observable unless the actor can see which path stopped, when it stopped, and which authority deliberately survived. The stories define measurable evidence instead of promising impossible instantaneous recall.

Story IDUse case IDsUser storyObservable acceptance conditions
D11-US-01D11-UC-01As a security administrator, I want each authority removed independently and propagated through every controllable delivery path, so that a stale session or job cannot keep acting and unrelated access is not destroyedEvidence names authoritative target and version; cache invalidation, session termination or recheck, stream closure, signed-URL expiry, parent/child cancellation, and job cancellation status; request time and first confirmed denial; unaffected grant probes; and residual downloaded-byte limits
D11-US-02D11-UC-02As a security operations investigator, I want every allow, deny, approval, credential resolution, and downstream result joined by stable lineage, so that I can explain an incident without collecting secretsA query from app session_id reaches parent and child run_id, tool intent, decision, approval, MCP request, connector request, and downstream request; actor chain and policy digest are present; a secret canary is absent; missing links and staleness breach generate alerts

The administrator chooses a specific revocation target rather than a generic “remove access” operation. Provider project membership, revision-bound preview capability, generated-app audience grant, app visibility policy, connector instance, agent deployment, and one approval are different records with different caches and residual effects. One target can be removed while the others remain positive controls.

Generated-app access is evaluated at every protected request using current visibility, authenticated principal or capability, tenant membership, role, resource, and action. A short-lived cache key includes app ID, tenant ID, principal ID, policy version, membership version, visibility version, grant version, and action, so a version advance makes stale entries unusable. Subscriptions reauthorize on connect, reconnect, policy change, and a bounded heartbeat. Background jobs carry tenant, initiating principal, grant/policy versions, and exact intended side effect, then reauthorize before execution. Signed object URLs are short-lived and tenant-scoped; search indexes, exports, analytics, and notifications preserve the originating tenant and audience boundary.

End-to-end product flows

A final 403 does not show whether an old stream or queued write survived, so the product flow must probe all paths from a known authorized precondition. A monotonic version is a number that only increases; embedding it in caches and jobs makes an older grant detectably stale rather than silently reusable.

Flow IDUse case IDsPathTriggerNumbered stepsTerminal evidence
D11-FLOW-01D11-UC-01RecoverySecurity administrator removes a Finance analyst from the team during an agent run1. Product verifies the current membership and active parent/child runs, then records the authorized precondition.<br>2. Membership service disables the grant, increments membership_version, and appends a revocation request.<br>3. Transactional outbox publishes a versioned event to authorization caches, provider sessions, runtime supervisors, app session indexes, stream controllers, signed-URL service, and job queues.<br>4. Parent and child runs cancel; the next privileged action revalidates and denies; no fresh capability token or credential is issued.<br>5. Generated app closes affected subscriptions and forces current role/membership evaluation while leaving a different app grant active.<br>6. Probe runner polls every leg until denial or the declared deadline.Actor secadmin_7, user and membership resources, revoked team/run/tool scopes, authorized precondition, expected denial objectives, observed per-leg status and first-denial times, unaffected app-grant result, environment, timestamps, event offset, revocation run ID, decision IDs, and trace IDs
D11-FLOW-02D11-UC-01DeniedA queued high-risk Slack post reaches execution after its approval or connector was revoked1. Job presents captured tenant, principal, deployment, app grant, approval version, connector version, and argument digest.<br>2. Tool gateway immediately reloads current high-risk state.<br>3. Version or digest mismatch denies before credential resolution.<br>4. Job records terminal cancellation and cannot retry with stale authority.<br>5. A separately approved read uses current state as a positive control.Actor, message/channel resource, slack.post_message scope, stale approval/connector precondition, expected deny, observed broker-not-called and job-cancelled results, positive control, environment, timestamp, decision ID, and immutable job attempt ID
D11-FLOW-03D11-UC-02HappyInvestigator opens an authorization incident by application trace ID1. Evidence service resolves app session and request to provider run without trusting the app as policy authority.<br>2. It joins model and retrieval requests, tool intent, authorization decision, approval, capability-token hash, protocol request, connector request, downstream request, and child-agent lineage.<br>3. It displays subject, actor, organization, active team, app tenant, deployment, tool, constrained resource, policy digest, credential mode, result, and duration.<br>4. Redaction removes prompts, raw documents, tokens, keys, cookies, and sensitive results.<br>5. Export service signs and sends the bounded event set to the customer SIEM.Actor/investigator, incident resource, audit-read scope, immutable-event precondition, expected complete redacted chain, observed lineage completeness and export acknowledgment, production environment, timestamps, query ID, event IDs, and signed export batch ID
D11-FLOW-04D11-UC-02FailureAudit completeness monitor finds a tool result with no authorization-decision link or detects a secret canary1. Stream processor compares required lineage edges and redaction patterns.<br>2. It quarantines the export batch and emits severity based on operation risk.<br>3. Supervisor marks the affected evidence interval incomplete and identifies producer and last valid offset.<br>4. Repair replays immutable events, never fabricating a decision.<br>5. Completeness and canary probes rerun before export resumes.Actor/service, affected event interval, audit-export scope, expected complete/redacted precondition, observed missing edge or canary hash, quarantine and recovery status, environment, timestamp, source offsets, replay run ID, and alert ID

A self-contained token can remain usable until expiry unless an online check or denylist exists, so the product publishes separate objectives for low-risk cache freshness, privileged action revalidation, stream closure, and job cancellation. Public anonymous access cannot be revoked per person, and already downloaded, exported, copied, or screenshotted bytes cannot be recalled; evidence states those limits.

System design derived from the flows

Revocation and audit fail when each service invents its own identifiers, clock, and retry semantics, because investigators cannot distinguish delay from data loss. The architecture uses each plane’s authoritative state plus a shared versioned event and lineage contract.

Use case IDEntry pointResponsible servicesAuthoritative storeFailure evidence
D11-UC-01Security console and grant-specific administration APIsProvider membership/deployment/preview/connector services; generated-app share and session services; revocation orchestrator and transactional outbox; cache invalidator; runtime supervisor; stream closer; signed-URL service; job canceller; residual probe runnerThe target grant remains authoritative in its owning provider, runtime, or app store; revocation workflow store owns convergence status; append-only evidence ledger owns observationsEvent publication lag, stale version accepted, unacknowledged leg, deadline breach, surviving stream/job/token, first-denial latency, residual limitation, and unaffected-control regression
D11-UC-02Provider incident explorer and SIEM export APIEvent collectors; trace propagator; lineage indexer; redaction service; metrics pipeline; completeness monitor; immutable evidence ledger; signed exporterAppend-only authorization event store owns redacted decisions; trace index owns joins; metrics time-series store owns aggregates; customer SIEM owns exported copyMissing required edge/field, clock skew, duplicate or late event, redaction canary hit, export rejection, policy-digest mismatch, and replay outcome

Every tool-decision event records timestamp, organization, active team, subject, agent and version, deployment, run, connector, protocol server, tool, constrained resource, decision and reason, approval identity, credential mode, provider-subject hash, policy bundle and digest, argument digest, result, and duration. It must not record raw prompts containing secrets, OAuth access or refresh tokens, API keys, session cookies, unredacted document bodies, or full sensitive tool results.

Stable lineage is hierarchical: session_id owns run_id; a run links model and retrieval requests plus tool intents; each intent links authorization decision, approval, MCP request, and downstream request; child-agent runs keep parent_run_id. Metrics include run and tool decisions by reason, cross-team invocation, credential-resolution mode, approval outcomes, authorization staleness, invalid audience, token-passthrough attempts, privilege-escalation denies, and prompt-injection tool denies. Metrics diagnose patterns; immutable events prove individual decisions.

Data model and ownership

Convergence cannot be proved if revocation events overwrite one another or if app sessions are stored in the provider membership table, so the model preserves independent authorities and append-only observations. Cross-plane target references are opaque and re-resolved by the owning service before any state change.

Generated-application database: Required in this slice — each generated application owns its share policy, audience grants, session index, subscriptions, signed-object references, and domain-job authorization versions so app access can be revoked independently of provider collaboration and runtime deployment.

Record or entityStore and ownerPrimary keyForeign key or opaque referenceTenant keyMaterial constraintLifecycle and deletionUse case IDs
RevocableAuthorityOwning provider grant store or generated-app policy store; relevant membership, deployment, connector, preview, approval, or app serviceauthority_type plus authority_idLocal subject/resource references within owner; opaque cross-plane mappings onlyorganization_id plus optional team_id or app_tenant_idStatus and monotonic version change atomically; one plane’s disable never implies another plane’s grant removalCreate on explicit grant; disable/revoke independently; tombstone through convergence and audit retention; then purge personal fieldsD11-UC-01
AppSharePolicyGenerated-app database; app policy serviceapp_share_policy_idOpaque provider deployment referenceapp_tenant_id or route-scoped public sentinelVisibility, protected routes, mutation defaults, and policy version are mandatory; public create never implies read/admin/exportVersioned updates; archive with app; retain decision metadata; state that prior downloads remain outside recallD11-UC-01, D11-UC-02
AppAudienceGrantGenerated-app database; app audience serviceapp_audience_grant_idLocal FK app_share_policy_id and app principal/group referenceapp_tenant_idAudience, role, scope, expiry, and revocation version required; no provider/preview inheritanceRevoke independently; tombstone until sessions, streams, URLs, and jobs converge; purge after retentionD11-UC-01
PreviewCapabilityPreview delivery store; provider preview servicepreview_capability_idOpaque project, preview, revision, and optional provider-principal referencesorganization_idHash-only token; audience, methods, environment, revision, expiry, and revocation epoch requiredRevoke or expire; purge edge cache, close preview streams, cancel queued preview work; retain residual statement for downloaded bytesD11-UC-01, D11-UC-02
CapabilityLinkGenerated-app database; app capability servicecapability_link_idLocal FK app_share_policy_id and route; token represented only by hashapp_tenant_id or route-scoped public sentinelAudience, method, route, scope, expiry, and revocation epoch required; possession grants no administrationRevoke or expire; invalidate caches and streams; delete hash after retention while prior downloads remain outside recallD11-UC-01
SessionIndexGenerated-app session-control store; app identity servicesession_index_idHashed session ID; local app_audience_grant_id; opaque provider subjectapp_tenant_idCache key includes app, tenant, principal, policy, membership, visibility, and grant versionsExpire or destroy on revocation; close streams; retain minimal denial correlation; purge bearer/session materialD11-UC-01, D11-UC-02
AppAuthorizedJobGenerated-app job store; app workflow serviceapp_job_idLocal app principal/grant references; opaque provider run and decision referencesapp_tenant_idCaptures initiating principal, tenant, policy/grant versions, operation, arguments digest, and cancellation state; must reauthorize before side effectCancel or terminally deny on stale version; preserve redacted attempt evidence; delete payload with app data retentionD11-UC-01, D11-UC-02
RevocationJobSecurity workflow store; revocation orchestratorrevocation_job_idOpaque target type/ID plus source version; local parent event referenceorganization_id plus optional app_tenant_idIdempotency key, requested version, deadline, and per-leg retry state prevent stale reactivationAppend request and leg transitions; archive immutable completion evidence; delete transient payload after retentionD11-UC-01, D11-UC-02
RevocationEventDurable event log; outbox and event-stream ownerevent_id plus partition offsetLocal FK revocation_job_id; opaque target and subject referencesorganization_idAt-least-once delivery with idempotent consumers; versions never decrease; occurred time and producer time both recordedPublish transactionally with authority change; compact payload only after all acknowledgments and audit retentionD11-UC-01, D11-UC-02
ConvergenceLegRevocation workflow store; probe runnerrevocation_job_id plus leg_nameLocal FK revocation_job_id; opaque cache/session/run/job/stream referenceorganization_id plus optional app_tenant_idRecords target version, deadline, retries, first denial, unaffected control, and residual limitationUpdate by monotonic state machine; freeze final evidence; remove operational payload after signed report exportD11-UC-01, D11-UC-02
AuthorizationDecisionEventAppend-only evidence ledger; security operationsdecision_idOpaque actor, app session, run, deployment, connector, policy, approval, and downstream referencesorganization_id plus active team_id and optional app_tenant_idRequired actor/resource/scope/precondition/expected/observed/environment/time fields; secrets redacted; immutable after appendRetain by audit policy; legal hold where required; export signed subset; delete/aggregate after retentionD11-UC-01, D11-UC-02
TraceLineageEdgeTrace index; observability platformparent_id plus child_id plus edge typeOpaque IDs into immutable producer eventsorganization_idRequired edge types form an acyclic run tree; late events preserve original event time and offsetAppend and reconcile; alert on missing edge; rebuild from ledger; expire index after ledger retentionD11-UC-02
AuditExportBatchExport store; SIEM exporterexport_batch_idLocal event-range references; opaque customer SIEM acknowledgmentorganization_idSigned manifest, contiguous offsets or explicit gaps, redaction pass, and idempotent destination keyQuarantine on gaps/canary hit; retry safely; retain manifest and acknowledgment; delete exported payload on scheduleD11-UC-02

For each revocation report, the product names what must become denied, what must remain allowed, and the irrecoverable residual. Removing project membership denies provider source, agent, preview configuration, and release actions but leaves a separately granted app membership and preview link. Revoking a preview capability denies its bound revision, streams, assets, and queued preview work but leaves project/app memberships. Removing an app grant denies tenant routes, subscriptions, object URLs, and app jobs but leaves provider role and preview access. Changing visibility removes former audience routes but preserves named administration only where current app policy permits.