Skip to main content
Harnest separates caller identity from downstream credentials.

Authenticate a request

An authentication listener reads connection metadata and returns one principal. It never receives the request body.
Listeners run in order. A later listener can enrich the principal but cannot change an established user_id.

Resolve a downstream credential

Declare one optional credential provider at the root:
Your provider decides whether to forward an incoming credential or exchange it for a narrower one. Harnest does not guess that policy.

Use a credential

Trusted tools, graph nodes, and lib/ functions resolve credentials inside an active invocation:
Never accept an audience or token as a model-generated tool argument. Trusted code must choose the audience and scopes.

Secret boundary

After Credential.reveal(), the receiving code owns the value. Keep the reveal close to the network call.