Skip to content

ADH-8304: Do not apply WebUI auth filter to S3 API object paths#11

Merged
iamlapa merged 2 commits into
2.2.0-developfrom
bugfix/ADH-8304
May 21, 2026
Merged

ADH-8304: Do not apply WebUI auth filter to S3 API object paths#11
iamlapa merged 2 commits into
2.2.0-developfrom
bugfix/ADH-8304

Conversation

@iamlapa

@iamlapa iamlapa commented May 20, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes S3G uploads for object keys ending with .html/.jsp when WebUI authentication is enabled.

HttpServer2 maps AuthenticationFilterInitializer filters to *.html and *.jsp on the main webapp by default. Since S3G serves S3 object API requests from the same main webapp, object paths like /bucket/page.html were intercepted by the WebUI/SPNEGO filter before S3 SigV4 handling and failed with 401 Unauthorized.

The fix adds an internal HttpServer2/BaseHttpServer hook to override main webapp filter path specs, and disables those WebUI filter mappings only for the S3 API server. S3G WebAdmin keeps the existing WebUI auth behavior.

Changes

  • Added HttpServer2.Builder#setWebAppFilterPathSpecs.
  • Added BaseHttpServer#getWebAppFilterPathSpecs.
  • Disabled WebUI initializer filter path mappings for S3GatewayHttpServer.
  • Kept S3G WebAdmin HTML/JSP filter mappings unchanged.
  • Added regression tests for default/custom/empty filter mappings and S3G API vs WebAdmin behavior.
  • Updated S3G HTTP security documentation.

S3 Gateway serves S3 object keys through the main webapp. When WebUI authentication is enabled, HttpServer2 maps initializer filters to *.html and *.jsp by default. This makes object keys such as page.html hit the WebUI/SPNEGO authentication filter before S3 SigV4 handling, causing PUT Object to fail with 401.
@iamlapa iamlapa merged commit 5887216 into 2.2.0-develop May 21, 2026
93 of 95 checks passed
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.

3 participants