Glossary

Token passthrough

Token passthrough is a credential flow in which an intermediary forwards a client-supplied token directly to a downstream service without validating or exchanging it, leaving the downstream service responsible for authenticating the caller and enforcing the token’s permissions while the intermediary controls only the surrounding request path.

How it works

Token passthrough separates request routing from credential validation. A client gives an intermediary a token intended for a downstream service. The intermediary carries that token across the next hop, usually without interpreting its claims, checking its validity, or exchanging it for another credential. The downstream service remains the authorization authority.

A typical flow is:

  1. A client obtains a token for the downstream service.
  2. The client asks the harness or gateway to perform an operation.
  3. The intermediary selects the permitted destination and forwards the request with the supplied token.
  4. The downstream service validates the token, resolves the principal and scopes, and allows or rejects the operation.
  5. The intermediary records the invocation outcome without placing the raw credential in prompts, transcripts, or ordinary logs.

Passthrough does not mean the intermediary has no policy role. It can still restrict destinations, methods, arguments, tool choices, or execution timing. What it does not do is establish that the token is valid for the requested action. That distinction matters because the authorization boundary sits downstream, even when the intermediary controls the path used to reach it.

The token should travel through a credential channel, not through model context. The model can identify which approved connection to use, but deterministic harness code should attach the credential after the tool call has passed policy checks.

Why it matters in an agent harness

Token passthrough can preserve the caller’s identity and downstream permissions. The agent does not need a shared service credential that collapses many users into one principal. If the downstream service already maintains the authoritative permission model, passthrough also avoids reproducing that model inside every intermediary.

The tradeoff is that the intermediary may carry authority it cannot fully inspect. A harness could accept an expired token, a token for the wrong audience, or a token with broader scope than the requested task. The downstream service should reject invalid authorization, but rejection alone does not contain every risk. The harness might route the credential to the wrong service, expose it through tracing, or retry a sensitive call after an ambiguous response.

This makes several controls important:

  • Bind each credential handle to an explicit destination. Never let model-generated text select an arbitrary host for a bearer token.
  • Keep raw tokens outside prompts, tool arguments visible to the model, execution traces, and error messages.
  • Apply harness policy before forwarding. A valid token does not make every requested operation appropriate for the current agent run.
  • Record the requesting principal, selected credential handle, destination, operation, policy decision, and outcome. Record identifiers or fingerprints, not reusable secrets.
  • Treat timeouts and interrupted connections as unknown outcomes when the downstream operation may have committed.
  • Define revocation and rotation behavior. Cached credentials can outlive the authority an operator intended to delegate.

Passthrough therefore moves validation; it does not remove the need for a control boundary. The downstream service decides whether the credential authorizes the call. The harness decides whether the agent should be allowed to attempt that call at all.

Token passthrough vs scoped credentials

The distinction changes where you constrain authority. Passthrough preserves an existing credential. Scoped credentials create or select narrower authority for a particular task, service, or duration.

Design axisToken passthroughScoped credentials
IdentityUsually preserves the client principalMay represent a delegated or workload principal
ValidationPerformed by the downstream servicePerformed by the issuer and downstream service
Permission widthInherits the supplied token’s scopesCan be limited for the intended operation
Operational costAvoids token exchange or mintingRequires issuance, exchange, or credential selection
Main riskForwarding a reusable token to the wrong placeIssuing a scope that is broader than the task requires

Use passthrough when preserving downstream identity and policy is the governing requirement. Prefer scoped credentials when the harness can reliably reduce authority before execution. The two patterns can coexist: an intermediary may accept a caller token, validate or exchange it at a trusted boundary, and send a narrower credential downstream. That is delegation or token exchange, not pure passthrough.

The Rifty take

We treat token passthrough as a boundary choice, not a convenience flag. We optimize for keeping credentials out of model-visible state and binding every forwarded token to a known destination and recorded policy decision. If narrower task credentials are practical, we accept the extra machinery because reduced authority is easier to contain than a broadly reusable bearer token.

Common failure modes

  • Passing the raw token through the model’s context or tool arguments.
  • Allowing the agent to choose both the credential and an unrestricted destination.
  • Assuming downstream validation replaces harness-level approval or operation policy.
  • Logging authorization headers in traces, retry records, or provider error payloads.
  • Forwarding a token whose audience does not match the selected service.
  • Reusing one client token across unrelated tasks, agents, or tenant contexts.
  • Retrying non-idempotent calls after a timeout without resolving the prior outcome.
  • Recording only the downstream response, leaving no attribution for who delegated the call.
  • Treating possession of a token as proof that the current run should exercise all of its scopes.
  • Keeping cached tokens active after revocation, rotation, or the end of the delegated task.

Frequently asked questions

Is token passthrough inherently insecure?

Token passthrough is not inherently insecure, but it shifts trust to the downstream validator and makes routing discipline critical. It is defensible when tokens stay outside model-visible state, destinations are allowlisted, downstream audiences are enforced, and the harness applies its own operation policy before forwarding each request.

Should an agent ever see the raw token?

No, the agent should normally receive an opaque credential or connection handle rather than the raw token. Deterministic harness code can resolve that handle and attach the credential after approving the tool call. This prevents prompts, transcripts, model outputs, and ordinary traces from becoming secret-bearing surfaces.

Does downstream validation remove the need for an approval gate?

No. Downstream validation answers whether the credential permits an operation, while an approval gate answers whether this agent run should attempt it now. A token may authorize deletion or publication even when the operator delegated only inspection, drafting, or a bounded change requiring separate approval.

When should token exchange replace passthrough?

Prefer token exchange when the intermediary can create a credential with a narrower audience, scope, lifetime, or task binding than the client token. Passthrough remains useful when preserving the caller’s downstream identity is required and duplicating the downstream authorization model would add inconsistency without reducing practical authority.

Related glossary terms.