Skip to main content
Flyte implements authentication using OpenID Connect (OIDC) for browser-based user login and OAuth2 for service-to-service authentication. This covers configuring both.

Overview

Flyte’s auth system has two layers:
  1. Identity layer (OIDC): Verifies who a user is. Requires registering Flyte as an OIDC client with your Identity Provider (IdP).
  2. Authorization server: Issues access tokens to clients (flytectl, pyflyte, FlytePropeller, FlyteConsole). Flyte ships with a built-in authorization server, or you can use an external one (Okta, Azure AD, Keycloak).
Authentication requires a public domain name and TLS. Sandbox (flytectl demo start) uses a different insecure setup and does not require this.

Prerequisites

  • A public domain name (e.g., flyte.example.com) pointing to your Flyte Ingress
  • A registered OIDC application in your IdP

Identity provider support

FeatureOktaGoogleGCP IdentityAzure ADAuth0KeycloakGitHub
OpenID Connect (OIDC)YesYesYesYesYesYesNo
Custom auth serverYesNoYesYes?YesNo

Step 1: Register Flyte with your IdP

  1. Create an OIDC - OpenID Connect app integration with type Web Application
  2. Add sign-in redirect URI: https://<your-flyte-url>/callback
  3. Optionally add logout URI: https://<your-flyte-url>/logout
  4. Note the Client ID and Client Secret

Step 2: Generate an internal client secret

FlytePropeller authenticates to FlyteAdmin using a shared secret. Generate one and compute its bcrypt hash:
pip install bcrypt
python -c '
import bcrypt, base64, secrets
pwd = secrets.token_hex(16)
hash = base64.b64encode(bcrypt.hashpw(pwd.encode(), bcrypt.gensalt(6)))
print(f"Password: {pwd}")
print(f"Hash: {hash.decode()}")
'
Keep both the plaintext password and the bcrypt hash — you need both in the config.

Step 3: Apply OIDC configuration

Add the following to your values.yaml and run helm upgrade:
configuration:
  auth:
    enabled: true
    oidc:
      # Uncomment the correct baseUrl for your IdP:
      # baseUrl: https://accounts.google.com
      # baseUrl: https://<keycloak-url>/auth/realms/<realm>
      # baseUrl: https://login.microsoftonline.com/<tenant-id>/v2.0
      baseUrl: https://dev-<org-id>.okta.com/oauth2/default
      clientId: <client_ID>
      clientSecret: <client_secret>
    internal:
      clientSecret: '<your-random-password>'
      clientSecretHash: <your-hashed-password>
    authorizedUris:
      - https://<your-flyte-deployment-URL>
helm upgrade flyte-backend flyteorg/flyte-binary \
  --namespace flyte \
  --values values.yaml

Step 4: Update the local flytectl config

After enabling auth, update ~/.flyte/config.yaml to use PKCE flow:
admin:
  endpoint: dns:///flyte.example.com
  authType: Pkce    # Use Pkce instead of clientCred
  insecure: false

Using an external authorization server

If your IdP provides a custom OAuth2 authorization server (Okta, Azure AD, Keycloak), you can replace Flyte’s built-in server:
configuration:
  inline:
    auth:
      appAuth:
        authServerType: External
        externalAuthServer:
          baseUrl: https://dev-<org-id>.okta.com/oauth2/<auth-server-id>
          metadataUrl: .well-known/oauth-authorization-server
        thirdPartyConfig:
          flyteClient:
            clientId: <flytectl-client-id>
            redirectUri: http://localhost:53593/callback
            scopes: [offline, all]
      userAuth:
        openId:
          baseUrl: https://dev-<org-id>.okta.com/oauth2/<auth-server-id>
          scopes: [profile, openid]
          clientId: <oidc-clientId>

CI/CD with client credentials

For automated workflows (CI pipelines, scheduled jobs), use the client credentials flow:
export FLYTE_CREDENTIALS_CLIENT_ID=<client_id>
export FLYTE_CREDENTIALS_CLIENT_SECRET=<client_secret>
export FLYTE_CREDENTIALS_AUTH_MODE=basic
export FLYTE_CREDENTIALS_AUTHORIZATION_METADATA_KEY=<header_name>
export FLYTE_CREDENTIALS_OAUTH_SCOPES=<idp_scopes>
export FLYTE_PLATFORM_AUTH=True

Disable Helm secret management

To create the FlytePropeller secret manually (e.g., from an external secret manager):
secrets:
  adminOauthClientCredentials:
    enabled: true
    clientSecret: null      # Disables Helm from creating the secret
    clientId: flytepropeller
Then create the secret declaratively:
apiVersion: v1
kind: Secret
metadata:
  name: flyte-secret-auth
  namespace: flyte
type: Opaque
stringData:
  client_secret: <client_secret>

Build docs developers (and LLMs) love