Brunda10 commented on issue #51304:
URL: https://github.com/apache/airflow/issues/51304#issuecomment-3131747666
---
### ๐ Overview of the Issue
By default, the Breeze environment launches Airflow with
`SimpleAuthManager`, which lacks support for role-based access control (RBAC),
user management, and the full security UI. This makes it difficult for
developers to test features that require a realistic authentication and
authorization setup โ for example, creating users via UI or CLI, assigning
roles, or validating permissions.
```python
airflow@airflow-api-server-6865b4769f-cvl2c:/opt/airflow$ airflow users
create
Usage: airflow [-h] GROUP_OR_COMMAND ...
Positional Arguments:
GROUP_OR_COMMAND
[...] omitted for brevity
Options:
-h, --help show this help message and exit
airflow command error: argument GROUP_OR_COMMAND: invalid choice: 'users'
(choose from api-server, assets, backfill, cheat-sheet, config, connections,
dag-processor, dags, db, info, jobs, kerberos, kubernetes, plugins, p
ools, providers, rotate-fernet-key, scheduler, standalone, tasks, triggerer,
variables, version), see help above.
```
---
### ๐ง How the Issue Was Fixed
I updated the Breeze CLI logic and Airflow standalone logic to default to
`FabAuthManager` instead of `SimpleAuthManager`.
#### 1. `developer_commands.py`
File:
`dev/breeze/src/airflow_breeze/commands/developer_commands.py`
Change:
```python
# Before:
default=ALLOWED_AUTH_MANAGERS[0], # SIMPLE_AUTH_MANAGER
# After:
default=ALLOWED_AUTH_MANAGERS[1], # FAB_AUTH_MANAGER
```
This ensures that `breeze start-airflow` launches Airflow with FAB Auth by
default.
#### 2. `standalone_command.py`
File:
`airflow/cli/commands/standalone_command.py`
I updated the `auth_manager` used in standalone mode to also default to
`FabAuthManager`.
---
### ๐งช Testing
I tested this setup in the following environments:
* โ
**Breeze bash terminal**
* โ
**Kubernetes bash terminal**
In both cases, I was able to:
* Login through FAB-authenticated UI
* Create users via CLI and UI
* View the Security tab and manage roles/permissions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]