From aa25bb4261988868dfa2635f3f4a64a3c7d76514 Mon Sep 17 00:00:00 2001 From: kameshsr <47484458+kameshsr@users.noreply.github.com> Date: Fri, 12 Jan 2024 11:48:18 +0530 Subject: [PATCH 1/3] MOSIP-31067 Added verbose logging of class (#1165) * MOSIP-31067 Fixed dependencies verion mismatch Signed-off-by: kameshsr * MOSIP-31067 Fixed dependencies verion mismatch Signed-off-by: kameshsr * MOSIP-31067 Removed child auth filter. Signed-off-by: kameshsr * MOSIP-31067 Removed child auth filter. Signed-off-by: kameshsr * MOSIP-31067 Removed child auth filter. Signed-off-by: kameshsr * MOSIP-31067 Fixed ida startup issue Signed-off-by: kameshsr * MOSIP-31067 Added verbose logging of class Signed-off-by: kameshsr --------- Signed-off-by: kameshsr --- authentication/authentication-internal-service/Dockerfile | 4 ++-- authentication/authentication-service/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/authentication/authentication-internal-service/Dockerfile b/authentication/authentication-internal-service/Dockerfile index b5239d29a7a..fbb6cf590ac 100644 --- a/authentication/authentication-internal-service/Dockerfile +++ b/authentication/authentication-internal-service/Dockerfile @@ -133,11 +133,11 @@ CMD if [ "$is_glowroot_env" = "present" ]; then \ rm -rf glowroot.zip ; \ sed -i "s//${current_module_env}/g" glowroot/glowroot.properties ; \ wget -q "${iam_adapter_url_env}" -O "${loader_path_env}"/kernel-auth-adapter.jar; \ - java -jar -Djava.security.debug=sunpkcs11 -javaagent:glowroot/glowroot.jar -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ + java -jar -verbose:class -Djava.security.debug=sunpkcs11 -javaagent:glowroot/glowroot.jar -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ else \ wget -q "${artifactory_url_env}"/artifactory/libs-release-local/io/mosip/authentication/authentication-ref-impl/authentication-childauthfilter-impl.jar -O "${loader_path_env}"/authentication-childauthfilter-impl.jar ; \ wget -q "${iam_adapter_url_env}" -O "${loader_path_env}"/kernel-auth-adapter.jar; \ - java -jar -Djava.security.debug=sunpkcs11 -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ + java -jar -verbose:class -Djava.security.debug=sunpkcs11 -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ fi #Sample docker run command: diff --git a/authentication/authentication-service/Dockerfile b/authentication/authentication-service/Dockerfile index 805fd9b3a84..fec45d653dd 100644 --- a/authentication/authentication-service/Dockerfile +++ b/authentication/authentication-service/Dockerfile @@ -136,11 +136,11 @@ CMD if [ "$is_glowroot_env" = "present" ]; then \ rm -rf glowroot.zip ; \ sed -i "s//${current_module_env}/g" glowroot/glowroot.properties ; \ wget -q "${iam_adapter_url_env}" -O "${loader_path_env}"/kernel-auth-adapter.jar; \ - java -jar -Djava.security.debug=sunpkcs11 -javaagent:glowroot/glowroot.jar -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ + java -jar -verbose:class -Djava.security.debug=sunpkcs11 -javaagent:glowroot/glowroot.jar -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ else \ wget -q "${artifactory_url_env}"/artifactory/libs-release-local/io/mosip/authentication/authentication-ref-impl/authentication-childauthfilter-impl.jar -O "${loader_path_env}"/authentication-childauthfilter-impl.jar ; \ wget -q "${iam_adapter_url_env}" -O "${loader_path_env}"/kernel-auth-adapter.jar; \ - java -jar -Djava.security.debug=sunpkcs11 -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ + java -jar -verbose:class -Djava.security.debug=sunpkcs11 -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ fi #Sample docker run command: From cbf28a0ee58d791bf8b23c87c386330ab1ace970 Mon Sep 17 00:00:00 2001 From: kameshsr <47484458+kameshsr@users.noreply.github.com> Date: Fri, 12 Jan 2024 17:27:56 +0530 Subject: [PATCH 2/3] MOSIP-31067 Reverted verbose parameter in docker (#1166) * MOSIP-31067 Fixed dependencies verion mismatch Signed-off-by: kameshsr * MOSIP-31067 Fixed dependencies verion mismatch Signed-off-by: kameshsr * MOSIP-31067 Removed child auth filter. Signed-off-by: kameshsr * MOSIP-31067 Removed child auth filter. Signed-off-by: kameshsr * MOSIP-31067 Removed child auth filter. Signed-off-by: kameshsr * MOSIP-31067 Fixed ida startup issue Signed-off-by: kameshsr * MOSIP-31067 Added verbose logging of class Signed-off-by: kameshsr * MOSIP-31067 Reverted verbose parameter in docker Signed-off-by: kameshsr --------- Signed-off-by: kameshsr --- authentication/authentication-internal-service/Dockerfile | 4 ++-- authentication/authentication-service/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/authentication/authentication-internal-service/Dockerfile b/authentication/authentication-internal-service/Dockerfile index fbb6cf590ac..b5239d29a7a 100644 --- a/authentication/authentication-internal-service/Dockerfile +++ b/authentication/authentication-internal-service/Dockerfile @@ -133,11 +133,11 @@ CMD if [ "$is_glowroot_env" = "present" ]; then \ rm -rf glowroot.zip ; \ sed -i "s//${current_module_env}/g" glowroot/glowroot.properties ; \ wget -q "${iam_adapter_url_env}" -O "${loader_path_env}"/kernel-auth-adapter.jar; \ - java -jar -verbose:class -Djava.security.debug=sunpkcs11 -javaagent:glowroot/glowroot.jar -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ + java -jar -Djava.security.debug=sunpkcs11 -javaagent:glowroot/glowroot.jar -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ else \ wget -q "${artifactory_url_env}"/artifactory/libs-release-local/io/mosip/authentication/authentication-ref-impl/authentication-childauthfilter-impl.jar -O "${loader_path_env}"/authentication-childauthfilter-impl.jar ; \ wget -q "${iam_adapter_url_env}" -O "${loader_path_env}"/kernel-auth-adapter.jar; \ - java -jar -verbose:class -Djava.security.debug=sunpkcs11 -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ + java -jar -Djava.security.debug=sunpkcs11 -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ fi #Sample docker run command: diff --git a/authentication/authentication-service/Dockerfile b/authentication/authentication-service/Dockerfile index fec45d653dd..805fd9b3a84 100644 --- a/authentication/authentication-service/Dockerfile +++ b/authentication/authentication-service/Dockerfile @@ -136,11 +136,11 @@ CMD if [ "$is_glowroot_env" = "present" ]; then \ rm -rf glowroot.zip ; \ sed -i "s//${current_module_env}/g" glowroot/glowroot.properties ; \ wget -q "${iam_adapter_url_env}" -O "${loader_path_env}"/kernel-auth-adapter.jar; \ - java -jar -verbose:class -Djava.security.debug=sunpkcs11 -javaagent:glowroot/glowroot.jar -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ + java -jar -Djava.security.debug=sunpkcs11 -javaagent:glowroot/glowroot.jar -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ else \ wget -q "${artifactory_url_env}"/artifactory/libs-release-local/io/mosip/authentication/authentication-ref-impl/authentication-childauthfilter-impl.jar -O "${loader_path_env}"/authentication-childauthfilter-impl.jar ; \ wget -q "${iam_adapter_url_env}" -O "${loader_path_env}"/kernel-auth-adapter.jar; \ - java -jar -verbose:class -Djava.security.debug=sunpkcs11 -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ + java -jar -Djava.security.debug=sunpkcs11 -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -Dloader.path="${loader_path_env}" -Dfile.encoding="UTF-8" ${current_module_env}.jar ; \ fi #Sample docker run command: From 278b3b7e7d2004b008336e3944641f88c8c797dd Mon Sep 17 00:00:00 2001 From: Anusha Sunkada Date: Mon, 22 Jan 2024 15:20:07 +0530 Subject: [PATCH 3/3] MOSIP-26691 (#1170) Signed-off-by: ase-101 --- .../service/IdaAuditPluginImpl.java | 41 +++---------------- 1 file changed, 5 insertions(+), 36 deletions(-) diff --git a/authentication/esignet-integration-impl/src/main/java/io/mosip/authentication/esignet/integration/service/IdaAuditPluginImpl.java b/authentication/esignet-integration-impl/src/main/java/io/mosip/authentication/esignet/integration/service/IdaAuditPluginImpl.java index 1e2ce7be147..3a06bf6e3c2 100644 --- a/authentication/esignet-integration-impl/src/main/java/io/mosip/authentication/esignet/integration/service/IdaAuditPluginImpl.java +++ b/authentication/esignet-integration-impl/src/main/java/io/mosip/authentication/esignet/integration/service/IdaAuditPluginImpl.java @@ -74,10 +74,10 @@ private void audit(String username, Action action, ActionStatus status, AuditDTO auditRequest.setApplicationName(ESIGNET); auditRequest.setSessionUserId(StringUtils.isEmpty(username)?"no-user":username); auditRequest.setSessionUserName(StringUtils.isEmpty(username)?"no-user":username); - auditRequest.setIdType(TRANSACTION); + auditRequest.setIdType(audit.getIdType()); auditRequest.setCreatedBy(this.getClass().getSimpleName()); - auditRequest.setModuleName(getModuleByAction(action)); - auditRequest.setModuleId(getModuleByAction(action)); + auditRequest.setModuleName(action.getModule()); + auditRequest.setModuleId(action.getModule()); auditRequest.setDescription(getAuditDescription(audit)); auditRequest.setId(audit.getTransactionId()); @@ -120,40 +120,9 @@ private String getAuditDescription(AuditDTO audit) throws JSONException { json.put("state", audit.getState()); json.put("codeHash", audit.getCodeHash()); json.put("accessTokenHash", audit.getAccessTokenHash()); + json.put("linkCodeHash", audit.getLinkedCodeHash()); + json.put("linkTransactionId", audit.getLinkedTransactionId()); return json.toString(); } - private String getModuleByAction(Action action) { - switch (action) { - case OIDC_CLIENT_CREATE: - case OIDC_CLIENT_UPDATE: - return "ClientManagementController"; - case GET_OAUTH_DETAILS: - case TRANSACTION_STARTED: - case SEND_OTP: - case AUTHENTICATE: - case GET_AUTH_CODE: - case DO_KYC_AUTH: - case DO_KYC_EXCHANGE: - return "AuthorizationController"; - case GENERATE_TOKEN: - return "OAuthController"; - case GET_USERINFO: - return "OpenIdConnectController"; - case LINK_AUTH_CODE: - case LINK_AUTHENTICATE: - case LINK_CODE: - case LINK_SEND_OTP: - case LINK_STATUS: - case LINK_TRANSACTION: - case SAVE_CONSENT: - return "LinkedAuthorizationController"; - case GET_CERTIFICATE: - case UPLOAD_CERTIFICATE: - return "SystemInfoController"; - default: - return "EsignetService"; - } - } - }