Implementation Guide

    Attributing every Amazon Bedrock and Google Vertex AI call to an end user when applications share one cloud role

    When applications share one IAM role or service account, cloud audit records identify the role, not the person who triggered the call. To attribute each call, authenticate the user in the application, carry a verified identity into the request path, and record the user, the policy decision and the request together at a point the client cannot bypass. Metadata, tags and credential scoping each help, but each leaves gaps.

    What a per-call attribution record should contain

    • Verified user identifier and the identity provider that asserted it
    • Calling application and workload identity (the shared role or service account), kept as a separate field
    • Target provider, model and operation, including whether the call was streaming, batch or synchronous
    • Policy evaluated, the decision (allow, redact, block or other) and the time it was made
    • Reference to the input and output, or to their redacted forms, under your retention rules
    • Correlation ID matching the corresponding cloud audit entry

    Why a shared role breaks per-user attribution

    A shared role or service account is a workload identity. Every application that assumes it presents the same principal to Amazon Bedrock or Google Vertex AI. Native audit records such as AWS CloudTrail and Google Cloud Audit Logs therefore name that role or service account. They do not name the employee, customer or agent session that caused the request.

    That gap matters when security or compliance teams ask who invoked which model, with what input, under which policy. From the cloud record alone, the honest answer is "one of the applications that holds the role." Any per-user answer has to be inferred from application logs, timestamps and guesswork, which is weak evidence in an investigation or audit.

    NIST zero trust guidance for cloud access control frames the underlying issue. Application requests are triggered by user actions, so the end-user principal should be authenticated and represented by a cryptographically verifiable token, kept distinct from the workload identity. A shared service account is not a user identity, and it should not stand in for one in the record.

    Four attribution patterns and what each can show

    Most teams end up combining these patterns. The useful question for each is what it proves, and what it leaves to trust.

    • Application-layer identity propagation: Shows: a verified user principal travels with the request through your own services. Cannot show: anything on the cloud side unless the identity is also written into a record you control. Main risk: identity taken from a client-supplied field.
    • Per-request metadata and tagging: Shows: a user or session reference attached to each call, where the provider and API path accept it, useful for correlation and usage reporting. Cannot show: that the value is true. The caller sets it, so it is only as trustworthy as the code that sets it.
    • Role or credential scoping: Shows: a distinct cloud principal per user, tenant or session, so native audit records separate callers. Cannot show: the input, the policy applied or the outcome. Main cost: credential issuance and role management that grow with the number of users.
    • Enforcement in the execution path: Shows: verified user, policy decision and request in one record created as the call is made. Cannot show: calls that bypass the enforcement point, so direct access to the shared role must be closed off.

    Implementing user-bound model calls

    The sequence below follows NIST guidance on end-user authentication and per-request authorization. The details of tokens, headers and SDK calls will differ by provider and application stack.

    • 1. Authenticate at the application edge: Use your identity provider, with phishing-resistant MFA where the user population allows it. Treat the verified assertion as the only source of user identity.
    • 2. Exchange for a short-lived internal token: Convert the external credential into a locally verifiable token, such as a JWT, that downstream services can check at each hop. Short lifetimes limit replay and exposure.
    • 3. Derive identity server-side: The component that calls the model reads the user from the verified token. It never accepts a user ID from a request body, header or prompt.
    • 4. Authorize each request: Check the user against policy for the model, data and action requested, at a point in the call path. Record the decision at the same moment.
    • 5. Write one attribution record per call: Include a correlation ID that is also passed to the provider as request metadata where supported, so your record can be matched to the cloud audit entry.
    • 6. Close the side doors: Restrict who can assume the shared role. If applications can call the provider directly, calls will exist with no user attached.

    Failure modes to test before relying on the record

    Spoofable identity is the most common failure. If a browser, mobile client or upstream service can set the user field, the record proves only what the caller claimed. Signed tokens verified at your own boundary fix this, as does an enforcement point that reads identity from the token itself.

    Streaming, batch and asynchronous calls need separate checks. In streaming, identity and policy must be bound when the request opens, because there is no later moment to add them. In batch and queued work, the user who submitted the job may no longer have a live session when the call runs. Carry the verified identity, and its time of verification, inside the job record, and decide whether a stale token is acceptable for deferred execution.

    Multiple applications create a quieter gap. If each application implements its own propagation, field names, token lifetimes and retention will differ, and reconstructing one user's activity across them becomes a manual exercise. A single, consistent attribution record across applications is easier to query and to defend.

    Finally, keep user attributes in tokens and records to what is needed. Identity claims that carry extra personal data widen exposure without improving attribution.

    Enforcing in the path versus reviewing after the fact

    Log review reconstructs what probably happened. It depends on joining cloud records with application records after the event, and it can only report decisions that were never actually made, such as whether a user should have been allowed to send certain data to a model. Enforcement in the execution path makes the decision before the call proceeds and writes identity, decision and request together. The record is a by-product of the control, not a reconstruction.

    Trussed enforces policy in the execution path across models, agents, tools and MCP servers, with actions to allow, redact, block, rate limit or escalate for human approval. Its scope is individual interactions and tool calls. Enforcement at runtime, not review after the fact, produces audit-ready evidence mapped to frameworks including HIPAA, NYDFS and NIST, and it can be self-managed in the customer's cloud with configurable retention and data residency.

    This does not replace the cloud's own records. CloudTrail and Cloud Audit Logs remain the provider's account of what reached the service. The per-user record from the enforcement point is the account of who asked and what policy applied, and the correlation ID lets reviewers read the two side by side.

    From user to model call

    Authenticate

    The application verifies the user through the identity provider.

    Bind

    A short-lived, verifiable token represents the user in the call path.

    Enforce

    Policy is checked per request against that user.

    Record

    User, decision and request are stored as one record.

    Bind every model call to a user

    Talk through how enforcement in the execution path can tie each interaction to an authenticated user and produce audit-ready evidence in your regulated enterprise.

    Talk to an Expert
    Next step

    How does your AI governance program compare?

    See where your program has gaps in less than 2 minutes.