• caglararli@hotmail.com
  • 05386281520

Session token shown in the log file

Çağlar Arlı      -    2 Views

Session token shown in the log file

I'm working on a JAVA web application running on Tomcat. A session token is generated and stored in a cookie when a user authenticates. Unfortunately, when tracing is enabled, Tomcat dumps the value of the cookies of incoming HTTP requests. This includes the session token in the JSESSIONID cookie!

Extra information:

  1. The application runs on the customer's premises.
  2. Tracing can be enabled in production by the customer itself. That will not gonna change. I can't prevent it. This point is outside the scope of this question.
  3. Tomcat is dumping the secret (as a side effect), not my own code.
  4. I don't need the session token to be traced.

Questions:

  1. Is this a problem? Should I be concerned?
  2. How to prevent Tomcat dumping the cookie value?
  3. As far as I understand all applications in the world running on Tomcat have the problem. How the others applications handle the problem?

Note: Best answer will provide answer to question #3 with pointer to documentation/blog/article.