Harden Durable HTTP trust boundaries - #221
Merged
Merged
Conversation
Prevent credentials from crossing origins during redirects and 202 polling, and reject direct starts of the internal poll orchestrator. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 09ea1d35-b7bd-4f4a-a243-763f29ea115f
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the azure-functions-durable v2 Durable HTTP (“call_http”) implementation by tightening trust boundaries around redirects and 202-polling, preventing credential/header leakage across origins, and blocking direct client invocation of the internal polling orchestrator.
Changes:
- Added an HTTP(S)-only redirect policy that strips sensitive headers on cross-origin redirects and rejects non-HTTP(S) redirect targets.
- Hardened the Durable HTTP polling orchestrator to validate
Locationtargets (absolute HTTP(S) after resolution), avoid forwarding credentials cross-origin, and reject top-level invocation. - Added regression tests for redirect header stripping, cross-origin polling behavior, and top-level invocation rejection; documented the security fix in the package changelog.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
azure-functions-durable/azure/durable_functions/http/builtin.py |
Introduces origin parsing/comparison helpers, a secure redirect handler, stricter URL validation, and trust-boundary enforcement in the polling orchestrator. |
tests/azure-functions-durable/test_http_builtin_compat.py |
Adds coverage for redirect credential stripping, cross-origin polling header/token behavior, and top-level orchestrator invocation rejection. |
azure-functions-durable/CHANGELOG.md |
Documents the user-visible security hardening under ## Unreleased (FIXED). |
berndverst
reviewed
Jul 29, 2026
berndverst
reviewed
Jul 29, 2026
berndverst
reviewed
Jul 29, 2026
Strip proxy credentials across origins, preserve non-redirect response semantics, and document function-key polling behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 09ea1d35-b7bd-4f4a-a243-763f29ea115f
berndverst
approved these changes
Jul 29, 2026
berndverst
left a comment
Member
There was a problem hiding this comment.
Re-reviewed the follow-up commit and full diff. The Proxy-Authorization leak and redirect-validation regression are fixed with coverage, and the intentional same-origin x-functions-key polling behavior is now clearly documented. Targeted tests and cross-version redirect probes pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
python -m pytest tests\azure-functions-durable -m "not dts and not azurite and not functions_e2e" -qpython -m flake8 azure-functions-durablepython -m flake8 tests\azure-functions-durablepython -m nox -s typecheck_functionsFixes the security issues identified in the Durable HTTP implementation introduced by #155.