Skip to content

Displaying first_name+last_name or email in "Audit Log" on DAG details page#68833

Open
VladaZakharova wants to merge 1 commit into
apache:mainfrom
VladaZakharova:audit-log-change
Open

Displaying first_name+last_name or email in "Audit Log" on DAG details page#68833
VladaZakharova wants to merge 1 commit into
apache:mainfrom
VladaZakharova:audit-log-change

Conversation

@VladaZakharova

Copy link
Copy Markdown
Contributor

In Breeze / community Airflow, there are several types of auth managers that have different sets of fields, which actually leads to different data stored to DB about the user.
The default auth manager is usually SimpleAuthManager. It only knows simple login data like:

  • username
  • role
  • password

For example:
username: admin
role: admin
password: admin

So in default Breeze, the new column will look the same as old one:
User: admin.
User Display Name: admin.

The other one that can be also used is FAB manager. Available fields are:

  • username
  • first_name
  • last_name
  • email
  • password
  • role

The common solution will be for different auth managers like this:


   If first_name and last_name exist:
       show "first_name last_name"

   Else if email exists:
       show "email"

   Else:
       show "username"

Example:
first_name = Jane.
last_name = Smith.
email = jane@example.com.
username = jane.

User = jane.
User Display Name = Jane Smith.

Or:
first_name = empty.
last_name = empty.
email = jane@example.com.
username = jane.

User = jane.
User Display Name = jane@example.com.

This change will make the Audit log more informative for users.
Example how it will look like:
Screenshot 2026-06-17 at 12 53 38

The change is implemented as a new Column in Audit Logs tab, which can be also hidden in side menu by user, if preferred to not be shown.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant