Overview
Flipt supports these application authentication patterns:- Static Client Tokens — generate a secure token and configure it in Flipt
- JWT Authentication — use JWTs from your existing identity provider
- Kubernetes Service Account Exchange — exchange a pod service account token for a Flipt client token
Method 1: Static Client Tokens
Static tokens are the simplest way to authenticate. You generate a secure random token, add it to your Flipt configuration, and then use that token in your applications.Step 1: Generate a Secure Token
Generate a cryptographically secure random token:7f3a8b2c1d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a).
Step 2: Configure Flipt with Your Token
Add the token to your Flipt configuration:config.yaml
Step 3: Restart Flipt
Restart your Flipt instance to pick up the new configuration.Step 4: Use the Token in Your Application
Once configured, pass the client token to your SDK or send it in the HTTPAuthorization header.
SDK authentication class names and initialization options vary by language and
SDK version. Use the auth strategy/client token option documented in the SDK
README for your language from the Server SDKs
and Client SDKs pages.
Using Tokens with Kubernetes Secrets
For Kubernetes deployments, store the token in a Secret and reference it via environment variables:Method 2: JWT Authentication
If you already have an identity provider (Auth0, Okta, Keycloak, etc.) that issues JWTs, you can use those with Flipt without creating static tokens.Step 1: Configure Flipt for JWT
Add JWT authentication to your Flipt configuration:config.yaml
Step 2: Use JWTs in Your Application
Your application obtains a JWT from your identity provider, then passes it to Flipt using the JWT authorization header format:- You already have SSO set up
- You want to avoid managing static tokens
- You need per-user authentication and audit trails
Method 3: Kubernetes Service Account Tokens
If you’re running Flipt in Kubernetes, you can use the Kubernetes authentication method to exchange a pod service account token for a Flipt client token.Step 1: Enable Kubernetes Authentication
config.yaml
Step 2: Exchange the Service Account Token for a Flipt Client Token
Kubernetes service account tokens are not used directly as Flipt client tokens. Instead, send the pod token to Flipt’s Kubernetes auth endpoint to obtain a Flipt client token:clientToken value as a normal Flipt client token (Authorization: Bearer <client-token>).
This approach:
- Avoids provisioning static tokens per workload
- Aligns Flipt credentials to Kubernetes service account token expiration
- Works well for in-cluster service-to-service authentication
Choosing an Authentication Method
| Method | Best For | Complexity |
|---|---|---|
| Static Token | Simple deployments, CI/CD, single application | Low |
| JWT | Teams with existing IdP (Auth0, Okta, Keycloak) | Medium |
| Kubernetes SA | Running in Kubernetes with multiple services | Low |
Related
- Authentication Configuration — Full reference for all auth options
- REST API Reference — REST API authentication details
- Server SDKs — SDK documentation
- Client SDKs — Client-side evaluation SDKs