microsoft / microsoft/api-guidelines

Add guidance on the value of `WWW-Authenticate` header in 401 response

Open
#379 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Azure Guidelines
Dominant language
No language data
Stars
23.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

HTTP services are required to include a WWW-Authenticate header in a 401 Unauthorized response per RFC 7235:

The server generating a 401 response MUST send a WWW-Authenticate header field (Section 4.1) containing at least one challenge applicable to the target resource.

But Azure service teams currently are left on their own to decide what constitutes an "applicable challenge", leading to inconsistency in the result and possible confusion for users.

@schaabs has some concrete thoughts on good practices that we can codify into the Azure API Guidelines.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with RFC 7235 sections 3.1 and 4.1, then review the Azure API Guidelines structure to identify where authentication-response guidance belongs. Done means the guidelines explain what an applicable WWW-Authenticate challenge should contain for 401 responses, incorporating the concrete practices referenced in the issue.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.