Skip to content

[v3-3-test] Refuse a separator-bearing secret id before the team scoped lookup (#70902) - #71041

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

[v3-3-test] Refuse a separator-bearing secret id before the team scoped lookup (#70902)#71041
potiuk merged 1 commit into
v3-3-testfrom
backport-ed87a1a-v3-3-test

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor
  • Refuse a separator-bearing secret id before the team scoped lookup

The team scoped lookup builds PREFIX + __ + , so an id that itself
contains ___ makes that string ambiguous. A caller in team_a asking for the bare
id prod___dbconn builds AIRFLOW_CONN__TEAM_A___PROD___DBCONN, byte-identical to
what team team_a___prod builds for its own id dbconn -- and that lookup hits, so
the guard that ran only ahead of the team agnostic fall-through was never
reached.

Move the check ahead of both lookups and widen it from "spells out a team
namespace" to "contains the separator". The narrower form had to reason about
which team an id might name, which is unanswerable while a team name may itself
contain the separator; the broader form does not, and it no longer depends on
stored team names being valid.

Costs an id that itself contains ___, which is now unreachable in either scope
including for its owning team. That is deliberate and tested: the string such an
id builds is one another team's name could build, and nothing in it says which
reading was meant.

This matches what the provider secrets backends already do.

  • Condense the collision rationale to one site

Both lookups carried the same five-line explanation verbatim.
(cherry picked from commit ed87a1a)

Co-authored-by: Jarek Potiuk jarek@potiuk.com

…ed lookup (#70902)

* Refuse a separator-bearing secret id before the team scoped lookup

The team scoped lookup builds PREFIX + _<TEAM>___ + <ID>, so an id that itself
contains ___ makes that string ambiguous. A caller in team_a asking for the bare
id prod___dbconn builds AIRFLOW_CONN__TEAM_A___PROD___DBCONN, byte-identical to
what team team_a___prod builds for its own id dbconn -- and that lookup hits, so
the guard that ran only ahead of the team agnostic fall-through was never
reached.

Move the check ahead of both lookups and widen it from "spells out a team
namespace" to "contains the separator". The narrower form had to reason about
which team an id might name, which is unanswerable while a team name may itself
contain the separator; the broader form does not, and it no longer depends on
stored team names being valid.

Costs an id that itself contains ___, which is now unreachable in either scope
including for its owning team. That is deliberate and tested: the string such an
id builds is one another team's name could build, and nothing in it says which
reading was meant.

This matches what the provider secrets backends already do.

* Condense the collision rationale to one site

Both lookups carried the same five-line explanation verbatim.
(cherry picked from commit ed87a1a)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@potiuk
potiuk marked this pull request as ready for review August 4, 2026 00:35
@potiuk
potiuk requested review from ashb and dstandish as code owners August 4, 2026 00:35
@potiuk
potiuk merged commit a033b7a into v3-3-test Aug 4, 2026
60 of 69 checks passed
@potiuk
potiuk deleted the backport-ed87a1a-v3-3-test branch August 4, 2026 00:47
@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 Author

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.

vatsrahul1001 pushed a commit that referenced this pull request Aug 5, 2026
…ed lookup (#70902) (#71041)

* Refuse a separator-bearing secret id before the team scoped lookup

The team scoped lookup builds PREFIX + _<TEAM>___ + <ID>, so an id that itself
contains ___ makes that string ambiguous. A caller in team_a asking for the bare
id prod___dbconn builds AIRFLOW_CONN__TEAM_A___PROD___DBCONN, byte-identical to
what team team_a___prod builds for its own id dbconn -- and that lookup hits, so
the guard that ran only ahead of the team agnostic fall-through was never
reached.

Move the check ahead of both lookups and widen it from "spells out a team
namespace" to "contains the separator". The narrower form had to reason about
which team an id might name, which is unanswerable while a team name may itself
contain the separator; the broader form does not, and it no longer depends on
stored team names being valid.

Costs an id that itself contains ___, which is now unreachable in either scope
including for its owning team. That is deliberate and tested: the string such an
id builds is one another team's name could build, and nothing in it says which
reading was meant.

This matches what the provider secrets backends already do.

* Condense the collision rationale to one site

Both lookups carried the same five-line explanation verbatim.
(cherry picked from commit ed87a1a)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
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.

2 participants