[Bug] Week1: Airflow login credentials undiscoverable on fresh setup
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
- Follow the Week 1 notebook setup
- Run the Get Airflow Password cell:
password_file = project_root / "airflow" / "simple_auth_manager_passwords.json.generated" - Cell prints:
⚠ Password file not found - Manually checking inside the container confirms the file does not exist:
docker exec rag-airflow find /opt/airflow -name "*.generated" # (no output) - 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:
docker exec -it rag-airflow airflow users reset-password \
--username admin \
--password adminThen 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:
AIRFLOW__CORE__AUTH_MANAGER: airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManagerOption C: Hardcode a known admin password in compose.yml using the _AIRFLOW_WWW_USER_PASSWORD environment variable and document it in the notebook:
_AIRFLOW_WWW_USER_CREATE: "true"
_AIRFLOW_WWW_USER_USERNAME: admin
_AIRFLOW_WWW_USER_PASSWORD: adminSource: jamwithai/production-agentic-rag-course