Permit unauthenticated access to health/info/prometheus actuator endpoints#1138
Conversation
…oints Spring Boot 4 applies the application's SecurityFilterChain to the management port, so the existing anyRequest().authenticated() rule caused /actuator/health to return 401 and broke prod healthchecks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
ChangesActuator Endpoint Security Rules
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
EndpointRequest moved from org.springframework.boot.actuate.autoconfigure.security.servlet to org.springframework.boot.security.autoconfigure.actuate.web.servlet in Spring Boot 4. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
SecurityFilterChainto the management port, so the existinganyRequest().authenticated()rule made/actuator/healthreturn 401 and broke the prod deployment's healthcheck.health,info, andprometheusviaEndpointRequest.to(...); other exposed endpoints (env,beans, …) still require authentication.Test plan
curl http://<host>:8011/actuator/healthreturns 200 without credentialscurl http://<host>:8011/actuator/envstill returns 401🤖 Generated with Claude Code
Summary by CodeRabbit