Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 401 responses should include WWW-Authentciate header #48

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

rtamalin
Copy link
Collaborator

@rtamalin rtamalin commented Aug 2, 2024

When generating a HTTP 401 StatusUnauthorized response to a telemetry client the response should include an appropriate WWW-Authenticate header indicating to the client what action it should take to address it's lack of authorization.

The generated WWW-Authenticate header uses a custom "Bearer" challenge specifying a realm of "suse-telemetry-service" with a scope of either "authenticate" or "register" indicating the appropriate action which the client needs to take.

Fixes: #47

When generating a HTTP 401 StatusUnauthorized response to a telemetry
client the response should include an appropriate WWW-Authenticate
header indicating to the client what action it should take to address
it's lack of authorization.

The generated WWW-Authenticate header uses a custom "Bearer" challenge
specifying a realm of "suse-telemetry-service" with a scope of either
"authenticate" or "register" indicating the appropriate action which
the client needs to take.

Fixes: #47
@rtamalin rtamalin force-pushed the unauthorized_www_authenticate_header branch from 1280f59 to b79fbb2 Compare August 2, 2024 20:14
Copy link
Collaborator

@gbuenodevsuse gbuenodevsuse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rtamalin rtamalin merged commit aa5c44f into main Aug 5, 2024
1 check passed
@rtamalin rtamalin deleted the unauthorized_www_authenticate_header branch August 5, 2024 14:35
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.

Authentication: HTTP 401StatusUnauthorized responses should include an appropriate WWW-Authenticate header
2 participants