Skip to content

Bind identity and audit every sensitive action

Attribute an agent action to the authenticated caller and workload while enforcing tenant scope.

Scenario

A catalog assistant can update a tenant's draft shipping preferences. The API has authenticated the customer, while the worker has its own service identity. The old audit entry records only the worker.

Explanation

A workload identity proves which service is running. With Claude API workload identity federation, a workload can authenticate using short-lived identity tokens from a trusted identity provider in place of a long-lived API key. Match the federation rules to the intended issuer, audience and workload. Use scoped credentials for each downstream resource, and keep them out of model input and logs.

The tool handler derives the customer and tenant from the authenticated session and rechecks permission to act on the target. The worker credential only grants the minimum capability required for its job. Audit the caller, workload identity, action, target, policy decision, approved scope when relevant, result and correlation ID. Use approved metadata and retain a record of denials as well as allowed changes.

Worked example

A draft shipping change runs through worker preference-writer. The handler checks the customer from the session, then verifies the draft belongs to that tenant and that the caller may edit it. Its audit record stores both identities, the draft ID, the decision and the trace ID. It stores no access token.