[Bug] Week1: Airflow login credentials undiscoverable on fresh setup

Author: avibathulaCreated Mar 22, 2026Updated Mar 22, 2026

Environment

  • OS: macOS
  • Docker Desktop: 28.1.1
  • UV: 0.7.x
  • Python: 3.12

Summary

The Week 1 notebook assumes Airflow 3.x's simple_auth_manager is in use, which generates a password file at a known path. However the container is actually configured with Flask AppBuilder database auth (AUTH_DB), so the file is never created and students have no way to discover the auto-generated admin password.

Steps to Reproduce

  1. Follow the Week 1 notebook setup
  2. Run the Get Airflow Password cell:
    python
    password_file = project_root / "airflow" / "simple_auth_manager_passwords.json.generated"
  3. Cell prints: ⚠ Password file not found
  4. Manually checking inside the container confirms the file does not exist:
    bash
    docker exec rag-airflow find /opt/airflow -name "*.generated"
    # (no output)
  5. Opening http://localhost:8080 shows a login prompt with no usable credentials

Root Cause

webserver_config.py inside the container uses AUTH_TYPE = AUTH_DB (Flask AppBuilder), not Airflow 3.x's SimpleAuthManager. With AUTH_DB, Airflow creates the admin user in the database during initialization but does not write a password file. The notebook's password-reading cell is written for the wrong auth backend.

Workaround

Reset the auto-created admin password manually:

bash
docker exec -it rag-airflow airflow users reset-password \
  --username admin \
  --password admin

Then log in at http://localhost:8080 with admin / admin.

Fix

Pick one of the following:

Option A: Update the notebook cell to use airflow users list to confirm the admin user exists and instruct students to reset the password via the CLI command above.

Option B: Switch the container to Airflow 3.x's SimpleAuthManager so the password file is generated as the notebook expects, by adding to the Airflow environment in compose.yml:

yaml
AIRFLOW__CORE__AUTH_MANAGER: airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager

Option C: Hardcode a known admin password in compose.yml using the _AIRFLOW_WWW_USER_PASSWORD environment variable and document it in the notebook:

yaml
_AIRFLOW_WWW_USER_CREATE: "true"
_AIRFLOW_WWW_USER_USERNAME: admin
_AIRFLOW_WWW_USER_PASSWORD: admin

Source: jamwithai/production-agentic-rag-course