Repository navigation
Keep Durable Functions system keys out of management URLs - #313
Open
Naiyuan Tian (nytian) wants to merge 1 commit into
Open
Naiyuan Tian (nytian) wants to merge 1 commit into
Naiyuan Tian (nytian) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 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
codeparameters intox-functions-keyheader metadata. - Use key-free
Locationheaders and addCache-Control: no-storeto 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() { |
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.
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
requiredHeadersusingx-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
CHANGELOG.mdAdditional information