Skip to content

Airflow Keycloak provider redirect to HTTP instead of HTTPS #60922

@atalakey4work

Description

@atalakey4work

Apache Airflow Provider(s)

keycloak

Versions of Apache Airflow Providers

apache-airflow-providers-keycloak 0.5.0

Apache Airflow version

3.0.2

Operating System

Official container image "apache/airflow:3.0.2"

Deployment

Official Apache Airflow Helm Chart

Deployment details

Below is my current values.yaml:

ingress:
  apiServer:
    enabled: true
    annotations:
      cert-manager.io/cluster-issuer: letsencrypt-prod
    hosts:
    - name: airflow.REDACTED
      tls:
        enabled: true
        secretName: airflow.REDACTED
    ingressClassName: nginx

env:
  - name: _PIP_ADDITIONAL_REQUIREMENTS
    value: apache-airflow-providers-keycloak==0.5.0

config:
  core:
    auth_manager: airflow.providers.keycloak.auth_manager.keycloak_auth_manager.KeycloakAuthManager
  api:
    base_url: https://airflow.REDACTED
  keycloak_auth_manager:
    server_url: https://REDACTED/auth/ # (note: auth/ needed for backward compatibility)
    realm: REDACTED
    client_id: airflow
    client_secret: REDACTED

What happened

Airflow redirects to Keycloak with an HTTP redirect_url despite me seeting base_url: https://airflow.REDACTED:

https://REDACTED/auth/realms/REDACTED/protocol/openid-connect/auth?client_id=airflow&response_type=code&redirect_uri=http://airflow.REDACTED/auth/login_callback&scope=openid&state=&nonce=

What you think should happen instead

Airflow shoud set redirect_uri to https://airflow.REDACTED/auth/login_callback

How to reproduce

Deploy Airflow using Helm with the values shared

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions