Skip to content

Respect [fab] update_fab_perms when syncing per-DAG permissions during parsing - #70588

Closed
dor-bernstein wants to merge 2 commits into
apache:mainfrom
clutchsecurity:clut/respect-update-fab-perms-dag-sync
Closed

Respect [fab] update_fab_perms when syncing per-DAG permissions during parsing#70588
dor-bernstein wants to merge 2 commits into
apache:mainfrom
clutchsecurity:clut/respect-update-fab-perms-dag-sync

Conversation

@dor-bernstein

Copy link
Copy Markdown
Contributor

During DAG parsing, _serialize_dag_capturing_errors() calls _sync_dag_perms() for every DAG whenever the FAB auth manager is active — regardless of the [fab] update_fab_perms setting. sync_perm_for_dag() creates/refreshes a per-DAG resource on every parse, which is avoidable DB work for deployments that manage DAG access at the role level and have disabled automatic FAB permission management.

This makes the per-DAG permission sync honor [fab] update_fab_perms:

  • Default is True, so there is no behavior change for existing configurations.
  • When set to False (operator has opted out of automatic FAB permission management), the per-DAG sync is skipped, avoiding the extra per-parse writes.

The flag's documented purpose is "Update FAB permissions and sync security manager roles", so honoring it in this path is consistent with its intent.

During parsing, _serialize_dag_capturing_errors() calls _sync_dag_perms() for
every DAG whenever the FAB auth manager is active, ignoring the
[fab] update_fab_perms setting. sync_perm_for_dag() refreshes a per-DAG resource
on every parse, which is unnecessary DB work for deployments that manage DAG
access at the role level and have disabled automatic FAB permission management.

Honor update_fab_perms in this path (default True, so no behavior change for
existing configurations); when set to False, the per-DAG permission sync is
skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dor-bernstein

Copy link
Copy Markdown
Contributor Author

Superseded by #70589 (reopened from a personal fork). Closing this one.

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