Skip to content

Apply per-DAG audit log permission to event log detail endpoint#67112

Merged
pierrejeambrun merged 1 commit into
apache:mainfrom
astronomer:fix-event-log-detail-authz
May 19, 2026
Merged

Apply per-DAG audit log permission to event log detail endpoint#67112
pierrejeambrun merged 1 commit into
apache:mainfrom
astronomer:fix-event-log-detail-authz

Conversation

@pierrejeambrun
Copy link
Copy Markdown
Member

Align GET /eventLogs/{event_log_id} with the collection endpoint GET /eventLogs, which already scopes results to the user's permitted Dags via ReadableEventLogsFilterDep. The detail endpoint only enforced the generic DagAccessEntity.AUDIT_LOG check via requires_access_dag with no dag_id.

Introduce requires_access_event_log, mirroring requires_access_backfill: resolve the dag_id from the event log row, then delegate to requires_access_dag scoped to that dag_id.


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

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

Align GET /eventLogs/{event_log_id} with the collection endpoint
GET /eventLogs, which already scopes results to the user's permitted
Dags via ReadableEventLogsFilterDep. The detail endpoint only enforced
the generic DagAccessEntity.AUDIT_LOG check via requires_access_dag with
no dag_id.

Introduce requires_access_event_log, mirroring requires_access_backfill:
resolve the dag_id from the event log row, then delegate to
requires_access_dag scoped to that dag_id.
@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label May 18, 2026
@pierrejeambrun pierrejeambrun self-assigned this May 18, 2026
@pierrejeambrun pierrejeambrun added the backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch label May 18, 2026
Copy link
Copy Markdown
Member

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

@pierrejeambrun pierrejeambrun merged commit 4498582 into apache:main May 19, 2026
143 checks passed
@pierrejeambrun pierrejeambrun deleted the fix-event-log-detail-authz branch May 19, 2026 08:22
@github-actions
Copy link
Copy Markdown
Contributor

Backport successfully created: v3-2-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-2-test PR Link

github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request May 19, 2026
…dpoint (apache#67112)

Align GET /eventLogs/{event_log_id} with the collection endpoint
GET /eventLogs, which already scopes results to the user's permitted
Dags via ReadableEventLogsFilterDep. The detail endpoint only enforced
the generic DagAccessEntity.AUDIT_LOG check via requires_access_dag with
no dag_id.

Introduce requires_access_event_log, mirroring requires_access_backfill:
resolve the dag_id from the event log row, then delegate to
requires_access_dag scoped to that dag_id.
(cherry picked from commit 4498582)

Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
aws-airflow-bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request May 19, 2026
…dpoint (apache#67112)

Align GET /eventLogs/{event_log_id} with the collection endpoint
GET /eventLogs, which already scopes results to the user's permitted
Dags via ReadableEventLogsFilterDep. The detail endpoint only enforced
the generic DagAccessEntity.AUDIT_LOG check via requires_access_dag with
no dag_id.

Introduce requires_access_event_log, mirroring requires_access_backfill:
resolve the dag_id from the event log row, then delegate to
requires_access_dag scoped to that dag_id.
(cherry picked from commit 4498582)

Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
pierrejeambrun added a commit that referenced this pull request May 19, 2026
…dpoint (#67112) (#67159)

Align GET /eventLogs/{event_log_id} with the collection endpoint
GET /eventLogs, which already scopes results to the user's permitted
Dags via ReadableEventLogsFilterDep. The detail endpoint only enforced
the generic DagAccessEntity.AUDIT_LOG check via requires_access_dag with
no dag_id.

Introduce requires_access_event_log, mirroring requires_access_backfill:
resolve the dag_id from the event log row, then delegate to
requires_access_dag scoped to that dag_id.
(cherry picked from commit 4498582)

Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
vatsrahul1001 pushed a commit that referenced this pull request May 20, 2026
…dpoint (#67112) (#67159)

Align GET /eventLogs/{event_log_id} with the collection endpoint
GET /eventLogs, which already scopes results to the user's permitted
Dags via ReadableEventLogsFilterDep. The detail endpoint only enforced
the generic DagAccessEntity.AUDIT_LOG check via requires_access_dag with
no dag_id.

Introduce requires_access_event_log, mirroring requires_access_backfill:
resolve the dag_id from the event log row, then delegate to
requires_access_dag scoped to that dag_id.
(cherry picked from commit 4498582)

Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
vatsrahul1001 pushed a commit that referenced this pull request May 20, 2026
…dpoint (#67112) (#67159)

Align GET /eventLogs/{event_log_id} with the collection endpoint
GET /eventLogs, which already scopes results to the user's permitted
Dags via ReadableEventLogsFilterDep. The detail endpoint only enforced
the generic DagAccessEntity.AUDIT_LOG check via requires_access_dag with
no dag_id.

Introduce requires_access_event_log, mirroring requires_access_backfill:
resolve the dag_id from the event log row, then delegate to
requires_access_dag scoped to that dag_id.
(cherry picked from commit 4498582)

Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
vatsrahul1001 pushed a commit that referenced this pull request May 21, 2026
…dpoint (#67112) (#67159)

Align GET /eventLogs/{event_log_id} with the collection endpoint
GET /eventLogs, which already scopes results to the user's permitted
Dags via ReadableEventLogsFilterDep. The detail endpoint only enforced
the generic DagAccessEntity.AUDIT_LOG check via requires_access_dag with
no dag_id.

Introduce requires_access_event_log, mirroring requires_access_backfill:
resolve the dag_id from the event log row, then delegate to
requires_access_dag scoped to that dag_id.
(cherry picked from commit 4498582)

Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
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 backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants