Skip to content

[v3-3-test] Skip stored credentials when a connection test overrides host or port - #70010

Merged
pierrejeambrun merged 1 commit into
apache:v3-3-testfrom
astronomer:backport-69957
Jul 17, 2026
Merged

[v3-3-test] Skip stored credentials when a connection test overrides host or port#70010
pierrejeambrun merged 1 commit into
apache:v3-3-testfrom
astronomer:backport-69957

Conversation

@pierrejeambrun

Copy link
Copy Markdown
Member

Backport of #69957 to v3-3-test.

Cherry-picked from a6d87ba.

Conflict resolution (connections.py): the cherry-pick pulled in the get_team_name / is_authorized_connection(GET) authorization scaffolding from #67620, which is not on v3-3-test. Only #69957's own change was applied — skipping stored credentials when the request overrides the stored connection's host or port — adapted to the v3-3-test code structure (the inline try/except was converted to existing_conn: Connection | None + if/else, mirroring the post-#69957 shape on main minus the #67620 dependency). The test file applied cleanly, and all connection-test unit tests pass.


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

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

…apache#69957)

The POST /connections/test endpoint restores an existing connection's stored
credentials (password/extra) when the request sends the masked sentinel, so a
saved connection can be tested without re-typing secrets. Connection
configuration users have write-only access to those credentials and are not
meant to view them; reusing them while the request points at a caller-supplied
host or port applies them against a destination the caller chose rather than
the connection's own, which is outside the intent of the retype-free test flow.

Scope the credential reuse to requests that keep the stored connection's host
and port. Follows the same hardening as apache#67620.

(cherry picked from commit a6d87ba)
@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label Jul 17, 2026
@pierrejeambrun
pierrejeambrun merged commit 944a345 into apache:v3-3-test Jul 17, 2026
71 checks passed
@pierrejeambrun
pierrejeambrun deleted the backport-69957 branch July 17, 2026 13:26
@github-actions github-actions Bot added this to the Airflow 3.3.1 milestone Jul 17, 2026
@github-actions

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.1 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 vatsrahul1001 added the type:bug-fix Changelog: Bug Fixes label Jul 27, 2026
vatsrahul1001 pushed a commit that referenced this pull request Aug 5, 2026
…#69957) (#70010)

The POST /connections/test endpoint restores an existing connection's stored
credentials (password/extra) when the request sends the masked sentinel, so a
saved connection can be tested without re-typing secrets. Connection
configuration users have write-only access to those credentials and are not
meant to view them; reusing them while the request points at a caller-supplied
host or port applies them against a destination the caller chose rather than
the connection's own, which is outside the intent of the retype-free test flow.

Scope the credential reuse to requests that keep the stored connection's host
and port. Follows the same hardening as #67620.

(cherry picked from commit a6d87ba)
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 type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants