Template requestAttributesEnabled on the Log4j ConfigurableLoggerAccessLogValve - #28064
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummaryThis PR completes the templating of the What changedModified Why it mattersWhen Identity Server is deployed behind a reverse proxy with Technical details
WalkthroughIn 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
|
|
Integration Test Runner |




Purpose
Follow-up to #27655. That PR templated
requestAttributesEnabledon the defaultAccessLogValve(the{% else %}branch) but left the Log4jConfigurableLoggerAccessLogValvebranch ({% if http_access_log.useLogger is sameas true %}) emitting onlypattern— sohttp_access_log.request_attributes_enabledis silently dropped when the Log4j access logger is used.When IS is behind a reverse proxy with
RemoteIpValve, the%hpattern cannot log the real client IP becauserequestAttributesEnabledis never propagated to the Log4j valve.Fixes #27172.
Change
modules/distribution/src/repository/resources/conf/templates/repository/conf/tomcat/catalina-server.xml.j2— addedrequestAttributesEnabled="{{http_access_log.request_attributes_enabled}}"to theConfigurableLoggerAccessLogValveelement, mirroring the default-valve branch from #27655.ConfigurableLoggerAccessLogValveextendsAbstractAccessLogValveand already honors the attribute.default.jsonchange —http_access_log.request_attributes_enabled(defaultfalse) was added in Template therequestAttributesEnabledparameter for theAccessLogValve#27655.Opt-in (requires restart)