Recently upgraded from Spring Security 5.3.4 to 5.7.6 and since then am seeing data scrubbed from the logs following certain key words. When, for example, a log message contains the words “key”, “token”, or “secret”, the string after those keywords is scrubbed.
Some examples…
Looking up record by key word
becomes
Lookup up record by key***
o.s.w.s.MyTokenAuthorizationService successful login, continue
becomes
o.s.w.s.MyToken***, continue
Understand the point of this is to prevent secrets, authentication tokens, and keys from getting logged, but Spring is often inaccurate and scrubs data that is needed for debugging
For example
Logging Request: GET mysite.com/fetchData?primaryKey=col1&value=77
becomes
Logging Request: GET mysite.com/fetchData?primaryKey***
Is there some way to prevent Spring from scrubbing this data?
Have tried searching documentation for any mention of this behavior or of how to disable it but without success.
To validate that these keywords were actually triggering the data scrub, tried replacing “key” with “k3y”, “token” with “t0ken”, and “secret” with “s3cret”. Everything logged without scrubbing.