fix(security): require authentication for actuator endpoints other than health#124
Merged
epugh merged 1 commit intoMay 8, 2026
Merged
Conversation
This was referenced May 2, 2026
…an health The secured filter chain matched /actuator and /actuator/* with permitAll, exposing the entire actuator surface anonymously even when http.security.enabled=true (sbom, loggers, prometheus, metrics, info). Tighten the matchers so /actuator/health stays anonymously reachable for load balancers and orchestrators, while everything else under /actuator requires an authenticated principal. Only relevant when http.security.enabled=true; the unsecured filter chain is unchanged. Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
f14e683 to
289fc0c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The secured filter chain matched `/actuator` and `/actuator/*` with `permitAll`, which exposed the entire actuator surface anonymously even when `http.security.enabled=true`:
Tighten the matchers:
Operators who need a metrics scraper without tokens can configure scraper auth or move actuator to a separate management port (`management.server.port` + `management.server.address=127.0.0.1`) — neither is changed here.
Operator impact
Only relevant when `http.security.enabled=true` (currently opt-in, defaults to false). The `unsecured` filter chain is unchanged.
Test plan
Note on PR ordering
Touches `HttpSecurityConfiguration.java`. Overlaps with #121 (CORS allowlist) and #123 (audience validation). Whichever lands later will need a small rebase.
References
🤖 Generated with Claude Code