You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to hash the remote user that gets logged?
There used to be LogbackAccessSecurityAttributesSaveFilter which enabled to override the doFilter() function, but it has been removed in the newer version of this starter.
The text was updated successfully, but these errors were encountered:
@Component
public class FilterConfiguration {
@Bean
@NotNull
public FilterRegistrationBean<LogbackAccessSecurityServletFilter> logbackAccessSecurityServletFilter() {
return new FilterRegistrationBean(new CustomSecurityAttributesSaveFilter());
}
}
public class CustomSecurityAttributesSaveFilter implements Filter {
@NotNull
public static final String REMOTE_USER_ATTRIBUTE = Reflection.getOrCreateKotlinClass(LogbackAccessSecurityServletFilter.class).getQualifiedName() + ".remoteUser";
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
saveSecurityAttributes((HttpServletRequest) request);
chain.doFilter(request, response);
}
private void saveSecurityAttributes(HttpServletRequest request) {
request.setAttribute(REMOTE_USER_ATTRIBUTE, hash(request.getRemoteUser()));
}
}
Is there a reason that LogbackAccessSecurityServletFilter is final? Otherwise I could override the doFilter there and create my own FilterRegistrationBean without any warnings.
Question
Is there a way to hash the remote user that gets logged?
There used to be LogbackAccessSecurityAttributesSaveFilter which enabled to override the doFilter() function, but it has been removed in the newer version of this starter.
The text was updated successfully, but these errors were encountered: