Skip to content

apache-airflow-providers-keycloak==0.3.0|0.4.0 redirects to 127.0.0.1:8080 after a successfull login #58552

@gbonazzoli

Description

@gbonazzoli

Apache Airflow version

3.1.3

If "Other Airflow 2/3 version" selected, which one?

No response

What happened?

I configure Airflow 3.1.3 to authenticate to an existing (and working) Keycloak.

The module version is: apache-airflow-providers-keycloak==0.3.0

After a successful login, keycloak redirects to 127.0.0.1:8080 after a successfull login and precisely to:

http://127.0.0.1:8080/auth/login_callback?state=&session_state=30ad9dfa-be2c-161b-8ca4-457160323188&iss=https%3A%2F%2Fkeycloak-prod.colombinigroup.com%2Frealms%2Fcolombini&code=cae7d5a5-17a0-4b35-8eaf-af65892e4b07.30ad9dfa-be2c-161b-8ca4-457160323188.90b317e0-38bd-4349-8d57-135adf4cdbf2

My configuration in airflow.cfg is:

...
auth_manager = airflow.providers.keycloak.auth_manager.keycloak_auth_manager.KeycloakAuthManager
...
[keycloak_auth_manager]
client_id = airflow-test
client_secret = xxxxxxxxxxxxxxxxxxxxxxxxxxxx

<img width="722" height="866" alt="Image" src="https://github.com/user-attachments/assets/c866b981-4423-4a35-9636-81a252ca53ea" />

<img width="722" height="866" alt="Image" src="https://github.com/user-attachments/assets/f8c00f73-2381-403f-9cbb-4ee7f2d39181" />

realm = colombini
server_url = https://keycloak-prod.colombinigroup.com
# server_url = http://192.168.99.11:30026

and here is how is configure the OIDC Client in Keycloak:

Image

What you think should happen instead?

It should instead put me through the Airflow 3.1.3 User interface.

How to reproduce

Configure a vanilla airflow with the 4 parameters

Operating System

Ubuntu 24.04.3 LTS

Versions of Apache Airflow Providers

apache-airflow                           3.1.3
apache-airflow-core                      3.1.3
apache-airflow-providers-celery          3.13.1
apache-airflow-providers-common-compat   1.8.0
apache-airflow-providers-common-io       1.6.4
apache-airflow-providers-common-sql      1.28.2
apache-airflow-providers-keycloak        0.3.0
apache-airflow-providers-postgres        6.4.0
apache-airflow-providers-smtp            2.3.1
apache-airflow-providers-standard        1.9.1
apache-airflow-task-sdk                  1.1.3

Deployment

Virtualenv installation

Deployment details

Nothing special.

Anything else?

No

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions