Honor forwarded headers when creating management URLs
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 62/100
調査の方向性
azure/durable_functions/models/DurableOrchestrationClient.py で get_client_response_links() と _replace_url_origin() を読むことから始めます。issue にあるソースレベルの再現を使って、request.url が管理 URL の origin をどのように置き換えるかを追跡し、その後、転送ヘッダーの想定される opt-in 動作を確認します。信頼された Forwarded または X-Forwarded ヘッダーによってクライアント向けの scheme と host が生成され、デフォルトの動作は変更されない状態になれば完了です。
索引モデルが issue の本文から書いたものです。
説明
🐛 Describe the bug
A clear and concise description of what the bug is.
DurableOrchestrationClient.create_check_status_response() and get_client_response_links() do not consider Forwarded, X-Forwarded-Host, or X-Forwarded-Proto when constructing management URLs.
The SDK copies the extension-provided management URL templates, then unconditionally replaces their origin with the scheme and authority from request.url. Behind Azure Front Door, Application Gateway, or another reverse proxy, request.url can contain the internal origin. The resulting Location, statusQueryGetUri, and other management URLs can therefore expose an internal hostname or use HTTP even when forwarded headers describe the public HTTPS origin.
The Durable Functions extension added opt-in forwarded-header support in Azure/azure-functions-durable-extension#3083. Out-of-process binding templates are generated without an HTTP request, however, and the Python SDK subsequently replaces their origin from request.url, so that extension behavior does not cover this Python path.
This is separate from #355: current Azure Linux managed hosting correctly returns HTTPS management URLs for ordinary HTTPS-only Function Apps.
🤔 Expected behavior
What should have happened?
When trusted forwarded-header handling is enabled, Python-generated management URLs should use the client-facing scheme and host from Forwarded or X-Forwarded-Proto/X-Forwarded-Host, consistent with the Durable Functions extension behavior. Without opt-in, existing request.url behavior should remain unchanged.
☕ Steps to reproduce
What Durable Functions patterns are you using, if any?
Any minimal reproducer we can use?
Are you running this locally or on Azure?
- Run a Python Durable Functions HTTP starter behind a reverse proxy.
- Have the proxy forward a public HTTPS origin using
X-Forwarded-Proto: httpsandX-Forwarded-Host: public.example.com, while the worker receives an internalrequest.urlsuch ashttp://internal.example/api/start. - Return
client.create_check_status_response(req, instance_id). - Observe that the management URL origins use
http://internal.examplerather thanhttps://public.example.com.
A source-level reproduction is also sufficient: initialize the client with an HTTPS management URL template, call get_client_response_links() with an HTTP request.url, and observe that _replace_url_origin() downgrades the template to HTTP.
Relevant implementation: azure/durable_functions/models/DurableOrchestrationClient.py, in get_client_response_links() and _replace_url_origin().
⚡If deployed to Azure
We have access to a lot of telemetry that can help with investigations. Please provide as much of the following information as you can to help us investigate!
- Timeframe issue observed: N/A; identified through source analysis of reverse-proxy behavior
- Function App name: N/A
- Function name(s): N/A
- Azure region: N/A
- Orchestration instance ID(s): N/A
- Azure storage account name: N/A
If you don't want to share your Function App or storage account name GitHub, please at least share the orchestration instance ID. Otherwise it's extremely difficult to look up information.
- 主要言語
- Python
- スター
- 157
- フォーク
- 71
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Azure/azure-functions-durable-python のほかの issue
-
Enhancement fixed-in-v2 P3
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Azure/azure-functions-durable-python#617 · コメント 1 件 ·
-
bug Debuggability fixed-in-v2 P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Azure/azure-functions-durable-python#587 · コメント 2 件 · リアクション 1 件 ·
-
Custom object serialization broken for orchestrator return values対応中かも @andystaples が 72 日前に担当しました。 オープンbug fixed-in-v2 P2
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Azure/azure-functions-durable-python#568 · コメント 1 件 ·
-
bug fixed-in-v2 P3
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Azure/azure-functions-durable-python#475 · コメント 1 件 ·
-
blocked bug fixed-in-v2 known-regression
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
Azure/azure-functions-durable-python#600 · コメント 3 件 ·
Azure/azure-functions-durable-python の issue をすべて見る
似ている issue
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
darnitdevorg/darnit#587 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
accessibility good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
llm translation
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug bug-hunt
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信