Skip to content

Commit

Permalink
add MDC
Browse files Browse the repository at this point in the history
  • Loading branch information
Thumimku committed May 29, 2024
1 parent d4a358b commit 40906dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ private void handleImpersonatedAccessToken(AuthenticationContext authenticationC

// Check if the token represents an impersonation request
if (impersonator != null) {
MDC.put(Constants.IMPERSONATOR, impersonator);
String scope = introspectionResponseDTO.getScope();
String clientId = introspectionResponseDTO.getClientId();
String requestUri = authenticationContext.getAuthenticationRequest().getRequestUri();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public class AuthenticationValve extends ValveBase {
private static final String USER_AGENT = "User-Agent";
private static final String REMOTE_ADDRESS = "remoteAddress";
private static final String SERVICE_PROVIDER = "serviceProvider";
private static final String IMPERSONATOR = "impersonator";
private final String CLIENT_COMPONENT = "clientComponent";
private final String REST_API_CLIENT_COMPONENT = "REST API";
private static final String AUTH_USER_TENANT_DOMAIN = "authUserTenantDomain";
Expand Down Expand Up @@ -275,6 +276,7 @@ private void unsetMDCThreadLocals() {
MDC.remove(USER_AGENT);
MDC.remove(REMOTE_ADDRESS);
MDC.remove(SERVICE_PROVIDER);
MDC.remove(IMPERSONATOR);
}

private boolean isLoggableParam(String param) {
Expand Down

0 comments on commit 40906dc

Please sign in to comment.