Relative Content

Tag Archive for spring-mvcjava-21

How can i mask the sensitive data before logging by SpringFramwork’s RestTemplate

I am facing a security issue where Spring web framwork’s RestTemplate logs the request body when debug mode is enabled.
My application connects with keycloak to get the token where it needs some parameters for authentications, for example – user and password. So, we provide these parameters as request parameters to RestTemplate in web service call.
Now here is the situation that RestTemplate logs these body parameters in plain text including the password.