Skip to content

Keep Durable Functions system keys out of management URLs - #313

Open
Naiyuan Tian (nytian) wants to merge 1 commit into
mainfrom
nytian/management-url
Open

Naiyuan Tian (nytian) wants to merge 1 commit into
mainfrom
nytian/management-url

Conversation

@nytian

Copy link
Copy Markdown
Contributor

Issue describing the changes in this PR

Generated management URLs include the Durable system key in code, which can expose it through HTTP access logs.

Return the key separately through requiredHeaders using x-functions-key, including when converting older host bindings. Generate key-free management URLs and Location headers, add no-store responses, and update regression tests and E2E callers. Existing constructor signatures and gRPC operations are preserved.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes are added to the CHANGELOG.md
  • I have added all required tests (Unit tests, E2E tests)

Additional information

  • Breaking change: polling clients must send the returned headers.
  • Validation: 45 module tests passed; packaged authentication checks passed across four backends and both extension TFMs.
  • Broader E2E suite: 31/36 passed; five entity scenarios timed out and remain unresolved.

@nytian
Naiyuan Tian (nytian) requested a review from a team as a code owner November 11, 2026 22:34
Copilot AI balanced review requested due to automatic review settings November 11, 2026 22:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the change moving management authentication from URL query strings to required headers.

No open issues 🎉

What changed in this PR

This PR moves Durable Functions management authentication from URL query strings to requiredHeaders, reducing system-key exposure in HTTP access logs. Polling clients must now send the returned headers; existing constructor signatures and gRPC operations remain unchanged.

Changes:

  • Generate key-free management URLs and convert legacy code parameters into x-functions-key header metadata.
  • Use key-free Location headers and add Cache-Control: no-store to check-status responses.
  • Add regression coverage and update E2E callers to send authentication headers.
File Description
endtoendtests/​src/​test/​java/​com/​functions/​EndToEndTests.java Sends required headers to validated management endpoints and checks key-free URLs.
azurefunctions/​src/​test/​java/​com/​microsoft/​durabletask/​azurefunctions/​HttpManagementPayloadTest.java Tests legacy-key conversion, header precedence, immutability, and empty queries.
azurefunctions/​src/​test/​java/​com/​microsoft/​durabletask/​azurefunctions/​DurableClientContextTest.java Tests binding credentials, context isolation, key-free locations, and no-store responses.
azurefunctions/​src/​main/​java/​com/​microsoft/​durabletask/​azurefunctions/​HttpManagementPayload.java Separates authentication headers from management URLs while preserving the existing constructor.
azurefunctions/​src/​main/​java/​com/​microsoft/​durabletask/​azurefunctions/​DurableClientContext.java Passes binding headers into payloads and updates check-status response headers.

Review effort: Balanced

*
* @return An immutable map of required HTTP request headers.
*/
public Map<String, String> getRequiredHeaders() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants