Skip to content

ApprovalOperator(assigned_users=...) unusable with SimpleAuthManager when simple_auth_manager_all_admins=True (no one can approve/reject) #59348

Description

@zachliu

Apache Airflow version

3.1.4

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

No response

What happened?

In Airflow 3.1.4, the ApprovalOperator’s assigned_users argument appears to depend on the configured auth manager.

When I use SimpleAuthManager and set simple_auth_manager_all_admins=True, assigned_users becomes effectively unusable: no one can approve or reject in the UI.

Image

I suspect this is because when simple_auth_manager_all_admins=True, SimpleAuthManager does not create/populate the ab_user table, so assigned_users has no user table to resolve against.

What you think should happen instead?

When simple_auth_manager_all_admins=True, ApprovalOperator should ignore assigned_users (or treat it as “everyone”) and allow all logged-in users to approve/reject, since “all admins” mode implies there is no real user directory backing assigned_users.

(Alternatively, Airflow could validate this configuration and raise a clear error explaining that assigned_users requires a real user store, but the current behavior is a silent “nobody can approve.”)

How to reproduce

  1. Configure the auth manager to SimpleAuthManager
  2. Set simple_auth_manager_all_admins to True
  3. Create a DAG that uses ApprovalOperator with assigned_users set to one or more usernames or simple None
  4. Trigger the DAG and open the approval UI

Operating System

LM 21.3 with docker python:3.12-slim-bookworm

Versions of Apache Airflow Providers

No response

Deployment

Docker-Compose

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions