Skip to content

feat(core): add azure-deprecating to default allowed HTTP headers - #7246

Open
heaths with Copilot wants to merge 2 commits into
mainfrom
copilot/update-azure-core-header-logging
Open

feat(core): add azure-deprecating to default allowed HTTP headers#7246
heaths with Copilot wants to merge 2 commits into
mainfrom
copilot/update-azure-core-header-logging

Conversation

Copilot AI commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

azure-deprecating was missing from the default allowed (unsanitized) header list in Azure Core's HTTP pipeline logging/sanitizer, causing its value to be redacted (REDACTED) in logs. Per Azure API Guidelines: Deprecating Behavior Notification, this header carries human-readable deprecation notices that should be visible in diagnostics.

Requested by Heath Stewart (@heaths).

Changes

  • sdk/core/azure-core/src/http/log_policy.cpp — Added "azure-deprecating" to g_defaultAllowedHttpHeaders (alphabetically between Accept-Ranges and Cache-Control).
  • sdk/core/azure-core/test/ut/log_policy_test.cpp — Added azure-deprecating to the SendRequest test helper and updated LogPolicy.Headers expected output.
  • sdk/core/azure-core/CHANGELOG.md — Added entry under Features Added for 1.17.0-beta.1.

Pull Request Checklist

Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:

See the detailed list in the contributing guide.

  • C++ Guidelines
  • Doxygen docs
  • Unit tests
  • No unwanted commits/changes
  • Descriptive title/description
    • PR is single purpose
    • Related issue listed
  • Comments in source
  • No typos
  • Update changelog
  • Not work-in-progress
  • External references or docs updated
  • Self review of PR done
  • Any breaking changes?

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
9 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Add `azure-deprecating` to `g_defaultAllowedHttpHeaders` so this
response header is logged without redaction by the HTTP pipeline.
Update tests and CHANGELOG accordingly.

See https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#deprecating-behavior-notification

Co-authored-by: heaths <1532486+heaths@users.noreply.github.com>
Copilot AI changed the title [WIP] Update logging defaults to allow azure-deprecating response header feat(core): add azure-deprecating to default allowed HTTP headers Jul 27, 2026
Copilot AI requested a review from heaths July 27, 2026 21:38
@heaths
heaths marked this pull request as ready for review July 27, 2026 22:07
@heaths
heaths requested a review from RickWinter as a code owner July 27, 2026 22:07
Copilot AI review requested due to automatic review settings July 27, 2026 22:07
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
8 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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.

Pull request overview

This PR updates Azure Core’s HTTP pipeline logging sanitizer defaults so the azure-deprecating header value is no longer redacted in diagnostics, aligning with Azure API Guidelines deprecation notifications.

Changes:

  • Added azure-deprecating to the default allowed (unsanitized) HTTP header allow-list used by LogPolicy/HttpSanitizer.
  • Updated LogPolicy.DefaultHeaders unit test helper and expected logged header output to include azure-deprecating.
  • Added a release note entry for the change in sdk/core/azure-core/CHANGELOG.md.
Show a summary per file
File Description
sdk/core/azure-core/src/http/log_policy.cpp Adds azure-deprecating to the default allowed header set so it won’t be redacted in logs.
sdk/core/azure-core/test/ut/log_policy_test.cpp Extends the default-header logging test to exercise and assert azure-deprecating output.
sdk/core/azure-core/CHANGELOG.md Documents the new default-allowed header in release notes.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Low


### Features Added

- Added `azure-deprecating` to the default list of allowed (unsanitized) HTTP response headers logged by the HTTP pipeline. See [Azure API guidelines: Deprecating Behavior Notification](https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#deprecating-behavior-notification) for more information.
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.

3 participants