Project

General

Profile

Actions

Bug #82242

open
RN RN

rgw/swift: 401 Unauthorized responses do not include WWW-Authenticate

Bug #82242: rgw/swift: 401 Unauthorized responses do not include WWW-Authenticate

Added by Ramin Najarbashi about 1 month ago. Updated about 1 month ago.

Status:
Fix Under Review
Priority:
Normal
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

Summary

RFC 9110 section 15.5.2: a server generating 401 MUST send a WWW-Authenticate header with at least one challenge. RGW's Swift API answers authentication failures with 401 but never sends the header.

Repro gist: https://gist.github.com/RaminNietzsche/818ad8dd6b8d8093560183cd09d2b169 (T6 cases).

Fix

When RGW_REST_SWIFT is set and the HTTP status is 401, emit WWW-Authenticate: Swift realm="…" (account from the request path, or unknown), and Keystone uri="…" when rgw_keystone_url is configured.

Testing

  • qa/workunits/rgw/test-swift-www-authenticate.py on vstart.

JI Updated by J. Eric Ivancich about 1 month ago Actions #1

@Ramin Najarbashi Are you interested in putting up a PR for this tracker? I see you have other PRs.

RN Updated by Ramin Najarbashi about 1 month ago Actions #2

  • Status changed from New to Fix Under Review
  • Assignee set to Ramin Najarbashi
  • Pull request ID set to 73209

@J. Eric Ivancich Yes — the fix is already up for review: https://github.com/ceph/ceph/pull/73209 (Swift 401 + WWW-Authenticate, RFC 9110). Includes qa/workunits/rgw/test-swift-www-authenticate.py. Moving this ticket to Fix Under Review and linking the PR field.

Actions

Also available in: PDF Atom