Canton Network validators use JWT-based authentication through an OIDC (OpenID Connect) provider. This secures access to the Ledger API, Wallet UI, CNS UI, and the validator backend. Production deployments must enable authentication. Running without authentication is acceptable only for local development and early DevNet testing.Documentation Index
Fetch the complete documentation index at: https://cantonfoundation-issue-365-details-history.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
How authentication works
The validator uses standard OIDC flows:- Web UIs (Wallet, CNS) use Authorization Code flow with PKCE. Users authenticate through your OIDC provider’s login page, and the UI receives a short-lived access token.
- Backend services use Client Credentials flow. A service account authenticates directly with the OIDC provider to obtain a token for Ledger API access.
- The Ledger API validates JWT tokens using the JWKS (JSON Web Key Set) endpoint published by your OIDC provider.
Token requirements
Access tokens issued by your OIDC provider must include these claims:sub(subject) — Identifies the user or service account. For the validator admin, this must match the wallet admin user identity.aud(audience) — Must includehttps://canton.network.globalfor Ledger API access, and the validator API URL for UI access.scope— Must includedaml_ledger_apifor Ledger API operations.
Required OIDC clients
You need to register several clients (applications) with your OIDC provider:ledger-api— A resource server definition representing the Ledger API. Not a login client; used as an audience target.validator-app-backend— A confidential (service account) client using Client Credentials grant. The validator backend uses this to authenticate with the Ledger API.wallet-web-ui— A public client using Authorization Code + PKCE. Powers the Wallet UI login.cns-ui— A public client using Authorization Code + PKCE. Powers the CNS UI login.
OIDC provider options
Any OIDC-compliant provider works. The Splice documentation provides tested configurations for:- Auth0 — Managed SaaS identity provider. Straightforward setup with tenant-level configuration.
- Keycloak — Open-source, self-hosted. Good for organizations that need full control over their identity infrastructure. Commonly used for LocalNet and DevNet.
- Okta — Enterprise identity provider with OIDC support.
Keycloak setup (LocalNet and DevNet)
Keycloak is a common choice for local development and DevNet because you can run it alongside your validator in Docker.Realm configuration
Create a realm namedcanton with the following session settings:
- Offline session max lifespan: 5,184,000 seconds (60 days)
- Offline session idle timeout: 2,592,000 seconds (30 days)
Client scopes
Create adaml_ledger_api client scope with:
- A User Client Role mapper included in access tokens
- An Audience mapper set to
https://canton.network.global
openid scope with:
- A Validator API Audience mapper set to
https://validator-api.your-domain.example/api - A Subject (sub) mapper included in access tokens
Client registration
| Client ID | Type | Auth method | Purpose |
|---|---|---|---|
ledger-api | Resource server | None | Audience target for Ledger API tokens |
validator-app-backend | Confidential | Client credentials | Backend service authentication |
wallet-web-ui | Public | Authorization Code + PKCE | Wallet UI login |
cns-ui | Public | Authorization Code + PKCE | CNS UI login |
User setup
Create a user whose username matches your validator’s party hint exactly. This user becomes the wallet admin operator.OIDC endpoints
Your validator needs three endpoints from your OIDC provider:Docker Compose configuration
Enable authentication by adding the-a flag to start.sh, then set these environment variables in your .env file:
WALLET_ADMIN_USER and LEDGER_API_ADMIN_USER must be the Keycloak user UUID, not the username. Retrieve the UUID from the Keycloak admin console.Kubernetes configuration
Set the equivalent values in your Helmvalues.yaml:
Running without authentication
For local development only, the validator can run without authentication. In Docker Compose, omit the-a flag. The validator issues self-signed tokens internally.
Next steps
Configuration
Review other configuration options.
Upgrades
Plan for network upgrades.