diff --git a/components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/utils/LogConstants.java b/components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/utils/LogConstants.java index 861b1e0bcc92..dbabbb1e1677 100644 --- a/components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/utils/LogConstants.java +++ b/components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/utils/LogConstants.java @@ -78,9 +78,7 @@ public static class ApplicationManagement { public static final String REGENERATE_CLIENT_SECRET_ACTION = "regenerate-client-secret"; public static final String UPDATE_APP_STATE_ACTION = "update-app-state"; public static final String CONSOLE_CLIENT_ID = "CONSOLE"; - public static final String MY_ACCOUNT_CLIENT_ID = "MY_ACCOUNT"; public static final String CONSOLE_APP_NAME = "Console"; - public static final String MY_ACCOUNT_APP_NAME = "My Account"; } /** diff --git a/components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/utils/LoggerUtils.java b/components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/utils/LoggerUtils.java index 4c7a98209f94..8825d74652e2 100644 --- a/components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/utils/LoggerUtils.java +++ b/components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/utils/LoggerUtils.java @@ -53,8 +53,6 @@ import static org.wso2.carbon.identity.central.log.mgt.utils.LogConstants.ApplicationManagement.CONSOLE_APP_NAME; import static org.wso2.carbon.identity.central.log.mgt.utils.LogConstants.ApplicationManagement.CONSOLE_CLIENT_ID; -import static org.wso2.carbon.identity.central.log.mgt.utils.LogConstants.ApplicationManagement.MY_ACCOUNT_APP_NAME; -import static org.wso2.carbon.identity.central.log.mgt.utils.LogConstants.ApplicationManagement.MY_ACCOUNT_CLIENT_ID; import static org.wso2.carbon.identity.central.log.mgt.utils.LogConstants.ENABLE_LOG_MASKING; import static org.wso2.carbon.identity.central.log.mgt.utils.LogConstants.LOGGABLE_USER_CLAIMS; import static org.wso2.carbon.identity.event.IdentityEventConstants.Event.PUBLISH_AUDIT_LOG; @@ -173,9 +171,9 @@ public static void triggerDiagnosticLogEvent(DiagnosticLog.DiagnosticLogBuilder try { Map diagnosticLogProperties = new HashMap<>(); DiagnosticLog diagnosticLog = diagnosticLogBuilder.build(); - /* As the Console and MyAccount application are managed by the identity server, the diagnostic logs are not + /* As the Console application is used to access the identity server resources, the diagnostic logs are not required to be emitted. */ - if (isConsoleOrMyAccountApp(diagnosticLog)) { + if (isConsoleApp(diagnosticLog)) { return; } IdentityEventService eventMgtService = @@ -392,7 +390,7 @@ public static List getLoggableClaimURIs() { return new ArrayList<>(); } - private static boolean isConsoleOrMyAccountApp(DiagnosticLog diagnosticLog) { + private static boolean isConsoleApp(DiagnosticLog diagnosticLog) { if (diagnosticLog.getInput() == null) { return false; @@ -401,24 +399,24 @@ private static boolean isConsoleOrMyAccountApp(DiagnosticLog diagnosticLog) { List clientIDs; Object clientIDInputObj = diagnosticLog.getInput().get(LogConstants.InputKeys.CLIENT_ID); if (clientIDInputObj instanceof String) { - return CONSOLE_CLIENT_ID.equals(clientIDInputObj) || MY_ACCOUNT_CLIENT_ID.equals(clientIDInputObj); + return CONSOLE_CLIENT_ID.equals(clientIDInputObj); } Object clientNameInputObj = diagnosticLog.getInput().get(LogConstants.InputKeys.APPLICATION_NAME); if (clientNameInputObj instanceof String) { - return CONSOLE_APP_NAME.equals(clientNameInputObj) || MY_ACCOUNT_APP_NAME.equals(clientNameInputObj); + return CONSOLE_APP_NAME.equals(clientNameInputObj); } if (clientIDInputObj instanceof List) { clientIDs = (List) diagnosticLog.getInput().get(LogConstants.InputKeys.CLIENT_ID); if (CollectionUtils.isNotEmpty(clientIDs)) { clientID = (String) clientIDs.get(0); - return CONSOLE_CLIENT_ID.equals(clientID) || MY_ACCOUNT_CLIENT_ID.equals(clientID); + return CONSOLE_CLIENT_ID.equals(clientID); } } if (diagnosticLog.getInput().get("client_id") instanceof List) { clientIDs = (List) diagnosticLog.getInput().get("client_id"); if (CollectionUtils.isNotEmpty(clientIDs)) { clientID = (String) clientIDs.get(0); - return CONSOLE_CLIENT_ID.equals(clientID) || MY_ACCOUNT_CLIENT_ID.equals(clientID); + return CONSOLE_CLIENT_ID.equals(clientID); } } return false;