Nice investigation.
Bug reproduced with plain spring-boot 2.2.2.RELEASE (*)
It looks like a bug in spring-boot... or at least a difference with
plain tomcat that could be documented...
Fortunately, easy workaround:
server.tomcat.accesslog.pattern=%{X-Forwarded-For}i ...
cu
(*) tested with https://github.com/spring-guides/gs-spring-boot.git
launched with
java -Dserver.tomcat.accesslog.pattern='%{X-Forwarded-For}i %a %h'
-Dserver.tomcat.remote-ip-header='X-Forwarded-For'
-Dserver.tomcat.accesslog.directory=`pwd`
-Dserver.tomcat.accesslog.enabled=true -Dserver.port=8083 -jar
target/gs-spring-boot-0.1.0.jar
crdaudt <[email protected]> a écrit :
OK, I checked more closely -- the cas.log and cas_audit.log files are,
indeed responding to the RemoteIpValve setting (i.e., they are logging the
IP address of the client. The same is true for the gradle log file in
.gradle/daemon/5.6.3/daemon-<pid>.out.log. However, the tomcat
access_log.<date>.log file is still logging the IP address of the load
balancer. Is there a way to cause the access log to also record the IP
address of the client rather than the load balancer? For that matter, is
this a bad idea?
--
Pascal Rigaux
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/20200106221152.Horde.cXwcJ7BTZhBjqU27lwDUeoX%40courrier.univ-paris1.fr.