From efeb202899e5344cc118c9cb1ca45704aca7fd2a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Jul 2026 21:29:37 +0000 Subject: [PATCH 1/2] Initial plan From 15f1cb5a99d8c6449d6ed3f57016a6dd87f4c565 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Jul 2026 21:33:40 +0000 Subject: [PATCH 2/2] Add azure-deprecating to DEFAULT_HEADERS_ALLOWLIST in HttpLoggingPolicy Add `azure-deprecating` response header to the list of default allowed headers in `HttpLoggingPolicy` so it is logged without redaction. 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> --- sdk/core/azure-core/CHANGELOG.md | 6 ++++++ .../azure-core/azure/core/pipeline/policies/_universal.py | 1 + sdk/core/azure-core/tests/test_pipeline.py | 1 + 3 files changed, 8 insertions(+) diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index f77fe1020e82..759a911cace5 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.42.0 (Unreleased) + +### Features Added + +- Added `azure-deprecating` to the default allowed headers list in `HttpLoggingPolicy`, so deprecation notification headers are logged without redaction. + ## 1.41.0 (2026-05-07) ### Features Added diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py index 9be81820904f..1e221ceb413c 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py @@ -438,6 +438,7 @@ class HttpLoggingPolicy( "WWW-Authenticate", # OAuth Challenge header. "x-vss-e2eid", # Needed by Azure DevOps pipelines. "x-msedge-ref", # Needed by Azure DevOps pipelines. + "azure-deprecating", # Deprecation notification header. ] ) REDACTED_PLACEHOLDER: str = "REDACTED" diff --git a/sdk/core/azure-core/tests/test_pipeline.py b/sdk/core/azure-core/tests/test_pipeline.py index af6ca1a1a0ea..8262a70827f9 100644 --- a/sdk/core/azure-core/tests/test_pipeline.py +++ b/sdk/core/azure-core/tests/test_pipeline.py @@ -73,6 +73,7 @@ def test_default_http_logging_policy(http_request): assert "WWW-Authenticate" in http_logging_policy.allowed_header_names assert "x-vss-e2eid" in http_logging_policy.allowed_header_names assert "x-msedge-ref" in http_logging_policy.allowed_header_names + assert "azure-deprecating" in http_logging_policy.allowed_header_names # Testing I can replace the set entirely HttpLoggingPolicy.DEFAULT_HEADERS_ALLOWLIST = set(HttpLoggingPolicy.DEFAULT_HEADERS_ALLOWLIST) HttpLoggingPolicy.DEFAULT_HEADERS_WHITELIST = set(HttpLoggingPolicy.DEFAULT_HEADERS_ALLOWLIST)