Skip to content

[v3-3-test] Mask nested entities when writing bulk audit-log entries (#70890) - #71043

Merged
potiuk merged 1 commit into
apache:v3-3-testfrom
potiuk:backport-fc8d6d8-v3-3-test
Aug 4, 2026
Merged

[v3-3-test] Mask nested entities when writing bulk audit-log entries (#70890)#71043
potiuk merged 1 commit into
apache:v3-3-testfrom
potiuk:backport-fc8d6d8-v3-3-test

Conversation

@potiuk

@potiuk potiuk commented Aug 4, 2026

Copy link
Copy Markdown
Member

Backport of #70890 to v3-3-test.

The audit-log maskers for Variables and Connections dispatch on top-level key
names. A bulk request body has exactly one top-level key, actions, and the
entities sit two levels down in actions[].entities[] — so neither val/value
nor extra was ever seen, and the payload was recorded as supplied.

The masker also runs on the raw request body before validation, so extra can
arrive as any JSON type; json.loads raises TypeError rather than
JSONDecodeError for a non-string, which escaped the audit-log path entirely.

Backport note: the original commit's context included TestActionLoggingUserFields,
which belongs to #70583 (get_display_name on BaseUser) and is not in v3-3-test.
That class and its imports are dropped here; the rest is identical to the original commit.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

…pache#70890)

The audit-log maskers for Variables and Connections dispatch on top-level key
names. A bulk request body has exactly one top-level key, `actions`, and the
entities sit two levels down in `actions[].entities[]` -- so neither
`val`/`value` nor `extra` was ever seen, and the payload was recorded as
supplied.

The masker also runs on the raw request body before validation, so `extra` can
arrive as any JSON type. `json.loads` raises `TypeError` rather than
`JSONDecodeError` for a non-string, which escaped the audit-log path entirely.
Bulk bodies newly reach this branch, so the shape is now reachable where it
previously was not.

(cherry picked from commit fc8d6d8)
@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label Aug 4, 2026
@potiuk
potiuk merged commit 4140090 into apache:v3-3-test Aug 4, 2026
5 checks passed
@potiuk
potiuk deleted the backport-fc8d6d8-v3-3-test branch August 4, 2026 01:10
@github-actions github-actions Bot added this to the Airflow 3.3.2 milestone Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.2 based on: merged to version branch
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

@potiuk potiuk modified the milestones: Airflow 3.3.2, Airflow 3.3.1 Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant