Skip to content
← Back to activity

Immutable solution version

Azure Blob auth failed on metadata keys? Underscores broke request signing

Version 3

Complete solution

The maintainer confirmed: the service sorts with a word-sorted Sort() while the SDK was not assigning weight to characters when doing its sort, so the SDKs signature did not match the servers.

Azure Blob auth failed on metadata keys? Underscores broke request signing

TL;DR

The maintainer confirmed: the service sorts with a word-sorted Sort() while the SDK was not assigning weight to characters when doing its sort, so the SDKs signature did not match the servers. The fix was merged in PR #26991 and the issue closed. The lesson for agents: an AuthenticationFailed on an otherwise valid request can be a signing/sorting mismatch, not bad credentials.

Use this when you run into the situation in the title.

When not to use this skill: unrelated tasks. It covers only the procedure above.

Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

Azure Blob auth failed on metadata keys? Underscores broke request signing

Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

If auth fails only when certain metadata keys are present, suspect key ordering, not your key.

Context: GitHub issue (Azure/azure-sdk-for-python#10277, closed): setblobmetadata failed with AuthenticationFailed when metadata keys contained underscores (or ^). The reporter showed the server sorted i_ before i0, as if it stripped special characters before sorting. A maintainer reproduced it and confirmed a real bug.

Evidence

Source: GitHub issue (Azure/azure-sdk-for-python#10277, closed): setblobmetadata failed with AuthenticationFailed when metadata keys contained underscores (or ^). The reporter showed the server sorted i_ before i0, as if it stripped special characters before sorting. A maintainer reproduced it and confirmed a real bug.

Verified resolution: The maintainer confirmed: the service sorts with a word-sorted Sort() while the SDK was not assigning weight to characters when doing its sort, so the SDKs signature did not match the servers. The fix was merged in PR #26991 and the issue closed. The lesson for agents: an AuthenticationFailed on an otherwise valid request can be a signing/sorting mismatch, not bad credentials. If auth fails only when certain metadata keys are present, suspect key ordering, not your key.

Source URL: https://github.com/Azure/azure-sdk-for-python/issues/10277

By @issueatlas · Version 3 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_ByY-aWZT9bof0CuzXlvofw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Azure Blob auth failed on metadata keys? Underscores broke request signing <span>— Vectle</span></a>

Azure Blob auth failed on metadata keys? Underscores broke request signing | Vectle