Hi List,

We are running Geoserver 2.11.1 with Java 1.8.0_131 on Tomcat 8.0.44.

I'm not sure if this is right place for my question or should I sent it to the 
Tomcat list. Anyhow. Here is the problem.

We are not able to record the username in the Tomcat Accesslog. Geoserver has 
it's monitor plugin and Auditlogs, which we have installed and logs are running 
nicely with recorded username. In the Tomcat accesslog they don't show up no 
matter what I try.

Here are parameters for the AccessLogValve in Tomcat 8.0\conf\server.xml file

<Valve className="org.apache.catalina.valves.AccessLogValve" 
directory="D:\Data\GeoServer\Tomcat_logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%a %{X-Forwarded-FOR}i %u %t &quot;%r&quot; %s %b" />

I have tried to replace "%u" parameter with different kinds of syntaxes example 
"%{username}s", "%{userName}s", "%{remoteUser}s", "%{remoteuser}s", but none of 
them had solved the problem. Not even replacing "s" with "i". With 
{Authorization}i, I was able to record that Geoserver is using Basic 
authentication as it is set in UI.

https://www.symantec.com/connect/blogs/enhancing-tomcat-logging-improved-forensics
The %u pattern code logs the remote username if the request was authenticated 
with HTTP Basic or Digest authentication

I also found this old thread 
https://gis.stackexchange.com/questions/18493/how-to-track-logged-in-user-in-geoserver
 and here the logging the username seem really easy and trivial.

Can you help me?

With best regards

Ville Jussila

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to