camunda 8 - existing keycloak

Hi, I was trying to configure camunda 8 with exisitng keycloak, while trying to access the camunda operate/optimize, can able to login via keycloak relam credentials. Once login im getting error as Invalid redirect_uri. how to fix the issue.
Thanks in Advance

Hi there! :waving_hand:

I can help you resolve this “Invalid redirect_uri” error with your Camunda 8 and Keycloak integration. This is a common configuration issue that occurs when there’s a mismatch between the redirect URIs configured in Keycloak and what Camunda components are actually using.

Root Cause

The error happens because the redirect URI registered in your Keycloak client doesn’t exactly match the URI that Operate/Optimize uses during the authentication flow.

Solution Steps

1. Check Your Keycloak Client Configuration

In your Keycloak admin console, for each Camunda component client, ensure the redirect URIs are set correctly:

  • Operate: https://your-domain/operate/identity-callback
  • Optimize: https://your-domain/optimize/api/authentication/callback

Replace your-domain with your actual domain/URL where Camunda is accessible.

2. Verify Your Camunda Configuration

If you’re using Helm charts, ensure your values match:

global:
  identity:
    auth:
      operate:
        redirectUrl: "https://your-domain/operate"
      optimize:
        redirectUrl: "https://your-domain/optimize"

operate:
  contextPath: "/operate"
optimize:
  contextPath: "/optimize"

3. Common Issues to Check

  • Protocol mismatch: If your ingress uses HTTPS, all redirect URLs must use HTTPS
  • Trailing slashes: Ensure consistency (no trailing slashes in redirect URIs)
  • Context paths: The contextPath in your configuration must match what’s used in ingress and Keycloak
  • Client type: Ensure Keycloak clients are set to “confidential” access type
  • Client secrets: Verify they match between Keycloak and Camunda configuration

4. Troubleshooting Steps

  1. Check the actual redirect URI in your browser’s address bar during login
  2. Compare it exactly with what’s configured in Keycloak
  3. Restart the affected pods after making configuration changes
  4. Check the logs for more detailed error information

Additional Information

To help you further, could you provide:

  • Your Camunda 8 version
  • Are you using Self-Managed (Helm/Docker) or SaaS?
  • The exact URL you’re using to access Operate/Optimize
  • Your current Keycloak client redirect URI configuration

References:

Let me know if you need help with any specific part of the configuration!