Skip to content

Infinite redirection loop when attempting to access a dockerized Airflow webserver using hostname #49495

@Dev-iL

Description

@Dev-iL

Apache Airflow version

3.0.0

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

No response

What happened?

Spinoff from: #48825 (comment)

When accessing an instance of Airflow running via docker compose by accessing http://HOSTNAME:8080 (as opposed to http://localhost:8080), it results in a big "Unauthorized" message as well as an infinite redirection loop:

Image

What you think should happen instead?

The UI should allow interaction.

How to reproduce

  1. Include the following configurations in the default 3.0.0rc4 docker-compose.yaml file:
    # AIRFLOW__API__BASE_URL: UNSET!
    AIRFLOW__CORE__AUTH_MANAGER: airflow.api_fastapi.auth.managers.simple.simple_auth_manager.SimpleAuthManager
    AIRFLOW__WEBSERVER__BASE_URL: http://${VM_HOSTNAME}:8080
  1. Set the environment variable VM_HOSTNAME to the hostname of the machine on which the container will be running.
  2. Run the container and wait for the api server to boot.
  3. Attempt to access the Airflow instance via http://${VM_HOSTNAME}:8080 - either from the machine on which the container is running, or from another one.

Operating System

Rocky Linux 9.3

Versions of Apache Airflow Providers

apache-airflow-providers-amazon           | 9.6.0
apache-airflow-providers-celery           | 3.10.6
apache-airflow-providers-cncf-kubernetes  | 10.4.2
apache-airflow-providers-common-compat    | 1.6.0
apache-airflow-providers-common-io        | 1.5.3
apache-airflow-providers-common-messaging | 1.0.0rc3
apache-airflow-providers-common-sql       | 1.25.0
apache-airflow-providers-docker           | 4.3.1
apache-airflow-providers-elasticsearch    | 6.2.1
apache-airflow-providers-fab              | 2.0.1rc0
apache-airflow-providers-ftp              | 3.12.3
apache-airflow-providers-git              | 0.0.2rc0
apache-airflow-providers-google           | 15.0.1
apache-airflow-providers-grpc             | 3.7.3
apache-airflow-providers-hashicorp        | 4.1.0
apache-airflow-providers-http             | 5.2.1
apache-airflow-providers-microsoft-azure  | 12.3.0
apache-airflow-providers-mysql            | 6.2.1
apache-airflow-providers-odbc             | 4.9.1
apache-airflow-providers-openlineage      | 2.2.0rc0
apache-airflow-providers-postgres         | 6.1.2
apache-airflow-providers-redis            | 4.0.2
apache-airflow-providers-sendgrid         | 4.0.1
apache-airflow-providers-sftp             | 5.2.0
apache-airflow-providers-slack            | 9.0.4
apache-airflow-providers-smtp             | 2.0.2
apache-airflow-providers-snowflake        | 6.2.1
apache-airflow-providers-ssh              | 4.0.1
apache-airflow-providers-standard         | 1.0.0rc0

Deployment

Docker-Compose

Deployment details

No response

Anything else?

CC: @ashb @pierrejeambrun @dheerajturaga

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

affected_version:3.0Issues Reported for 3.0area:UIRelated to UI/UX. For Frontend Developers.area:corearea:webserverWebserver related Issueskind:bugThis is a clearly a bugpriority:highHigh priority bug that should be patched quickly but does not require immediate new release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions