Of course, I know this is not a Tomcat forum. ;)
Actually I meant a mechanism that provides user identity for Tomcat.
If Tomcat sees the same user it picks up his old session and further checks session expiration by timeout and other custom conditions.
It's probably waffle.apache.NegotiateAuthenticator provides the user identity.
I've decoded NTLM tokens from the log file and found out that token does contain correct new user name, but NegotiateAuthenticator after all negotiations reports old user name.
Please find below log file extraction.
All messages are prepended by the same header so I moved it to the top.
I also group messages into 3 groups for 3 negotiation rounds.
I've found out also that new user name has the same object sid (admin confirmed that).
So, is it possible that NTLM implementation (in Waffle? in Windows?) takes new user name, then identifies it in domain, then gets object sid and then gets old user name from some local cache by this object sid?
==log file extraction==
<DATE> <TIME> waffle.apache.NegotiateAuthenticator authenticate
FINE: GET /sso/, contentlength: -1
FINE: authorization: <none>, ntlm post: false
FINE: authorization required
FINE: GET /sso/, contentlength: -1
FINE: authorization: Negotiate <a-short-token>, ntlm post: false
FINE: token buffer: 40 byte(s)
FINE: continue required: true
FINE: continue token: <outgoing-long-token>
FINE: GET /sso/, contentlength: -1
FINE: authorization: Negotiate <incoming-long-token-with-NEWNAME>, ntlm post: false
FINE: token buffer: 454 byte(s)
FINE: continue required: false
FINE: logged in user: DOMAIN\OLDNAME (<OBJECT-SID>)
FINE: roles: <some AD groups>
FINE: session id:6B2BF83C4241F62A3742E28CDB308A21
INFO: successfully logged in user: DOMAIN\OLDNAME