Skip to main content

Authentication

How clients authenticate to Rivet: secrets for your backend, short-lived JWTs for public clients, and ACL tokens for long-lived scoped access.

Every request to Rivet carries a credential, and the control plane checks what that credential may reach before routing it to an actor. This page covers the kinds available. To authorize a caller after it is connected, see Permissions.

Authentication is required by default. On a self-hosted control plane, auth.insecure_allow_unauthenticated restores the old unauthenticated behavior for a trusted network; do not enable it on anything publicly reachable.

Choosing a Credential

LifetimeScopeRevokeAvailable in
Admin tokenStaticEverything, every namespaceRotate the secret and restartSelf-hosted
Secret keyStaticOne namespaceDelete the keyRivet Cloud
JWT1 hour by default, 24 hour maximumOne namespace, one grant setWait for expirySelf-hosted, Rivet Cloud
ACL tokenLong-livedRoles built from reusable policiesDelete the tokenEnterprise

Your backend can hold a secret, so it uses one directly. A browser or mobile app cannot, because anyone can read it out of the bundle, so mint a short-lived JWT per user on your backend and hand that out instead. Reach for ACL when a credential has to outlive a session and stay revocable.

On Rivet Cloud the secret, publishable, and connection keys are created from the dashboard or the CLI. See Tokens.