Authenticating to Confluent Cloud using OAuth/OIDC with Auth0 as Identity Provider

Authenticating to Confluent Cloud using OAuth/OIDC with Auth0 as Identity Provider

This page is no longer maintained (Nov 12, 2025). For the most current information, go to https://docs.snaplogic.com/snaps/snaps-data/sp-kafka/confluent-oauth-auth0.html.

Overview

Confluent Cloud supports OAuth 2.0 / OpenID Connect (OIDC) to enable secure, token-based authentication for workloads—ideal for applications and services. Learn more. To authenticate to Confluent Cloud using OAuth/OIDC with Auth0 as your Identity Provider (IdP), follow the procedure described below.

Prerequisites

  • A Confluent Cloud account with OrganizationAdmin role.

  • An Auth0 account.

Step 1: Configure Auth0 as an OIDC Provider

  1. Create an Application in Auth0:

    1. Log in to your Auth0 dashboard.

    2. Navigate to Applications and click Create Application.

    3. Specify a Name for the application.

    4. Select Machine to Machine (M2M) Applications.

      oauth-sample-app-m2m.png
    5. Add the required Permissions, and click Authorize

      auth-permissions.png

      .

  2. In the application settings, note the Client ID and Client Secret.

    client-credentials.png



  3. Click Settings to define a default audience in the API Authorizations Settings section. Set this to https://dev-bkbwr0ycpbpxxiv5.us.auth0.com/api/v2/. You can get this URI from the API tab in the Application.

    default-audience.png

The Identifier will serve as the Audience in your token requests.

 

Step 2: Add Auth0 as an Identity Provider in Confluent Cloud

  1. Log into Confluent Cloud Console.

  2. Navigate to Settings > Accounts & Access > Workload Identities.

    accounts-n-access.png



  3. Click Add identity providers.

  4. Select OAuth/OIDC and click Next.

    oauth-oidc.png



  5. Select Other OIDC identity provider.

    ohter-oidc-provider.png



  6. Provide a meaningful Name and Description.

  7. Enter the OIDC Discovery URL obtained from Auth0.

  8. Click Import from OIDC Discovery URL to auto-fill the JWKS URI and Issuer URI. The OIDC Discovery URL typically follows the format: <https://<your-domain>>.auth0.com/.well-known/openid-configuration

    oidc-discovery-url.png



  9. Click Validate and save to add the identity provider.

    identity-provider-created.png

 

Step 3: Create an Identity Pool in Confluent Cloud

  1. In the Confluent Cloud Console, go to Settings > Accounts & Access > Workload Identities.

  2. Click Add identity pool.

    • Provide a Name and Description.

    • Select the previously added Auth0 identity provider.

  3. Configure Filters (Optional) based on token claims to automatically assign identities to this pool.

  4. Click Add new permissions.

    add-new-permissions.png
  5. Assign appropriate RBAC roles to the identity pool to control access.

    new-role-assignment.png



  6. Click Save to create the identity pool.

    new-identity-pool.png



  7. Record Cluster and Pool ID's. These will be defined in the Kafka Snap via SASL extension properties.

    auth0-id-pool.png
    cluster-id.png

Configure Kafka OAuth2 Account

  1. Configure the following settings with the values obtained from the configuration in the Confluent Cloud console:

    • <your-bootstrap-server>: Confluent Cloud Kafka bootstrap server URL.

    • <your-domain>: Auth0 domain.

    • <your-client-id> and <your-client-secret>: Obtained from Auth0 application settings.

    • <your-cluster-id>: Confluent Cloud cluster ID.

    • <your-identity-pool-id>: The ID of the identity pool created in Confluent Cloud.

kafka-oauth2-account-1.png
kafka-oauth2-account-2.png
kafka-oauth2-account-1.png
kafka-oauth2-account-2.png
  1. Validate the account. The account should be validated successfully.

    kafka-oauth2-successful-validation.png

 

Troubleshooting

Error

Reason

Resolution

Error

Reason

Resolution

JWT_PROCESSING_FAILED Error

  • This can be caused by various issues, such as a mismatch between the Issuer URI entered in Confluent Cloud and the URI in the JWT token.

  • Another potential reason that can cause this error is the expiry of the JWKS keys.

  • Ensure that the Issuer URI and URI in the JWT token, both match exactly.

  • Refresh the keys in Confluent Cloud.

 

Related links: