From ac5a951d5735337c1c5bc9d9a7cf2651e26f4129 Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Wed, 1 Mar 2023 15:58:12 +0530 Subject: [PATCH 01/74] Update PartnerServiceImpl.java (#540) Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../io/mosip/pms/partner/service/impl/PartnerServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/partner/service/impl/PartnerServiceImpl.java b/partner/partner-management-service/src/main/java/io/mosip/pms/partner/service/impl/PartnerServiceImpl.java index ccde561c8f..78feaf5f24 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/partner/service/impl/PartnerServiceImpl.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/partner/service/impl/PartnerServiceImpl.java @@ -295,13 +295,13 @@ public PartnerResponse registerPartner(PartnerRequestDto request) { PartnerType partnerType = validateAndGetPartnerType(request.getPartnerType()); PolicyGroup policyGroup = null; - if (partnerType.getIsPolicyRequired() && request.getPolicyGroup()==null) { + if (partnerType.getIsPolicyRequired() && (request.getPolicyGroup()==null||request.getPolicyGroup().isEmpty())) { LOGGER.error("Policy Group is mandatory for "+partnerType.getCode()); auditUtil.setAuditRequestDto(PartnerServiceAuditEnum.REGISTER_PARTNER_FAILURE); throw new PartnerServiceException(ErrorCode.POLICY_GROUP_IS_MANDATORY.getErrorCode(), String.format(ErrorCode.POLICY_GROUP_IS_MANDATORY.getErrorMessage(),partnerType.getCode())); } - if(request.getPolicyGroup()!=null) { + if(request.getPolicyGroup()!=null && !request.getPolicyGroup().isEmpty()) { policyGroup = validateAndGetPolicyGroupByName(request.getPolicyGroup()); } Partner partner = mapPartnerFromRequest(request, policyGroup, partnerType.getCode()); From d511d34270eaaacaa65f1763e0d6527b77a7a3ed Mon Sep 17 00:00:00 2001 From: Mahesh-Binayak <76687012+Mahesh-Binayak@users.noreply.github.com> Date: Thu, 6 Apr 2023 14:36:23 +0530 Subject: [PATCH 02/74] [DSD-2429]Updated swagger config and changed folder structure. (#545) * [DSD-2429]Updated swagger config.java * [DSD_2429]Updated folder structure and package name Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../io/mosip/pms/policy/{ => config}/OpenApiProperties.java | 2 +- .../java/io/mosip/pms/policy/{ => config}/SwaggerConfig.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename partner/policy-management-service/src/main/java/io/mosip/pms/policy/{ => config}/OpenApiProperties.java (96%) rename partner/policy-management-service/src/main/java/io/mosip/pms/policy/{ => config}/SwaggerConfig.java (98%) diff --git a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/OpenApiProperties.java b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/config/OpenApiProperties.java similarity index 96% rename from partner/policy-management-service/src/main/java/io/mosip/pms/policy/OpenApiProperties.java rename to partner/policy-management-service/src/main/java/io/mosip/pms/policy/config/OpenApiProperties.java index 5b88ca46c9..920661ab3b 100644 --- a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/OpenApiProperties.java +++ b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/config/OpenApiProperties.java @@ -1,4 +1,4 @@ -package io.mosip.pms.policy; +package io.mosip.pms.policy.config; import java.util.List; diff --git a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/SwaggerConfig.java b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/config/SwaggerConfig.java similarity index 98% rename from partner/policy-management-service/src/main/java/io/mosip/pms/policy/SwaggerConfig.java rename to partner/policy-management-service/src/main/java/io/mosip/pms/policy/config/SwaggerConfig.java index 4aa9f49e37..ade22a590d 100644 --- a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/SwaggerConfig.java +++ b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/config/SwaggerConfig.java @@ -1,4 +1,4 @@ -package io.mosip.pms.policy; +package io.mosip.pms.policy.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; From 37ca18d5994c2f1e800d8fc8d8437684aa954c94 Mon Sep 17 00:00:00 2001 From: Mahesh-Binayak <76687012+Mahesh-Binayak@users.noreply.github.com> Date: Fri, 26 May 2023 14:21:48 +0530 Subject: [PATCH 03/74] Update pms-auth_policy.csv (#552) This is to make sure that while issuing credential , we dont face "Error occured while publishing topic to hub :- Failed to send data to Kafka server: The message is 1063127 bytes when serialized which is larger than 1048576, which is the value of the max.request.size configuration.\" issue in kafka Signed-off-by: Mahesh-Binayak <76687012+Mahesh-Binayak@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/dml/pms-auth_policy.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_scripts/mosip_pms/dml/pms-auth_policy.csv b/db_scripts/mosip_pms/dml/pms-auth_policy.csv index 030579ca1c..0a56b34767 100644 --- a/db_scripts/mosip_pms/dml/pms-auth_policy.csv +++ b/db_scripts/mosip_pms/dml/pms-auth_policy.csv @@ -2,7 +2,7 @@ id,policy_group_id,name,descr,policy_file_id,policy_type,version,policy_schema,v mpolicy-default-auth,mpolicygroup-default-auth,mpolicy-default-auth,mpolicy-default-auth,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""zone"",""source"":[{""attribute"":""zone""}],""encrypted"":true},{""attributeName"":""preferredLang"",""source"":[{""attribute"":""preferredLang""}],""encrypted"":false},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-abis,mpolicygroup-default-abis,mpolicy-default-abis,mpolicy-default-abis,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-qrcode,mpolicygroup-default-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-euin,mpolicygroup-default-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-euin,mpolicygroup-default-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-reprint,mpolicygroup-default-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-resident,mpolicygroup-default-resident,mpolicy-default-resident,mpolicy-default-resident,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-adjudication,mpolicy-default-adjudication,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""},{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""100000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() From cd5a6163b818ebfc6eb0088a85ec7bc9e720b195 Mon Sep 17 00:00:00 2001 From: techno-243 Date: Tue, 20 Jun 2023 17:22:58 +0530 Subject: [PATCH 04/74] =?UTF-8?q?[DSD-2861]updated=20=E2=80=9CData=20Share?= =?UTF-8?q?=E2=80=9C=20from=20=E2=80=9CDirect=E2=80=9D=20to=20Auth=20polic?= =?UTF-8?q?y=20mpolicy-default-euin=20,=20mpolicy-default-qrcode,=20mpolic?= =?UTF-8?q?y-default-reprint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/dml/pms-auth_policy.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db_scripts/mosip_pms/dml/pms-auth_policy.csv b/db_scripts/mosip_pms/dml/pms-auth_policy.csv index 0a56b34767..3e0bae0d80 100644 --- a/db_scripts/mosip_pms/dml/pms-auth_policy.csv +++ b/db_scripts/mosip_pms/dml/pms-auth_policy.csv @@ -1,9 +1,9 @@ id,policy_group_id,name,descr,policy_file_id,policy_type,version,policy_schema,valid_from_date,valid_to_date,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes mpolicy-default-auth,mpolicygroup-default-auth,mpolicy-default-auth,mpolicy-default-auth,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""zone"",""source"":[{""attribute"":""zone""}],""encrypted"":true},{""attributeName"":""preferredLang"",""source"":[{""attribute"":""preferredLang""}],""encrypted"":false},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-abis,mpolicygroup-default-abis,mpolicy-default-abis,mpolicy-default-abis,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-qrcode,mpolicygroup-default-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-qrcode,mpolicygroup-default-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":"""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-euin,mpolicygroup-default-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-reprint,mpolicygroup-default-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-reprint,mpolicygroup-default-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":"""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-resident,mpolicygroup-default-resident,mpolicy-default-resident,mpolicy-default-resident,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-adjudication,mpolicy-default-adjudication,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""},{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""100000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-cert,mpolicygroup-default-cert,mpolicy-default-cert,mpolicy-default-cert,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() From 57f11322a6bce6f54d4ac9085114333fd200a5dd Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Tue, 27 Jun 2023 18:18:02 +0530 Subject: [PATCH 05/74] MOSIP-18951 , MOSIP-27040 : Update ClientManagementServiceImpl.java (#541) * Update ClientManagementServiceImpl.java * MOSIP-26591 : Updated policy management service * Update PolicyValidatorErrorConstant.java * Update ClientManagementServiceImpl.java * Update PolicyManagementService.java * Update ClientManagementServiceImpl.java * Update AuthenticationContextRefUtil.java * Update AuthenticationContextRefUtil.java * Update AuthenticationContextRefUtil.java Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../io/mosip/pms/device/util/AuditUtil.java | 2 +- .../impl/ClientManagementServiceImpl.java | 7 +-- .../pms/common}/constant/AuditErrorCode.java | 2 +- .../util/AuthenticationContextRefUtil.java | 4 +- .../service/PolicyManagementService.java | 2 +- .../io/mosip/pms/policy/util/AuditUtil.java | 48 +++++++++++++++---- .../PolicyValidatorErrorConstant.java | 4 +- 7 files changed, 51 insertions(+), 18 deletions(-) rename partner/{partner-management-service/src/main/java/io/mosip/pms/device => pms-common/src/main/java/io/mosip/pms/common}/constant/AuditErrorCode.java (92%) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/device/util/AuditUtil.java b/partner/partner-management-service/src/main/java/io/mosip/pms/device/util/AuditUtil.java index 0ffd0c8b42..3af1ac60c3 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/device/util/AuditUtil.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/device/util/AuditUtil.java @@ -34,11 +34,11 @@ import io.mosip.kernel.core.exception.ExceptionUtils; import io.mosip.kernel.core.exception.ServiceError; import io.mosip.kernel.core.util.DateUtils; +import io.mosip.pms.common.constant.AuditErrorCode; import io.mosip.pms.common.exception.ValidationException; import io.mosip.pms.common.request.dto.RequestWrapper; import io.mosip.pms.common.response.dto.ResponseWrapper; import io.mosip.pms.common.util.RestUtil; -import io.mosip.pms.device.constant.AuditErrorCode; import io.mosip.pms.device.exception.DeviceServiceException; import io.mosip.pms.device.util.dto.AuditRequestDto; import io.mosip.pms.device.util.dto.AuditResponseDto; diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/service/impl/ClientManagementServiceImpl.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/service/impl/ClientManagementServiceImpl.java index 4d2443db27..426514f995 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/service/impl/ClientManagementServiceImpl.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/service/impl/ClientManagementServiceImpl.java @@ -76,6 +76,7 @@ public class ClientManagementServiceImpl implements ClientManagementService { private static final String AUTH_POLICY_TYPE = "Auth"; private static final String AUTH_PARTNER_TYPE = "Auth_Partner"; private static final String ERROR_MESSAGE = "errorMessage"; + public static final String ACTIVE = "ACTIVE"; @Autowired ObjectMapper objectMapper; @@ -181,7 +182,7 @@ public ClientDetailResponse createOIDCClient(ClientDetailCreateRequest createReq ErrorCode.PARTNER_HAVING_NO_ACRVALUES.getErrorMessage()); } clientDetail.setAcrValues( String.join(",",acrValues)); - clientDetail.setStatus("ACTIVE"); + clientDetail.setStatus(ACTIVE); clientDetail.setGrantTypes(String.join(",", createRequest.getGrantTypes())); clientDetail.setClientAuthMethods(String.join(",", createRequest.getClientAuthMethods())); clientDetail.setCreatedDateTime(LocalDateTime.now(ZoneId.of("UTC"))); @@ -375,7 +376,7 @@ public ClientDetailResponse updateOIDCClient(String clientId, ClientDetailUpdate clientDetail.setRedirectUris(String.join(",", updateRequest.getRedirectUris())); clientDetail.setGrantTypes(String.join(",", updateRequest.getGrantTypes())); clientDetail.setClientAuthMethods(String.join(",", updateRequest.getClientAuthMethods())); - clientDetail.setStatus(updateRequest.getStatus()); + clientDetail.setStatus(updateRequest.getStatus().toUpperCase()); clientDetail.setUpdatedDateTime(LocalDateTime.now(ZoneId.of("UTC"))); clientDetail.setUpdatedBy(getLoggedInUserId()); makeUpdateIDPServiceCall(clientDetail, environment.getProperty("mosip.pms.esignet.oidc-client-update-url")); @@ -506,4 +507,4 @@ private List convertStringToList(String commaSeparatedString){ private String getLoggedInUserId() { return UserDetailUtil.getLoggedInUserId(); } -} \ No newline at end of file +} diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/device/constant/AuditErrorCode.java b/partner/pms-common/src/main/java/io/mosip/pms/common/constant/AuditErrorCode.java similarity index 92% rename from partner/partner-management-service/src/main/java/io/mosip/pms/device/constant/AuditErrorCode.java rename to partner/pms-common/src/main/java/io/mosip/pms/common/constant/AuditErrorCode.java index da40be9511..01946e66e2 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/device/constant/AuditErrorCode.java +++ b/partner/pms-common/src/main/java/io/mosip/pms/common/constant/AuditErrorCode.java @@ -1,4 +1,4 @@ -package io.mosip.pms.device.constant; +package io.mosip.pms.common.constant; public enum AuditErrorCode { diff --git a/partner/pms-common/src/main/java/io/mosip/pms/common/util/AuthenticationContextRefUtil.java b/partner/pms-common/src/main/java/io/mosip/pms/common/util/AuthenticationContextRefUtil.java index 7b7ffadef9..7dd73b3807 100644 --- a/partner/pms-common/src/main/java/io/mosip/pms/common/util/AuthenticationContextRefUtil.java +++ b/partner/pms-common/src/main/java/io/mosip/pms/common/util/AuthenticationContextRefUtil.java @@ -101,7 +101,7 @@ private Map, String> getAllClaims() { Map, String> claimsMap = new HashMap<>(); List allowedClaims = getSupportedClaims(); for(String claim:allowedClaims) { - if(map.get(claim).getValue()!=null) { + if(map.containsKey(claim)) { claimsMap.put(convertStringToList(map.get(claim).getValue()),claim); } } @@ -166,4 +166,4 @@ public Set getPolicySupportedClaims(Set claimsFromPolicy) { private List convertStringToList(String commaSeparatedString){ return Arrays.asList(commaSeparatedString.split(",")); } -} \ No newline at end of file +} diff --git a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/service/PolicyManagementService.java b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/service/PolicyManagementService.java index a1e237d646..aac9f31e14 100644 --- a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/service/PolicyManagementService.java +++ b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/service/PolicyManagementService.java @@ -1049,4 +1049,4 @@ public List getActivePolicyDetailsByGroupName(String policyGro return policiesByGroupName; } -} \ No newline at end of file +} diff --git a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/util/AuditUtil.java b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/util/AuditUtil.java index 3869a8a8be..0a2ee5e53f 100644 --- a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/util/AuditUtil.java +++ b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/util/AuditUtil.java @@ -11,27 +11,35 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpEntity; -import org.springframework.http.MediaType; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Component; +import org.springframework.web.client.HttpStatusCodeException; import org.springframework.web.client.RestTemplate; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import io.mosip.kernel.core.authmanager.authadapter.model.AuthUserDetails; +import io.mosip.kernel.core.authmanager.exception.AuthNException; +import io.mosip.kernel.core.authmanager.exception.AuthZException; import io.mosip.kernel.core.exception.ExceptionUtils; import io.mosip.kernel.core.exception.ServiceError; import io.mosip.kernel.core.http.RequestWrapper; import io.mosip.kernel.core.http.ResponseWrapper; import io.mosip.kernel.core.logger.spi.Logger; import io.mosip.kernel.core.util.DateUtils; +import io.mosip.pms.common.constant.AuditErrorCode; import io.mosip.pms.common.exception.ValidationException; import io.mosip.pms.common.util.PMSLogger; import io.mosip.pms.common.util.RestUtil; import io.mosip.pms.policy.dto.AuditRequestDto; import io.mosip.pms.policy.dto.AuditResponseDto; import io.mosip.pms.policy.dto.PolicyManageEnum; +import io.mosip.pms.policy.errorMessages.PolicyManagementServiceException; @Component @@ -122,17 +130,17 @@ public void setAuditRequestDto(PolicyManageEnum PartnerManageEnum, String refId callAuditManager(auditRequestDto); } - private void callAuditManager(AuditRequestDto auditRequestDto) { + private void callAuditManager(AuditRequestDto auditRequestDto) { RequestWrapper auditReuestWrapper = new RequestWrapper<>(); auditReuestWrapper.setRequest(auditRequestDto); HttpEntity> httpEntity = new HttpEntity<>(auditReuestWrapper); - String response =null; + ResponseEntity response =null; try { - response = restUtil.postApi(auditUrl, null, "", "", MediaType.APPLICATION_JSON, httpEntity, String.class); - getAuditDetailsFromResponse(response); + response = restTemplate.exchange(auditUrl, HttpMethod.POST, httpEntity, String.class); + getAuditDetailsFromResponse(response.getBody()); } catch (Exception ex) { - log.error("Error occured while calling audit service", ex); - } + handlException(ex); + } } private AuditResponseDto getAuditDetailsFromResponse(String responseBody) throws Exception { @@ -150,7 +158,8 @@ private AuditResponseDto getAuditDetailsFromResponse(String responseBody) throws }); auditResponseDto = responseObject.getResponse(); } catch (IOException | NullPointerException exception) { - throw exception; + throw new PolicyManagementServiceException(AuditErrorCode.AUDIT_PARSE_EXCEPTION.getErrorCode(), + AuditErrorCode.AUDIT_PARSE_EXCEPTION.getErrorMessage()); } return auditResponseDto; @@ -167,4 +176,27 @@ private String getUserId() { return SecurityContextHolder.getContext().getAuthentication().getName(); } } + + private void handlException(HttpStatusCodeException ex) { + List validationErrorsList = ExceptionUtils.getServiceErrorList(ex.getResponseBodyAsString()); + + if (ex.getRawStatusCode() == 401) { + if (!validationErrorsList.isEmpty()) { + throw new AuthNException(validationErrorsList); + } else { + throw new BadCredentialsException("Authentication failed from AuthManager"); + } + } + if (ex.getRawStatusCode() == 403) { + if (!validationErrorsList.isEmpty()) { + throw new AuthZException(validationErrorsList); + } else { + throw new AccessDeniedException("Access denied from AuthManager"); + } + } + throw new PolicyManagementServiceException(AuditErrorCode.AUDIT_EXCEPTION.getErrorCode(), + AuditErrorCode.AUDIT_EXCEPTION.getErrorMessage() + ex); + + } + } \ No newline at end of file diff --git a/partner/policy-validator/src/main/java/io/mosip/pms/policy/validator/constants/PolicyValidatorErrorConstant.java b/partner/policy-validator/src/main/java/io/mosip/pms/policy/validator/constants/PolicyValidatorErrorConstant.java index ea8db37fac..1811515f6a 100644 --- a/partner/policy-validator/src/main/java/io/mosip/pms/policy/validator/constants/PolicyValidatorErrorConstant.java +++ b/partner/policy-validator/src/main/java/io/mosip/pms/policy/validator/constants/PolicyValidatorErrorConstant.java @@ -9,9 +9,9 @@ public enum PolicyValidatorErrorConstant { INVALID_POLICY_SCHEMA("PMS_PV_004", "Invalid policy schema"), - INVALID_INPUT_PARAMETER("PMS_PV_005", "Invalid input parameter - %s"), + INVALID_INPUT_PARAMETER("PMS_PV_005", "Invalid input parameter - %s in policy data"), - MISSING_INPUT_PARAMETER("PMS_PV_006", "Missing input parameter - %s"); + MISSING_INPUT_PARAMETER("PMS_PV_006", "Missing input parameter - %s in policy data"); private final String errorCode; From 59f6294fc122a6b7616a677dfa198f1253a3703a Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Wed, 28 Jun 2023 12:09:53 +0530 Subject: [PATCH 06/74] MOSIP-26622 : Added Binding partner to db scripts (#542) * Added Binding partner to db scripts * Updated db_release_Scripts * Fix for swagger issue in policy manager Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../sql/1.2.0.1-B2_to_1.2.0.1-B3_upgrade.sql | 17 +++++++++++++++++ .../sql/1.2.0.1-B3_to_1.2.0.1-B2_revoke.sql | 15 +++++++++++++++ db_scripts/mosip_pms/dml/pms-partner_type.csv | 1 + 3 files changed, 33 insertions(+) create mode 100644 db_release_scripts/mosip_pms/sql/1.2.0.1-B2_to_1.2.0.1-B3_upgrade.sql create mode 100644 db_release_scripts/mosip_pms/sql/1.2.0.1-B3_to_1.2.0.1-B2_revoke.sql diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1-B2_to_1.2.0.1-B3_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1-B2_to_1.2.0.1-B3_upgrade.sql new file mode 100644 index 0000000000..0961a3c016 --- /dev/null +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1-B2_to_1.2.0.1-B3_upgrade.sql @@ -0,0 +1,17 @@ +-- ------------------------------------------------------------------------------------------------- +-- Database Name: mosip_pms +-- Release Version : 1.2.1 +-- Purpose : Database Alter scripts for the release for PMS DB. +-- Create By : Balaji A +-- Created Date : Mar-2023 +-- +-- Modified Date Modified By Comments / Remarks +-- ------------------------------------------------------------------------------------------------- + + + + +\c mosip_pms sysadmin + +INSERT INTO pms.partner_type (code,partner_description,is_policy_required,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes,is_deleted,del_dtimes) VALUES + ('Binding_Partner','Binding Partner',true,true,'superadmin',now(),NULL,NULL,false,NULL) ON CONFLICT (code) DO NOTHING; \ No newline at end of file diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1-B3_to_1.2.0.1-B2_revoke.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1-B3_to_1.2.0.1-B2_revoke.sql new file mode 100644 index 0000000000..163e283db3 --- /dev/null +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1-B3_to_1.2.0.1-B2_revoke.sql @@ -0,0 +1,15 @@ +-- ------------------------------------------------------------------------------------------------- +-- Database Name: mosip_pms +-- Release Version : 1.2.1 +-- Purpose : Revoking Database Alter deployement done for release in PMS DB. +-- Create By : Balaji A +-- Created Date : Mar-2023 +-- +-- Modified Date Modified By Comments / Remarks +-- ------------------------------------------------------------------------------------------------- + + + +\c mosip_pms sysadmin + +DELETE FROM pms.partner_type WHERE code = 'Binding_Partner'; \ No newline at end of file diff --git a/db_scripts/mosip_pms/dml/pms-partner_type.csv b/db_scripts/mosip_pms/dml/pms-partner_type.csv index 79f7fb83a1..3809c77f22 100644 --- a/db_scripts/mosip_pms/dml/pms-partner_type.csv +++ b/db_scripts/mosip_pms/dml/pms-partner_type.csv @@ -11,3 +11,4 @@ MISP_Partner,MISP_Partner,TRUE,superadmin,now(),TRUE Internal_Partner,Used internally to share certs,TRUE,superadmin,now(),TRUE SDK_Partner,SDK Partner,TRUE,superadmin,now(),FALSE Print_Partner,Print Partner,TRUE,superadmin,now(),TRUE +Binding_Partner,Binding Partner,TRUE,superadmin,now(),TRUE From de41c147329d901c370fe5ab9c2392b85047b8de Mon Sep 17 00:00:00 2001 From: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 4 Jul 2023 11:53:20 +0530 Subject: [PATCH 07/74] Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql Signed-off-by: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 5019373207..4f6bb4acad 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"firstName","filter":[{"language":"eng"}]},{"attribute":"middleName","filter":[{"language":"eng"}]},{"attribute":"lastName","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"mobileno"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"permanentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"presentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"presentProvince"},{"attribute":"permanentProvince"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"permanentCity"},{"attribute":"presentCity"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"postalCode","source":[{"attribute":"presentZipcode","filter":[{"language":"eng"}]},{"attribute":"permanentZipcode","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"}]}],"encrypted":false,"format":"extraction"}],"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"}}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', '2020-12-16 12:30:14.183', '2025-04-28 09:37:00.000', true, 'admin', '2020-12-16 12:30:14.183', 'service-account-mosip-creser-client', '2021-02-09 06:50:22.065', false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'mpolicy-default-PDFCard', 'mpolicy-default-PDFCard', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', '1', 'https://schemas.mosip.io/v1/auth-policy', '2022-09-20 09:00:54.316627', '2025-04-28 09:37:00', true, 'admin', '2022-09-20 09:00:54.316627', 'admin', '2022-09-20 09:00:54.316627', false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From ae70ebea3417b858c4dfd295e94380c497efc322 Mon Sep 17 00:00:00 2001 From: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 4 Jul 2023 11:56:26 +0530 Subject: [PATCH 08/74] Update pms-auth_policy.csv Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/dml/pms-auth_policy.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_scripts/mosip_pms/dml/pms-auth_policy.csv b/db_scripts/mosip_pms/dml/pms-auth_policy.csv index 3e0bae0d80..0e33edc431 100644 --- a/db_scripts/mosip_pms/dml/pms-auth_policy.csv +++ b/db_scripts/mosip_pms/dml/pms-auth_policy.csv @@ -9,6 +9,6 @@ mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-a mpolicy-default-cert,mpolicygroup-default-cert,mpolicy-default-cert,mpolicy-default-cert,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-eUIN_with_QR,mpolicygroup-default-print,mpolicy-default-eUIN_with_QR,mpolicy-default-eUIN_with_QR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-eUIN_with_faceQR,mpolicygroup-default-print,mpolicy-default-eUIN_with_faceQR,mpolicy-default-eUIN_with_faceQR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""firstName"",""source"":[{""attribute"":""firstName""}],""encrypted"":true},{""attributeName"":""middleName"",""source"":[{""attribute"":""middleName""}],""encrypted"":true},{""attributeName"":""lastName"",""source"":[{""attribute"":""lastName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""PCN"",""source"":[{""attribute"":""VID"",""filter"":[{""type"":""PERPETUAL""}]}],""encrypted"":false,""format"":""RETRIEVE""},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""bestTwoFingers"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Finger""}]}],""encrypted"":false,""format"":""bestTwoFingers""},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":false,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,2022-09-20 09:00:54.316627,2025-04-28 09:37:00,TRUE,admin,2022-09-20 09:00:54.316627,admin,2022-09-20 09:00:54.316627 mpolicy-default-digitalcard,mpolicygroup-default-digitalcard,mpolicy-default-digitalcard,mpolicy-default-digitalcard,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""250"",""transactionsAllowed"":""10000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() mpolicy-default-mobile,mpolicygroup-default-mobile,mpolicy-default-mobile,mpolicy-default-mobile,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":false,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() From c868c160f2e7125e246b32e29b663b4b52459cb8 Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Thu, 6 Jul 2023 11:11:53 +0530 Subject: [PATCH 09/74] fix for build failure (#575) * Update AuditUtil.java Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> * Update AuditUtil.java --------- Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../java/io/mosip/pms/policy/util/AuditUtil.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/util/AuditUtil.java b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/util/AuditUtil.java index 0a2ee5e53f..496bb38e24 100644 --- a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/util/AuditUtil.java +++ b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/util/AuditUtil.java @@ -17,6 +17,8 @@ import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Component; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.HttpServerErrorException; import org.springframework.web.client.HttpStatusCodeException; import org.springframework.web.client.RestTemplate; @@ -138,9 +140,11 @@ private void callAuditManager(AuditRequestDto auditRequestDto) { try { response = restTemplate.exchange(auditUrl, HttpMethod.POST, httpEntity, String.class); getAuditDetailsFromResponse(response.getBody()); - } catch (Exception ex) { - handlException(ex); - } + } catch (HttpClientErrorException | HttpServerErrorException ex) { + handlException( ex); + } catch (Exception e) { + log.error("Failed to get response from audit manager", e); + } } private AuditResponseDto getAuditDetailsFromResponse(String responseBody) throws Exception { @@ -199,4 +203,4 @@ private void handlException(HttpStatusCodeException ex) { } -} \ No newline at end of file +} From c106bc53d8e99d23574bff78b1144fa842b3b2de Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:01:12 +0530 Subject: [PATCH 10/74] Update pms-auth_policy.csv (#586) * Update pms-auth_policy.csv Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> * Update pms-auth_policy.csv * Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql * Update pms-auth_policy.csv * Update pms-auth_policy.csv * Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql * Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql --------- Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- db_scripts/mosip_pms/dml/pms-auth_policy.csv | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 4f6bb4acad..4805e0c829 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'mpolicy-default-PDFCard', 'mpolicy-default-PDFCard', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', '1', 'https://schemas.mosip.io/v1/auth-policy', '2022-09-20 09:00:54.316627', '2025-04-28 09:37:00', true, 'admin', '2022-09-20 09:00:54.316627', 'admin', '2022-09-20 09:00:54.316627', false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) diff --git a/db_scripts/mosip_pms/dml/pms-auth_policy.csv b/db_scripts/mosip_pms/dml/pms-auth_policy.csv index 0e33edc431..9536caa45b 100644 --- a/db_scripts/mosip_pms/dml/pms-auth_policy.csv +++ b/db_scripts/mosip_pms/dml/pms-auth_policy.csv @@ -1,14 +1,14 @@ id,policy_group_id,name,descr,policy_file_id,policy_type,version,policy_schema,valid_from_date,valid_to_date,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes -mpolicy-default-auth,mpolicygroup-default-auth,mpolicy-default-auth,mpolicy-default-auth,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""zone"",""source"":[{""attribute"":""zone""}],""encrypted"":true},{""attributeName"":""preferredLang"",""source"":[{""attribute"":""preferredLang""}],""encrypted"":false},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-abis,mpolicygroup-default-abis,mpolicy-default-abis,mpolicy-default-abis,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-qrcode,mpolicygroup-default-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":"""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-euin,mpolicygroup-default-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-reprint,mpolicygroup-default-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":"""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-resident,mpolicygroup-default-resident,mpolicy-default-resident,mpolicy-default-resident,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-adjudication,mpolicy-default-adjudication,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""},{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""100000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-cert,mpolicygroup-default-cert,mpolicy-default-cert,mpolicy-default-cert,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-eUIN_with_QR,mpolicygroup-default-print,mpolicy-default-eUIN_with_QR,mpolicy-default-eUIN_with_QR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-eUIN_with_faceQR,mpolicygroup-default-print,mpolicy-default-eUIN_with_faceQR,mpolicy-default-eUIN_with_faceQR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,2022-09-20 09:00:54.316627,2025-04-28 09:37:00,TRUE,admin,2022-09-20 09:00:54.316627,admin,2022-09-20 09:00:54.316627 -mpolicy-default-digitalcard,mpolicygroup-default-digitalcard,mpolicy-default-digitalcard,mpolicy-default-digitalcard,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""250"",""transactionsAllowed"":""10000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-mobile,mpolicygroup-default-mobile,mpolicy-default-mobile,mpolicy-default-mobile,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":false,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-auth,mpolicygroup-default-auth,mpolicy-default-auth,mpolicy-default-auth,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""zone"",""source"":[{""attribute"":""zone""}],""encrypted"":true},{""attributeName"":""preferredLang"",""source"":[{""attribute"":""preferredLang""}],""encrypted"":false},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-abis,mpolicygroup-default-abis,mpolicy-default-abis,mpolicy-default-abis,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-qrcode,mpolicygroup-default-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-euin,mpolicygroup-default-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-reprint,mpolicygroup-default-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-resident,mpolicygroup-default-resident,mpolicy-default-resident,mpolicy-default-resident,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-adjudication,mpolicy-default-adjudication,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""},{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""100000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-cert,mpolicygroup-default-cert,mpolicy-default-cert,mpolicy-default-cert,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-eUIN_with_QR,mpolicygroup-default-print,mpolicy-default-eUIN_with_QR,mpolicy-default-eUIN_with_QR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-eUIN_with_faceQR,mpolicygroup-default-print,mpolicy-default-eUIN_with_faceQR,mpolicy-default-eUIN_with_faceQR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""PCN"",""source"":[{""attribute"":""VID"",""filter"":[{""type"":""PERPETUAL""}]}],""encrypted"":false,""format"":""RETRIEVE""},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""bestTwoFingers"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Finger""}]}],""encrypted"":false,""format"":""bestTwoFingers""},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":false,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-digitalcard,mpolicygroup-default-digitalcard,mpolicy-default-digitalcard,mpolicy-default-digitalcard,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""250"",""transactionsAllowed"":""10000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-mobile,mpolicygroup-default-mobile,mpolicy-default-mobile,mpolicy-default-mobile,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":false,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() From 7d73dc7fd3569cfb6e7229a46d601b3581b7de0b Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Fri, 28 Jul 2023 14:38:57 +0530 Subject: [PATCH 11/74] [MOSIP-28228]Update pms-misp_license.sql (#587) Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/ddl/pms-misp_license.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_scripts/mosip_pms/ddl/pms-misp_license.sql b/db_scripts/mosip_pms/ddl/pms-misp_license.sql index e218452624..0c9b0219dc 100644 --- a/db_scripts/mosip_pms/ddl/pms-misp_license.sql +++ b/db_scripts/mosip_pms/ddl/pms-misp_license.sql @@ -19,7 +19,7 @@ CREATE TABLE pms.misp_license( misp_id character varying(36) NOT NULL, license_key character varying(128) NOT NULL, - policy_id character varying(128) NULL, + policy_id character varying(36) NULL, valid_from_date timestamp NOT NULL, valid_to_date timestamp, is_active boolean NOT NULL, From df3cc4dafe6b78750e8ca38c3751fb5336f4d0a9 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 17 Aug 2023 19:37:19 +0530 Subject: [PATCH 12/74] Revert "Update pms-auth_policy.csv (#586)" (#595) This reverts commit 694c8282f16c3de443d3938b1b8b1e6e2133fe02. Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- db_scripts/mosip_pms/dml/pms-auth_policy.csv | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 4805e0c829..5019373207 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"firstName","filter":[{"language":"eng"}]},{"attribute":"middleName","filter":[{"language":"eng"}]},{"attribute":"lastName","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"mobileno"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"permanentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"presentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"presentProvince"},{"attribute":"permanentProvince"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"permanentCity"},{"attribute":"presentCity"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"postalCode","source":[{"attribute":"presentZipcode","filter":[{"language":"eng"}]},{"attribute":"permanentZipcode","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"}]}],"encrypted":false,"format":"extraction"}],"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"}}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', '2020-12-16 12:30:14.183', '2025-04-28 09:37:00.000', true, 'admin', '2020-12-16 12:30:14.183', 'service-account-mosip-creser-client', '2021-02-09 06:50:22.065', false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) diff --git a/db_scripts/mosip_pms/dml/pms-auth_policy.csv b/db_scripts/mosip_pms/dml/pms-auth_policy.csv index 9536caa45b..3e0bae0d80 100644 --- a/db_scripts/mosip_pms/dml/pms-auth_policy.csv +++ b/db_scripts/mosip_pms/dml/pms-auth_policy.csv @@ -1,14 +1,14 @@ id,policy_group_id,name,descr,policy_file_id,policy_type,version,policy_schema,valid_from_date,valid_to_date,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes -mpolicy-default-auth,mpolicygroup-default-auth,mpolicy-default-auth,mpolicy-default-auth,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""zone"",""source"":[{""attribute"":""zone""}],""encrypted"":true},{""attributeName"":""preferredLang"",""source"":[{""attribute"":""preferredLang""}],""encrypted"":false},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-abis,mpolicygroup-default-abis,mpolicy-default-abis,mpolicy-default-abis,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-qrcode,mpolicygroup-default-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-euin,mpolicygroup-default-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-reprint,mpolicygroup-default-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-resident,mpolicygroup-default-resident,mpolicy-default-resident,mpolicy-default-resident,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-adjudication,mpolicy-default-adjudication,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""},{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""100000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-cert,mpolicygroup-default-cert,mpolicy-default-cert,mpolicy-default-cert,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-eUIN_with_QR,mpolicygroup-default-print,mpolicy-default-eUIN_with_QR,mpolicy-default-eUIN_with_QR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-eUIN_with_faceQR,mpolicygroup-default-print,mpolicy-default-eUIN_with_faceQR,mpolicy-default-eUIN_with_faceQR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""PCN"",""source"":[{""attribute"":""VID"",""filter"":[{""type"":""PERPETUAL""}]}],""encrypted"":false,""format"":""RETRIEVE""},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""bestTwoFingers"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Finger""}]}],""encrypted"":false,""format"":""bestTwoFingers""},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":false,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-digitalcard,mpolicygroup-default-digitalcard,mpolicy-default-digitalcard,mpolicy-default-digitalcard,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""250"",""transactionsAllowed"":""10000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-mobile,mpolicygroup-default-mobile,mpolicy-default-mobile,mpolicy-default-mobile,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":false,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-auth,mpolicygroup-default-auth,mpolicy-default-auth,mpolicy-default-auth,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""zone"",""source"":[{""attribute"":""zone""}],""encrypted"":true},{""attributeName"":""preferredLang"",""source"":[{""attribute"":""preferredLang""}],""encrypted"":false},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-abis,mpolicygroup-default-abis,mpolicy-default-abis,mpolicy-default-abis,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-qrcode,mpolicygroup-default-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":"""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-euin,mpolicygroup-default-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-reprint,mpolicygroup-default-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":"""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-resident,mpolicygroup-default-resident,mpolicy-default-resident,mpolicy-default-resident,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-adjudication,mpolicy-default-adjudication,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""},{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""100000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-cert,mpolicygroup-default-cert,mpolicy-default-cert,mpolicy-default-cert,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-eUIN_with_QR,mpolicygroup-default-print,mpolicy-default-eUIN_with_QR,mpolicy-default-eUIN_with_QR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-eUIN_with_faceQR,mpolicygroup-default-print,mpolicy-default-eUIN_with_faceQR,mpolicy-default-eUIN_with_faceQR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""firstName"",""source"":[{""attribute"":""firstName""}],""encrypted"":true},{""attributeName"":""middleName"",""source"":[{""attribute"":""middleName""}],""encrypted"":true},{""attributeName"":""lastName"",""source"":[{""attribute"":""lastName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""PCN"",""source"":[{""attribute"":""VID"",""filter"":[{""type"":""PERPETUAL""}]}],""encrypted"":false,""format"":""RETRIEVE""},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""bestTwoFingers"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Finger""}]}],""encrypted"":false,""format"":""bestTwoFingers""},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":false,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-digitalcard,mpolicygroup-default-digitalcard,mpolicy-default-digitalcard,mpolicy-default-digitalcard,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""250"",""transactionsAllowed"":""10000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-mobile,mpolicygroup-default-mobile,mpolicy-default-mobile,mpolicy-default-mobile,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":false,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() From 9d74e7e61879d6310ff0f99169d6a9e38910bf53 Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Fri, 18 Aug 2023 13:55:22 +0530 Subject: [PATCH 13/74] Revert "Revert "Update pms-auth_policy.csv (#586)" (#595)" (#596) This reverts commit c661c62563dba72a6617344a38c43b8e6bc981a3. Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- db_scripts/mosip_pms/dml/pms-auth_policy.csv | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 5019373207..4805e0c829 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"firstName","filter":[{"language":"eng"}]},{"attribute":"middleName","filter":[{"language":"eng"}]},{"attribute":"lastName","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"mobileno"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"permanentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"presentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"presentProvince"},{"attribute":"permanentProvince"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"permanentCity"},{"attribute":"presentCity"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"postalCode","source":[{"attribute":"presentZipcode","filter":[{"language":"eng"}]},{"attribute":"permanentZipcode","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"}]}],"encrypted":false,"format":"extraction"}],"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"}}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', '2020-12-16 12:30:14.183', '2025-04-28 09:37:00.000', true, 'admin', '2020-12-16 12:30:14.183', 'service-account-mosip-creser-client', '2021-02-09 06:50:22.065', false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) diff --git a/db_scripts/mosip_pms/dml/pms-auth_policy.csv b/db_scripts/mosip_pms/dml/pms-auth_policy.csv index 3e0bae0d80..9536caa45b 100644 --- a/db_scripts/mosip_pms/dml/pms-auth_policy.csv +++ b/db_scripts/mosip_pms/dml/pms-auth_policy.csv @@ -1,14 +1,14 @@ id,policy_group_id,name,descr,policy_file_id,policy_type,version,policy_schema,valid_from_date,valid_to_date,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes -mpolicy-default-auth,mpolicygroup-default-auth,mpolicy-default-auth,mpolicy-default-auth,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""zone"",""source"":[{""attribute"":""zone""}],""encrypted"":true},{""attributeName"":""preferredLang"",""source"":[{""attribute"":""preferredLang""}],""encrypted"":false},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-abis,mpolicygroup-default-abis,mpolicy-default-abis,mpolicy-default-abis,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-qrcode,mpolicygroup-default-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":"""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-euin,mpolicygroup-default-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-reprint,mpolicygroup-default-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":"""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-resident,mpolicygroup-default-resident,mpolicy-default-resident,mpolicy-default-resident,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-adjudication,mpolicy-default-adjudication,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""},{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""100000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-cert,mpolicygroup-default-cert,mpolicy-default-cert,mpolicy-default-cert,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-eUIN_with_QR,mpolicygroup-default-print,mpolicy-default-eUIN_with_QR,mpolicy-default-eUIN_with_QR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-eUIN_with_faceQR,mpolicygroup-default-print,mpolicy-default-eUIN_with_faceQR,mpolicy-default-eUIN_with_faceQR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""firstName"",""source"":[{""attribute"":""firstName""}],""encrypted"":true},{""attributeName"":""middleName"",""source"":[{""attribute"":""middleName""}],""encrypted"":true},{""attributeName"":""lastName"",""source"":[{""attribute"":""lastName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""PCN"",""source"":[{""attribute"":""VID"",""filter"":[{""type"":""PERPETUAL""}]}],""encrypted"":false,""format"":""RETRIEVE""},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""bestTwoFingers"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Finger""}]}],""encrypted"":false,""format"":""bestTwoFingers""},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":false,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-digitalcard,mpolicygroup-default-digitalcard,mpolicy-default-digitalcard,mpolicy-default-digitalcard,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""250"",""transactionsAllowed"":""10000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() -mpolicy-default-mobile,mpolicygroup-default-mobile,mpolicy-default-mobile,mpolicy-default-mobile,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":false,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),4/28/2025 9:37,TRUE,admin,now(),admin,now() +mpolicy-default-auth,mpolicygroup-default-auth,mpolicy-default-auth,mpolicy-default-auth,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""zone"",""source"":[{""attribute"":""zone""}],""encrypted"":true},{""attributeName"":""preferredLang"",""source"":[{""attribute"":""preferredLang""}],""encrypted"":false},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-abis,mpolicygroup-default-abis,mpolicy-default-abis,mpolicy-default-abis,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-qrcode,mpolicygroup-default-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-euin,mpolicygroup-default-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-reprint,mpolicygroup-default-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-resident,mpolicygroup-default-resident,mpolicy-default-resident,mpolicy-default-resident,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-adjudication,mpolicy-default-adjudication,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""},{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""100000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-cert,mpolicygroup-default-cert,mpolicy-default-cert,mpolicy-default-cert,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-eUIN_with_QR,mpolicygroup-default-print,mpolicy-default-eUIN_with_QR,mpolicy-default-eUIN_with_QR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-eUIN_with_faceQR,mpolicygroup-default-print,mpolicy-default-eUIN_with_faceQR,mpolicy-default-eUIN_with_faceQR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""PCN"",""source"":[{""attribute"":""VID"",""filter"":[{""type"":""PERPETUAL""}]}],""encrypted"":false,""format"":""RETRIEVE""},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""bestTwoFingers"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Finger""}]}],""encrypted"":false,""format"":""bestTwoFingers""},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":false,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-digitalcard,mpolicygroup-default-digitalcard,mpolicy-default-digitalcard,mpolicy-default-digitalcard,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""250"",""transactionsAllowed"":""10000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-mobile,mpolicygroup-default-mobile,mpolicy-default-mobile,mpolicy-default-mobile,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":false,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() From 7ddb6a410eda3443cb0e7405cfd98cba7cf296bc Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Fri, 18 Aug 2023 22:52:33 +0530 Subject: [PATCH 14/74] Update pms-auth_policy.csv (#597) Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/dml/pms-auth_policy.csv | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/db_scripts/mosip_pms/dml/pms-auth_policy.csv b/db_scripts/mosip_pms/dml/pms-auth_policy.csv index 9536caa45b..9779b04761 100644 --- a/db_scripts/mosip_pms/dml/pms-auth_policy.csv +++ b/db_scripts/mosip_pms/dml/pms-auth_policy.csv @@ -1,14 +1,14 @@ id,policy_group_id,name,descr,policy_file_id,policy_type,version,policy_schema,valid_from_date,valid_to_date,is_active,cr_by,cr_dtimes,upd_by,upd_dtimes -mpolicy-default-auth,mpolicygroup-default-auth,mpolicy-default-auth,mpolicy-default-auth,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""zone"",""source"":[{""attribute"":""zone""}],""encrypted"":true},{""attributeName"":""preferredLang"",""source"":[{""attribute"":""preferredLang""}],""encrypted"":false},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-abis,mpolicygroup-default-abis,mpolicy-default-abis,mpolicy-default-abis,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-qrcode,mpolicygroup-default-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-euin,mpolicygroup-default-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-reprint,mpolicygroup-default-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-resident,mpolicygroup-default-resident,mpolicy-default-resident,mpolicy-default-resident,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-adjudication,mpolicy-default-adjudication,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""},{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""100000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-cert,mpolicygroup-default-cert,mpolicy-default-cert,mpolicy-default-cert,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-eUIN_with_QR,mpolicygroup-default-print,mpolicy-default-eUIN_with_QR,mpolicy-default-eUIN_with_QR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-eUIN_with_faceQR,mpolicygroup-default-print,mpolicy-default-eUIN_with_faceQR,mpolicy-default-eUIN_with_faceQR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""PCN"",""source"":[{""attribute"":""VID"",""filter"":[{""type"":""PERPETUAL""}]}],""encrypted"":false,""format"":""RETRIEVE""},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""bestTwoFingers"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Finger""}]}],""encrypted"":false,""format"":""bestTwoFingers""},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":false,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-digitalcard,mpolicygroup-default-digitalcard,mpolicy-default-digitalcard,mpolicy-default-digitalcard,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""250"",""transactionsAllowed"":""10000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() -mpolicy-default-mobile,mpolicygroup-default-mobile,mpolicy-default-mobile,mpolicy-default-mobile,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":false,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),NOW() + INTERVAL '5 year',TRUE,admin,now(),admin,now() +mpolicy-default-auth,mpolicygroup-default-auth,mpolicy-default-auth,mpolicy-default-auth,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""zone"",""source"":[{""attribute"":""zone""}],""encrypted"":true},{""attributeName"":""preferredLang"",""source"":[{""attribute"":""preferredLang""}],""encrypted"":false},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-abis,mpolicygroup-default-abis,mpolicy-default-abis,mpolicy-default-abis,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-qrcode,mpolicygroup-default-print,mpolicy-default-qrcode,mpolicy-default-qrcode,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-euin,mpolicygroup-default-print,mpolicy-default-euin,mpolicy-default-euin,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-reprint,mpolicygroup-default-print,mpolicy-default-reprint,mpolicy-default-reprint,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-resident,mpolicygroup-default-resident,mpolicy-default-resident,mpolicy-default-resident,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-adjudication,mpolicy-default-adjudication,"{""shareableAttributes"":[{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""registration-client\/NEW\/individualBiometrics"",""filter"":[{""type"":""Iris""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Finger""}]},{""attribute"":""CNIE\/verification\/biometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":true,""format"":""extraction""},{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""100000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Packet Manager""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-cert,mpolicygroup-default-cert,mpolicy-default-cert,mpolicy-default-cert,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-eUIN_with_QR,mpolicygroup-default-print,mpolicy-default-eUIN_with_QR,mpolicy-default-eUIN_with_QR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-eUIN_with_faceQR,mpolicygroup-default-print,mpolicy-default-eUIN_with_faceQR,mpolicy-default-eUIN_with_faceQR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""PCN"",""source"":[{""attribute"":""VID"",""filter"":[{""type"":""PERPETUAL""}]}],""encrypted"":false,""format"":""RETRIEVE""},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""bestTwoFingers"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Finger""}]}],""encrypted"":false,""format"":""bestTwoFingers""},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":false,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-digitalcard,mpolicygroup-default-digitalcard,mpolicy-default-digitalcard,mpolicy-default-digitalcard,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""250"",""transactionsAllowed"":""10000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-mobile,mpolicygroup-default-mobile,mpolicy-default-mobile,mpolicy-default-mobile,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":false,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() From b0bc8960d4f5143302adfb4e8e39fd37de88126b Mon Sep 17 00:00:00 2001 From: Akila Lakshmanan <77330852+akilalakshmanan@users.noreply.github.com> Date: Mon, 21 Aug 2023 15:55:04 +0530 Subject: [PATCH 15/74] [MOSIP-28484] Added error handling for deploy.sh script (#593) * [MOSIP-28484] Added error handling for deploy.sh script * [MOSIP-28484] Added error handling for deploy.sh script * [MOSIP-28484] Removed exit command --------- Co-authored-by: akilalakshmanan Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/deploy.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/db_scripts/mosip_pms/deploy.sh b/db_scripts/mosip_pms/deploy.sh index 3660793a44..75055ed43d 100644 --- a/db_scripts/mosip_pms/deploy.sh +++ b/db_scripts/mosip_pms/deploy.sh @@ -16,32 +16,31 @@ else fi ## Terminate existing connections -echo "Terminating active connections" -CONN=$(PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -t -c "SELECT count(pg_terminate_backend(pg_stat_activity.pid)) FROM pg_stat_activity WHERE datname = '$MOSIP_DB_NAME' AND pid <> pg_backend_pid()";exit;) +echo "Terminating active connections" +CONN=$(PGPASSWORD=$SU_USER_PWD psql -v ON_ERROR_STOP=1 --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -t -c "SELECT count(pg_terminate_backend(pg_stat_activity.pid)) FROM pg_stat_activity WHERE datname = '$MOSIP_DB_NAME' AND pid <> pg_backend_pid()";exit;) echo "Terminated connections" ## Drop db and role echo "Dropping DB" -PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -f drop_db.sql +PGPASSWORD=$SU_USER_PWD psql -v ON_ERROR_STOP=1 --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -f drop_db.sql echo "Dropping user" -PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -f drop_role.sql +PGPASSWORD=$SU_USER_PWD psql -v ON_ERROR_STOP=1 --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -f drop_role.sql ## Create users -echo `date "+%m/%d/%Y %H:%M:%S"` ": Creating database users" -PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -f role_dbuser.sql -v dbuserpwd=\'$DBUSER_PWD\' +echo `date "+%m/%d/%Y %H:%M:%S"` ": Creating database users" +PGPASSWORD=$SU_USER_PWD psql -v ON_ERROR_STOP=1 --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -f role_dbuser.sql -v dbuserpwd=\'$DBUSER_PWD\' ## Create DB echo "Creating DB" -PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -f db.sql -PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -f ddl.sql +PGPASSWORD=$SU_USER_PWD psql -v ON_ERROR_STOP=1 --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -f db.sql +PGPASSWORD=$SU_USER_PWD psql -v ON_ERROR_STOP=1 --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -f ddl.sql ## Grants -PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -f grants.sql +PGPASSWORD=$SU_USER_PWD psql -v ON_ERROR_STOP=1 --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -f grants.sql ## Populate tables if [ ${DML_FLAG} == 1 ] then - echo `date "+%m/%d/%Y %H:%M:%S"` ": Deploying DML for ${MOSIP_DB_NAME} database" - PGPASSWORD=$SU_USER_PWD psql --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -a -b -f dml.sql + echo `date "+%m/%d/%Y %H:%M:%S"` ": Deploying DML for ${MOSIP_DB_NAME} database" + PGPASSWORD=$SU_USER_PWD psql -v ON_ERROR_STOP=1 --username=$SU_USER --host=$DB_SERVERIP --port=$DB_PORT --dbname=$DEFAULT_DB_NAME -a -b -f dml.sql fi - From 19abe1704f7d83ec0d0cd7459c1fdc64156d7263 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Wed, 6 Sep 2023 14:43:41 +0530 Subject: [PATCH 16/74] [MOSIP-29315] Update pms-oidc_client.sql Signed-off-by: Keshav Mishra Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/ddl/pms-oidc_client.sql | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/db_scripts/mosip_pms/ddl/pms-oidc_client.sql b/db_scripts/mosip_pms/ddl/pms-oidc_client.sql index 90d77f5e5b..b32edcc7c0 100644 --- a/db_scripts/mosip_pms/ddl/pms-oidc_client.sql +++ b/db_scripts/mosip_pms/ddl/pms-oidc_client.sql @@ -38,28 +38,28 @@ CREATE TABLE pms.oidc_client( CONSTRAINT uq_oidc_client_public_key UNIQUE (public_key) ); -- ddl-end -- -COMMENT ON TABLE oidc_client.id IS 'Client ID: Unique id assigned to registered OIDC client.'; +COMMENT ON TABLE pms.oidc_client.id IS 'Client ID: Unique id assigned to registered OIDC client.'; -- ddl-end -- -COMMENT ON COLUMN oidc_client.name IS 'Client Name: Registered name of OIDC client.'; +COMMENT ON COLUMN pms.oidc_client.name IS 'Client Name: Registered name of OIDC client.'; -- ddl-end -- -COMMENT ON COLUMN oidc_client.logo_uri IS 'Client Logo URL: Client logo to be displayed on IDP UI.'; +COMMENT ON COLUMN pms.oidc_client.logo_uri IS 'Client Logo URL: Client logo to be displayed on IDP UI.'; -- ddl-end -- -COMMENT ON COLUMN oidc_client.redirect_uris IS 'Recirect URLS: Comma separated list of client redirect URLs.'; +COMMENT ON COLUMN pms.oidc_client.redirect_uris IS 'Recirect URLS: Comma separated list of client redirect URLs.'; -- ddl-end -- -COMMENT ON COLUMN oidc_client.rp_id IS 'Relaying Party Id: Id of the partner id who has created this OIDC client.'; +COMMENT ON COLUMN pms.oidc_client.rp_id IS 'Relaying Party Id: Id of the partner id who has created this OIDC client.'; -- ddl-end -- -COMMENT ON COLUMN oidc_client.policy_id IS 'Policy Id: Id of the policy '; +COMMENT ON COLUMN pms.oidc_client.policy_id IS 'Policy Id: Id of the policy '; -- ddl-end -- -COMMENT ON COLUMN oidc_client.status IS 'Client status: Allowed values - ACTIVE / INACTIVE.'; +COMMENT ON COLUMN pms.oidc_client.status IS 'Client status: Allowed values - ACTIVE / INACTIVE.'; -- ddl-end -- -COMMENT ON COLUMN oidc_client.public_key IS 'Public key: JWK data.'; +COMMENT ON COLUMN pms.oidc_client.public_key IS 'Public key: JWK data.'; -- ddl-end -- -COMMENT ON COLUMN oidc_client.grant_types IS 'Grant Types: Allowed grant types for the client.'; +COMMENT ON COLUMN pms.oidc_client.grant_types IS 'Grant Types: Allowed grant types for the client.'; -- ddl-end -- -COMMENT ON COLUMN oidc_client.auth_methods IS 'Client Auth methods: Allowed token endpoint authentication methods.'; +COMMENT ON COLUMN pms.oidc_client.auth_methods IS 'Client Auth methods: Allowed token endpoint authentication methods.'; -- ddl-end -- -COMMENT ON COLUMN oidc_client.claims IS 'Requested Claims: claims json as per policy defined for relaying party.'; +COMMENT ON COLUMN pms.oidc_client.claims IS 'Requested Claims: claims json as per policy defined for relaying party.'; -- ddl-end -- -COMMENT ON COLUMN oidc_client.acr_values IS 'Allowed Authentication context References(acr) json'; +COMMENT ON COLUMN pms.oidc_client.acr_values IS 'Allowed Authentication context References(acr) json'; -- ddl-end -- From 3c7cb836c6e89287291780b76a9370b19062e0ee Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Wed, 6 Sep 2023 17:57:43 +0530 Subject: [PATCH 17/74] [MOSIP-29315] Signed-off-by: Keshav Mishra Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/ddl/pms-oidc_client.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db_scripts/mosip_pms/ddl/pms-oidc_client.sql b/db_scripts/mosip_pms/ddl/pms-oidc_client.sql index b32edcc7c0..dd7ec35e8f 100644 --- a/db_scripts/mosip_pms/ddl/pms-oidc_client.sql +++ b/db_scripts/mosip_pms/ddl/pms-oidc_client.sql @@ -38,7 +38,7 @@ CREATE TABLE pms.oidc_client( CONSTRAINT uq_oidc_client_public_key UNIQUE (public_key) ); -- ddl-end -- -COMMENT ON TABLE pms.oidc_client.id IS 'Client ID: Unique id assigned to registered OIDC client.'; +COMMENT ON TABLE pms.oidc_client IS 'Client ID: Unique id assigned to registered OIDC client.'; -- ddl-end -- COMMENT ON COLUMN pms.oidc_client.name IS 'Client Name: Registered name of OIDC client.'; -- ddl-end -- @@ -62,4 +62,3 @@ COMMENT ON COLUMN pms.oidc_client.claims IS 'Requested Claims: claims json as pe -- ddl-end -- COMMENT ON COLUMN pms.oidc_client.acr_values IS 'Allowed Authentication context References(acr) json'; -- ddl-end -- - From 93e6cf4cc372443f7ba3a5978c270f9fba1cfbe3 Mon Sep 17 00:00:00 2001 From: bhumi46 <111699703+bhumi46@users.noreply.github.com> Date: Fri, 15 Sep 2023 13:12:46 +0530 Subject: [PATCH 18/74] [MOSIP-29256] updated reusable worklows (#602) * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/mavenpublish.yml | 214 -------------- .github/workflows/postgres-init_trigger.yml | 83 ------ .github/workflows/push-trigger.yml | 88 ++++++ .github/workflows/push_trigger.yml | 311 -------------------- .github/workflows/release-changes.yml | 26 ++ .github/workflows/release_changes.yml | 56 ---- .github/workflows/release_trigger.yml | 209 ------------- .github/workflows/tag.yml | 33 +++ 8 files changed, 147 insertions(+), 873 deletions(-) delete mode 100644 .github/workflows/mavenpublish.yml delete mode 100644 .github/workflows/postgres-init_trigger.yml create mode 100644 .github/workflows/push-trigger.yml delete mode 100644 .github/workflows/push_trigger.yml create mode 100644 .github/workflows/release-changes.yml delete mode 100644 .github/workflows/release_changes.yml delete mode 100644 .github/workflows/release_trigger.yml create mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/mavenpublish.yml b/.github/workflows/mavenpublish.yml deleted file mode 100644 index 331c817d32..0000000000 --- a/.github/workflows/mavenpublish.yml +++ /dev/null @@ -1,214 +0,0 @@ -# This workflow will build a package using Maven and then publish it nexus when a pull request is merged -# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path - -name: Maven Package upon a pull request - -on: - pull_request: - types: [closed] - -jobs: - build: - - runs-on: ubuntu-latest - if: github.event.pull_request.merged == true - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 11 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false " > $GITHUB_WORKSPACE/settings.xml - - - name: Build with Maven - run: | - cd partner - mvn -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml - - - name: Ready the springboot artifacts - run: find -name '*.jar' -executable -type f -exec zip release.zip {} + - - - name: Upload the springboot jars - uses: actions/upload-artifact@v1 - with: - name: release - path: ./release.zip - - - publish_to_nexus: - - runs-on: ubuntu-latest - if: github.event.pull_request.merged == true - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 11 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false " > $GITHUB_WORKSPACE/settings.xml - - - name: Install xmllint - run: | - sudo apt-get update - sudo apt-get install libxml2-utils - - - name: Build with Maven - run: cd partner && mvn -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml - - - name: Publish the maven package - run: | - chmod +x ./deploy.sh - ./deploy.sh partner $GITHUB_WORKSPACE/settings.xml SNAPSHOT - env: - GPG_TTY: $(tty) - - docker-policy-management-service: - needs: build - - runs-on: ubuntu-latest - env: - NAMESPACE: mosipdev - SERVICE_NAME: policy-management-service - SERVICE_LOCATION: partner/policy-management-service - - steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v1 - with: - name: release - path: ./ - - - name: Setup branch name - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - - - name: Get version info from pom - id: getPomVersion - uses: mavrosxristoforos/get-xml-info@1.0 - with: - xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml - xpath: /*[local-name()="project"]/*[local-name()="version"] - - - name: Unzip and extract the policy-management-service - run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - echo "push version ${{steps.getPomVersion.outputs.info}}" - VERSION=$BRANCH_NAME - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - docker-partner-management-service: - needs: build - - runs-on: ubuntu-latest - env: - NAMESPACE: mosipdev - SERVICE_NAME: partner-management-service - SERVICE_LOCATION: partner/partner-management-service - - steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v1 - with: - name: release - path: ./ - - - name: Setup branch name - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - - - name: Get version info from pom - id: getPomVersion - uses: mavrosxristoforos/get-xml-info@1.0 - with: - xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml - xpath: /*[local-name()="project"]/*[local-name()="version"] - - - name: Unzip and extract the partner-management-service - run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - echo "push version ${{steps.getPomVersion.outputs.info}}" - VERSION=$BRANCH_NAME - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION \ No newline at end of file diff --git a/.github/workflows/postgres-init_trigger.yml b/.github/workflows/postgres-init_trigger.yml deleted file mode 100644 index 3de4c6f32c..0000000000 --- a/.github/workflows/postgres-init_trigger.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Trigger postgres-init repo upon db scripts updates - -on: - push: - branches: - - master - - 1.* - - develop - - release* - paths: - - db_release_scripts/** - - db_scripts/** - -jobs: - paths-filter: - runs-on: ubuntu-latest - outputs: - db_release_scripts: ${{ steps.filter.outputs.db_release_scripts }} - db_scripts: ${{ steps.filter.outputs.db_scripts }} - steps: - - uses: actions/checkout@v2 - - uses: dorny/paths-filter@v2 - id: filter - with: - base: ${{ github.ref }} - filters: | - db_release_scripts: - - 'db_release_scripts/**' - db_scripts: - - 'db_scripts/**' - - # run only if 'db_release_scripts' files were changed - db_release_scripts_updates: - needs: paths-filter - if: needs.paths-filter.outputs.db_release_scripts == 'true' - runs-on: ubuntu-latest - steps: - - name: Check for updates - run: echo "Updates are present in db_release_scripts directory, Triggering postgres-init repo" - - uses: 8398a7/action-slack@v3 - with: - status: ${{ job.status }} - fields: repo,message,commit,author,job,took,ref # selectable (default: repo,message) - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DEVOPS }} # required - if: success() # Pick up events when the job is successful. - - # run only if not 'db_release_scripts' files were changed - - name: Check for no updates - if: needs.paths-filter.outputs.db_release_scripts != 'true' - run: echo "Updates are not present in db_release_scripts directory" - - # run only if 'db_scripts' files were changed - db_scripts_updates: - needs: paths-filter - if: needs.paths-filter.outputs.db_scripts == 'true' - runs-on: ubuntu-latest - steps: - - name: Check for updates - run: echo "Updates are present in db_scripts directory, Triggering postgres-init repo" - - uses: 8398a7/action-slack@v3 - with: - status: ${{ job.status }} - fields: repo,message,commit,author,job,took,ref # selectable (default: repo,message) - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DEVOPS }} # required - if: success() # Pick up events when the job is successful. - - # run only if not 'db_scripts' files were changed - - name: Check for no updates - if: needs.paths-filter.outputs.db_scripts != 'true' - run: echo "Updates are not present in db_scripts directory" - - # This job is to trigger postgres-init repo. - trigger-postgres_init_repo: - runs-on: ubuntu-latest - steps: - - uses: peter-evans/repository-dispatch@v2 - with: - token: ${{ secrets.ACTION_PAT }} - repository: mosip/postgres-init - base: ${{ github.ref }} - event-type: db-event diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml new file mode 100644 index 0000000000..db27b6a745 --- /dev/null +++ b/.github/workflows/push-trigger.yml @@ -0,0 +1,88 @@ +name: Maven Package upon a push + +on: + release: + types: [published] + pull_request: + types: [opened] + workflow_dispatch: + inputs: + message: + description: 'Message for manually triggering' + required: false + default: 'Triggered for Updates' + type: string + push: + branches: + - '!release-branch' + - release* + - master + - 1.* + - develop + - MOSIP* + +jobs: + build-maven-partner: + uses: mosip/kattu/.github/workflows/maven-build.yml@master + with: + SERVICE_LOCATION: ./partner + BUILD_ARTIFACT: partner + secrets: + OSSRH_USER: ${{ secrets.OSSRH_USER }} + OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} + OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} + GPG_SECRET: ${{ secrets.GPG_SECRET }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + publish_to_nexus: + if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}" + needs: build-maven-partner + uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master + with: + SERVICE_LOCATION: ./partner + secrets: + OSSRH_USER: ${{ secrets.OSSRH_USER }} + OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} + OSSRH_URL: ${{ secrets.OSSRH_SNAPSHOT_URL }} + OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} + GPG_SECRET: ${{ secrets.GPG_SECRET }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + build-dockers: + needs: build-maven-partner + strategy: + matrix: + include: + - SERVICE_LOCATION: 'partner/partner-management-service' + SERVICE_NAME: 'partner-management-service' + BUILD_ARTIFACT: 'partner' + - SERVICE_LOCATION: 'partner/policy-management-service' + SERVICE_NAME: 'policy-management-service' + BUILD_ARTIFACT: 'partner' + fail-fast: false + name: ${{ matrix.SERVICE_NAME }} + uses: mosip/kattu/.github/workflows/docker-build.yml@master + with: + SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} + SERVICE_NAME: ${{ matrix.SERVICE_NAME }} + BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }} + secrets: + DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }} + ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }} + RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + sonar_analysis: + needs: build-maven-partner + if: "${{ github.event_name != 'pull_request' }}" + uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master + with: + SERVICE_LOCATION: ./partner + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + ORG_KEY: ${{ secrets.ORG_KEY }} + OSSRH_USER: ${{ secrets.OSSRH_USER }} + OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} + OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} + GPG_SECRET: ${{ secrets.GPG_SECRET }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file diff --git a/.github/workflows/push_trigger.yml b/.github/workflows/push_trigger.yml deleted file mode 100644 index d2a76d7f9e..0000000000 --- a/.github/workflows/push_trigger.yml +++ /dev/null @@ -1,311 +0,0 @@ -name: Maven Package upon a push - -on: - push: - branches: - - '!release-branch' - - release-1* - - master - - 1.* - - develop - -jobs: - build: - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 11 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - - name: Setup branch and env - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - - echo ${{ env.BRANCH_NAME }} - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - - name: Build with Maven - run: | - cd partner - mvn -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml - - - name: Ready the springboot artifacts - run: find -name '*.jar' -executable -type f -exec zip release.zip {} + - - - name: Upload the springboot jars - uses: actions/upload-artifact@v1 - with: - name: release - path: ./release.zip - - uses: 8398a7/action-slack@v3 - with: - status: ${{ job.status }} - fields: repo,message,commit,workflow,job # selectable (default: repo,message) - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required - if: failure() # Pick up events even if the job fails or is canceled. - - publish_to_nexus: - if: "!contains(github.ref, 'master')" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 11 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and env - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo ${{ env.BRANCH_NAME }} - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false " > $GITHUB_WORKSPACE/settings.xml - - - name: Install xmllint - run: | - sudo apt-get update - sudo apt-get install libxml2-utils - - name: Build with Maven - run: cd partner && mvn -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml - - - name: Publish the maven package - run: | - chmod +x ./deploy.sh - cd partner && mvn deploy -s $GITHUB_WORKSPACE/settings.xml -f pom.xml - env: - GPG_TTY: $(tty) - # - uses: 8398a7/action-slack@v3 - # with: - # status: ${{ job.status }} - # fields: repo,message,commit,workflow,job # selectable (default: repo,message) - # env: - # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEVOPS_WEBHOOK }} # required - # if: failure() # Pick up events even if the job fails or is canceled.D - - docker-policy-management-service: - needs: build - - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets.dev_namespace_docker_hub }} - SERVICE_NAME: policy-management-service - SERVICE_LOCATION: partner/policy-management-service - - steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v1 - with: - name: release - path: ./ - - - name: Setup branch name - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo ${{ env.BRANCH_NAME }} - - - name: Get version info from pom - id: getPomVersion - uses: mavrosxristoforos/get-xml-info@1.0 - with: - xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml - xpath: /*[local-name()="project"]/*[local-name()="version"] - - - name: Unzip and extract the policy-management-service - run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" - - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --build-arg SOURCE=mosip --build-arg COMMIT_HASH=$(git rev-parse HEAD) --build-arg COMMIT_ID=$(git rev-parse --short HEAD) --build-arg BUILD_TIME=${{steps.date.outputs.date}} --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - echo "push version ${{steps.getPomVersion.outputs.info}}" - if [[ $BRANCH_NAME == master ]]; then - VERSION=latest - else - VERSION=$BRANCH_NAME - fi - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - - uses: 8398a7/action-slack@v3 - with: - status: ${{ job.status }} - fields: repo,message,commit,workflow,job # selectable (default: repo,message) - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEVOPS_WEBHOOK }} # required - if: failure() # Pick up events even if the job fails or is canceled. - - docker-partner-management-service: - needs: build - - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets.dev_namespace_docker_hub }} - SERVICE_NAME: partner-management-service - SERVICE_LOCATION: partner/partner-management-service - - steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v1 - with: - name: release - path: ./ - - - name: Setup branch name - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo ${{ env.BRANCH_NAME }} - - - name: Get version info from pom - id: getPomVersion - uses: mavrosxristoforos/get-xml-info@1.0 - with: - xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml - xpath: /*[local-name()="project"]/*[local-name()="version"] - - - name: Unzip and extract the partner-management-service - run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" - - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --build-arg SOURCE=mosip --build-arg COMMIT_HASH=$(git rev-parse HEAD) --build-arg COMMIT_ID=$(git rev-parse --short HEAD) --build-arg BUILD_TIME=${{steps.date.outputs.date}} --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - echo "push version ${{steps.getPomVersion.outputs.info}}" - if [[ $BRANCH_NAME == master ]]; then - VERSION=latest - else - VERSION=$BRANCH_NAME - fi - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - - uses: 8398a7/action-slack@v3 - with: - status: ${{ job.status }} - fields: repo,message,commit,workflow,job # selectable (default: repo,message) - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEVOPS_WEBHOOK }} # required - if: failure() # Pick up events even if the job fails or is canceled. - sonar_analysis: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 11 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and env - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - - name: Build with Maven - run: | - cd partner - mvn -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml - - - name: Analyze with SonarCloud - run: | - cd partner - mvn -B -Dgpg.skip verify sonar:sonar -Dsonar.projectKey=mosip_${{ github.event.repository.name }} -Dsonar.organization=${{ secrets.ORG_KEY }} -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_TOKEN }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - - - diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml new file mode 100644 index 0000000000..2579ea836f --- /dev/null +++ b/.github/workflows/release-changes.yml @@ -0,0 +1,26 @@ +name: Release/pre-release Preparation. + +on: + workflow_dispatch: + inputs: + MESSAGE: + description: 'Triggered for release or pe-release' + required: false + default: 'Release Preparation' + RELEASE_TAG: + description: 'tag to update' + required: true + SNAPSHOT_TAG: + description: 'tag to be replaced' + required: true + BASE: + description: 'base branch for PR' + required: true +jobs: + maven-release-preparation: + uses: mosip/kattu/.github/workflows/release-changes.yml@master + with: + MESSAGE: ${{ inputs.MESSAGE }} + RELEASE_TAG: ${{ inputs.RELEASE_TAG }} + SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} + BASE: ${{ inputs.BASE }} \ No newline at end of file diff --git a/.github/workflows/release_changes.yml b/.github/workflows/release_changes.yml deleted file mode 100644 index cc9c2956d9..0000000000 --- a/.github/workflows/release_changes.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Release/pre-release Preparation. - -on: - workflow_dispatch: - inputs: - message: - description: 'Triggered for release or pe-release' - required: false - default: 'Release Preparation' - releaseTags: - description: 'tag to update' - required: true - snapshotTags: - description: 'tag to be replaced' - required: true - base: - description: 'base branch for PR' - required: true -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup branch and env - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - - - name: Mannualy changing the pom versions - run: find . -type f -name "*pom.xml" -print0 | xargs -0 sed -i "s/${{ github.event.inputs.snapshotTags }}/${{ github.event.inputs.releaseTags }}/g" - - - name: Updating the Release URL in POM - run: | - cd .github/workflows - sed -i 's/OSSRH_SNAPSHOT_URL/RELEASE_URL/g' push_trigger.yml - - - name: Updating libs-snapshot-local to libs-release local for artifactory URL's. - run: find . -type f -name "*Dockerfile" -print0 | xargs -0 sed -i "s/libs-snapshot-local/libs-release-local/g" - - - name: removing -DskipTests - run: find . -type f -name "*push_trigger.yml" -print0 | xargs -0 sed -i "s/"-DskipTests"//g" - -# - name: removing --Dgpg.skip -# run: find . -type f -name "*push_trigger.yml" -print0 | xargs -0 sed -i "s/"-Dgpg.skip"//g" - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.ACTION_PAT }} - commit-message: Updated Pom versions for release changes - title: Release changes - body: Automated PR for ${{ github.event.inputs.releaseTags }} release. - branch: release-branch - delete-branch: true - base: ${{ github.event.inputs.base }} diff --git a/.github/workflows/release_trigger.yml b/.github/workflows/release_trigger.yml deleted file mode 100644 index 16c505237f..0000000000 --- a/.github/workflows/release_trigger.yml +++ /dev/null @@ -1,209 +0,0 @@ -name: Release maven packages and docker upon a release - -on: - release: - types: [published] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 11 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false " > $GITHUB_WORKSPACE/settings.xml - - - name: Build with Maven - run: | - cd partner - mvn -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml - - - name: Ready the springboot artifacts - run: find -name '*.jar' -executable -type f -exec zip release.zip {} + - - - name: Upload the springboot jars - uses: actions/upload-artifact@v1 - with: - name: release - path: ./release.zip - - - publish_to_nexus: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 11 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false " > $GITHUB_WORKSPACE/settings.xml - - - name: Install xmllint - run: | - sudo apt-get update - sudo apt-get install libxml2-utils - - - name: Build with Maven - run: cd partner && mvn -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml - - - name: Publish the maven package - run: | - chmod +x ./deploy.sh - ./deploy.sh partner $GITHUB_WORKSPACE/settings.xml .* - env: - GPG_TTY: $(tty) - - docker-policy-management-service: - needs: build - - runs-on: ubuntu-latest - env: - NAMESPACE: mosipdev - SERVICE_NAME: policy-management-service - SERVICE_LOCATION: partner/policy-management-service - - steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v1 - with: - name: release - path: ./ - - - name: Setup branch name - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - - - name: Get version info from pom - id: getPomVersion - uses: mavrosxristoforos/get-xml-info@1.0 - with: - xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml - xpath: /*[local-name()="project"]/*[local-name()="version"] - - - name: Unzip and extract the policy-management-service - run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - echo "push version ${{steps.getPomVersion.outputs.info}}" - VERSION=$BRANCH_NAME - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - docker-partner-management-service: - needs: build - - runs-on: ubuntu-latest - env: - NAMESPACE: mosipdev - SERVICE_NAME: partner-management-service - SERVICE_LOCATION: partner/partner-management-service - - steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v1 - with: - name: release - path: ./ - - - name: Setup branch name - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - - - name: Get version info from pom - id: getPomVersion - uses: mavrosxristoforos/get-xml-info@1.0 - with: - xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml - xpath: /*[local-name()="project"]/*[local-name()="version"] - - - name: Unzip and extract the partner-management-service - run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - echo "push version ${{steps.getPomVersion.outputs.info}}" - VERSION=$BRANCH_NAME - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000000..c4939a6e8c --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,33 @@ +name: Tagging of repos + +on: + workflow_dispatch: + inputs: + TAG: + description: 'Tag to be published' + required: true + type: string + BODY: + description: 'Release body message' + required: true + default: 'Changes in this Release' + type: string + PRE_RELEASE: + description: 'Pre-release? True/False' + required: true + default: False + type: string + DRAFT: + description: 'Draft? True/False' + required: false + default: False + type: string + +jobs: + tag-branch: + uses: mosip/kattu/.github/workflows/tag.yml@master + with: + TAG: ${{ inputs.TAG }} + BODY: ${{ inputs.BODY }} + PRE_RELEASE: ${{ inputs.PRE_RELEASE }} + DRAFT: ${{ inputs.DRAFT }} From 847f62258f16634170a6e01ac563aa8908322b9b Mon Sep 17 00:00:00 2001 From: bhumi46 <111699703+bhumi46@users.noreply.github.com> Date: Mon, 25 Sep 2023 20:18:34 +0530 Subject: [PATCH 19/74] [MOSIP-29256] updated reusable worklows (#603) * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/release-changes.yml | 5 ++++- .github/workflows/tag.yml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml index 2579ea836f..783d4896a2 100644 --- a/.github/workflows/release-changes.yml +++ b/.github/workflows/release-changes.yml @@ -23,4 +23,7 @@ jobs: MESSAGE: ${{ inputs.MESSAGE }} RELEASE_TAG: ${{ inputs.RELEASE_TAG }} SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} - BASE: ${{ inputs.BASE }} \ No newline at end of file + BASE: ${{ inputs.BASE }} + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + ACTION_PAT: ${{ secrets.ACTION_PAT }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index c4939a6e8c..c131f5aa9b 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -31,3 +31,5 @@ jobs: BODY: ${{ inputs.BODY }} PRE_RELEASE: ${{ inputs.PRE_RELEASE }} DRAFT: ${{ inputs.DRAFT }} + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} From 4d8d0aa8ba07cf2219aca45cd8cc219727c1b6c2 Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Thu, 12 Oct 2023 13:27:51 +0530 Subject: [PATCH 20/74] [MOSIP-29600]Update PartnerManagementServiceImpl.java (#605) * [MOSIP-29600]Update PartnerManagementServiceImpl.java Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> * Update PartnerManagementServiceImplTest.java * Update AuthPolicyRepository.java * Update PolicyManagementService.java * Update PolicyServiceTest.java * Update PartnerServiceImplTest.java * Update PartnerManagementServiceImplTest.java * Update PartnerManagementServiceImpl.java * Update PartnerServiceImpl.java --------- Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../impl/PartnerManagementServiceImpl.java | 24 +++++------ .../service/impl/PartnerServiceImpl.java | 2 +- .../PartnerManagementServiceImplTest.java | 40 +++++++++---------- .../service/impl/PartnerServiceImplTest.java | 14 +++---- .../repository/AuthPolicyRepository.java | 2 +- .../service/PolicyManagementService.java | 6 +-- .../test/service/PolicyServiceTest.java | 22 +++++----- 7 files changed, 54 insertions(+), 56 deletions(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/partner/manager/service/impl/PartnerManagementServiceImpl.java b/partner/partner-management-service/src/main/java/io/mosip/pms/partner/manager/service/impl/PartnerManagementServiceImpl.java index 67c3f9ad9b..2bcb22b33d 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/partner/manager/service/impl/PartnerManagementServiceImpl.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/partner/manager/service/impl/PartnerManagementServiceImpl.java @@ -583,7 +583,18 @@ public APIKeyGenerateResponseDto generateAPIKey(String partnerId, APIKeyGenerate throw new PartnerManagerServiceException(ErrorCode.LOGGEDIN_USER_NOT_AUTHORIZED.getErrorCode(), ErrorCode.LOGGEDIN_USER_NOT_AUTHORIZED.getErrorMessage()); } - AuthPolicy validPolicy = authPolicyRepository.findByPolicyName(requestDto.getPolicyName()); + Optional partnerFromDb = partnerRepository.findById(partnerId); + if (partnerFromDb.isEmpty()) { + auditUtil.setAuditRequestDto(PartnerManageEnum.GENERATE_API_KEY_FAILURE, partnerId, "partnerId"); + throw new PartnerManagerServiceException(ErrorCode.PARTNER_ID_DOES_NOT_EXIST_EXCEPTION.getErrorCode(), + ErrorCode.PARTNER_ID_DOES_NOT_EXIST_EXCEPTION.getErrorMessage()); + } + if (!partnerFromDb.get().getIsActive()) { + auditUtil.setAuditRequestDto(PartnerManageEnum.GENERATE_API_KEY_FAILURE, partnerId, "partnerId"); + throw new PartnerManagerServiceException(ErrorCode.PARTNER_NOT_ACTIVE_EXCEPTION.getErrorCode(), + ErrorCode.PARTNER_NOT_ACTIVE_EXCEPTION.getErrorMessage()); + } + AuthPolicy validPolicy = authPolicyRepository.findByPolicyGroupIdAndName(partnerFromDb.get().getPolicyGroupId(),requestDto.getPolicyName()); if(validPolicy == null) { auditUtil.setAuditRequestDto(PartnerManageEnum.GENERATE_API_KEY_FAILURE, partnerId, "partnerId"); throw new PartnerManagerServiceException(ErrorCode.POLICY_NOT_EXIST_EXCEPTION.getErrorCode(), @@ -597,17 +608,6 @@ public APIKeyGenerateResponseDto generateAPIKey(String partnerId, APIKeyGenerate throw new PartnerManagerServiceException(ErrorCode.PARTNER_POLICY_MAPPING_NOT_EXISTS.getErrorCode(), ErrorCode.PARTNER_POLICY_MAPPING_NOT_EXISTS.getErrorMessage()); } - Optional partnerFromDb = partnerRepository.findById(partnerId); - if (partnerFromDb.isEmpty()) { - auditUtil.setAuditRequestDto(PartnerManageEnum.GENERATE_API_KEY_FAILURE, partnerId, "partnerId"); - throw new PartnerManagerServiceException(ErrorCode.PARTNER_ID_DOES_NOT_EXIST_EXCEPTION.getErrorCode(), - ErrorCode.PARTNER_ID_DOES_NOT_EXIST_EXCEPTION.getErrorMessage()); - } - if (!partnerFromDb.get().getIsActive()) { - auditUtil.setAuditRequestDto(PartnerManageEnum.GENERATE_API_KEY_FAILURE, partnerId, "partnerId"); - throw new PartnerManagerServiceException(ErrorCode.PARTNER_NOT_ACTIVE_EXCEPTION.getErrorCode(), - ErrorCode.PARTNER_NOT_ACTIVE_EXCEPTION.getErrorMessage()); - } PartnerPolicy policyByLabel = partnerPolicyRepository.findByPartnerIdPolicyIdAndLabel( partnerFromDb.get().getId(), validPolicy.getId(), requestDto.getLabel()); if(policyByLabel != null) { diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/partner/service/impl/PartnerServiceImpl.java b/partner/partner-management-service/src/main/java/io/mosip/pms/partner/service/impl/PartnerServiceImpl.java index 78feaf5f24..562583d6e9 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/partner/service/impl/PartnerServiceImpl.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/partner/service/impl/PartnerServiceImpl.java @@ -518,7 +518,7 @@ public PartnerResponse updatePartnerDetails(PartnerUpdateDto partnerUpdateReques } private AuthPolicy validatePolicyGroupAndPolicy(String policyGroupId, String policyName) { - AuthPolicy authPolicyFromDb = authPolicyRepository.findByPolicyGroupAndName(policyGroupId, policyName); + AuthPolicy authPolicyFromDb = authPolicyRepository.findByPolicyGroupIdAndName(policyGroupId, policyName); if (authPolicyFromDb == null) { auditUtil.setAuditRequestDto(PartnerServiceAuditEnum.SUBMIT_API_REQUEST_FAILURE, policyName, "policyName"); throw new PartnerServiceException(ErrorCode.POLICY_GROUP_POLICY_NOT_EXISTS.getErrorCode(), diff --git a/partner/partner-management-service/src/test/java/io/mosip/pms/test/partner/service/impl/PartnerManagementServiceImplTest.java b/partner/partner-management-service/src/test/java/io/mosip/pms/test/partner/service/impl/PartnerManagementServiceImplTest.java index 40b26308dc..671e76e244 100644 --- a/partner/partner-management-service/src/test/java/io/mosip/pms/test/partner/service/impl/PartnerManagementServiceImplTest.java +++ b/partner/partner-management-service/src/test/java/io/mosip/pms/test/partner/service/impl/PartnerManagementServiceImplTest.java @@ -948,10 +948,11 @@ public void approveRejectPartnerPolicyMappingTest05() { public void generateAPIKeyTest() { APIKeyGenerateRequestDto request = new APIKeyGenerateRequestDto(); request.setLabel("unique"); - request.setPolicyName("policyName"); - Mockito.when(authPolicyRepository.findByPolicyName(request.getPolicyName())).thenReturn(getAuthPolicies().get(0)); + request.setPolicyName("policyName"); + Optional newPartner = Optional.of(getPartner()); + Mockito.when(partnerRepository.findById("partner")).thenReturn(newPartner); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName(newPartner.get().getPolicyGroupId(),request.getPolicyName())).thenReturn(getAuthPolicies().get(0)); Mockito.when((partnerPolicyRequestRepository.findByPartnerIdAndPolicyIdAndStatusCode(Mockito.any(),Mockito.any(),Mockito.any()))).thenReturn(List.of(getPartnerPolicyRequestData())); - Mockito.when(partnerRepository.findById("partner")).thenReturn(Optional.of(getPartner())); Mockito.when(partnerPolicyRepository.findByPartnerIdPolicyIdAndLabel("partner","234","unique")).thenReturn(getPartnerPolicy()); Map response = new HashMap<>(); response.put("response", getCertResponse()); @@ -964,39 +965,36 @@ public void generateAPIKeyTest() { }catch (PartnerManagerServiceException e) { assertTrue(e.getErrorCode().equals(ErrorCode.LOGGEDIN_USER_NOT_AUTHORIZED.getErrorCode())); } - - Mockito.when(authPolicyRepository.findByPolicyName(request.getPolicyName())).thenReturn(null); + Mockito.when(partnerRepository.findById("partner")).thenReturn(Optional.empty()); try { partnerManagementImpl.generateAPIKey("partner", request); }catch (PartnerManagerServiceException e) { - assertTrue(e.getErrorCode().equals(ErrorCode.POLICY_NOT_EXIST_EXCEPTION.getErrorCode())); + assertTrue(e.getErrorCode().equals(ErrorCode.PARTNER_ID_DOES_NOT_EXIST_EXCEPTION.getErrorCode())); } - Mockito.when(authPolicyRepository.findByPolicyName(request.getPolicyName())).thenReturn(getAuthPolicies().get(0)); - Mockito.when((partnerPolicyRequestRepository.findByPartnerIdAndPolicyIdAndStatusCode(Mockito.any(),Mockito.any(),Mockito.any()))).thenReturn(Collections.emptyList()); + Optional partner = Optional.of(getPartner()); + partner.get().setIsActive(false); + Mockito.when(partnerRepository.findById("partner")).thenReturn(partner); try { partnerManagementImpl.generateAPIKey("partner", request); }catch (PartnerManagerServiceException e) { - assertTrue(e.getErrorCode().equals(ErrorCode.PARTNER_POLICY_MAPPING_NOT_EXISTS.getErrorCode())); + assertTrue(e.getErrorCode().equals(ErrorCode.PARTNER_NOT_ACTIVE_EXCEPTION.getErrorCode())); } - Mockito.when(authPolicyRepository.findByPolicyName(request.getPolicyName())).thenReturn(getAuthPolicies().get(0)); - Mockito.when((partnerPolicyRequestRepository.findByPartnerIdAndPolicyIdAndStatusCode(Mockito.any(),Mockito.any(),Mockito.any()))).thenReturn(List.of(getPartnerPolicyRequestData())); - Mockito.when(partnerRepository.findById("partner")).thenReturn(Optional.empty()); + Mockito.when(partnerRepository.findById("partner")).thenReturn(newPartner); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName(request.getPolicyName(),newPartner.get().getPolicyGroupId())).thenReturn(null); try { partnerManagementImpl.generateAPIKey("partner", request); }catch (PartnerManagerServiceException e) { - assertTrue(e.getErrorCode().equals(ErrorCode.PARTNER_ID_DOES_NOT_EXIST_EXCEPTION.getErrorCode())); - } - Mockito.when(authPolicyRepository.findByPolicyName(request.getPolicyName())).thenReturn(getAuthPolicies().get(0)); - Mockito.when((partnerPolicyRequestRepository.findByPartnerIdAndPolicyIdAndStatusCode(Mockito.any(),Mockito.any(),Mockito.any()))).thenReturn(List.of(getPartnerPolicyRequestData())); - Optional partner = Optional.of(getPartner()); - partner.get().setIsActive(false); - Mockito.when(partnerRepository.findById("partner")).thenReturn(partner); + assertTrue(e.getErrorCode().equals(ErrorCode.POLICY_NOT_EXIST_EXCEPTION.getErrorCode())); + } + Mockito.when(partnerRepository.findById("partner")).thenReturn(newPartner); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName(newPartner.get().getPolicyGroupId(),request.getPolicyName())).thenReturn(getAuthPolicies().get(0)); + Mockito.when((partnerPolicyRequestRepository.findByPartnerIdAndPolicyIdAndStatusCode(Mockito.any(),Mockito.any(),Mockito.any()))).thenReturn(Collections.emptyList()); try { partnerManagementImpl.generateAPIKey("partner", request); }catch (PartnerManagerServiceException e) { - assertTrue(e.getErrorCode().equals(ErrorCode.PARTNER_NOT_ACTIVE_EXCEPTION.getErrorCode())); + assertTrue(e.getErrorCode().equals(ErrorCode.PARTNER_POLICY_MAPPING_NOT_EXISTS.getErrorCode())); } - Mockito.when(authPolicyRepository.findByPolicyName(request.getPolicyName())).thenReturn(getAuthPolicies().get(0)); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName(request.getPolicyName(),newPartner.get().getPolicyGroupId())).thenReturn(getAuthPolicies().get(0)); Mockito.when((partnerPolicyRequestRepository.findByPartnerIdAndPolicyIdAndStatusCode(Mockito.any(),Mockito.any(),Mockito.any()))).thenReturn(List.of(getPartnerPolicyRequestData())); Mockito.when(partnerRepository.findById("partner")).thenReturn(Optional.of(getPartner())); Mockito.when(partnerPolicyRepository.findByPartnerIdPolicyIdAndLabel("123456","234","unique")).thenReturn(getPartnerPolicy()); diff --git a/partner/partner-management-service/src/test/java/io/mosip/pms/test/partner/service/impl/PartnerServiceImplTest.java b/partner/partner-management-service/src/test/java/io/mosip/pms/test/partner/service/impl/PartnerServiceImplTest.java index e67bbb27d5..65f8edc990 100644 --- a/partner/partner-management-service/src/test/java/io/mosip/pms/test/partner/service/impl/PartnerServiceImplTest.java +++ b/partner/partner-management-service/src/test/java/io/mosip/pms/test/partner/service/impl/PartnerServiceImplTest.java @@ -789,7 +789,7 @@ public void mapPartnerPolicyCredentialType_001() { Mockito.when(partnerRepository.findById("12345")).thenReturn(partner); Mockito.when(authPolicyRepository.findById("12345")).thenReturn(Optional.of(createAuthPolicy())); Mockito.when(authPolicyRepository - .findByPolicyGroupAndName(Mockito.anyString(), Mockito.anyString())).thenReturn(createAuthPolicy()); + .findByPolicyGroupIdAndName(Mockito.anyString(), Mockito.anyString())).thenReturn(createAuthPolicy()); pserviceImpl.mapPartnerPolicyCredentialType("euin", "12345", "12345"); } @@ -879,7 +879,7 @@ public void requestForPolicyMappingTest() { Optional partner = Optional.of(createPartner(true)); partner.get().setPartnerTypeCode("Auth_Partner"); Mockito.when(partnerRepository.findById("12345")).thenReturn(partner); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345","policyName")).thenReturn(createAuthPolicy()); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345","policyName")).thenReturn(createAuthPolicy()); Mockito.when(partnerPolicyRequestRepository.findByPartnerIdAndPolicyId("12345","123")).thenReturn(List.of(createPartnerPolicyRequest("approved"))); pserviceImpl.requestForPolicyMapping(request, "12345"); partner.get().setPolicyGroupId(null); @@ -921,7 +921,7 @@ public void requestForPolicyMappingTest() { } partner.get().setIsActive(true); Mockito.when(partnerRepository.findById("12345")).thenReturn(partner); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345","policyName")).thenReturn(null); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345","policyName")).thenReturn(null); try { pserviceImpl.requestForPolicyMapping(request, "12345"); }catch (PartnerServiceException e) { @@ -929,7 +929,7 @@ public void requestForPolicyMappingTest() { } AuthPolicy authPolicy = createAuthPolicy(); authPolicy.setIsActive(false); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345","policyName")).thenReturn(authPolicy); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345","policyName")).thenReturn(authPolicy); try { pserviceImpl.requestForPolicyMapping(request, "12345"); }catch (PartnerServiceException e) { @@ -938,7 +938,7 @@ public void requestForPolicyMappingTest() { authPolicy = createAuthPolicy(); authPolicy.setIsActive(true); authPolicy.setValidToDate(LocalDateTime.now().minusMonths(3)); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345","policyName")).thenReturn(authPolicy); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345","policyName")).thenReturn(authPolicy); try { pserviceImpl.requestForPolicyMapping(request, "12345"); }catch (PartnerServiceException e) { @@ -947,7 +947,7 @@ public void requestForPolicyMappingTest() { authPolicy = createAuthPolicy(); authPolicy.setIsActive(true); authPolicy.getPolicyGroup().setIsActive(false); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345","policyName")).thenReturn(authPolicy); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345","policyName")).thenReturn(authPolicy); try { pserviceImpl.requestForPolicyMapping(request, "12345"); }catch (PartnerServiceException e) { @@ -1264,4 +1264,4 @@ private String caCertResponse() { } -} \ No newline at end of file +} diff --git a/partner/pms-common/src/main/java/io/mosip/pms/common/repository/AuthPolicyRepository.java b/partner/pms-common/src/main/java/io/mosip/pms/common/repository/AuthPolicyRepository.java index 65344ae87b..1447139201 100644 --- a/partner/pms-common/src/main/java/io/mosip/pms/common/repository/AuthPolicyRepository.java +++ b/partner/pms-common/src/main/java/io/mosip/pms/common/repository/AuthPolicyRepository.java @@ -13,7 +13,7 @@ public interface AuthPolicyRepository extends JpaRepository{ @Query(value = "select * from auth_policy ap where ap.policy_group_id=?1 and ap.name = ?2",nativeQuery = true) - AuthPolicy findByPolicyGroupAndName(String policyGroupId, String name); + AuthPolicy findByPolicyGroupIdAndName(String policyGroupId, String name); @Query(value = "select * from auth_policy ap where ap.policy_group_id=?1 and ap.id = ?2",nativeQuery = true) AuthPolicy findByPolicyGroupAndId(String policyGroupId, String policyId); diff --git a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/service/PolicyManagementService.java b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/service/PolicyManagementService.java index aac9f31e14..95ab0c591c 100644 --- a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/service/PolicyManagementService.java +++ b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/service/PolicyManagementService.java @@ -294,7 +294,7 @@ public PolicyCreateResponseDto updatePolicies(PolicyUpdateRequestDto requestDto, throw new PolicyManagementServiceException(ErrorMessages.PUBLISHED_POLICY_NOT_UPDATED.getErrorCode(), ErrorMessages.PUBLISHED_POLICY_NOT_UPDATED.getErrorMessage()); } - AuthPolicy mappedPolicy = authPolicyRepository.findByPolicyGroupAndName(policyGroup.getId(), + AuthPolicy mappedPolicy = authPolicyRepository.findByPolicyGroupIdAndName(policyGroup.getId(), requestDto.getName()); if (mappedPolicy != null && !mappedPolicy.getName().equals(authPolicy.getName())) { auditUtil.setAuditRequestDto(PolicyManageEnum.UPDATE_POLICY_FAILURE, requestDto.getName(), "policyName"); @@ -354,7 +354,7 @@ private PolicyGroupCreateResponseDto savePolicyGroup(PolicyGroup policyGroup) { * @return */ private void validateAuthPolicyName(String policyGroupId, String auth_policy_name) { - AuthPolicy auth_policy_by_name = authPolicyRepository.findByPolicyGroupAndName(policyGroupId, auth_policy_name); + AuthPolicy auth_policy_by_name = authPolicyRepository.findByPolicyGroupIdAndName(policyGroupId, auth_policy_name); if (auth_policy_by_name != null) { auditUtil.setAuditRequestDto(PolicyManageEnum.CREATE_POLICY_FAILURE, auth_policy_name, "policyName"); throw new PolicyManagementServiceException( @@ -445,7 +445,7 @@ private PolicyResponseDto mapPolicyAndPolicyGroup(AuthPolicy authPolicy) private PolicyCreateResponseDto savePolicy(JSONObject policyJson, String oldPolicyName, String newPolicyName, String policyDesc, String policyGroupId, String policyType, String policyGroupName, String version, String authPolicyId) throws PolicyManagementServiceException, Exception { - AuthPolicy authPolicy = authPolicyRepository.findByPolicyGroupAndName(policyGroupId, oldPolicyName); + AuthPolicy authPolicy = authPolicyRepository.findByPolicyGroupIdAndName(policyGroupId, oldPolicyName); if (authPolicy != null) { authPolicy.setId(authPolicy.getId()); authPolicy.setDescr(policyDesc); diff --git a/partner/policy-management-service/src/test/java/io/mosip/pms/policy/test/service/PolicyServiceTest.java b/partner/policy-management-service/src/test/java/io/mosip/pms/policy/test/service/PolicyServiceTest.java index 30155ea3c9..a2456cec2a 100644 --- a/partner/policy-management-service/src/test/java/io/mosip/pms/policy/test/service/PolicyServiceTest.java +++ b/partner/policy-management-service/src/test/java/io/mosip/pms/policy/test/service/PolicyServiceTest.java @@ -338,7 +338,7 @@ public void createPoliciesTest_S004() throws PolicyManagementServiceException, E PolicyCreateRequestDto request = createPoliciesRequest(); request.setPolicyType("Data_Share"); Mockito.when(policyGroupRepository.findByName("Test_Policy_Group_001")).thenReturn(policyGroupData()); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345","Test_001")).thenReturn(getAuthPolicy()); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345","Test_001")).thenReturn(getAuthPolicy()); service.createPolicies(request); } @@ -376,7 +376,7 @@ public void createPoliciesTest_S007() throws PolicyManagementServiceException, E Mockito.when(mapper.readValue(new URL("http://localhost:8999/schema"), JsonNode.class)).thenReturn(actualObj); Mockito.when(policyGroupRepository.findByName("Test_Policy_Group_001")).thenReturn(policyGroupData()); Mockito.when(authPolicyRepository.findByName("Test")).thenReturn(getAuthPolicy()); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345","Test")).thenReturn(getAuthPolicy()); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345","Test")).thenReturn(getAuthPolicy()); try { service.createPolicies(request); }catch (PolicyManagementServiceException e) { @@ -571,7 +571,7 @@ public void updatePolicies_PolicyNameDuplicateTest() throws PolicyManagementServ AuthPolicy authPolicyName = getAuthPolicy(); authPolicyName.getPolicyGroup().setId("12345"); authPolicyName.setName("Test_01"); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345", "Test")).thenReturn(authPolicyName); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345", "Test")).thenReturn(authPolicyName); service.updatePolicies(request, "12345"); } @@ -597,7 +597,7 @@ public void updatePolicies_Test_01() throws PolicyManagementServiceException, Ex AuthPolicy authPolicyName = getAuthPolicy(); authPolicyName.getPolicyGroup().setId("12345"); authPolicyName.setName("Test_01"); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345", "Test")).thenReturn(authPolicyName); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345", "Test")).thenReturn(authPolicyName); service.updatePolicies(request, "12345"); } @@ -625,7 +625,7 @@ public void updatePolicies_Test_02() throws PolicyManagementServiceException, Ex authPolicyName.setPolicySchema("localhost"); authPolicyName.getPolicyGroup().setId("12345"); authPolicyName.setName("Test_01"); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345", "Test")).thenReturn(authPolicyName); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345", "Test")).thenReturn(authPolicyName); service.updatePolicies(request, "12345"); } @@ -654,7 +654,7 @@ public void updatePolicies_Test_03() throws PolicyManagementServiceException, Ex authPolicyName.getPolicyGroup().setId("12345"); authPolicyName.setName("Test_01"); authPolicyName.setPolicy_type("Auth"); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345", "Test")).thenReturn(authPolicyName); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345", "Test")).thenReturn(authPolicyName); ObjectMapper objectMapper = new ObjectMapper(); JsonNode actualObj = objectMapper.readTree(authPolicySchema); Mockito.when(mapper.readValue(new URL("http://localhost:8999/schema"), JsonNode.class)).thenReturn(actualObj); @@ -686,7 +686,7 @@ public void updatePolicies_Test_04() throws PolicyManagementServiceException, Ex authPolicyName.getPolicyGroup().setId("12345"); authPolicyName.setName("Test_01"); authPolicyName.setPolicy_type("Auth"); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345", "Test_01")).thenReturn(authPolicyName); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345", "Test_01")).thenReturn(authPolicyName); ObjectMapper objectMapper = new ObjectMapper(); JsonNode actualObj = objectMapper.readTree(authPolicySchema); Mockito.when(mapper.readValue(new URL("http://localhost:8999/schema"), JsonNode.class)).thenReturn(actualObj); @@ -738,7 +738,7 @@ public void publishPolicy_PolicyPublishedTest() throws JsonParseException, JsonM Mockito.when(authPolicyRepository.findByName("Test")).thenReturn(authPolicy); Optional policy = Optional.of(policyGroup); Mockito.when(policyGroupRepository.findByName("Test")).thenReturn(policy.get()); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345", "Test")).thenReturn(getAuthPolicy()); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345", "Test")).thenReturn(getAuthPolicy()); service.publishPolicy("Test", "Test"); } @@ -762,7 +762,7 @@ public void publishPolicyTest() throws JsonParseException, JsonMappingException, Mockito.when(authPolicyRepository.findById("Test")).thenReturn(Optional.of(authPolicy)); Optional policy = Optional.of(policyGroup); Mockito.when(policyGroupRepository.findById("Test")).thenReturn(policy); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345", "Test")).thenReturn(getAuthPolicy()); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345", "Test")).thenReturn(getAuthPolicy()); Mockito.when(policyGroupRepository.findById("12345")).thenReturn(policy); service.publishPolicy("Test", "Test"); } @@ -788,7 +788,7 @@ public void publishPolicyTest_02() throws JsonParseException, JsonMappingExcepti Mockito.when(authPolicyRepository.findById("Test")).thenReturn(Optional.of(authPolicy)); Optional policy = Optional.of(policyGroup); Mockito.when(policyGroupRepository.findById("Test")).thenReturn(policy); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345", "Test")).thenReturn(getAuthPolicy()); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345", "Test")).thenReturn(getAuthPolicy()); Mockito.when(policyGroupRepository.findById("12345")).thenReturn(policy); try { service.publishPolicy("Test", "Test"); @@ -821,7 +821,7 @@ public void publishPolicyTest_01() throws JsonParseException, JsonMappingExcepti AuthPolicy authPolicy01 = getAuthPolicy(); authPolicy01.setIsActive(false); authPolicy01.setPolicySchema("localhost"); - Mockito.when(authPolicyRepository.findByPolicyGroupAndName("12345", "Test")).thenReturn(authPolicy01); + Mockito.when(authPolicyRepository.findByPolicyGroupIdAndName("12345", "Test")).thenReturn(authPolicy01); Mockito.when(policyGroupRepository.findById("12345")).thenReturn(policy); service.publishPolicy("Test", "Test"); } From 24257d7d582ef7ed14e0f486650cde626afc224d Mon Sep 17 00:00:00 2001 From: Rakshithb1 <79500257+Rakshithb1@users.noreply.github.com> Date: Wed, 15 Nov 2023 12:20:30 +0530 Subject: [PATCH 21/74] [MOSIP-29918] added db-test.yml (#612) Signed-off-by: Rakshithb1 Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/db-test.yml | 39 ++++++++++++++++++++++++++++++++++ db_scripts/mosip_pms/deploy.sh | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/db-test.yml diff --git a/.github/workflows/db-test.yml b/.github/workflows/db-test.yml new file mode 100644 index 0000000000..430c25da0d --- /dev/null +++ b/.github/workflows/db-test.yml @@ -0,0 +1,39 @@ +name: PostgreSQL Test + +on: + release: + types: [published] + pull_request: + types: [opened, reopened, synchronize] + paths: + - 'db_scripts/**' + workflow_dispatch: + inputs: + message: + description: 'Message for manually triggering' + required: false + default: 'Triggered for Updates' + type: string + push: + branches: + - '!release-branch' + - release* + - master + - 1.* + - develop* + - MOSIP* + paths: + - 'db_scripts/**' + +jobs: + build-db-test: + strategy: + matrix: + include: + - DB_LOCATION: 'db_scripts/mosip_pms' + DB_NAME: 'mosip_pms' + fail-fast: false + name: ${{ matrix.DB_NAME }} + uses: mosip/kattu/.github/workflows/db-test.yml@master + with: + DB_LOCATION: ${{ matrix.DB_LOCATION}} diff --git a/db_scripts/mosip_pms/deploy.sh b/db_scripts/mosip_pms/deploy.sh index 75055ed43d..0d0c3a8097 100644 --- a/db_scripts/mosip_pms/deploy.sh +++ b/db_scripts/mosip_pms/deploy.sh @@ -1,4 +1,4 @@ -#!/bin/sh + ## Properties file set -e properties_file="$1" From ee4537cd44b5f66c39b4b54f89334df0242d146e Mon Sep 17 00:00:00 2001 From: Rakshith B <79500257+Rakshithb1@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:31:47 +0530 Subject: [PATCH 22/74] [MOSIP-29961] Updated push-trigger.yml (#621) * [MOSIP-29961] removed paths from db-test.yml Signed-off-by: Rakshith B <79500257+Rakshithb1@users.noreply.github.com> * [MOSIP-29961] Updated push-trigger.yml Signed-off-by: Rakshith B <79500257+Rakshithb1@users.noreply.github.com> --------- Signed-off-by: Rakshith B <79500257+Rakshithb1@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/db-test.yml | 2 -- .github/workflows/push-trigger.yml | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/db-test.yml b/.github/workflows/db-test.yml index 430c25da0d..c3ed7de2b3 100644 --- a/.github/workflows/db-test.yml +++ b/.github/workflows/db-test.yml @@ -5,8 +5,6 @@ on: types: [published] pull_request: types: [opened, reopened, synchronize] - paths: - - 'db_scripts/**' workflow_dispatch: inputs: message: diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index db27b6a745..c429dcc3d4 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -4,7 +4,7 @@ on: release: types: [published] pull_request: - types: [opened] + types: [opened, reopened, synchronize] workflow_dispatch: inputs: message: @@ -85,4 +85,4 @@ jobs: OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} GPG_SECRET: ${{ secrets.GPG_SECRET }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} From c66563612fb997fc43d02052c94da45e27efc11f Mon Sep 17 00:00:00 2001 From: PRAFUL RAKHADE <99539100+Prafulrakhade@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:33:27 +0530 Subject: [PATCH 23/74] [DSD-3932] removed release-changes.yml, tag.yml and updated push-trigger.yml file (#618) Signed-off-by: techno-467 Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 2 +- .github/workflows/release-changes.yml | 29 ---------------------- .github/workflows/tag.yml | 35 --------------------------- 3 files changed, 1 insertion(+), 65 deletions(-) delete mode 100644 .github/workflows/release-changes.yml delete mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index c429dcc3d4..6e58022b18 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -35,7 +35,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} publish_to_nexus: - if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}" + if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish' }}" needs: build-maven-partner uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master with: diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml deleted file mode 100644 index 783d4896a2..0000000000 --- a/.github/workflows/release-changes.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Release/pre-release Preparation. - -on: - workflow_dispatch: - inputs: - MESSAGE: - description: 'Triggered for release or pe-release' - required: false - default: 'Release Preparation' - RELEASE_TAG: - description: 'tag to update' - required: true - SNAPSHOT_TAG: - description: 'tag to be replaced' - required: true - BASE: - description: 'base branch for PR' - required: true -jobs: - maven-release-preparation: - uses: mosip/kattu/.github/workflows/release-changes.yml@master - with: - MESSAGE: ${{ inputs.MESSAGE }} - RELEASE_TAG: ${{ inputs.RELEASE_TAG }} - SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} - BASE: ${{ inputs.BASE }} - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - ACTION_PAT: ${{ secrets.ACTION_PAT }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml deleted file mode 100644 index c131f5aa9b..0000000000 --- a/.github/workflows/tag.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Tagging of repos - -on: - workflow_dispatch: - inputs: - TAG: - description: 'Tag to be published' - required: true - type: string - BODY: - description: 'Release body message' - required: true - default: 'Changes in this Release' - type: string - PRE_RELEASE: - description: 'Pre-release? True/False' - required: true - default: False - type: string - DRAFT: - description: 'Draft? True/False' - required: false - default: False - type: string - -jobs: - tag-branch: - uses: mosip/kattu/.github/workflows/tag.yml@master - with: - TAG: ${{ inputs.TAG }} - BODY: ${{ inputs.BODY }} - PRE_RELEASE: ${{ inputs.PRE_RELEASE }} - DRAFT: ${{ inputs.DRAFT }} - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} From 5bbb30506958eef67cff628d1c6d95e071bf99c3 Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:51:16 +0530 Subject: [PATCH 24/74] MOSIP-25622 : Updated OIDC Client Details For Audit Purpose Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../io/mosip/pms/device/util/AuditUtil.java | 40 +++++++ .../contant/ClientServiceAuditEnum.java | 100 ++++++++++++++++++ .../ClientManagementController.java | 58 +++++++--- .../impl/ClientManagementServiceImpl.java | 30 +++++- 4 files changed, 212 insertions(+), 16 deletions(-) create mode 100644 partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/device/util/AuditUtil.java b/partner/partner-management-service/src/main/java/io/mosip/pms/device/util/AuditUtil.java index 3af1ac60c3..6fee1c51f9 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/device/util/AuditUtil.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/device/util/AuditUtil.java @@ -10,6 +10,7 @@ import javax.annotation.PostConstruct; +import io.mosip.pms.oidc.client.contant.ClientServiceAuditEnum; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; @@ -341,4 +342,43 @@ private void handlException(HttpStatusCodeException ex) { } + public void setAuditRequestDto(ClientServiceAuditEnum clientServiceAuditEnum, String refId, String refIdType) { + AuditRequestDto auditRequestDto = new AuditRequestDto(); + auditRequestDto.setHostIp(hostIpAddress); + auditRequestDto.setHostName(hostName);; + auditRequestDto.setApplicationId(clientServiceAuditEnum.getApplicationId()); + auditRequestDto.setApplicationName(clientServiceAuditEnum.getApplicationName()); + auditRequestDto.setSessionUserId(SecurityContextHolder.getContext().getAuthentication().getName()); + auditRequestDto.setSessionUserName(SecurityContextHolder.getContext().getAuthentication().getName()); + auditRequestDto.setCreatedBy(SecurityContextHolder.getContext().getAuthentication().getName()); + auditRequestDto.setActionTimeStamp(DateUtils.getUTCCurrentDateTime()); + auditRequestDto.setDescription(clientServiceAuditEnum.getDescription()); + auditRequestDto.setEventType(clientServiceAuditEnum.getType()); + auditRequestDto.setEventName(clientServiceAuditEnum.getName()); + auditRequestDto.setModuleId(clientServiceAuditEnum.getModuleId()); + auditRequestDto.setModuleName(clientServiceAuditEnum.getModuleName()); + auditRequestDto.setEventId(clientServiceAuditEnum.getEventId()); + auditRequestDto.setId(refId); + auditRequestDto.setIdType(refIdType); + callAuditManager(auditRequestDto); + } + + public void setAuditRequestDto(ClientServiceAuditEnum clientServiceAuditEnum) { + AuditRequestDto auditRequestDto = new AuditRequestDto(); + auditRequestDto.setHostIp(hostIpAddress); + auditRequestDto.setHostName(hostName);; + auditRequestDto.setApplicationId(clientServiceAuditEnum.getApplicationId()); + auditRequestDto.setApplicationName(clientServiceAuditEnum.getApplicationName()); + auditRequestDto.setSessionUserId(SecurityContextHolder.getContext().getAuthentication().getName()); + auditRequestDto.setSessionUserName(SecurityContextHolder.getContext().getAuthentication().getName()); + auditRequestDto.setCreatedBy(SecurityContextHolder.getContext().getAuthentication().getName()); + auditRequestDto.setActionTimeStamp(DateUtils.getUTCCurrentDateTime()); + auditRequestDto.setDescription(clientServiceAuditEnum.getDescription()); + auditRequestDto.setEventType(clientServiceAuditEnum.getType()); + auditRequestDto.setEventName(clientServiceAuditEnum.getName()); + auditRequestDto.setModuleId(clientServiceAuditEnum.getModuleId()); + auditRequestDto.setModuleName(clientServiceAuditEnum.getModuleName()); + auditRequestDto.setEventId(clientServiceAuditEnum.getEventId()); + callAuditManager(auditRequestDto); + } } diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java new file mode 100644 index 0000000000..68e5177602 --- /dev/null +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java @@ -0,0 +1,100 @@ +package io.mosip.pms.oidc.client.contant; + +import io.mosip.pms.partner.manager.constant.AuditConstant; + +public enum ClientServiceAuditEnum { + + CREATE_CLIENT("PMS_PRT_100", AuditConstant.AUDIT_SYSTEM, "POST CREATE OIDC CLIENT", + "Creating the OIDC Client", AuditConstant.PARTNER_MODULE_ID, AuditConstant.PARTNER_MODULE_NAME, "NO_ID", + "NO_ID_TYPE", AuditConstant.APPLICATION_NAME, AuditConstant.APPLICATION_ID), + CREATE_CLIENT_SUCCESS("PMS_PRT_200", AuditConstant.AUDIT_SYSTEM, "POST CREATE OIDC CLIENT", + "Creating the OIDC Client Success", AuditConstant.PARTNER_MODULE_ID, AuditConstant.PARTNER_MODULE_NAME, "NO_ID", + "NO_ID_TYPE", AuditConstant.APPLICATION_NAME, AuditConstant.APPLICATION_ID), + CREATE_CLIENT_FAILURE("PMS_PRT_300", AuditConstant.AUDIT_SYSTEM, "POST CREATE OIDC CLIENT", + "Creating the OIDC Client Failed", AuditConstant.PARTNER_MODULE_ID, AuditConstant.PARTNER_MODULE_NAME, "NO_ID", + "NO_ID_TYPE", AuditConstant.APPLICATION_NAME, AuditConstant.APPLICATION_ID), + UPDATE_CLIENT("PMS_PRT_600", AuditConstant.AUDIT_SYSTEM, "PUT UPDATE OIDC CLIENT", + "Updating OIDC Client", AuditConstant.PARTNER_MODULE_ID, AuditConstant.PARTNER_MODULE_NAME, "NO_ID", + "NO_ID_TYPE", AuditConstant.APPLICATION_NAME, AuditConstant.APPLICATION_ID), + UPDATE_CLIENT_SUCCESS("PMS_PRT_700", AuditConstant.AUDIT_SYSTEM, "PUT UPDATE OIDC CLIENT", + "Updating OIDC Client Success", AuditConstant.PARTNER_MODULE_ID, AuditConstant.PARTNER_MODULE_NAME, "NO_ID", + "NO_ID_TYPE", AuditConstant.APPLICATION_NAME, AuditConstant.APPLICATION_ID), + UPDATE_CLIENT_FAILURE("PMS_PRT_800", AuditConstant.AUDIT_SYSTEM, "PUT UPDATE OIDC CLIENT", + "Updating OIDC Client Failed", AuditConstant.PARTNER_MODULE_ID, AuditConstant.PARTNER_MODULE_NAME, "NO_ID", + "NO_ID_TYPE", AuditConstant.APPLICATION_NAME, AuditConstant.APPLICATION_ID); + + private final String eventId; + + private final String type; + + private String name; + + private String description; + + private String moduleId; + + private String moduleName; + + private String id; + + private String idType; + + private String applicationId; + + private String applicationName; + + public String getEventId() { + return eventId; + } + + public String getType() { + return type; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + public String getModuleId() { + return moduleId; + } + + public String getModuleName() { + return moduleName; + } + + public String getId() { + return id; + } + + public String getIdType() { + return idType; + } + + public String getApplicationId() { + return applicationId; + } + + public String getApplicationName() { + return applicationName; + } + + ClientServiceAuditEnum(String eventId, String type, String name, String description, String moduleId, + String moduleName, String id, String idType, String applicationId, String applicationName) { + this.eventId = eventId; + this.type = type; + this.name = name; + this.description = description; + this.moduleId = moduleId; + this.moduleName = moduleName; + this.id = id; + this.idType = idType; + this.applicationId = applicationId; + this.applicationName = applicationName; + } + +} diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java index 9793d0e2a7..b954a04f52 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java @@ -1,5 +1,9 @@ package io.mosip.pms.oidc.client.controller; +import io.mosip.pms.device.util.AuditUtil; +import io.mosip.pms.oidc.client.contant.ClientServiceAuditEnum; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RestController; import io.mosip.pms.common.request.dto.RequestWrapper; @@ -22,29 +26,55 @@ public class ClientManagementController { @Autowired ClientManagementService clientManagementService; + @Autowired + AuditUtil auditUtil; + + String msg = "mosip.clientmanagement.clients.retrieve"; + + String version = "1.0"; + @RequestMapping(value = "/oidc/client", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseWrapper createClient( + public ResponseEntity> createClient( @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { - var clientRespDto = clientManagementService.createOIDCClient(requestWrapper.getRequest()); - var response = new ResponseWrapper(); - response.setResponse(clientRespDto); - return response; + //var clientRespDto = clientManagementService.createOIDCClient(requestWrapper.getRequest()); + ResponseWrapper response = new ResponseWrapper<>(); + //var response = new ResponseWrapper(); + ClientDetailResponse clientDetailResponse = null; + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT,requestWrapper.getRequest().getName(),"clientID"); + clientDetailResponse = clientManagementService.createOIDCClient(requestWrapper.getRequest()); + //response.setResponse(clientRespDto); + response.setId(requestWrapper.getId()); + response.setVersion(requestWrapper.getVersion()); + response.setResponse(clientDetailResponse); + return new ResponseEntity<>(response, HttpStatus.OK); } @RequestMapping(value = "/oidc/client/{client_id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseWrapper updateClient(@PathVariable("client_id") String clientId, + public ResponseEntity> updateClient(@PathVariable("client_id") String clientId, @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { - var clientRespDto = clientManagementService.updateOIDCClient(clientId, requestWrapper.getRequest()); - var response = new ResponseWrapper(); - response.setResponse(clientRespDto); - return response; + //var clientRespDto = clientManagementService.updateOIDCClient(clientId, requestWrapper.getRequest()); + ResponseWrapper response = new ResponseWrapper<>(); + //var response = new ResponseWrapper(); + ClientDetailResponse clientDetailResponse = null; + ClientDetailUpdateRequest updateRequest = requestWrapper.getRequest(); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.UPDATE_CLIENT, clientId, "clientID"); + clientDetailResponse = clientManagementService.updateOIDCClient(clientId, updateRequest); + response.setId(requestWrapper.getId()); + response.setVersion(requestWrapper.getVersion()); + response.setResponse(clientDetailResponse); + return new ResponseEntity<>(response, HttpStatus.OK); } @RequestMapping(value = "/oidc/client/{client_id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseWrapper getClient(@PathVariable("client_id") String clientId) + public ResponseEntity> getClient(@PathVariable("client_id") String clientId) throws Exception { - var response = new ResponseWrapper(); - response.setResponse(clientManagementService.getClientDetails(clientId)); - return response; + ResponseWrapper response = new ResponseWrapper<>(); + ClientDetail clientDetail = null; + clientDetail = clientManagementService.getClientDetails(clientId); + //var response = new ResponseWrapper(); + response.setId(msg); + response.setVersion(version); + response.setResponse(clientDetail); + return new ResponseEntity<>(response, HttpStatus.OK); } } diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/service/impl/ClientManagementServiceImpl.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/service/impl/ClientManagementServiceImpl.java index 426514f995..eccf2449d3 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/service/impl/ClientManagementServiceImpl.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/service/impl/ClientManagementServiceImpl.java @@ -8,6 +8,9 @@ import java.util.Map; import java.util.Optional; import java.util.Set; + +import io.mosip.pms.device.util.AuditUtil; +import io.mosip.pms.oidc.client.contant.ClientServiceAuditEnum; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.env.Environment; import org.springframework.http.MediaType; @@ -96,6 +99,9 @@ public class ClientManagementServiceImpl implements ClientManagementService { @Autowired RestUtil restUtil; + @Autowired + AuditUtil auditUtil; + @Autowired private Environment environment; @@ -112,29 +118,39 @@ public ClientDetailResponse createOIDCClient(ClientDetailCreateRequest createReq Optional result = clientDetailRepository.findById(clientId); if (result.isPresent()) { LOGGER.error("createOIDCClient::Client with name {} already exists", createRequest.getName()); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT_FAILURE, createRequest.getName(), + "clientID"); throw new PartnerServiceException(ErrorCode.DUPLICATE_CLIENT.getErrorCode(), ErrorCode.DUPLICATE_CLIENT.getErrorMessage()); } Optional partner = partnerRepository.findById(createRequest.getAuthPartnerId()); if(partner.isEmpty()) { LOGGER.error("createOIDCClient::AuthPartner with Id {} doesn't exists", createRequest.getAuthPartnerId()); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT_FAILURE, createRequest.getName(), + "clientID"); throw new PartnerServiceException(ErrorCode.INVALID_PARTNERID.getErrorCode(), String .format(ErrorCode.INVALID_PARTNERID.getErrorMessage(), createRequest.getAuthPartnerId())); } if(!partner.get().getPartnerTypeCode().equalsIgnoreCase(AUTH_PARTNER_TYPE)) { LOGGER.error("createOIDCClient::{} cannot create OIDC Client", partner.get().getPartnerTypeCode()); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT_FAILURE, createRequest.getName(), + "clientID"); throw new PartnerServiceException(ErrorCode.INVALID_PARTNER_TYPE.getErrorCode(), String .format(ErrorCode.INVALID_PARTNER_TYPE.getErrorMessage(), partner.get().getPartnerTypeCode())); } Optional policyFromDb = authPolicyRepository.findById(createRequest.getPolicyId()); if (!policyFromDb.isPresent()) { LOGGER.error("createOIDCClient::Policy with Id {} not exists", createRequest.getPolicyId()); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT_FAILURE, createRequest.getName(), + "clientID"); throw new PartnerServiceException(ErrorCode.POLICY_NOT_EXIST.getErrorCode(), ErrorCode.POLICY_NOT_EXIST.getErrorMessage()); } AuthPolicy policy = policyFromDb.get(); if(!policy.getPolicy_type().equals(AUTH_POLICY_TYPE)) { LOGGER.error("createOIDCClient::Policy Type Mismatch. {} policy cannot be used to create OIDC Client",policy.getPolicy_type()); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT_FAILURE, createRequest.getName(), + "clientID"); throw new PartnerServiceException(ErrorCode.PARTNER_POLICY_TYPE_MISMATCH.getErrorCode(), String .format(ErrorCode.PARTNER_POLICY_TYPE_MISMATCH.getErrorMessage())); } @@ -143,6 +159,8 @@ public ClientDetailResponse createOIDCClient(ClientDetailCreateRequest createReq if (policyMappingReqFromDb.isEmpty()) { LOGGER.error("createOIDCClient::Policy and partner mapping not exists for policy {} and partner {}", createRequest.getPolicyId(), createRequest.getAuthPartnerId()); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT_FAILURE, createRequest.getName(), + "clientID"); throw new PartnerServiceException(ErrorCode.PARTNER_POLICY_MAPPING_NOT_EXISTS.getErrorCode(), ErrorCode.PARTNER_POLICY_MAPPING_NOT_EXISTS.getErrorMessage()); } @@ -152,6 +170,8 @@ public ClientDetailResponse createOIDCClient(ClientDetailCreateRequest createReq "createOIDCClient::Policy and partner mapping is not approved for policy {} and partner {} and status {}", createRequest.getPolicyId(), createRequest.getAuthPartnerId(), policyMappingReqFromDb.get(0).getStatusCode().equalsIgnoreCase("approved")); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT_FAILURE, createRequest.getName(), + "clientID"); throw new PartnerServiceException(ErrorCode.PARTNER_POLICY_NOT_APPROVED.getErrorCode(), ErrorCode.PARTNER_POLICY_NOT_APPROVED.getErrorMessage()); } @@ -169,6 +189,7 @@ public ClientDetailResponse createOIDCClient(ClientDetailCreateRequest createReq if (claims.isEmpty()) { LOGGER.error( "createOIDCClient::Partner has no User Claims"); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT_FAILURE); throw new PartnerServiceException(ErrorCode.PARTNER_HAVING_NO_CLAIMS.getErrorCode(), ErrorCode.PARTNER_HAVING_NO_CLAIMS.getErrorMessage()); } @@ -178,6 +199,7 @@ public ClientDetailResponse createOIDCClient(ClientDetailCreateRequest createReq if (acrValues.isEmpty()) { LOGGER.error( "createOIDCClient::Partner has no User Claims"); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT_FAILURE); throw new PartnerServiceException(ErrorCode.PARTNER_HAVING_NO_ACRVALUES.getErrorCode(), ErrorCode.PARTNER_HAVING_NO_ACRVALUES.getErrorMessage()); } @@ -192,7 +214,9 @@ public ClientDetailResponse createOIDCClient(ClientDetailCreateRequest createReq clientDetailRepository.save(clientDetail); var response = new ClientDetailResponse(); response.setClientId(clientDetail.getId()); - response.setStatus(clientDetail.getStatus()); + response.setStatus(clientDetail.getStatus()); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT_SUCCESS,createRequest.getName(), + "clientID"); return response; } @@ -367,6 +391,7 @@ public ClientDetailResponse updateOIDCClient(String clientId, ClientDetailUpdate Optional result = clientDetailRepository.findById(clientId); if (!result.isPresent()) { LOGGER.error("updateOIDCClient::Client not exists with id {}", clientId); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.UPDATE_CLIENT_FAILURE); throw new PartnerServiceException(ErrorCode.CLIENT_NOT_EXISTS.getErrorCode(), ErrorCode.CLIENT_NOT_EXISTS.getErrorMessage()); } @@ -385,8 +410,9 @@ public ClientDetailResponse updateOIDCClient(String clientId, ClientDetailUpdate response.setClientId(clientDetail.getId()); response.setStatus(clientDetail.getStatus()); notify(MapperUtils.mapClientDataToPublishDto(clientDetail), EventType.OIDC_CLIENT_UPDATED); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.UPDATE_CLIENT_SUCCESS); return response; - } + } /** * From 3e7f0206238afe0ba3c5600d58675fdacec012ba Mon Sep 17 00:00:00 2001 From: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:58:26 +0530 Subject: [PATCH 25/74] Remove Commented Codes Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../oidc/client/controller/ClientManagementController.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java index b954a04f52..0e912754dd 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java @@ -36,13 +36,10 @@ public class ClientManagementController { @RequestMapping(value = "/oidc/client", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> createClient( @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { - //var clientRespDto = clientManagementService.createOIDCClient(requestWrapper.getRequest()); ResponseWrapper response = new ResponseWrapper<>(); - //var response = new ResponseWrapper(); ClientDetailResponse clientDetailResponse = null; auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT,requestWrapper.getRequest().getName(),"clientID"); clientDetailResponse = clientManagementService.createOIDCClient(requestWrapper.getRequest()); - //response.setResponse(clientRespDto); response.setId(requestWrapper.getId()); response.setVersion(requestWrapper.getVersion()); response.setResponse(clientDetailResponse); @@ -52,9 +49,7 @@ public ResponseEntity> createClient( @RequestMapping(value = "/oidc/client/{client_id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> updateClient(@PathVariable("client_id") String clientId, @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { - //var clientRespDto = clientManagementService.updateOIDCClient(clientId, requestWrapper.getRequest()); ResponseWrapper response = new ResponseWrapper<>(); - //var response = new ResponseWrapper(); ClientDetailResponse clientDetailResponse = null; ClientDetailUpdateRequest updateRequest = requestWrapper.getRequest(); auditUtil.setAuditRequestDto(ClientServiceAuditEnum.UPDATE_CLIENT, clientId, "clientID"); @@ -71,7 +66,6 @@ public ResponseEntity> getClient(@PathVariable("cl ResponseWrapper response = new ResponseWrapper<>(); ClientDetail clientDetail = null; clientDetail = clientManagementService.getClientDetails(clientId); - //var response = new ResponseWrapper(); response.setId(msg); response.setVersion(version); response.setResponse(clientDetail); From 309542bc9764162e009705b4e7288c08cfb63fbb Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Thu, 13 Apr 2023 09:31:30 +0530 Subject: [PATCH 26/74] Updated EvenID's Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../oidc/client/contant/ClientServiceAuditEnum.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java index 68e5177602..3787e12d40 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java @@ -4,22 +4,22 @@ public enum ClientServiceAuditEnum { - CREATE_CLIENT("PMS_PRT_100", AuditConstant.AUDIT_SYSTEM, "POST CREATE OIDC CLIENT", + CREATE_CLIENT("PMS_PRT_300", AuditConstant.AUDIT_SYSTEM, "POST CREATE OIDC CLIENT", "Creating the OIDC Client", AuditConstant.PARTNER_MODULE_ID, AuditConstant.PARTNER_MODULE_NAME, "NO_ID", "NO_ID_TYPE", AuditConstant.APPLICATION_NAME, AuditConstant.APPLICATION_ID), - CREATE_CLIENT_SUCCESS("PMS_PRT_200", AuditConstant.AUDIT_SYSTEM, "POST CREATE OIDC CLIENT", + CREATE_CLIENT_SUCCESS("PMS_PRT_301", AuditConstant.AUDIT_SYSTEM, "POST CREATE OIDC CLIENT", "Creating the OIDC Client Success", AuditConstant.PARTNER_MODULE_ID, AuditConstant.PARTNER_MODULE_NAME, "NO_ID", "NO_ID_TYPE", AuditConstant.APPLICATION_NAME, AuditConstant.APPLICATION_ID), - CREATE_CLIENT_FAILURE("PMS_PRT_300", AuditConstant.AUDIT_SYSTEM, "POST CREATE OIDC CLIENT", + CREATE_CLIENT_FAILURE("PMS_PRT_302", AuditConstant.AUDIT_SYSTEM, "POST CREATE OIDC CLIENT", "Creating the OIDC Client Failed", AuditConstant.PARTNER_MODULE_ID, AuditConstant.PARTNER_MODULE_NAME, "NO_ID", "NO_ID_TYPE", AuditConstant.APPLICATION_NAME, AuditConstant.APPLICATION_ID), - UPDATE_CLIENT("PMS_PRT_600", AuditConstant.AUDIT_SYSTEM, "PUT UPDATE OIDC CLIENT", + UPDATE_CLIENT("PMS_PRT_303", AuditConstant.AUDIT_SYSTEM, "PUT UPDATE OIDC CLIENT", "Updating OIDC Client", AuditConstant.PARTNER_MODULE_ID, AuditConstant.PARTNER_MODULE_NAME, "NO_ID", "NO_ID_TYPE", AuditConstant.APPLICATION_NAME, AuditConstant.APPLICATION_ID), - UPDATE_CLIENT_SUCCESS("PMS_PRT_700", AuditConstant.AUDIT_SYSTEM, "PUT UPDATE OIDC CLIENT", + UPDATE_CLIENT_SUCCESS("PMS_PRT_304", AuditConstant.AUDIT_SYSTEM, "PUT UPDATE OIDC CLIENT", "Updating OIDC Client Success", AuditConstant.PARTNER_MODULE_ID, AuditConstant.PARTNER_MODULE_NAME, "NO_ID", "NO_ID_TYPE", AuditConstant.APPLICATION_NAME, AuditConstant.APPLICATION_ID), - UPDATE_CLIENT_FAILURE("PMS_PRT_800", AuditConstant.AUDIT_SYSTEM, "PUT UPDATE OIDC CLIENT", + UPDATE_CLIENT_FAILURE("PMS_PRT_305", AuditConstant.AUDIT_SYSTEM, "PUT UPDATE OIDC CLIENT", "Updating OIDC Client Failed", AuditConstant.PARTNER_MODULE_ID, AuditConstant.PARTNER_MODULE_NAME, "NO_ID", "NO_ID_TYPE", AuditConstant.APPLICATION_NAME, AuditConstant.APPLICATION_ID); From 611ef09cd8b8b5550304a1c0cba4891d79ba06f9 Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Thu, 13 Apr 2023 09:56:09 +0530 Subject: [PATCH 27/74] Updated the return type in the controller Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../ClientManagementController.java | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java index 0e912754dd..29d37eeaf1 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java @@ -34,41 +34,36 @@ public class ClientManagementController { String version = "1.0"; @RequestMapping(value = "/oidc/client", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity> createClient( + public ResponseWrapper createClient( @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { - ResponseWrapper response = new ResponseWrapper<>(); - ClientDetailResponse clientDetailResponse = null; + var clientRespDto = clientManagementService.createOIDCClient(requestWrapper.getRequest()); + var response = new ResponseWrapper(); auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT,requestWrapper.getRequest().getName(),"clientID"); - clientDetailResponse = clientManagementService.createOIDCClient(requestWrapper.getRequest()); response.setId(requestWrapper.getId()); response.setVersion(requestWrapper.getVersion()); - response.setResponse(clientDetailResponse); - return new ResponseEntity<>(response, HttpStatus.OK); + response.setResponse(clientRespDto); + return response; } @RequestMapping(value = "/oidc/client/{client_id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity> updateClient(@PathVariable("client_id") String clientId, + public ResponseWrapper updateClient(@PathVariable("client_id") String clientId, @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { - ResponseWrapper response = new ResponseWrapper<>(); - ClientDetailResponse clientDetailResponse = null; - ClientDetailUpdateRequest updateRequest = requestWrapper.getRequest(); + var clientRespDto = clientManagementService.updateOIDCClient(clientId, requestWrapper.getRequest()); + var response = new ResponseWrapper(); auditUtil.setAuditRequestDto(ClientServiceAuditEnum.UPDATE_CLIENT, clientId, "clientID"); - clientDetailResponse = clientManagementService.updateOIDCClient(clientId, updateRequest); response.setId(requestWrapper.getId()); response.setVersion(requestWrapper.getVersion()); - response.setResponse(clientDetailResponse); - return new ResponseEntity<>(response, HttpStatus.OK); + response.setResponse(clientRespDto); + return response; } @RequestMapping(value = "/oidc/client/{client_id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity> getClient(@PathVariable("client_id") String clientId) + public ResponseWrapper getClient(@PathVariable("client_id") String clientId) throws Exception { - ResponseWrapper response = new ResponseWrapper<>(); - ClientDetail clientDetail = null; - clientDetail = clientManagementService.getClientDetails(clientId); + var response = new ResponseWrapper(); + response.setResponse(clientManagementService.getClientDetails(clientId)); response.setId(msg); response.setVersion(version); - response.setResponse(clientDetail); - return new ResponseEntity<>(response, HttpStatus.OK); + return response; } } From 7fce0d6d8a9f5feaff96395d3afd0910eec5141a Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Thu, 13 Apr 2023 13:30:34 +0530 Subject: [PATCH 28/74] Removed Set Items Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../client/controller/ClientManagementController.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java index 29d37eeaf1..f2ab2c1d01 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java @@ -29,9 +29,6 @@ public class ClientManagementController { @Autowired AuditUtil auditUtil; - String msg = "mosip.clientmanagement.clients.retrieve"; - - String version = "1.0"; @RequestMapping(value = "/oidc/client", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseWrapper createClient( @@ -39,8 +36,6 @@ public ResponseWrapper createClient( var clientRespDto = clientManagementService.createOIDCClient(requestWrapper.getRequest()); var response = new ResponseWrapper(); auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT,requestWrapper.getRequest().getName(),"clientID"); - response.setId(requestWrapper.getId()); - response.setVersion(requestWrapper.getVersion()); response.setResponse(clientRespDto); return response; } @@ -51,8 +46,6 @@ public ResponseWrapper updateClient(@PathVariable("client_ var clientRespDto = clientManagementService.updateOIDCClient(clientId, requestWrapper.getRequest()); var response = new ResponseWrapper(); auditUtil.setAuditRequestDto(ClientServiceAuditEnum.UPDATE_CLIENT, clientId, "clientID"); - response.setId(requestWrapper.getId()); - response.setVersion(requestWrapper.getVersion()); response.setResponse(clientRespDto); return response; } @@ -62,8 +55,6 @@ public ResponseWrapper getClient(@PathVariable("client_id") String throws Exception { var response = new ResponseWrapper(); response.setResponse(clientManagementService.getClientDetails(clientId)); - response.setId(msg); - response.setVersion(version); return response; } } From 62f2079d8cf6b50186345cf5556fdc47dd8cf124 Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Thu, 3 Aug 2023 12:30:58 +0530 Subject: [PATCH 29/74] Added Test Cases for Increasing the coverage PMS Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../impl/FTPChipDetailServiceTest.java | 637 +++++++++++- .../impl/ClientManagementServiceImplTest.java | 923 +++++++++++++++++- .../PartnerManagementControllerTest.java | 125 +++ 3 files changed, 1671 insertions(+), 14 deletions(-) diff --git a/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/service/impl/FTPChipDetailServiceTest.java b/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/service/impl/FTPChipDetailServiceTest.java index 3879f26df4..f8728c6b8e 100644 --- a/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/service/impl/FTPChipDetailServiceTest.java +++ b/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/service/impl/FTPChipDetailServiceTest.java @@ -1,15 +1,28 @@ package io.mosip.pms.test.device.service.impl; -import static org.junit.Assert.assertTrue; +import static java.util.Collections.singletonList; +import static org.junit.Assert.*; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.*; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; +import java.io.IOException; +import java.io.InputStream; +import java.security.cert.Certificate; +import java.security.cert.CertificateFactory; +import java.sql.Timestamp; +import java.time.LocalDateTime; +import java.util.*; +import io.mosip.pms.common.constant.EventType; +import io.mosip.pms.common.dto.Type; +import io.mosip.pms.common.helper.WebSubPublisher; +import io.mosip.pms.common.request.dto.ErrorResponse; +import io.mosip.pms.device.response.dto.FtpCertDownloadResponeDto; +import io.mosip.pms.partner.dto.DataShareDto; +import io.mosip.pms.partner.dto.DataShareResponseDto; +import io.mosip.pms.partner.exception.PartnerServiceException; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; @@ -18,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.core.env.Environment; import org.springframework.data.domain.PageImpl; import org.springframework.http.MediaType; @@ -57,7 +71,7 @@ public class FTPChipDetailServiceTest { @InjectMocks private FtpChipDetailService ftpChipDetailService = new FTPChipDetailServiceImpl(); - + @Mock SearchHelper searchHelper; @@ -74,6 +88,15 @@ public class FTPChipDetailServiceTest { @Autowired private ObjectMapper objectMapper; + + @Autowired + private FTPChipDetailServiceImpl fTPChipDetailServiceImpl; + + @MockBean + private WebSubPublisher webSubPublisher; + + @MockBean + private AuditUtil auditUtil; @Autowired @Qualifier("selfTokenRestTemplate") @@ -373,4 +396,602 @@ private FtpChipCertificateRequestDto createUploadrequest(Boolean isItForRegistra FtpChipCertificateRequestDto.setPartnerDomain("doamin"); return FtpChipCertificateRequestDto; } + + @Test (expected = RequestException.class) + public void testGetDataShareurl1() { + when(environment.getProperty((String) any())).thenReturn("Property"); + when(restUtil.postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any())) + .thenThrow(new RequestException("An error occurred", "An error occurred")); + ReflectionTestUtils.invokeMethod(ftpChipDetailService,"getDataShareurl","https://pmp.partner.testgetdata.share.url"); + verify(environment).getProperty((String) any()); + verify(restUtil).postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any()); + } + + @Test + public void testGetDataShareurl2() { + when(environment.getProperty((String) any())).thenReturn("Property"); + + DataShareDto dataShareDto = new DataShareDto(); + dataShareDto.setPolicyId("policyId"); + dataShareDto.setSignature("certsChain"); + dataShareDto.setSubscriberId("42"); + dataShareDto.setTransactionsAllowed(7); + dataShareDto.setUrl("https://pmp.partner.testgetdata.share.url"); + dataShareDto.setValidForInMinutes(1); + + DataShareResponseDto dataShareResponseDto = new DataShareResponseDto(); + dataShareResponseDto.setDataShare(dataShareDto); + dataShareResponseDto.setErrors(new ArrayList<>()); + dataShareResponseDto.setId("id"); + dataShareResponseDto.setResponsetime("certsChain"); + dataShareResponseDto.setVersion("1.0"); + when(restUtil.postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any())).thenReturn(dataShareResponseDto); + assertEquals("https://pmp.partner.testgetdata.share.url", + ReflectionTestUtils.invokeMethod(ftpChipDetailService,"getDataShareurl","https://pmp.partner.testgetdata.share.url")); + verify(environment).getProperty((String) any()); + verify(restUtil).postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any()); + } + + @Test (expected = PartnerServiceException.class) + public void testGetDataShareurl3() { + when(environment.getProperty((String) any())).thenReturn("Property"); + when(restUtil.postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any())).thenReturn(null); + ReflectionTestUtils.invokeMethod(ftpChipDetailService,"getDataShareurl","https://pmp.partner.testgetdata.share.url"); + verify(environment).getProperty((String) any()); + verify(restUtil).postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any()); + } + + @Test (expected = PartnerServiceException.class) + public void testGetDataShareurl4() { + when(environment.getProperty((String) any())).thenReturn(""); + + DataShareDto dataShareDto = new DataShareDto(); + dataShareDto.setPolicyId("policyId"); + dataShareDto.setSignature("Signature"); + dataShareDto.setSubscriberId("id"); + dataShareDto.setTransactionsAllowed(1); + dataShareDto.setUrl("https://pmp.partner.testgetdata.share.url"); + dataShareDto.setValidForInMinutes(1); + + ErrorResponse errorResponse = new ErrorResponse(); + errorResponse.setErrorCode("An error occurred"); + errorResponse.setMessage("Not all who wander are lost"); + + ArrayList errorResponseList = new ArrayList<>(); + errorResponseList.add(errorResponse); + DataShareResponseDto dataShareResponseDto = mock(DataShareResponseDto.class); + when(dataShareResponseDto.getDataShare()).thenReturn(dataShareDto); + when(dataShareResponseDto.getErrors()).thenReturn(errorResponseList); + when(restUtil.postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any())).thenReturn(dataShareResponseDto); + ReflectionTestUtils.invokeMethod(ftpChipDetailService,"getDataShareurl","https://pmp.partner.testgetdata.share.url"); + verify(environment).getProperty((String) any()); + verify(restUtil).postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any()); + verify(dataShareResponseDto, atLeast(1)).getErrors(); + } + + @Test (expected = IllegalArgumentException.class) + public void testGetPartnerCertFromChain() throws Exception { + + ReflectionTestUtils.invokeMethod(ftpChipDetailService, "getPartnerCertFromChain", "Cert Chain"); + } + + @Test (expected = PartnerServiceException.class) + public void testGetPartnerCertFromChain2() throws Exception { + + ReflectionTestUtils.invokeMethod(ftpChipDetailService, "getPartnerCertFromChain", "PartnerServiceImpl"); + } + + @Test (expected = NullPointerException.class) + public void testGetPartnerCertFromChain3() throws Exception { + + ReflectionTestUtils.invokeMethod(ftpChipDetailService, "getPartnerCertFromChain", ""); + } + + @Test (expected = RequestException.class) + public void testUploadCertificate() throws IOException { + doNothing().when(auditUtil) + .auditRequest((String) any(), (String) any(), (String) any(), (String) any(), (String) any(), (String) any()); + + FTPChipDetail ftpChipDetail = new FTPChipDetail(); + ftpChipDetail.setActive(true); + ftpChipDetail.setApprovalStatus("Approval Status"); + ftpChipDetail.setCertificateAlias("Certificate Alias"); + ftpChipDetail.setCrBy("Cr By"); + ftpChipDetail.setCrDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDeleted(true); + ftpChipDetail.setFtpChipDetailId("ChipId"); + ftpChipDetail.setFtpProviderId("ProviderId"); + ftpChipDetail.setMake("Make"); + ftpChipDetail.setModel("Model"); + ftpChipDetail.setPartnerOrganizationName("Partner Organization Name"); + ftpChipDetail.setUpdBy("Upd By"); + ftpChipDetail.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + Optional ofResult = Optional.of(ftpChipDetail); + when(ftpChipDetailRepository.findById((String) any())).thenReturn(ofResult); + + Partner partner = new Partner(); + partner.setAdditionalInfo("Additional Info"); + partner.setAddress("abc"); + partner.setApprovalStatus("Approval Status"); + partner.setCertificateAlias("Certificate Alias"); + partner.setContactNo("Contact No"); + partner.setCrBy("Cr By"); + partner.setCrDtimes(mock(Timestamp.class)); + partner.setDelDtimes(mock(Timestamp.class)); + partner.setEmailId("emailId"); + partner.setId("Id"); + partner.setIsActive(true); + partner.setIsDeleted(false); + partner.setLangCode("eng"); + partner.setLogoUrl("https://pms.net/partner"); + partner.setName("Name"); + partner.setPartnerPolicies(new ArrayList<>()); + partner.setPartnerPolicyRequests(new ArrayList<>()); + partner.setPartnerTypeCode("Partner Type Code"); + partner.setPolicyGroupId("PolicyGroupId"); + partner.setUpdBy("Upd By"); + partner.setUpdDtimes(mock(Timestamp.class)); + partner.setUserId("UserId"); + when(partnerServiceRepository.findByIdAndIsDeletedFalseorIsDeletedIsNullAndIsActiveTrue((String) any())) + .thenReturn(partner); + ftpChipDetailService.uploadCertificate(new FtpChipCertificateRequestDto()); + verify(auditUtil).auditRequest((String) any(), (String) any(), (String) any(), (String) any(), (String) any(), + (String) any()); + verify(ftpChipDetailRepository).findById((String) any()); + verify(partnerServiceRepository).findByIdAndIsDeletedFalseorIsDeletedIsNullAndIsActiveTrue((String) any()); + } + + @Test (expected = RequestException.class) + public void testUploadCertificate2() throws IOException { + doNothing().when(auditUtil) + .auditRequest((String) any(), (String) any(), (String) any(), (String) any(), (String) any(), (String) any()); + when(ftpChipDetailRepository.findById((String) any())) + .thenThrow(new RequestException("An error occurred", "An error occurred")); + + Partner partner = new Partner(); + partner.setAdditionalInfo("Additional Info"); + partner.setAddress("abc"); + partner.setApprovalStatus("Approval Status"); + partner.setCertificateAlias("Certificate Alias"); + partner.setContactNo("Contact No"); + partner.setCrBy("Cr By"); + partner.setCrDtimes(mock(Timestamp.class)); + partner.setDelDtimes(mock(Timestamp.class)); + partner.setEmailId("emailId"); + partner.setId("Id"); + partner.setIsActive(true); + partner.setIsDeleted(false); + partner.setLangCode("eng"); + partner.setLogoUrl("https://pms.net/partner"); + partner.setName("Name"); + partner.setPartnerPolicies(new ArrayList<>()); + partner.setPartnerPolicyRequests(new ArrayList<>()); + partner.setPartnerTypeCode("Partner Type Code"); + partner.setPolicyGroupId("PolicyGroupId"); + partner.setUpdBy("Upd By"); + partner.setUpdDtimes(mock(Timestamp.class)); + partner.setUserId("UserId"); + when(partnerServiceRepository.findByIdAndIsDeletedFalseorIsDeletedIsNullAndIsActiveTrue((String) any())) + .thenReturn(partner); + ftpChipDetailService.uploadCertificate(new FtpChipCertificateRequestDto()); + verify(ftpChipDetailRepository).findById((String) any()); + verify(partnerServiceRepository).findByIdAndIsDeletedFalseorIsDeletedIsNullAndIsActiveTrue((String) any()); + } + + @Test (expected = RequestException.class) + public void testUploadCertificate3() throws IOException { + doNothing().when(auditUtil) + .auditRequest((String) any(), (String) any(), (String) any(), (String) any(), (String) any(), (String) any()); + when(ftpChipDetailRepository.findById((String) any())).thenReturn(Optional.empty()); + FTPChipDetail ftpChipDetail = mock(FTPChipDetail.class); + when(ftpChipDetail.getFtpProviderId()).thenReturn("Id"); + doNothing().when(ftpChipDetail).setActive(anyBoolean()); + doNothing().when(ftpChipDetail).setApprovalStatus((String) any()); + doNothing().when(ftpChipDetail).setCertificateAlias((String) any()); + doNothing().when(ftpChipDetail).setCrBy((String) any()); + doNothing().when(ftpChipDetail).setCrDtimes((LocalDateTime) any()); + doNothing().when(ftpChipDetail).setDelDtimes((LocalDateTime) any()); + doNothing().when(ftpChipDetail).setDeleted(anyBoolean()); + doNothing().when(ftpChipDetail).setFtpChipDetailId((String) any()); + doNothing().when(ftpChipDetail).setFtpProviderId((String) any()); + doNothing().when(ftpChipDetail).setMake((String) any()); + doNothing().when(ftpChipDetail).setModel((String) any()); + doNothing().when(ftpChipDetail).setPartnerOrganizationName((String) any()); + doNothing().when(ftpChipDetail).setUpdBy((String) any()); + doNothing().when(ftpChipDetail).setUpdDtimes((LocalDateTime) any()); + ftpChipDetail.setActive(true); + ftpChipDetail.setApprovalStatus("Approval Status"); + ftpChipDetail.setCertificateAlias("Certificate Alias"); + ftpChipDetail.setCrBy("Cr By"); + ftpChipDetail.setCrDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDeleted(false); + ftpChipDetail.setFtpChipDetailId("ChipId"); + ftpChipDetail.setFtpProviderId("ProviderId"); + ftpChipDetail.setMake("Make"); + ftpChipDetail.setModel("Model"); + ftpChipDetail.setPartnerOrganizationName("Partner Organization Name"); + ftpChipDetail.setUpdBy("Upd By"); + ftpChipDetail.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + + Partner partner = new Partner(); + partner.setAdditionalInfo("Additional Info"); + partner.setAddress("abc"); + partner.setApprovalStatus("Approval Status"); + partner.setCertificateAlias("Certificate Alias"); + partner.setContactNo("9087654321"); + partner.setCrBy("Cr By"); + partner.setCrDtimes(mock(Timestamp.class)); + partner.setDelDtimes(mock(Timestamp.class)); + partner.setEmailId("emailId"); + partner.setId("Id"); + partner.setIsActive(true); + partner.setIsDeleted(false); + partner.setLangCode("eng"); + partner.setLogoUrl("https://pms.net/partner"); + partner.setName("Name"); + partner.setPartnerPolicies(new ArrayList<>()); + partner.setPartnerPolicyRequests(new ArrayList<>()); + partner.setPartnerTypeCode("Partner Type Code"); + partner.setPolicyGroupId("PolicyGroupId"); + partner.setUpdBy("Upd By"); + partner.setUpdDtimes(mock(Timestamp.class)); + partner.setUserId("UserId"); + when(partnerServiceRepository.findByIdAndIsDeletedFalseorIsDeletedIsNullAndIsActiveTrue((String) any())) + .thenReturn(partner); + ftpChipDetailService.uploadCertificate(new FtpChipCertificateRequestDto()); + verify(auditUtil).auditRequest((String) any(), (String) any(), (String) any(), (String) any(), (String) any(), + (String) any()); + verify(ftpChipDetailRepository).findById((String) any()); + verify(ftpChipDetail).setActive(anyBoolean()); + verify(ftpChipDetail).setApprovalStatus((String) any()); + verify(ftpChipDetail).setCertificateAlias((String) any()); + verify(ftpChipDetail).setCrBy((String) any()); + verify(ftpChipDetail).setCrDtimes((LocalDateTime) any()); + verify(ftpChipDetail).setDelDtimes((LocalDateTime) any()); + verify(ftpChipDetail).setDeleted(anyBoolean()); + verify(ftpChipDetail).setFtpChipDetailId((String) any()); + verify(ftpChipDetail).setFtpProviderId((String) any()); + verify(ftpChipDetail).setMake((String) any()); + verify(ftpChipDetail).setModel((String) any()); + verify(ftpChipDetail).setPartnerOrganizationName((String) any()); + verify(ftpChipDetail).setUpdBy((String) any()); + verify(ftpChipDetail).setUpdDtimes((LocalDateTime) any()); + verify(partnerServiceRepository).findByIdAndIsDeletedFalseorIsDeletedIsNullAndIsActiveTrue((String) any()); + } + + @Test (expected = RequestException.class) + public void testUploadCertificate4() throws IOException { + doNothing().when(auditUtil) + .auditRequest((String) any(), (String) any(), (String) any(), (String) any(), (String) any(), (String) any()); + when(environment.getProperty((String) any())).thenReturn("Property"); + FTPChipDetail ftpChipDetail = mock(FTPChipDetail.class); + when(ftpChipDetail.getFtpChipDetailId()).thenReturn("ChipId"); + when(ftpChipDetail.getFtpProviderId()).thenReturn("ProviderId"); + doNothing().when(ftpChipDetail).setActive(anyBoolean()); + doNothing().when(ftpChipDetail).setApprovalStatus((String) any()); + doNothing().when(ftpChipDetail).setCertificateAlias((String) any()); + doNothing().when(ftpChipDetail).setCrBy((String) any()); + doNothing().when(ftpChipDetail).setCrDtimes((LocalDateTime) any()); + doNothing().when(ftpChipDetail).setDelDtimes((LocalDateTime) any()); + doNothing().when(ftpChipDetail).setDeleted(anyBoolean()); + doNothing().when(ftpChipDetail).setFtpChipDetailId((String) any()); + doNothing().when(ftpChipDetail).setFtpProviderId((String) any()); + doNothing().when(ftpChipDetail).setMake((String) any()); + doNothing().when(ftpChipDetail).setModel((String) any()); + doNothing().when(ftpChipDetail).setPartnerOrganizationName((String) any()); + doNothing().when(ftpChipDetail).setUpdBy((String) any()); + doNothing().when(ftpChipDetail).setUpdDtimes((LocalDateTime) any()); + ftpChipDetail.setActive(true); + ftpChipDetail.setApprovalStatus("Approval Status"); + ftpChipDetail.setCertificateAlias("Certificate Alias"); + ftpChipDetail.setCrBy("Cr By"); + ftpChipDetail.setCrDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDeleted(false); + ftpChipDetail.setFtpChipDetailId("ChipId"); + ftpChipDetail.setFtpProviderId("ProviderId"); + ftpChipDetail.setMake("Make"); + ftpChipDetail.setModel("Model"); + ftpChipDetail.setPartnerOrganizationName("Partner Organization Name"); + ftpChipDetail.setUpdBy("Upd By"); + ftpChipDetail.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + Optional ofResult = Optional.of(ftpChipDetail); + when(ftpChipDetailRepository.findById((String) any())).thenReturn(ofResult); + + Partner partner = new Partner(); + partner.setAdditionalInfo("Additional Info"); + partner.setAddress("abc"); + partner.setApprovalStatus("Approval Status"); + partner.setCertificateAlias("Certificate Alias"); + partner.setContactNo("9087654321"); + partner.setCrBy("Cr By"); + partner.setCrDtimes(mock(Timestamp.class)); + partner.setDelDtimes(mock(Timestamp.class)); + partner.setEmailId("emailId"); + partner.setId("Id"); + partner.setIsActive(true); + partner.setIsDeleted(false); + partner.setLangCode("eng"); + partner.setLogoUrl("https://pms.net/partner"); + partner.setName("Name"); + partner.setPartnerPolicies(new ArrayList<>()); + partner.setPartnerPolicyRequests(new ArrayList<>()); + partner.setPartnerTypeCode("Partner Type Code"); + partner.setPolicyGroupId("PolicyGroupId"); + partner.setUpdBy("Upd By"); + partner.setUpdDtimes(mock(Timestamp.class)); + partner.setUserId("UserId"); + when(partnerServiceRepository.findByIdAndIsDeletedFalseorIsDeletedIsNullAndIsActiveTrue((String) any())) + .thenReturn(partner); + when(restUtil.postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any())) + .thenThrow(new RequestException("An error occurred", "An error occurred")); + ftpChipDetailService.uploadCertificate(new FtpChipCertificateRequestDto("ProviderId", "ChipId", true, "Certificate Data", + "Organization Name", "Partner Domain")); + verify(environment).getProperty((String) any()); + verify(ftpChipDetailRepository).findById((String) any()); + verify(ftpChipDetail).getFtpChipDetailId(); + verify(ftpChipDetail).getFtpProviderId(); + verify(ftpChipDetail).setActive(anyBoolean()); + verify(ftpChipDetail).setApprovalStatus((String) any()); + verify(ftpChipDetail).setCertificateAlias((String) any()); + verify(ftpChipDetail).setCrBy((String) any()); + verify(ftpChipDetail).setCrDtimes((LocalDateTime) any()); + verify(ftpChipDetail).setDelDtimes((LocalDateTime) any()); + verify(ftpChipDetail).setDeleted(anyBoolean()); + verify(ftpChipDetail).setFtpChipDetailId((String) any()); + verify(ftpChipDetail).setFtpProviderId((String) any()); + verify(ftpChipDetail).setMake((String) any()); + verify(ftpChipDetail).setModel((String) any()); + verify(ftpChipDetail).setPartnerOrganizationName((String) any()); + verify(ftpChipDetail).setUpdBy((String) any()); + verify(ftpChipDetail).setUpdDtimes((LocalDateTime) any()); + verify(partnerServiceRepository).findByIdAndIsDeletedFalseorIsDeletedIsNullAndIsActiveTrue((String) any()); + verify(restUtil).postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any()); + } + + @Test (expected = RequestException.class) + public void testGetCertificate() throws IOException { + doNothing().when(auditUtil) + .auditRequest((String) any(), (String) any(), (String) any(), (String) any(), (String) any(), (String) any()); + when(environment.getProperty((String) any())).thenReturn("Property"); + + FTPChipDetail ftpChipDetail = new FTPChipDetail(); + ftpChipDetail.setActive(true); + ftpChipDetail.setApprovalStatus("Approval Status"); + ftpChipDetail.setCertificateAlias("Certificate Alias"); + ftpChipDetail.setCrBy("Cr By"); + ftpChipDetail.setCrDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDeleted(false); + ftpChipDetail.setFtpChipDetailId("ChipId"); + ftpChipDetail.setFtpProviderId("ProviderId"); + ftpChipDetail.setMake("Make"); + ftpChipDetail.setModel("Model"); + ftpChipDetail.setPartnerOrganizationName("Partner Organization Name"); + ftpChipDetail.setUpdBy("Upd By"); + ftpChipDetail.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + Optional ofResult = Optional.of(ftpChipDetail); + when(ftpChipDetailRepository.findById((String) any())).thenReturn(ofResult); + when(restUtil.getApi((String) any(), (Map) any(), (Class) any())) + .thenThrow(new RequestException("An error occurred", "An error occurred")); + ftpChipDetailService.getCertificate(new FtpChipCertDownloadRequestDto("ChipId")); + verify(environment).getProperty((String) any()); + verify(ftpChipDetailRepository).findById((String) any()); + verify(restUtil).getApi((String) any(), (Map) any(), (Class) any()); + } + + @Test (expected = RequestException.class) + public void testGetCertificate2() throws IOException { + doNothing().when(auditUtil) + .auditRequest((String) any(), (String) any(), (String) any(), (String) any(), (String) any(), (String) any()); + when(environment.getProperty((String) any())).thenReturn("Property"); + FTPChipDetail ftpChipDetail = mock(FTPChipDetail.class); + when(ftpChipDetail.getCertificateAlias()).thenReturn(null); + doNothing().when(ftpChipDetail).setActive(anyBoolean()); + doNothing().when(ftpChipDetail).setApprovalStatus((String) any()); + doNothing().when(ftpChipDetail).setCertificateAlias((String) any()); + doNothing().when(ftpChipDetail).setCrBy((String) any()); + doNothing().when(ftpChipDetail).setCrDtimes((LocalDateTime) any()); + doNothing().when(ftpChipDetail).setDelDtimes((LocalDateTime) any()); + doNothing().when(ftpChipDetail).setDeleted(anyBoolean()); + doNothing().when(ftpChipDetail).setFtpChipDetailId((String) any()); + doNothing().when(ftpChipDetail).setFtpProviderId((String) any()); + doNothing().when(ftpChipDetail).setMake((String) any()); + doNothing().when(ftpChipDetail).setModel((String) any()); + doNothing().when(ftpChipDetail).setPartnerOrganizationName((String) any()); + doNothing().when(ftpChipDetail).setUpdBy((String) any()); + doNothing().when(ftpChipDetail).setUpdDtimes((LocalDateTime) any()); + ftpChipDetail.setActive(true); + ftpChipDetail.setApprovalStatus("Approval Status"); + ftpChipDetail.setCertificateAlias("Certificate Alias"); + ftpChipDetail.setCrBy("Cr By"); + ftpChipDetail.setCrDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDeleted(false); + ftpChipDetail.setFtpChipDetailId("ChipId"); + ftpChipDetail.setFtpProviderId("ProviderId"); + ftpChipDetail.setMake("Make"); + ftpChipDetail.setModel("Model"); + ftpChipDetail.setPartnerOrganizationName("Partner Organization Name"); + ftpChipDetail.setUpdBy("Upd By"); + ftpChipDetail.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + Optional ofResult = Optional.of(ftpChipDetail); + when(ftpChipDetailRepository.findById((String) any())).thenReturn(ofResult); + when(restUtil.getApi((String) any(), (Map) any(), (Class) any())).thenReturn("Api"); + ftpChipDetailService.getCertificate(new FtpChipCertDownloadRequestDto("ChipId")); + verify(auditUtil).auditRequest((String) any(), (String) any(), (String) any(), (String) any(), (String) any(), + (String) any()); + verify(ftpChipDetailRepository).findById((String) any()); + verify(ftpChipDetail).getCertificateAlias(); + verify(ftpChipDetail).setActive(anyBoolean()); + verify(ftpChipDetail).setApprovalStatus((String) any()); + verify(ftpChipDetail).setCertificateAlias((String) any()); + verify(ftpChipDetail).setCrBy((String) any()); + verify(ftpChipDetail).setCrDtimes((LocalDateTime) any()); + verify(ftpChipDetail).setDelDtimes((LocalDateTime) any()); + verify(ftpChipDetail).setDeleted(anyBoolean()); + verify(ftpChipDetail).setFtpChipDetailId((String) any()); + verify(ftpChipDetail).setFtpProviderId((String) any()); + verify(ftpChipDetail).setMake((String) any()); + verify(ftpChipDetail).setModel((String) any()); + verify(ftpChipDetail).setPartnerOrganizationName((String) any()); + verify(ftpChipDetail).setUpdBy((String) any()); + verify(ftpChipDetail).setUpdDtimes((LocalDateTime) any()); + } + + @Test (expected = RequestException.class) + public void testGetCertificate4() throws IOException { + doNothing().when(auditUtil) + .auditRequest((String) any(), (String) any(), (String) any(), (String) any(), (String) any(), (String) any()); + when(environment.getProperty((String) any())).thenReturn("Property"); + when(ftpChipDetailRepository.findById((String) any())).thenReturn(Optional.empty()); + FTPChipDetail ftpChipDetail = mock(FTPChipDetail.class); + when(ftpChipDetail.getCertificateAlias()).thenReturn("Certificate Alias"); + doNothing().when(ftpChipDetail).setActive(anyBoolean()); + doNothing().when(ftpChipDetail).setApprovalStatus((String) any()); + doNothing().when(ftpChipDetail).setCertificateAlias((String) any()); + doNothing().when(ftpChipDetail).setCrBy((String) any()); + doNothing().when(ftpChipDetail).setCrDtimes((LocalDateTime) any()); + doNothing().when(ftpChipDetail).setDelDtimes((LocalDateTime) any()); + doNothing().when(ftpChipDetail).setDeleted(anyBoolean()); + doNothing().when(ftpChipDetail).setFtpChipDetailId((String) any()); + doNothing().when(ftpChipDetail).setFtpProviderId((String) any()); + doNothing().when(ftpChipDetail).setMake((String) any()); + doNothing().when(ftpChipDetail).setModel((String) any()); + doNothing().when(ftpChipDetail).setPartnerOrganizationName((String) any()); + doNothing().when(ftpChipDetail).setUpdBy((String) any()); + doNothing().when(ftpChipDetail).setUpdDtimes((LocalDateTime) any()); + ftpChipDetail.setActive(true); + ftpChipDetail.setApprovalStatus("Approval Status"); + ftpChipDetail.setCertificateAlias("Certificate Alias"); + ftpChipDetail.setCrBy("Cr By"); + ftpChipDetail.setCrDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDeleted(false); + ftpChipDetail.setFtpChipDetailId("ChipId"); + ftpChipDetail.setFtpProviderId("ProviderId"); + ftpChipDetail.setMake("Make"); + ftpChipDetail.setModel("Model"); + ftpChipDetail.setPartnerOrganizationName("Partner Organization Name"); + ftpChipDetail.setUpdBy("Upd By"); + ftpChipDetail.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + when(restUtil.getApi((String) any(), (Map) any(), (Class) any())).thenReturn("Api"); + ftpChipDetailService.getCertificate(new FtpChipCertDownloadRequestDto("ChipId")); + verify(auditUtil).auditRequest((String) any(), (String) any(), (String) any(), (String) any(), (String) any(), + (String) any()); + verify(ftpChipDetailRepository).findById((String) any()); + verify(ftpChipDetail).setActive(anyBoolean()); + verify(ftpChipDetail).setApprovalStatus((String) any()); + verify(ftpChipDetail).setCertificateAlias((String) any()); + verify(ftpChipDetail).setCrBy((String) any()); + verify(ftpChipDetail).setCrDtimes((LocalDateTime) any()); + verify(ftpChipDetail).setDelDtimes((LocalDateTime) any()); + verify(ftpChipDetail).setDeleted(anyBoolean()); + verify(ftpChipDetail).setFtpChipDetailId((String) any()); + verify(ftpChipDetail).setFtpProviderId((String) any()); + verify(ftpChipDetail).setMake((String) any()); + verify(ftpChipDetail).setModel((String) any()); + verify(ftpChipDetail).setPartnerOrganizationName((String) any()); + verify(ftpChipDetail).setUpdBy((String) any()); + verify(ftpChipDetail).setUpdDtimes((LocalDateTime) any()); + } + + + @Test (expected = IllegalArgumentException.class) + @Ignore + public void testGetCertificate5() throws IOException { + doNothing().when(auditUtil) + .auditRequest((String) any(), (String) any(), (String) any(), (String) any(), (String) any(), (String) any()); + when(environment.getProperty((String) any())).thenReturn("Property"); + FTPChipDetail ftpChipDetail = mock(FTPChipDetail.class); + when(ftpChipDetail.getCertificateAlias()).thenReturn("Certificate Alias"); + doNothing().when(ftpChipDetail).setActive(anyBoolean()); + doNothing().when(ftpChipDetail).setApprovalStatus((String) any()); + doNothing().when(ftpChipDetail).setCertificateAlias((String) any()); + doNothing().when(ftpChipDetail).setCrBy((String) any()); + doNothing().when(ftpChipDetail).setCrDtimes((LocalDateTime) any()); + doNothing().when(ftpChipDetail).setDelDtimes((LocalDateTime) any()); + doNothing().when(ftpChipDetail).setDeleted(anyBoolean()); + doNothing().when(ftpChipDetail).setFtpChipDetailId((String) any()); + doNothing().when(ftpChipDetail).setFtpProviderId((String) any()); + doNothing().when(ftpChipDetail).setMake((String) any()); + doNothing().when(ftpChipDetail).setModel((String) any()); + doNothing().when(ftpChipDetail).setPartnerOrganizationName((String) any()); + doNothing().when(ftpChipDetail).setUpdBy((String) any()); + doNothing().when(ftpChipDetail).setUpdDtimes((LocalDateTime) any()); + ftpChipDetail.setActive(true); + ftpChipDetail.setApprovalStatus("Approval Status"); + ftpChipDetail.setCertificateAlias("Certificate Alias"); + ftpChipDetail.setCrBy("Cr By"); + ftpChipDetail.setCrDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + ftpChipDetail.setDeleted(false); + ftpChipDetail.setFtpChipDetailId("ChipId"); + ftpChipDetail.setFtpProviderId("ProviderId"); + ftpChipDetail.setMake("Make"); + ftpChipDetail.setModel("Model"); + ftpChipDetail.setPartnerOrganizationName("Partner Organization Name"); + ftpChipDetail.setUpdBy("Upd By"); + ftpChipDetail.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + Optional ofResult = Optional.of(ftpChipDetail); + when(ftpChipDetailRepository.findById((String) any())).thenReturn(ofResult); + + FtpCertDownloadResponeDto ftpCertDownloadResponeDto = new FtpCertDownloadResponeDto(); + ftpCertDownloadResponeDto.setCertificateData("Certificate Data"); + ftpCertDownloadResponeDto.setTimestamp(LocalDateTime.of(1, 1, 1, 1, 1)); + when(objectMapper.readValue((String) any(), (Class) any())) + .thenReturn(ftpCertDownloadResponeDto); + when(objectMapper.writeValueAsString((Object) any())).thenReturn("42"); + when(restUtil.getApi((String) any(), (Map) any(), (Class) any())) + .thenReturn(new HashMap<>()); + assertSame(ftpCertDownloadResponeDto, + ftpChipDetailService.getCertificate(new FtpChipCertDownloadRequestDto("ChipId"))); + verify(environment).getProperty((String) any()); + verify(ftpChipDetailRepository).findById((String) any()); + verify(ftpChipDetail, atLeast(1)).getCertificateAlias(); + verify(ftpChipDetail).setActive(anyBoolean()); + verify(ftpChipDetail).setApprovalStatus((String) any()); + verify(ftpChipDetail).setCertificateAlias((String) any()); + verify(ftpChipDetail).setCrBy((String) any()); + verify(ftpChipDetail).setCrDtimes((LocalDateTime) any()); + verify(ftpChipDetail).setDelDtimes((LocalDateTime) any()); + verify(ftpChipDetail).setDeleted(anyBoolean()); + verify(ftpChipDetail).setFtpChipDetailId((String) any()); + verify(ftpChipDetail).setFtpProviderId((String) any()); + verify(ftpChipDetail).setMake((String) any()); + verify(ftpChipDetail).setModel((String) any()); + verify(ftpChipDetail).setPartnerOrganizationName((String) any()); + verify(ftpChipDetail).setUpdBy((String) any()); + verify(ftpChipDetail).setUpdDtimes((LocalDateTime) any()); + verify(objectMapper).readValue((String) any(), (Class) any()); + verify(objectMapper).writeValueAsString((Object) any()); + verify(restUtil).getApi((String) any(), (Map) any(), (Class) any()); + } + + @Test (expected = Exception.class) + public void testNotify() { + doNothing().when(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + ReflectionTestUtils.invokeMethod(fTPChipDetailServiceImpl,"notify","Cert Data", "Partner Domain"); + verify(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + } + + @Test (expected = Exception.class) + public void testNotify2() { + doThrow(new RequestException("An error occurred", "An error occurred")).when(webSubPublisher) + .notify((EventType) any(), (Map) any(), (Type) any()); + ReflectionTestUtils.invokeMethod(fTPChipDetailServiceImpl,"notify","Cert Data", "Partner Domain"); + verify(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + } } diff --git a/partner/partner-management-service/src/test/java/io/mosip/pms/test/oidc/service/impl/ClientManagementServiceImplTest.java b/partner/partner-management-service/src/test/java/io/mosip/pms/test/oidc/service/impl/ClientManagementServiceImplTest.java index 3ab6833843..b596687461 100644 --- a/partner/partner-management-service/src/test/java/io/mosip/pms/test/oidc/service/impl/ClientManagementServiceImplTest.java +++ b/partner/partner-management-service/src/test/java/io/mosip/pms/test/oidc/service/impl/ClientManagementServiceImplTest.java @@ -1,11 +1,33 @@ package io.mosip.pms.test.oidc.service.impl; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.UndeclaredThrowableException; +import java.sql.Ref; +import java.sql.Timestamp; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.*; +import com.fasterxml.jackson.core.JsonProcessingException; +import io.mosip.pms.common.constant.EventType; +import io.mosip.pms.common.dto.ClientPublishDto; +import io.mosip.pms.common.dto.PartnerDataPublishDto; +import io.mosip.pms.common.dto.PolicyPublishDto; +import io.mosip.pms.common.dto.Type; +import io.mosip.pms.common.entity.AuthPolicy; +import io.mosip.pms.common.entity.ClientDetail; +import io.mosip.pms.common.entity.Partner; +import io.mosip.pms.common.entity.PolicyGroup; +import io.mosip.pms.common.exception.ApiAccessibleException; +import io.mosip.pms.common.repository.PartnerRepository; +import io.mosip.pms.common.util.MapperUtils; +import io.mosip.pms.device.util.AuditUtil; +import io.mosip.pms.oidc.client.contant.ClientServiceAuditEnum; +import io.mosip.pms.oidc.client.dto.*; +import io.mosip.pms.partner.response.dto.PartnerCertDownloadResponeDto; +import org.json.simple.JSONObject; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -13,9 +35,14 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.core.env.Environment; +import org.springframework.http.MediaType; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.util.ReflectionTestUtils; -import static org.junit.Assert.assertTrue; + +import static io.mosip.pms.common.util.UserDetailUtil.getLoggedInUserId; +import static org.junit.Assert.*; +import static org.mockito.Mockito.*; import com.fasterxml.jackson.databind.ObjectMapper; @@ -24,10 +51,10 @@ import io.mosip.pms.common.repository.ClientDetailRepository; import io.mosip.pms.common.repository.PartnerPolicyRequestRepository; import io.mosip.pms.common.util.RestUtil; -import io.mosip.pms.oidc.client.dto.ClientDetailCreateRequest; import io.mosip.pms.oidc.client.service.impl.ClientManagementServiceImpl; import io.mosip.pms.partner.constant.ErrorCode; import io.mosip.pms.partner.exception.PartnerServiceException; +import org.springframework.web.multipart.MultipartFile; @RunWith(SpringRunner.class) @SpringBootTest @@ -36,6 +63,12 @@ public class ClientManagementServiceImplTest { @Autowired private ClientManagementServiceImpl serviceImpl; + @Mock + private Environment environment; + + @Mock + PartnerRepository partnerRepository; + @Mock ClientDetailRepository clientDetailRepository; @@ -45,6 +78,9 @@ public class ClientManagementServiceImplTest { @Mock PartnerPolicyRequestRepository partnerPolicyRequestRepository; + @MockBean + private AuditUtil auditUtil; + @MockBean private RestUtil restUtil; @@ -94,4 +130,879 @@ public void createClientTest() throws Exception { } } + @Test (expected = Exception.class) + public void testCreateOIDCClient02() throws Exception { + ClientDetailCreateRequest clientDetailCreateRequest = new ClientDetailCreateRequest(); + clientDetailCreateRequest.setPublicKey(new HashMap<>()); + serviceImpl.createOIDCClient(clientDetailCreateRequest); + } + + @Test (expected = Exception.class) + public void testCreateOIDCClient03() throws Exception { + ClientDetailCreateRequest clientDetailCreateRequest = mock(ClientDetailCreateRequest.class); + when(clientDetailCreateRequest.getPublicKey()).thenReturn(new HashMap<>()); + serviceImpl.createOIDCClient(clientDetailCreateRequest); + verify(clientDetailCreateRequest).getPublicKey(); + } + + @Test (expected = PartnerServiceException.class) + public void testCreateOIDCClient04() throws Exception { + ClientDetailCreateRequest createRequest = new ClientDetailCreateRequest(); + createRequest.setName("ClientName"); + createRequest.setAuthPartnerId("AuthPartnerId"); + createRequest.setPolicyId("PolicyID"); + List clientAuthMethods = new ArrayList(); + clientAuthMethods.add("private_key_jwt"); + createRequest.setClientAuthMethods(clientAuthMethods); + List setGrantTypes = new ArrayList(); + setGrantTypes.add("authorization_code"); + createRequest.setGrantTypes(setGrantTypes); + createRequest.setLogoUri("https://testcase.pms.net/browse/OIDCClient.png"); + List setRedirectUris = new ArrayList(); + setRedirectUris.add("https://testcase.pms.net/browse/OIDCClient"); + createRequest.setRedirectUris(setRedirectUris); + createRequest.setPublicKey(public_key); + + serviceImpl.createOIDCClient(createRequest); + } + + @Test (expected = PartnerServiceException.class) + public void testCreateOIDCClient05() throws Exception { + ClientDetailCreateRequest createRequest = new ClientDetailCreateRequest(); + createRequest.setName("ClientName"); + createRequest.setAuthPartnerId("AuthPartnerId"); + createRequest.setPolicyId("PolicyID"); + List clientAuthMethods = new ArrayList(); + clientAuthMethods.add("private_key_jwt"); + createRequest.setClientAuthMethods(clientAuthMethods); + List setGrantTypes = new ArrayList(); + setGrantTypes.add("authorization_code"); + createRequest.setGrantTypes(setGrantTypes); + createRequest.setLogoUri("https://testcase.pms.net/browse/OIDCClient.png"); + List setRedirectUris = new ArrayList(); + setRedirectUris.add("https://testcase.pms.net/browse/OIDCClient"); + createRequest.setRedirectUris(setRedirectUris); + createRequest.setPublicKey(public_key); + + ClientDetail clientDetail = new ClientDetail(); + clientDetail.setPublicKey("public_key"); + clientDetail.setId("clientId"); + clientDetail.setName(createRequest.getName()); + clientDetail.setRpId(createRequest.getAuthPartnerId()); + clientDetail.setPolicyId(createRequest.getPolicyId()); + clientDetail.setLogoUri(createRequest.getLogoUri()); + clientDetail.setRedirectUris(String.join(",", createRequest.getRedirectUris())); + clientDetail.setClaims("claims"); + clientDetail.setAcrValues( "acrValues"); + clientDetail.setStatus("ACTIVE"); + clientDetail.setGrantTypes(String.join(",", createRequest.getGrantTypes())); + clientDetail.setClientAuthMethods(String.join(",", createRequest.getClientAuthMethods())); + clientDetail.setCreatedDateTime(LocalDateTime.now(ZoneId.of("UTC"))); + clientDetail.setCreatedBy(getLoggedInUserId()); + + serviceImpl.createOIDCClient(createRequest); + assertEquals(createRequest,clientDetail); + } + + + @Test (expected = PartnerServiceException.class) + public void testCreateOIDCClient06() throws Exception { + + ClientDetailCreateRequest createRequest = new ClientDetailCreateRequest(); + createRequest.setName("ClientName"); + createRequest.setAuthPartnerId("AuthPartnerId"); + createRequest.setPolicyId("PolicyID"); + List clientAuthMethods = new ArrayList(); + clientAuthMethods.add("private_key_jwt"); + createRequest.setClientAuthMethods(clientAuthMethods); + List setGrantTypes = new ArrayList(); + setGrantTypes.add("authorization_code"); + createRequest.setGrantTypes(setGrantTypes); + createRequest.setLogoUri("https://testcase.pms.net/browse/OIDCClient.png"); + List setRedirectUris = new ArrayList(); + setRedirectUris.add("https://testcase.pms.net/browse/OIDCClient"); + createRequest.setRedirectUris(setRedirectUris); + createRequest.setPublicKey(public_key); + + when(environment.getProperty(any(String.class))).thenReturn("https://testcase.pms.net/browse/OIDCClient.png"); + when(clientDetailRepository.findById(any(String.class))).thenReturn(Optional.empty()); + when(partnerRepository.findById(any(String.class))).thenReturn(Optional.of(new Partner())); + + ClientDetailResponse response = serviceImpl.createOIDCClient(createRequest); + + assertNotNull(response); + } + + @Test (expected = PartnerServiceException.class) + public void testCreateOIDCClient07() throws Exception { + + when(environment.getProperty("auth.url")).thenReturn("https://pms.net/partner"); + when(clientDetailRepository.findById(anyString())).thenReturn(Optional.empty()); + when(partnerRepository.findById(anyString())).thenReturn(Optional.of(new Partner())); + + ClientDetailCreateRequest createRequest = new ClientDetailCreateRequest(); + createRequest.setName("ClientName"); + createRequest.setAuthPartnerId("AuthPartnerId"); + createRequest.setPolicyId("PolicyID"); + List clientAuthMethods = new ArrayList(); + clientAuthMethods.add("private_key_jwt"); + createRequest.setClientAuthMethods(clientAuthMethods); + List setGrantTypes = new ArrayList(); + setGrantTypes.add("authorization_code"); + createRequest.setGrantTypes(setGrantTypes); + createRequest.setLogoUri("https://testcase.pms.net/browse/OIDCClient.png"); + List setRedirectUris = new ArrayList(); + setRedirectUris.add("https://testcase.pms.net/browse/OIDCClient"); + createRequest.setRedirectUris(setRedirectUris); + createRequest.setPublicKey(public_key); + + ClientDetailResponse response = serviceImpl.createOIDCClient(createRequest); + + assertNotNull(response); + } + + @Test(expected = PartnerServiceException.class) + public void testCreateOIDCClient08() throws Exception { + + when(clientDetailRepository.findById(anyString())).thenReturn(Optional.of(new ClientDetail())); + + ClientDetailCreateRequest createRequest = new ClientDetailCreateRequest(); + createRequest.setName("ClientName"); + createRequest.setAuthPartnerId("AuthPartnerId"); + createRequest.setPolicyId("PolicyID"); + List clientAuthMethods = new ArrayList(); + clientAuthMethods.add("private_key_jwt"); + createRequest.setClientAuthMethods(clientAuthMethods); + List setGrantTypes = new ArrayList(); + setGrantTypes.add("authorization_code"); + createRequest.setGrantTypes(setGrantTypes); + createRequest.setLogoUri("https://testcase.pms.net/browse/OIDCClient.png"); + List setRedirectUris = new ArrayList(); + setRedirectUris.add("https://testcase.pms.net/browse/OIDCClient"); + createRequest.setRedirectUris(setRedirectUris); + createRequest.setPublicKey(public_key); + + serviceImpl.createOIDCClient(createRequest); + } + + @Test + public void testUpdateOIDCClient() throws Exception { + doNothing().when(auditUtil).setAuditRequestDto((ClientServiceAuditEnum) any()); + + ClientDetail clientDetail = new ClientDetail(); + clientDetail.setAcrValues("value"); + clientDetail.setClaims("Claims"); + clientDetail.setClientAuthMethods("Client Auth Methods"); + clientDetail.setCreatedBy("Cr By"); + clientDetail.setCreatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + clientDetail.setGrantTypes("Grant Types"); + clientDetail.setId("Id"); + clientDetail.setIsDeleted(false); + clientDetail.setLogoUri("Logo Uri"); + clientDetail.setName("Name"); + clientDetail.setPolicyId("PolicyId"); + clientDetail.setPublicKey("Public Key"); + clientDetail.setRedirectUris("Redirect Uris"); + clientDetail.setRpId("RpId"); + clientDetail.setStatus("Status"); + clientDetail.setUpdatedBy("UpdatedBy"); + clientDetail.setUpdatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + Optional ofResult = Optional.of(clientDetail); + + ClientDetail clientDetail1 = new ClientDetail(); + clientDetail1.setAcrValues("value"); + clientDetail1.setClaims("Claims"); + clientDetail1.setClientAuthMethods("Client Auth Methods"); + clientDetail1.setCreatedBy("Cr By"); + clientDetail1.setCreatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + clientDetail1.setGrantTypes("Grant Types"); + clientDetail1.setId("Id"); + clientDetail1.setIsDeleted(false); + clientDetail1.setLogoUri("Logo Uri"); + clientDetail1.setName("Name"); + clientDetail1.setPolicyId("PolicyId"); + clientDetail1.setPublicKey("Public Key"); + clientDetail1.setRedirectUris("Redirect Uris"); + clientDetail1.setRpId("RpId"); + clientDetail1.setStatus("Status"); + clientDetail1.setUpdatedBy("UpdatedBy"); + clientDetail1.setUpdatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + when(environment.getProperty(any(String.class))).thenReturn("Property"); + when(clientDetailRepository.save((ClientDetail) any())).thenReturn(clientDetail1); + when(clientDetailRepository.findById((String) any())).thenReturn(ofResult); + doNothing().when(restUtil) + .putApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), (Object) any(), + (Class) any()); + doNothing().when(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + + ClientDetailUpdateRequest clientDetailUpdateRequest = new ClientDetailUpdateRequest(); + clientDetailUpdateRequest.setClientAuthMethods(new ArrayList<>()); + clientDetailUpdateRequest.setClientName("ClientName"); + clientDetailUpdateRequest.setGrantTypes(new ArrayList<>()); + clientDetailUpdateRequest.setLogoUri("Logo Uri"); + clientDetailUpdateRequest.setRedirectUris(new ArrayList<>()); + clientDetailUpdateRequest.setStatus("Status"); + ClientDetailResponse actualUpdateOIDCClientResult = serviceImpl.updateOIDCClient("Id", + clientDetailUpdateRequest); + assertEquals("Id", actualUpdateOIDCClientResult.getClientId()); + assertEquals("Status", actualUpdateOIDCClientResult.getStatus()); + verify(auditUtil).setAuditRequestDto((ClientServiceAuditEnum) any()); + verify(clientDetailRepository).save((ClientDetail) any()); + verify(clientDetailRepository).findById((String) any()); + verify(restUtil).putApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any()); + verify(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + } + + @Test (expected = PartnerServiceException.class) + public void testUpdateOIDCClient2() throws Exception { + doNothing().when(auditUtil).setAuditRequestDto((ClientServiceAuditEnum) any()); + + ClientDetail clientDetail = new ClientDetail(); + clientDetail.setAcrValues("value"); + clientDetail.setClaims("Claims"); + clientDetail.setClientAuthMethods("Client Auth Methods"); + clientDetail.setCreatedBy("Cr By"); + clientDetail.setCreatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + clientDetail.setGrantTypes("Grant Types"); + clientDetail.setId("Id"); + clientDetail.setIsDeleted(false); + clientDetail.setLogoUri("Logo Uri"); + clientDetail.setName("Name"); + clientDetail.setPolicyId("PolicyId"); + clientDetail.setPublicKey("Public Key"); + clientDetail.setRedirectUris("Redirect Uris"); + clientDetail.setRpId("RpId"); + clientDetail.setStatus("Status"); + clientDetail.setUpdatedBy("UpdatedBy"); + clientDetail.setUpdatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + Optional ofResult = Optional.of(clientDetail); + + ClientDetail clientDetail1 = new ClientDetail(); + clientDetail1.setAcrValues("value"); + clientDetail1.setClaims("Claims"); + clientDetail1.setClientAuthMethods("Client Auth Methods"); + clientDetail1.setCreatedBy("Cr By"); + clientDetail1.setCreatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + clientDetail1.setGrantTypes("Grant Types"); + clientDetail1.setId("Id"); + clientDetail1.setIsDeleted(false); + clientDetail1.setLogoUri("Logo Uri"); + clientDetail1.setName("Name"); + clientDetail1.setPolicyId("PolicyId"); + clientDetail1.setPublicKey("Public Key"); + clientDetail1.setRedirectUris("Redirect Uris"); + clientDetail1.setRpId("RpId"); + clientDetail1.setStatus("Status"); + clientDetail1.setUpdatedBy("UpdatedBy"); + clientDetail1.setUpdatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + when(clientDetailRepository.save((ClientDetail) any())).thenReturn(clientDetail1); + when(clientDetailRepository.findById((String) any())).thenReturn(ofResult); + when(environment.getProperty((String) any())).thenReturn("Property"); + doNothing().when(restUtil) + .putApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any()); + doThrow(new PartnerServiceException("An error occurred", "An error occurred")).when(webSubPublisher) + .notify((EventType) any(), (Map) any(), (Type) any()); + + ClientDetailUpdateRequest clientDetailUpdateRequest = new ClientDetailUpdateRequest(); + clientDetailUpdateRequest.setClientAuthMethods(new ArrayList<>()); + clientDetailUpdateRequest.setClientName("ClientName"); + clientDetailUpdateRequest.setGrantTypes(new ArrayList<>()); + clientDetailUpdateRequest.setLogoUri("Logo Uri"); + clientDetailUpdateRequest.setRedirectUris(new ArrayList<>()); + clientDetailUpdateRequest.setStatus("Status"); + serviceImpl.updateOIDCClient("Id", clientDetailUpdateRequest); + verify(clientDetailRepository).save((ClientDetail) any()); + verify(clientDetailRepository).findById((String) any()); + verify(environment).getProperty((String) any()); + verify(restUtil).putApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any()); + verify(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + } + + @Test + public void testGetClientDetails() { + PolicyGroup policyGroup = new PolicyGroup(); + policyGroup.setCrBy("Cr By"); + policyGroup.setCrDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + policyGroup.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + policyGroup.setDesc("The characteristics of someone or something"); + policyGroup.setId("Id"); + policyGroup.setIsActive(true); + policyGroup.setIsDeleted(false); + policyGroup.setName("Name"); + policyGroup.setUpdBy("Upd By"); + policyGroup.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + policyGroup.setUserId("UserId"); + + AuthPolicy authPolicy = new AuthPolicy(); + authPolicy.SetVersion("1.0"); + authPolicy.setCrBy("Cr By"); + authPolicy.setCrDtimes(mock(Timestamp.class)); + authPolicy.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + authPolicy.setDescr("Descr"); + authPolicy.setId("Id"); + authPolicy.setIsActive(true); + authPolicy.setIsDeleted(false); + authPolicy.setName("Name"); + authPolicy.setPolicyFileId("Field"); + authPolicy.setPolicyGroup(policyGroup); + authPolicy.setPolicySchema("Schema"); + authPolicy.setPolicy_type("Policy Type"); + authPolicy.setUpdBy("Upd By"); + authPolicy.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + authPolicy.setValidFromDate(LocalDateTime.of(1, 1, 1, 1, 1)); + authPolicy.setValidToDate(LocalDateTime.of(1, 1, 1, 1, 1)); + Optional ofResult = Optional.of(authPolicy); + when(authPolicyRepository.findById((String) any())).thenReturn(ofResult); + + io.mosip.pms.common.entity.ClientDetail clientDetail = new io.mosip.pms.common.entity.ClientDetail(); + clientDetail.setAcrValues("values"); + clientDetail.setClaims("Claims"); + clientDetail.setClientAuthMethods("Client Auth Methods"); + clientDetail.setCreatedBy("Cr By"); + clientDetail.setCreatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + clientDetail.setGrantTypes("Grant Types"); + clientDetail.setId("Id"); + clientDetail.setIsDeleted(false); + clientDetail.setLogoUri("Logo Uri"); + clientDetail.setName("Name"); + clientDetail.setPolicyId("PolicyId"); + clientDetail.setPublicKey("Public Key"); + clientDetail.setRedirectUris("Redirect Uris"); + clientDetail.setRpId("RpId"); + clientDetail.setStatus("Status"); + clientDetail.setUpdatedBy("UpdatedBy"); + clientDetail.setUpdatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + Optional ofResult1 = Optional.of(clientDetail); + when(clientDetailRepository.findById((String) any())).thenReturn(ofResult1); + io.mosip.pms.oidc.client.dto.ClientDetail actualClientDetails = serviceImpl + .getClientDetails("Id"); + assertEquals(1, actualClientDetails.getAcrValues().size()); + assertEquals("Status", actualClientDetails.getStatus()); + assertEquals("RpId", actualClientDetails.getRelyingPartyId()); + assertEquals(1, actualClientDetails.getRedirectUris().size()); + assertEquals("Public Key", actualClientDetails.getPublicKey()); + assertEquals("Name", actualClientDetails.getPolicyName()); + assertEquals("PolicyId", actualClientDetails.getPolicyId()); + assertEquals("Name", actualClientDetails.getName()); + assertEquals("Logo Uri", actualClientDetails.getLogoUri()); + assertEquals("Id", actualClientDetails.getId()); + assertEquals(1, actualClientDetails.getGrantTypes().size()); + assertEquals(1, actualClientDetails.getClientAuthMethods().size()); + assertEquals(1, actualClientDetails.getClaims().size()); + verify(authPolicyRepository).findById((String) any()); + verify(clientDetailRepository).findById((String) any()); + } + + @Test (expected = PartnerServiceException.class) + public void testGetClientDetails2() { + when(authPolicyRepository.findById((String) any())) + .thenThrow(new PartnerServiceException("An error occurred", "An error occurred")); + + io.mosip.pms.common.entity.ClientDetail clientDetail = new io.mosip.pms.common.entity.ClientDetail(); + clientDetail.setAcrValues("values"); + clientDetail.setClaims("Claims"); + clientDetail.setClientAuthMethods("Client Auth Methods"); + clientDetail.setCreatedBy("Cr By"); + clientDetail.setCreatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + clientDetail.setGrantTypes("Grant Types"); + clientDetail.setId("Id"); + clientDetail.setIsDeleted(false); + clientDetail.setLogoUri("Logo Uri"); + clientDetail.setName("Name"); + clientDetail.setPolicyId("PolicyId"); + clientDetail.setPublicKey("Public Key"); + clientDetail.setRedirectUris("Redirect Uris"); + clientDetail.setRpId("RpId"); + clientDetail.setStatus("Status"); + clientDetail.setUpdatedBy("UpdatedBy"); + clientDetail.setUpdatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + Optional ofResult = Optional.of(clientDetail); + when(clientDetailRepository.findById((String) any())).thenReturn(ofResult); + serviceImpl.getClientDetails("Id"); + verify(authPolicyRepository).findById((String) any()); + verify(clientDetailRepository).findById((String) any()); + } + + @Test + public void testNotify() { + doNothing().when(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + + PartnerDataPublishDto partnerDataPublishDto = new PartnerDataPublishDto(); + partnerDataPublishDto.setCertificateData("Certificate Data"); + partnerDataPublishDto.setPartnerId("PartnerId"); + partnerDataPublishDto.setPartnerName("Partner Name"); + partnerDataPublishDto.setPartnerStatus("Partner Status"); + + PolicyPublishDto policyPublishDto = new PolicyPublishDto(); + policyPublishDto.setPolicy(new JSONObject()); + policyPublishDto.setPolicyCommenceOn(LocalDateTime.of(1, 1, 1, 1, 1)); + policyPublishDto.setPolicyDescription("Policy Description"); + policyPublishDto.setPolicyExpiresOn(LocalDateTime.of(1, 1, 1, 1, 1)); + policyPublishDto.setPolicyId("PolicyId"); + policyPublishDto.setPolicyName("Policy Name"); + policyPublishDto.setPolicyStatus("Policy Status"); + + ClientPublishDto clientPublishDto = new ClientPublishDto(); + clientPublishDto.setAuthContextRefs(new ArrayList<>()); + clientPublishDto.setClientAuthMethods(new ArrayList<>()); + clientPublishDto.setClientId("ClientId"); + clientPublishDto.setClientName("ClientName"); + clientPublishDto.setClientStatus("Client Status"); + clientPublishDto.setUserClaims(new ArrayList<>()); + ReflectionTestUtils.invokeMethod(serviceImpl, "notify", partnerDataPublishDto, policyPublishDto, clientPublishDto, + EventType.MISP_UPDATED); + verify(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + } + + @Test + public void testNotify2() { + doNothing().when(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + + PartnerDataPublishDto partnerDataPublishDto = new PartnerDataPublishDto(); + partnerDataPublishDto.setCertificateData("Certificate Data"); + partnerDataPublishDto.setPartnerId("PartnerId"); + partnerDataPublishDto.setPartnerName("Partner Name"); + partnerDataPublishDto.setPartnerStatus("Partner Status"); + + PolicyPublishDto policyPublishDto = new PolicyPublishDto(); + policyPublishDto.setPolicy(new JSONObject()); + policyPublishDto.setPolicyCommenceOn(LocalDateTime.of(1, 1, 1, 1, 1)); + policyPublishDto.setPolicyDescription("Policy Description"); + policyPublishDto.setPolicyExpiresOn(LocalDateTime.of(1, 1, 1, 1, 1)); + policyPublishDto.setPolicyId("PolicyId"); + policyPublishDto.setPolicyName("Policy Name"); + policyPublishDto.setPolicyStatus("Policy Status"); + + ClientPublishDto clientPublishDto = new ClientPublishDto(); + clientPublishDto.setAuthContextRefs(new ArrayList<>()); + clientPublishDto.setClientAuthMethods(new ArrayList<>()); + clientPublishDto.setClientId("ClientId"); + clientPublishDto.setClientName("ClientName"); + clientPublishDto.setClientStatus("Client Status"); + clientPublishDto.setUserClaims(new ArrayList<>()); + ReflectionTestUtils.invokeMethod(serviceImpl, "notify", partnerDataPublishDto, policyPublishDto, clientPublishDto, + EventType.POLICY_UPDATED); + verify(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + } + + @Test + public void testNotify3() { + doNothing().when(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + + PartnerDataPublishDto partnerDataPublishDto = new PartnerDataPublishDto(); + partnerDataPublishDto.setCertificateData("Certificate Data"); + partnerDataPublishDto.setPartnerId("PartnerId"); + partnerDataPublishDto.setPartnerName("Partner Name"); + partnerDataPublishDto.setPartnerStatus("Partner Status"); + + PolicyPublishDto policyPublishDto = new PolicyPublishDto(); + policyPublishDto.setPolicy(new JSONObject()); + policyPublishDto.setPolicyCommenceOn(LocalDateTime.of(1, 1, 1, 1, 1)); + policyPublishDto.setPolicyDescription("Policy Description"); + policyPublishDto.setPolicyExpiresOn(LocalDateTime.of(1, 1, 1, 1, 1)); + policyPublishDto.setPolicyId("PolicyId"); + policyPublishDto.setPolicyName("Policy Name"); + policyPublishDto.setPolicyStatus("Policy Status"); + + ClientPublishDto clientPublishDto = new ClientPublishDto(); + clientPublishDto.setAuthContextRefs(new ArrayList<>()); + clientPublishDto.setClientAuthMethods(new ArrayList<>()); + clientPublishDto.setClientId("ClientId"); + clientPublishDto.setClientName("ClientName"); + clientPublishDto.setClientStatus("Client Status"); + clientPublishDto.setUserClaims(new ArrayList<>()); + ReflectionTestUtils.invokeMethod(serviceImpl, "notify", partnerDataPublishDto, policyPublishDto, clientPublishDto, + EventType.APIKEY_UPDATED); + verify(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + } + + @Test + public void testNotify4() { + doNothing().when(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + + PartnerDataPublishDto partnerDataPublishDto = new PartnerDataPublishDto(); + partnerDataPublishDto.setCertificateData("Certificate Data"); + partnerDataPublishDto.setPartnerId("PartnerId"); + partnerDataPublishDto.setPartnerName("Partner Name"); + partnerDataPublishDto.setPartnerStatus("Partner Status"); + + PolicyPublishDto policyPublishDto = new PolicyPublishDto(); + policyPublishDto.setPolicy(new JSONObject()); + policyPublishDto.setPolicyCommenceOn(LocalDateTime.of(1, 1, 1, 1, 1)); + policyPublishDto.setPolicyDescription("Policy Description"); + policyPublishDto.setPolicyExpiresOn(LocalDateTime.of(1, 1, 1, 1, 1)); + policyPublishDto.setPolicyId("PolicyId"); + policyPublishDto.setPolicyName("Policy Name"); + policyPublishDto.setPolicyStatus("Policy Status"); + + ClientPublishDto clientPublishDto = new ClientPublishDto(); + clientPublishDto.setAuthContextRefs(new ArrayList<>()); + clientPublishDto.setClientAuthMethods(new ArrayList<>()); + clientPublishDto.setClientId("ClientId"); + clientPublishDto.setClientName("ClientName"); + clientPublishDto.setClientStatus("Client Status"); + clientPublishDto.setUserClaims(new ArrayList<>()); + ReflectionTestUtils.invokeMethod(serviceImpl, "notify", partnerDataPublishDto, policyPublishDto, clientPublishDto, + EventType.PARTNER_UPDATED); + verify(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + } + + @Test + public void testNotify5() { + doNothing().when(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + + PartnerDataPublishDto partnerDataPublishDto = new PartnerDataPublishDto(); + partnerDataPublishDto.setCertificateData("Certificate Data"); + partnerDataPublishDto.setPartnerId("PartnerId"); + partnerDataPublishDto.setPartnerName("Partner Name"); + partnerDataPublishDto.setPartnerStatus("Partner Status"); + + PolicyPublishDto policyPublishDto = new PolicyPublishDto(); + policyPublishDto.setPolicy(new JSONObject()); + policyPublishDto.setPolicyCommenceOn(LocalDateTime.of(1, 1, 1, 1, 1)); + policyPublishDto.setPolicyDescription("Policy Description"); + policyPublishDto.setPolicyExpiresOn(LocalDateTime.of(1, 1, 1, 1, 1)); + policyPublishDto.setPolicyId("PolicyId"); + policyPublishDto.setPolicyName("Policy Name"); + policyPublishDto.setPolicyStatus("Policy Status"); + + ClientPublishDto clientPublishDto = new ClientPublishDto(); + clientPublishDto.setAuthContextRefs(new ArrayList<>()); + clientPublishDto.setClientAuthMethods(new ArrayList<>()); + clientPublishDto.setClientId("ClientId"); + clientPublishDto.setClientName("ClientName"); + clientPublishDto.setClientStatus("Client Status"); + clientPublishDto.setUserClaims(new ArrayList<>()); + ReflectionTestUtils.invokeMethod(serviceImpl, "notify", partnerDataPublishDto, policyPublishDto, clientPublishDto, + EventType.CA_CERTIFICATE_UPLOADED); + verify(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + } + + @Test (expected = PartnerServiceException.class) + public void testNotify6() { + doThrow(new PartnerServiceException("An error occurred", "An error occurred")).when(webSubPublisher) + .notify((EventType) any(), (Map) any(), (Type) any()); + + PartnerDataPublishDto partnerDataPublishDto = new PartnerDataPublishDto(); + partnerDataPublishDto.setCertificateData("Certificate Data"); + partnerDataPublishDto.setPartnerId("PartnerId"); + partnerDataPublishDto.setPartnerName("Partner Name"); + partnerDataPublishDto.setPartnerStatus("Partner Status"); + + PolicyPublishDto policyPublishDto = new PolicyPublishDto(); + policyPublishDto.setPolicy(new JSONObject()); + policyPublishDto.setPolicyCommenceOn(LocalDateTime.of(1, 1, 1, 1, 1)); + policyPublishDto.setPolicyDescription("Policy Description"); + policyPublishDto.setPolicyExpiresOn(LocalDateTime.of(1, 1, 1, 1, 1)); + policyPublishDto.setPolicyId("PolicyId"); + policyPublishDto.setPolicyName("Policy Name"); + policyPublishDto.setPolicyStatus("Policy Status"); + + ClientPublishDto clientPublishDto = new ClientPublishDto(); + clientPublishDto.setAuthContextRefs(new ArrayList<>()); + clientPublishDto.setClientAuthMethods(new ArrayList<>()); + clientPublishDto.setClientId("ClientId"); + clientPublishDto.setClientName("ClientName"); + clientPublishDto.setClientStatus("Client Status"); + clientPublishDto.setUserClaims(new ArrayList<>()); + ReflectionTestUtils.invokeMethod(serviceImpl, "notify", partnerDataPublishDto, policyPublishDto, clientPublishDto, + EventType.MISP_UPDATED); + verify(webSubPublisher).notify((EventType) any(), (Map) any(), (Type) any()); + } + + @Test + public void testGetPolicyObject() { + ReflectionTestUtils.invokeMethod(serviceImpl,"getPolicyObject","Policy"); + ReflectionTestUtils.invokeMethod(serviceImpl,"getPolicyObject","Auth"); + ReflectionTestUtils.invokeMethod(serviceImpl,"getPolicyObject",""); + ReflectionTestUtils.invokeMethod(serviceImpl,"getPolicyObject","Policy123"); + ReflectionTestUtils.invokeMethod(serviceImpl,"getPolicyObject","123Policy"); + } + + @Test (expected = PartnerServiceException.class) + public void testPublishClientData() { + when(environment.getProperty((String) any())).thenReturn("Property"); + when(restUtil.getApi((String) any(), (Map) any(), (Class) any())) + .thenThrow(new PartnerServiceException("An error occurred", "An error occurred")); + + Partner partner = new Partner(); + partner.setAdditionalInfo("Additional Info"); + partner.setAddress("abc"); + partner.setApprovalStatus("Approval Status"); + partner.setCertificateAlias("Certificate Alias"); + partner.setContactNo("9087654321"); + partner.setCrBy("Cr By"); + partner.setCrDtimes(mock(Timestamp.class)); + partner.setDelDtimes(mock(Timestamp.class)); + partner.setEmailId("emailId"); + partner.setId("Id"); + partner.setIsActive(true); + partner.setIsDeleted(false); + partner.setLangCode("eng"); + partner.setLogoUrl("https://pms.net/partner"); + partner.setName("Name"); + partner.setPartnerPolicies(new ArrayList<>()); + partner.setPartnerPolicyRequests(new ArrayList<>()); + partner.setPartnerTypeCode("Partner Type Code"); + partner.setPolicyGroupId("PolicyGroupId"); + partner.setUpdBy("Upd By"); + partner.setUpdDtimes(mock(Timestamp.class)); + partner.setUserId("UserId"); + + PolicyGroup policyGroup = new PolicyGroup(); + policyGroup.setCrBy("Cr By"); + policyGroup.setCrDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + policyGroup.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + policyGroup.setDesc("The characteristics of someone or something"); + policyGroup.setId("Id"); + policyGroup.setIsActive(true); + policyGroup.setIsDeleted(false); + policyGroup.setName("Name"); + policyGroup.setUpdBy("Upd By"); + policyGroup.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + policyGroup.setUserId("UserId"); + + AuthPolicy authPolicy = new AuthPolicy(); + authPolicy.SetVersion("1.0"); + authPolicy.setCrBy("Cr By"); + authPolicy.setCrDtimes(mock(Timestamp.class)); + authPolicy.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + authPolicy.setDescr("Descr"); + authPolicy.setId("Id"); + authPolicy.setIsActive(true); + authPolicy.setIsDeleted(false); + authPolicy.setName("Name"); + authPolicy.setPolicyFileId("FileId"); + authPolicy.setPolicyGroup(policyGroup); + authPolicy.setPolicySchema("Schema"); + authPolicy.setPolicy_type("Policy Type"); + authPolicy.setUpdBy("Upd By"); + authPolicy.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + authPolicy.setValidFromDate(LocalDateTime.of(1, 1, 1, 1, 1)); + authPolicy.setValidToDate(LocalDateTime.of(1, 1, 1, 1, 1)); + + ClientDetail clientDetail = new ClientDetail(); + clientDetail.setAcrValues("values"); + clientDetail.setClaims("Claims"); + clientDetail.setClientAuthMethods("Client Auth Methods"); + clientDetail.setCreatedBy("Cr By"); + clientDetail.setCreatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + clientDetail.setGrantTypes("Grant Types"); + clientDetail.setId("Id"); + clientDetail.setIsDeleted(false); + clientDetail.setLogoUri("Logo Uri"); + clientDetail.setName("Name"); + clientDetail.setPolicyId("PolicyId"); + clientDetail.setPublicKey("Public Key"); + clientDetail.setRedirectUris("Redirect Uris"); + clientDetail.setRpId("RpId"); + clientDetail.setStatus("Status"); + clientDetail.setUpdatedBy("UpdatedBy"); + clientDetail.setUpdatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + ReflectionTestUtils.invokeMethod(serviceImpl,"publishClientData",partner,authPolicy,clientDetail); + verify(environment).getProperty((String) any()); + verify(restUtil).getApi((String) any(), (Map) any(), (Class) any()); + verify(MapperUtils.mapDataToPublishDto(partner, ReflectionTestUtils.invokeMethod(serviceImpl,"getPartnerCertificate",(partner.getCertificateAlias())))); + verify(MapperUtils.mapPolicyToPublishDto(authPolicy, ReflectionTestUtils.invokeMethod(serviceImpl,"getPolicyObject",(authPolicy.getPolicyFileId())))); + verify(MapperUtils.mapClientDataToPublishDto(clientDetail)); + verify(ReflectionTestUtils.invokeMethod(serviceImpl,"notify", (any(PartnerDataPublishDto.class)), any(PolicyPublishDto.class), any(ClientPublishDto.class), + eq(EventType.OIDC_CLIENT_CREATED))); + } + + @Test (expected = UndeclaredThrowableException.class) + public void testCallIdpService01() throws Exception { + when(objectMapper.readValue((String) any(), (Class>) any())).thenReturn(new HashMap<>()); + when(restUtil.postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any())) + .thenThrow(new PartnerServiceException("An error occurred", "An error occurred")); + + ClientDetail clientDetail = new ClientDetail(); + clientDetail.setAcrValues("values"); + clientDetail.setClaims("Claims"); + clientDetail.setClientAuthMethods("Client Auth Methods"); + clientDetail.setCreatedBy("Cr By"); + clientDetail.setCreatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + clientDetail.setGrantTypes("Grant Types"); + clientDetail.setId("Id"); + clientDetail.setIsDeleted(false); + clientDetail.setLogoUri("Logo Uri"); + clientDetail.setName("Name"); + clientDetail.setPolicyId("PolicyId"); + clientDetail.setPublicKey("Public Key"); + clientDetail.setRedirectUris("Redirect Uris"); + clientDetail.setRpId("RpId"); + clientDetail.setStatus("Status"); + clientDetail.setUpdatedBy("UpdatedBy"); + clientDetail.setUpdatedDateTime(LocalDateTime.of(1, 1, 1, 1, 1)); + + CreateClientRequestDto dto = new CreateClientRequestDto(); + dto.setClientId(clientDetail.getId()); + dto.setClientName(clientDetail.getName()); + dto.setRelyingPartyId(clientDetail.getRpId()); + dto.setLogoUri(clientDetail.getLogoUri()); + dto.setPublicKey(objectMapper.readValue(clientDetail.getPublicKey(), Map.class)); + dto.setUserClaims(Collections.singletonList((clientDetail.getClaims()))); + dto.setAuthContextRefs(Collections.singletonList(clientDetail.getAcrValues())); + dto.setRedirectUris(Collections.singletonList(clientDetail.getRedirectUris())); + dto.setGrantTypes(Collections.singletonList(clientDetail.getGrantTypes())); + dto.setClientAuthMethods(Collections.singletonList(clientDetail.getClientAuthMethods())); + ReflectionTestUtils.invokeMethod(serviceImpl,"callIdpService",clientDetail,"calleeApi",true); + verify(objectMapper).readValue((String) any(), (Class>) any()); + verify(restUtil).postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any()); + } + + @Test (expected = NullPointerException.class) + public void testGetReqAttributeFromPolicyJson() { + + JSONObject policyObject = new JSONObject(); + policyObject.put("id","001"); + policyObject.put("name","Policy"); + + ReflectionTestUtils.invokeMethod(serviceImpl,"getReqAttributeFromPolicyJson",policyObject,"Parent Attribute", "Child Attribute", + "Filter Attribute"); + } + + @Test (expected = ApiAccessibleException.class) + public void testMakeCreateIDPServiceCall01() throws JsonProcessingException { + ClientDetailResponse clientDetailResponse = new ClientDetailResponse(); + clientDetailResponse.setClientId("ClientId"); + clientDetailResponse.setStatus("Status"); + when(objectMapper.readValue((String) any(), (Class) any())) + .thenReturn(clientDetailResponse); + when(objectMapper.writeValueAsString((Object) any())).thenReturn("123"); + when(restUtil.postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any())).thenReturn(new HashMap<>()); + assertSame(clientDetailResponse, ReflectionTestUtils.invokeMethod(serviceImpl,"makeCreateIDPServiceCall","Request","Callee Api")); + verify(objectMapper).readValue((String) any(), (Class) any()); + verify(objectMapper).writeValueAsString((Object) any()); + verify(restUtil).postApi((String) any(), (List) any(), (String) any(), (String) any(), (MediaType) any(), + (Object) any(), (Class) any()); + } + + @Test (expected = PartnerServiceException.class) + public void testGetPartnerCertificate01() { + when(environment.getProperty((String) any())).thenReturn("Property"); + when(restUtil.getApi((String) any(), (Map) any(), (Class) any())) + .thenThrow(new PartnerServiceException("An error occurred", "An error occurred")); + ReflectionTestUtils.invokeMethod(serviceImpl,"getPartnerCertificate","Certificate Alias"); + verify(environment).getProperty((String) any()); + verify(restUtil).getApi((String) any(), (Map) any(), (Class) any()); + } + + @Test (expected = ApiAccessibleException.class) + public void testGetPartnerCertificate02() throws JsonProcessingException { + when(environment.getProperty((String) any())).thenReturn("Property"); + + PartnerCertDownloadResponeDto partnerCertDownloadResponeDto = new PartnerCertDownloadResponeDto(); + partnerCertDownloadResponeDto.setCertificateData("Certificate Data"); + partnerCertDownloadResponeDto.setTimestamp(LocalDateTime.of(1, 1, 1, 1, 1)); + when(objectMapper.readValue((String) any(), (Class) any())) + .thenReturn(partnerCertDownloadResponeDto); + when(objectMapper.writeValueAsString((Object) any())).thenReturn("123"); + when(restUtil.getApi((String) any(), (Map) any(), (Class) any())) + .thenReturn(new HashMap<>()); + assertEquals("Certificate Data", ReflectionTestUtils.invokeMethod(serviceImpl,"getPartnerCertificate","Certificate Alias")); + verify(environment).getProperty((String) any()); + verify(objectMapper).readValue((String) any(), (Class) any()); + verify(objectMapper).writeValueAsString((Object) any()); + verify(restUtil).getApi((String) any(), (Map) any(), (Class) any()); + } + + @Test (expected = PartnerServiceException.class) + //@Ignore + public void testCreateOIDCClient01() throws Exception { + + ClientDetailCreateRequest createRequest = new ClientDetailCreateRequest(); + createRequest.setName("ClientName"); + createRequest.setAuthPartnerId("mosip_partnerorg1665194709609"); + createRequest.setPolicyId("53704"); + List clientAuthMethods = new ArrayList(); + clientAuthMethods.add("private_key_jwt"); + createRequest.setClientAuthMethods(clientAuthMethods); + List setGrantTypes = new ArrayList(); + setGrantTypes.add("authorization_code"); + createRequest.setGrantTypes(setGrantTypes); + createRequest.setLogoUri("https://testcase.pms.net/browse/OIDCClient.png"); + List setRedirectUris = new ArrayList(); + setRedirectUris.add("https://testcase.pms.net/browse/OIDCClient"); + createRequest.setRedirectUris(setRedirectUris); + createRequest.setPublicKey(public_key); + + Partner partner = new Partner(); + partner.setAdditionalInfo("Additional Info"); + partner.setAddress("abc"); + partner.setApprovalStatus("Approval Status"); + partner.setCertificateAlias("Certificate Alias"); + partner.setContactNo("9087654321"); + partner.setCrBy("Cr By"); + partner.setCrDtimes(mock(Timestamp.class)); + partner.setDelDtimes(mock(Timestamp.class)); + partner.setEmailId("emailId"); + partner.setId("mosip_partnerorg1665194709609"); + partner.setIsActive(true); + partner.setIsDeleted(false); + partner.setLangCode("eng"); + partner.setLogoUrl("https://pms.net/partner"); + partner.setName("auth"); + partner.setPartnerPolicies(new ArrayList<>()); + partner.setPartnerPolicyRequests(new ArrayList<>()); + partner.setPartnerTypeCode("Auth_Policy"); + partner.setPolicyGroupId("mosip_partnerorg1665194709609"); + partner.setUpdBy("Upd By"); + partner.setUpdDtimes(mock(Timestamp.class)); + partner.setUserId("UserId"); + + PolicyGroup policyGroup = new PolicyGroup(); + policyGroup.setCrBy("Cr By"); + policyGroup.setCrDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + policyGroup.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + policyGroup.setDesc("The characteristics of someone or something"); + policyGroup.setId("mosip_partnerorg1665194709609"); + policyGroup.setIsActive(true); + policyGroup.setIsDeleted(false); + policyGroup.setName("Name"); + policyGroup.setUpdBy("Upd By"); + policyGroup.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + policyGroup.setUserId("UserId"); + + AuthPolicy authPolicy = new AuthPolicy(); + authPolicy.SetVersion("1.0"); + authPolicy.setCrBy("Cr By"); + authPolicy.setCrDtimes(mock(Timestamp.class)); + authPolicy.setDelDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + authPolicy.setDescr("Descr"); + authPolicy.setId("mosip_partnerorg1665194709609"); + authPolicy.setIsActive(true); + authPolicy.setIsDeleted(false); + authPolicy.setName("Name"); + authPolicy.setPolicyFileId("42"); + authPolicy.setPolicyGroup(policyGroup); + authPolicy.setPolicySchema("Schema"); + authPolicy.setPolicy_type("Policy Type"); + authPolicy.setUpdBy("Upd By"); + authPolicy.setUpdDtimes(LocalDateTime.of(1, 1, 1, 1, 1)); + authPolicy.setValidFromDate(LocalDateTime.of(1, 1, 1, 1, 1)); + authPolicy.setValidToDate(LocalDateTime.of(1, 1, 1, 1, 1)); + + when(clientDetailRepository.findById(anyString())).thenReturn(Optional.empty()); + when(partnerRepository.findById(anyString())).thenReturn(Optional.of(partner)); + when(authPolicyRepository.findById(anyString())).thenReturn(Optional.of(authPolicy)); + + ClientDetailResponse response = serviceImpl.createOIDCClient(createRequest); + + assertNotNull(response); + } + + @Test + public void testConvertStringToList01() { + String inputString = "id,name,email"; + List expectedList = Arrays.asList("id", "name", "email"); + List resultList = ReflectionTestUtils.invokeMethod(serviceImpl, "convertStringToList", inputString); + assertEquals(expectedList, resultList); + } + } diff --git a/partner/partner-management-service/src/test/java/io/mosip/pms/test/partner/controller/PartnerManagementControllerTest.java b/partner/partner-management-service/src/test/java/io/mosip/pms/test/partner/controller/PartnerManagementControllerTest.java index bd546b8648..df82f4b403 100644 --- a/partner/partner-management-service/src/test/java/io/mosip/pms/test/partner/controller/PartnerManagementControllerTest.java +++ b/partner/partner-management-service/src/test/java/io/mosip/pms/test/partner/controller/PartnerManagementControllerTest.java @@ -1,15 +1,22 @@ package io.mosip.pms.test.partner.controller; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.*; +import static org.mockito.Mockito.doNothing; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import java.time.LocalDateTime; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.List; import java.util.Optional; +import io.mosip.pms.partner.manager.controller.PartnerManagementController; +import lombok.SneakyThrows; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -218,4 +225,122 @@ public void activateDeactivatePartnerAPIKey() throws Exception { mockMvc.perform(MockMvcRequestBuilders.patch("/partners/1234/policy/456/apiKey/status").contentType(MediaType.APPLICATION_JSON_VALUE) .content(objectMapper.writeValueAsString(request))).andExpect(MockMvcResultMatchers.status().isOk()); } + + @Test (expected = Exception.class) + public void testGetPartnersDetails() { + PartnerManagementController partnerManagementController = new PartnerManagementController(); + partnerManagementController.getPartnersDeatils(Optional.of("1234")); + } + + @Test (expected = Exception.class) + public void testApproveRejectPolicyMappings() { + + PartnerManagementController partnerManagementController = new PartnerManagementController(); + + StatusRequestDto statusRequestDto = new StatusRequestDto(); + statusRequestDto.setStatus("Status"); + + RequestWrapper requestWrapper = new RequestWrapper<>(); + requestWrapper.setId("mosip.partnermanagement.partners.policy.mapping"); + requestWrapper.setMetadata("{}"); + requestWrapper.setRequest(statusRequestDto); + requestWrapper.setRequesttime(ZonedDateTime.now(ZoneOffset.UTC).toLocalDateTime()); + requestWrapper.setVersion("1.0"); + partnerManagementController.approveRejectPolicyMappings(requestWrapper, "MappingKey"); + } + + @Test (expected = Exception.class) + public void testApproveRejectPolicyMappings2() { + + PartnerManagementController partnerManagementController = new PartnerManagementController(); + + StatusRequestDto statusRequestDto = new StatusRequestDto(); + statusRequestDto.setStatus("Status"); + RequestWrapper requestWrapper = (RequestWrapper) mock(RequestWrapper.class); + when(requestWrapper.getId()).thenReturn("mosip.partnermanagement.partners.policy.mapping"); + when(requestWrapper.getVersion()).thenReturn("1.0"); + doNothing().when(requestWrapper).setId((String) any()); + doNothing().when(requestWrapper).setMetadata((Object) any()); + doNothing().when(requestWrapper).setRequest((StatusRequestDto) any()); + doNothing().when(requestWrapper).setRequesttime((LocalDateTime) any()); + doNothing().when(requestWrapper).setVersion((String) any()); + requestWrapper.setId("mosip.partnermanagement.partners.policy.mapping"); + requestWrapper.setMetadata("{}"); + requestWrapper.setRequest(statusRequestDto); + requestWrapper.setRequesttime(ZonedDateTime.now(ZoneOffset.UTC).toLocalDateTime()); + requestWrapper.setVersion("1.0"); + partnerManagementController.approveRejectPolicyMappings(requestWrapper, "MappingKey"); + } + + @SneakyThrows + @Test + public void testActivateDeactivatePartnerAPIKey() { + PartnerManagementController partnerManagementController = new PartnerManagementController(); + + APIkeyStatusUpdateRequestDto apIkeyStatusUpdateRequestDto = new APIkeyStatusUpdateRequestDto(); + apIkeyStatusUpdateRequestDto.setLabel("Label"); + apIkeyStatusUpdateRequestDto.setStatus("Status"); + + RequestWrapper requestWrapper = new RequestWrapper<>(); + requestWrapper.setId("mosip.partnermanagement.partners.policy.mapping"); + requestWrapper.setMetadata("{}"); + requestWrapper.setRequest(apIkeyStatusUpdateRequestDto); + requestWrapper.setRequesttime(ZonedDateTime.now(ZoneOffset.UTC).toLocalDateTime()); + requestWrapper.setVersion("1.0"); + Mockito.when(partnerManagementService.updateAPIKeyStatus("1234","456",apIkeyStatusUpdateRequestDto)) + .thenReturn("Success"); + mockMvc.perform(MockMvcRequestBuilders.patch("/partners/1234/policy/456/apiKey/status").contentType(MediaType.APPLICATION_JSON_VALUE) + .content(objectMapper.writeValueAsString(requestWrapper))).andExpect(MockMvcResultMatchers.status().isUnauthorized()); + } + + @SneakyThrows + @Test (expected = Exception.class) + public void testActivateDeactivatePartnerAPIKey2() { + + PartnerManagementController partnerManagementController = new PartnerManagementController(); + + APIkeyStatusUpdateRequestDto apIkeyStatusUpdateRequestDto = new APIkeyStatusUpdateRequestDto(); + apIkeyStatusUpdateRequestDto.setLabel("Label"); + apIkeyStatusUpdateRequestDto.setStatus("Status"); + RequestWrapper requestWrapper = (RequestWrapper) mock(RequestWrapper.class); + when(requestWrapper.getId()).thenReturn("id"); + when(requestWrapper.getVersion()).thenReturn("1.0"); + doNothing().when(requestWrapper).setId((String) any()); + doNothing().when(requestWrapper).setMetadata((Object) any()); + doNothing().when(requestWrapper).setRequest((APIkeyStatusUpdateRequestDto) any()); + doNothing().when(requestWrapper).setRequesttime((LocalDateTime) any()); + doNothing().when(requestWrapper).setVersion((String) any()); + requestWrapper.setId("mosip.partnermanagement.partners.policy.mapping"); + requestWrapper.setMetadata("{}"); + requestWrapper.setRequest(apIkeyStatusUpdateRequestDto); + requestWrapper.setRequesttime(ZonedDateTime.now(ZoneOffset.UTC).toLocalDateTime()); + requestWrapper.setVersion("1.0"); + Mockito.when(partnerManagementService.updateAPIKeyStatus("1234","456",apIkeyStatusUpdateRequestDto)) + .thenReturn("Success"); + + partnerManagementController.activateDeactivatePartnerAPIKey("1234", "456", requestWrapper); + + mockMvc.perform(MockMvcRequestBuilders.patch("/partners/1234/policy/456/apiKey/status").contentType(MediaType.APPLICATION_JSON_VALUE) + .content(objectMapper.writeValueAsString(requestWrapper))).andExpect(MockMvcResultMatchers.status().isOk()); + } + + @Test (expected = Exception.class) + public void testActivateDeactivatePartnerAPIKey3() { + + PartnerManagementController partnerManagementController = new PartnerManagementController(); + + APIkeyStatusUpdateRequestDto apIkeyStatusUpdateRequestDto = new APIkeyStatusUpdateRequestDto(); + apIkeyStatusUpdateRequestDto.setLabel("Label"); + apIkeyStatusUpdateRequestDto.setStatus("Status"); + + RequestWrapper requestWrapper = new RequestWrapper<>(); + requestWrapper.setId("mosip.partnermanagement.partners.policy.mapping"); + requestWrapper.setMetadata("{}"); + requestWrapper.setRequest(apIkeyStatusUpdateRequestDto); + requestWrapper.setRequesttime(ZonedDateTime.now(ZoneOffset.UTC).toLocalDateTime()); + requestWrapper.setVersion("1.0"); + partnerManagementController.activateDeactivatePartnerAPIKey("123", "456", requestWrapper); + + } + } From 22382f2f49793ab5a4845c5f8541407664e86589 Mon Sep 17 00:00:00 2001 From: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 4 Jul 2023 11:53:20 +0530 Subject: [PATCH 30/74] Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql Signed-off-by: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 4805e0c829..4f6bb4acad 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'mpolicy-default-PDFCard', 'mpolicy-default-PDFCard', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', '1', 'https://schemas.mosip.io/v1/auth-policy', '2022-09-20 09:00:54.316627', '2025-04-28 09:37:00', true, 'admin', '2022-09-20 09:00:54.316627', 'admin', '2022-09-20 09:00:54.316627', false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From 7456f38ac38688dd1eee6ad89a36fd87218e2ab9 Mon Sep 17 00:00:00 2001 From: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 4 Jul 2023 11:56:26 +0530 Subject: [PATCH 31/74] Update pms-auth_policy.csv Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/dml/pms-auth_policy.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_scripts/mosip_pms/dml/pms-auth_policy.csv b/db_scripts/mosip_pms/dml/pms-auth_policy.csv index 9779b04761..cb14697d5c 100644 --- a/db_scripts/mosip_pms/dml/pms-auth_policy.csv +++ b/db_scripts/mosip_pms/dml/pms-auth_policy.csv @@ -9,6 +9,6 @@ mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-a mpolicy-default-cert,mpolicygroup-default-cert,mpolicy-default-cert,mpolicy-default-cert,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() mpolicy-default-eUIN_with_QR,mpolicygroup-default-print,mpolicy-default-eUIN_with_QR,mpolicy-default-eUIN_with_QR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() mpolicy-default-eUIN_with_faceQR,mpolicygroup-default-print,mpolicy-default-eUIN_with_faceQR,mpolicy-default-eUIN_with_faceQR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() -mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""PCN"",""source"":[{""attribute"":""VID"",""filter"":[{""type"":""PERPETUAL""}]}],""encrypted"":false,""format"":""RETRIEVE""},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""bestTwoFingers"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Finger""}]}],""encrypted"":false,""format"":""bestTwoFingers""},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":false,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,2022-09-20 09:00:54.316627,2025-04-28 09:37:00,TRUE,admin,2022-09-20 09:00:54.316627,admin,2022-09-20 09:00:54.316627 mpolicy-default-digitalcard,mpolicygroup-default-digitalcard,mpolicy-default-digitalcard,mpolicy-default-digitalcard,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""250"",""transactionsAllowed"":""10000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() mpolicy-default-mobile,mpolicygroup-default-mobile,mpolicy-default-mobile,mpolicy-default-mobile,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":false,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() From dfefd091357ee236d6d42e5141c555ba084646c3 Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:01:12 +0530 Subject: [PATCH 32/74] Update pms-auth_policy.csv (#586) * Update pms-auth_policy.csv Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> * Update pms-auth_policy.csv * Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql * Update pms-auth_policy.csv * Update pms-auth_policy.csv * Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql * Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql --------- Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 4f6bb4acad..4805e0c829 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'mpolicy-default-PDFCard', 'mpolicy-default-PDFCard', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', '1', 'https://schemas.mosip.io/v1/auth-policy', '2022-09-20 09:00:54.316627', '2025-04-28 09:37:00', true, 'admin', '2022-09-20 09:00:54.316627', 'admin', '2022-09-20 09:00:54.316627', false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From 1e0d48901ac8e91ae69ea45f96dc24f724dca3ae Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 17 Aug 2023 19:37:19 +0530 Subject: [PATCH 33/74] Revert "Update pms-auth_policy.csv (#586)" (#595) This reverts commit 694c8282f16c3de443d3938b1b8b1e6e2133fe02. Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 4805e0c829..5019373207 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"firstName","filter":[{"language":"eng"}]},{"attribute":"middleName","filter":[{"language":"eng"}]},{"attribute":"lastName","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"mobileno"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"permanentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"presentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"presentProvince"},{"attribute":"permanentProvince"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"permanentCity"},{"attribute":"presentCity"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"postalCode","source":[{"attribute":"presentZipcode","filter":[{"language":"eng"}]},{"attribute":"permanentZipcode","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"}]}],"encrypted":false,"format":"extraction"}],"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"}}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', '2020-12-16 12:30:14.183', '2025-04-28 09:37:00.000', true, 'admin', '2020-12-16 12:30:14.183', 'service-account-mosip-creser-client', '2021-02-09 06:50:22.065', false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From 37a51b73451fa340ab32e99f15c247612026f555 Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Fri, 18 Aug 2023 13:55:22 +0530 Subject: [PATCH 34/74] Revert "Revert "Update pms-auth_policy.csv (#586)" (#595)" (#596) This reverts commit c661c62563dba72a6617344a38c43b8e6bc981a3. Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 5019373207..4805e0c829 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"firstName","filter":[{"language":"eng"}]},{"attribute":"middleName","filter":[{"language":"eng"}]},{"attribute":"lastName","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"mobileno"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"permanentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"presentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"presentProvince"},{"attribute":"permanentProvince"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"permanentCity"},{"attribute":"presentCity"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"postalCode","source":[{"attribute":"presentZipcode","filter":[{"language":"eng"}]},{"attribute":"permanentZipcode","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"}]}],"encrypted":false,"format":"extraction"}],"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"}}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', '2020-12-16 12:30:14.183', '2025-04-28 09:37:00.000', true, 'admin', '2020-12-16 12:30:14.183', 'service-account-mosip-creser-client', '2021-02-09 06:50:22.065', false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From ae74b1a8b0f70701febe1a64e8b4f34c9e2750cc Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Wed, 6 Sep 2023 14:43:41 +0530 Subject: [PATCH 35/74] [MOSIP-29315] Update pms-oidc_client.sql Signed-off-by: Keshav Mishra Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/ddl/pms-oidc_client.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_scripts/mosip_pms/ddl/pms-oidc_client.sql b/db_scripts/mosip_pms/ddl/pms-oidc_client.sql index dd7ec35e8f..8f87c7c37a 100644 --- a/db_scripts/mosip_pms/ddl/pms-oidc_client.sql +++ b/db_scripts/mosip_pms/ddl/pms-oidc_client.sql @@ -38,7 +38,7 @@ CREATE TABLE pms.oidc_client( CONSTRAINT uq_oidc_client_public_key UNIQUE (public_key) ); -- ddl-end -- -COMMENT ON TABLE pms.oidc_client IS 'Client ID: Unique id assigned to registered OIDC client.'; +COMMENT ON TABLE pms.oidc_client.id IS 'Client ID: Unique id assigned to registered OIDC client.'; -- ddl-end -- COMMENT ON COLUMN pms.oidc_client.name IS 'Client Name: Registered name of OIDC client.'; -- ddl-end -- From 0d01585c6ae5688e69636b61478f1104fda8b89e Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Wed, 6 Sep 2023 17:57:43 +0530 Subject: [PATCH 36/74] [MOSIP-29315] Signed-off-by: Keshav Mishra Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/ddl/pms-oidc_client.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_scripts/mosip_pms/ddl/pms-oidc_client.sql b/db_scripts/mosip_pms/ddl/pms-oidc_client.sql index 8f87c7c37a..dd7ec35e8f 100644 --- a/db_scripts/mosip_pms/ddl/pms-oidc_client.sql +++ b/db_scripts/mosip_pms/ddl/pms-oidc_client.sql @@ -38,7 +38,7 @@ CREATE TABLE pms.oidc_client( CONSTRAINT uq_oidc_client_public_key UNIQUE (public_key) ); -- ddl-end -- -COMMENT ON TABLE pms.oidc_client.id IS 'Client ID: Unique id assigned to registered OIDC client.'; +COMMENT ON TABLE pms.oidc_client IS 'Client ID: Unique id assigned to registered OIDC client.'; -- ddl-end -- COMMENT ON COLUMN pms.oidc_client.name IS 'Client Name: Registered name of OIDC client.'; -- ddl-end -- From 04b87310cffa7d331126aba07737bb302f666569 Mon Sep 17 00:00:00 2001 From: bhumi46 <111699703+bhumi46@users.noreply.github.com> Date: Fri, 15 Sep 2023 13:12:46 +0530 Subject: [PATCH 37/74] [MOSIP-29256] updated reusable worklows (#602) * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 4 ++-- .github/workflows/release-changes.yml | 26 +++++++++++++++++++++ .github/workflows/tag.yml | 33 +++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release-changes.yml create mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index 6e58022b18..d202b3cc0a 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -4,7 +4,7 @@ on: release: types: [published] pull_request: - types: [opened, reopened, synchronize] + types: [opened] workflow_dispatch: inputs: message: @@ -35,7 +35,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} publish_to_nexus: - if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish' }}" + if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}" needs: build-maven-partner uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master with: diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml new file mode 100644 index 0000000000..2579ea836f --- /dev/null +++ b/.github/workflows/release-changes.yml @@ -0,0 +1,26 @@ +name: Release/pre-release Preparation. + +on: + workflow_dispatch: + inputs: + MESSAGE: + description: 'Triggered for release or pe-release' + required: false + default: 'Release Preparation' + RELEASE_TAG: + description: 'tag to update' + required: true + SNAPSHOT_TAG: + description: 'tag to be replaced' + required: true + BASE: + description: 'base branch for PR' + required: true +jobs: + maven-release-preparation: + uses: mosip/kattu/.github/workflows/release-changes.yml@master + with: + MESSAGE: ${{ inputs.MESSAGE }} + RELEASE_TAG: ${{ inputs.RELEASE_TAG }} + SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} + BASE: ${{ inputs.BASE }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000000..c4939a6e8c --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,33 @@ +name: Tagging of repos + +on: + workflow_dispatch: + inputs: + TAG: + description: 'Tag to be published' + required: true + type: string + BODY: + description: 'Release body message' + required: true + default: 'Changes in this Release' + type: string + PRE_RELEASE: + description: 'Pre-release? True/False' + required: true + default: False + type: string + DRAFT: + description: 'Draft? True/False' + required: false + default: False + type: string + +jobs: + tag-branch: + uses: mosip/kattu/.github/workflows/tag.yml@master + with: + TAG: ${{ inputs.TAG }} + BODY: ${{ inputs.BODY }} + PRE_RELEASE: ${{ inputs.PRE_RELEASE }} + DRAFT: ${{ inputs.DRAFT }} From 38798dc33e15820aa22332f027be6e8d94199878 Mon Sep 17 00:00:00 2001 From: bhumi46 <111699703+bhumi46@users.noreply.github.com> Date: Mon, 25 Sep 2023 20:18:34 +0530 Subject: [PATCH 38/74] [MOSIP-29256] updated reusable worklows (#603) * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/release-changes.yml | 5 ++++- .github/workflows/tag.yml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml index 2579ea836f..783d4896a2 100644 --- a/.github/workflows/release-changes.yml +++ b/.github/workflows/release-changes.yml @@ -23,4 +23,7 @@ jobs: MESSAGE: ${{ inputs.MESSAGE }} RELEASE_TAG: ${{ inputs.RELEASE_TAG }} SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} - BASE: ${{ inputs.BASE }} \ No newline at end of file + BASE: ${{ inputs.BASE }} + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + ACTION_PAT: ${{ secrets.ACTION_PAT }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index c4939a6e8c..c131f5aa9b 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -31,3 +31,5 @@ jobs: BODY: ${{ inputs.BODY }} PRE_RELEASE: ${{ inputs.PRE_RELEASE }} DRAFT: ${{ inputs.DRAFT }} + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} From 445dabb86b67fe3f4471b59771dbea7548715a01 Mon Sep 17 00:00:00 2001 From: Rakshithb1 <79500257+Rakshithb1@users.noreply.github.com> Date: Wed, 15 Nov 2023 12:20:30 +0530 Subject: [PATCH 39/74] [MOSIP-29918] added db-test.yml (#612) Signed-off-by: Rakshithb1 Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/db-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/db-test.yml b/.github/workflows/db-test.yml index c3ed7de2b3..430c25da0d 100644 --- a/.github/workflows/db-test.yml +++ b/.github/workflows/db-test.yml @@ -5,6 +5,8 @@ on: types: [published] pull_request: types: [opened, reopened, synchronize] + paths: + - 'db_scripts/**' workflow_dispatch: inputs: message: From 274a47e96c5f689d3dafeea8b7d3be686c5ce578 Mon Sep 17 00:00:00 2001 From: Rakshith B <79500257+Rakshithb1@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:31:47 +0530 Subject: [PATCH 40/74] [MOSIP-29961] Updated push-trigger.yml (#621) * [MOSIP-29961] removed paths from db-test.yml Signed-off-by: Rakshith B <79500257+Rakshithb1@users.noreply.github.com> * [MOSIP-29961] Updated push-trigger.yml Signed-off-by: Rakshith B <79500257+Rakshithb1@users.noreply.github.com> --------- Signed-off-by: Rakshith B <79500257+Rakshithb1@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/db-test.yml | 2 -- .github/workflows/push-trigger.yml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/db-test.yml b/.github/workflows/db-test.yml index 430c25da0d..c3ed7de2b3 100644 --- a/.github/workflows/db-test.yml +++ b/.github/workflows/db-test.yml @@ -5,8 +5,6 @@ on: types: [published] pull_request: types: [opened, reopened, synchronize] - paths: - - 'db_scripts/**' workflow_dispatch: inputs: message: diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index d202b3cc0a..c429dcc3d4 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -4,7 +4,7 @@ on: release: types: [published] pull_request: - types: [opened] + types: [opened, reopened, synchronize] workflow_dispatch: inputs: message: From 5fee11d56acfda5e4b0e7cc381de6c18527e0562 Mon Sep 17 00:00:00 2001 From: PRAFUL RAKHADE <99539100+Prafulrakhade@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:33:27 +0530 Subject: [PATCH 41/74] [DSD-3932] removed release-changes.yml, tag.yml and updated push-trigger.yml file (#618) Signed-off-by: techno-467 Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 2 +- .github/workflows/release-changes.yml | 29 ---------------------- .github/workflows/tag.yml | 35 --------------------------- 3 files changed, 1 insertion(+), 65 deletions(-) delete mode 100644 .github/workflows/release-changes.yml delete mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index c429dcc3d4..6e58022b18 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -35,7 +35,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} publish_to_nexus: - if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}" + if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish' }}" needs: build-maven-partner uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master with: diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml deleted file mode 100644 index 783d4896a2..0000000000 --- a/.github/workflows/release-changes.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Release/pre-release Preparation. - -on: - workflow_dispatch: - inputs: - MESSAGE: - description: 'Triggered for release or pe-release' - required: false - default: 'Release Preparation' - RELEASE_TAG: - description: 'tag to update' - required: true - SNAPSHOT_TAG: - description: 'tag to be replaced' - required: true - BASE: - description: 'base branch for PR' - required: true -jobs: - maven-release-preparation: - uses: mosip/kattu/.github/workflows/release-changes.yml@master - with: - MESSAGE: ${{ inputs.MESSAGE }} - RELEASE_TAG: ${{ inputs.RELEASE_TAG }} - SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} - BASE: ${{ inputs.BASE }} - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - ACTION_PAT: ${{ secrets.ACTION_PAT }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml deleted file mode 100644 index c131f5aa9b..0000000000 --- a/.github/workflows/tag.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Tagging of repos - -on: - workflow_dispatch: - inputs: - TAG: - description: 'Tag to be published' - required: true - type: string - BODY: - description: 'Release body message' - required: true - default: 'Changes in this Release' - type: string - PRE_RELEASE: - description: 'Pre-release? True/False' - required: true - default: False - type: string - DRAFT: - description: 'Draft? True/False' - required: false - default: False - type: string - -jobs: - tag-branch: - uses: mosip/kattu/.github/workflows/tag.yml@master - with: - TAG: ${{ inputs.TAG }} - BODY: ${{ inputs.BODY }} - PRE_RELEASE: ${{ inputs.PRE_RELEASE }} - DRAFT: ${{ inputs.DRAFT }} - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} From bc54876bf006c6d1b8dbb271dc0a800f3f0f0e72 Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:51:16 +0530 Subject: [PATCH 42/74] MOSIP-25622 : Updated OIDC Client Details For Audit Purpose Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../pms/oidc/client/controller/ClientManagementController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java index f2ab2c1d01..53dcc963d8 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java @@ -42,7 +42,7 @@ public ResponseWrapper createClient( @RequestMapping(value = "/oidc/client/{client_id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseWrapper updateClient(@PathVariable("client_id") String clientId, - @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { + @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { var clientRespDto = clientManagementService.updateOIDCClient(clientId, requestWrapper.getRequest()); var response = new ResponseWrapper(); auditUtil.setAuditRequestDto(ClientServiceAuditEnum.UPDATE_CLIENT, clientId, "clientID"); From 41629743871dab3ed429126080003baf15df2024 Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Thu, 7 Dec 2023 10:56:21 +0530 Subject: [PATCH 43/74] Update pms-partner_type.csv Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/dml/pms-partner_type.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_scripts/mosip_pms/dml/pms-partner_type.csv b/db_scripts/mosip_pms/dml/pms-partner_type.csv index 3809c77f22..6c6e015c43 100644 --- a/db_scripts/mosip_pms/dml/pms-partner_type.csv +++ b/db_scripts/mosip_pms/dml/pms-partner_type.csv @@ -7,7 +7,7 @@ FTM_Provider,FTM Provider,TRUE,superadmin,now(),FALSE Online_Verification_Partner,Online_Verification_Partner,TRUE,superadmin,now(),TRUE ABIS_Partner,ABIS Partner,TRUE,superadmin,now(),TRUE Manual_Adjudication,Manual Adjudication,TRUE,superadmin,now(),TRUE -MISP_Partner,MISP_Partner,TRUE,superadmin,now(),TRUE +MISP_Partner,MISP_Partner,TRUE,superadmin,now(),FALSE Internal_Partner,Used internally to share certs,TRUE,superadmin,now(),TRUE SDK_Partner,SDK Partner,TRUE,superadmin,now(),FALSE Print_Partner,Print Partner,TRUE,superadmin,now(),TRUE From a96891e761203397b463b6697b0c195eedd87a29 Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:16:16 +0530 Subject: [PATCH 44/74] [DSD-3823]Update pms-partner_policy_bioextract.csv Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../dml/pms-partner_policy_bioextract.csv | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/db_scripts/mosip_pms/dml/pms-partner_policy_bioextract.csv b/db_scripts/mosip_pms/dml/pms-partner_policy_bioextract.csv index e55356be37..020d043cb6 100644 --- a/db_scripts/mosip_pms/dml/pms-partner_policy_bioextract.csv +++ b/db_scripts/mosip_pms/dml/pms-partner_policy_bioextract.csv @@ -1,22 +1,22 @@ id,part_id,policy_id,attribute_name,extractor_provider,extractor_provider_version,biometric_modality,biometric_sub_types,cr_by,cr_dtimes,upd_by,upd_dtimes -146098,mpartner-default-auth,mpolicy-default-auth,photo,mock,1.1,face,,admin,now(),admin,now() -146099,mpartner-default-auth,mpolicy-default-auth,iris,mock,1.1,iris,,admin,now(),admin,now() -146100,mpartner-default-auth,mpolicy-default-auth,fingerprint,mock,1.1,finger,,admin,now(),admin,now() -146101,mpartner-default-print,mpolicy-default-qrcode,photo,mock,1.1,face,,admin,now(),admin,now() -146102,mpartner-default-print,mpolicy-default-qrcode,iris,mock,1.1,iris,,admin,now(),admin,now() -146103,mpartner-default-print,mpolicy-default-qrcode,fingerprint,mock,1.1,finger,,admin,now(),admin,now() -146104,mpartner-default-print,mpolicy-default-euin,photo,mock,1.1,face,,admin,now(),admin,now() -146105,mpartner-default-print,mpolicy-default-euin,iris,mock,1.1,iris,,admin,now(),admin,now() -146106,mpartner-default-print,mpolicy-default-euin,fingerprint,mock,1.1,finger,,admin,now(),admin,now() -146107,mpartner-default-print,mpolicy-default-reprint,photo,mock,1.1,face,,admin,now(),admin,now() -146108,mpartner-default-print,mpolicy-default-reprint,iris,mock,1.1,iris,,admin,now(),admin,now() -146109,mpartner-default-print,mpolicy-default-reprint,fingerprint,mock,1.1,finger,,admin,now(),admin,now() -146110,mpartner-default-print,mpolicy-default-eUIN_with_QR,photo,mock,1.1,face,,admin,now(),admin,now() -146111,mpartner-default-print,mpolicy-default-eUIN_with_QR,iris,mock,1.1,iris,,admin,now(),admin,now() -146112,mpartner-default-print,mpolicy-default-eUIN_with_QR,fingerprint,mock,1.1,finger,,admin,now(),admin,now() -146113,mpartner-default-print,mpolicy-default-eUIN_with_faceQR,photo,mock,1.1,face,,admin,now(),admin,now() -146114,mpartner-default-print,mpolicy-default-eUIN_with_faceQR,iris,mock,1.1,iris,,admin,now(),admin,now() -146115,mpartner-default-print,mpolicy-default-eUIN_with_faceQR,fingerprint,mock,1.1,finger,,admin,now(),admin,now() -146116,mpartner-default-digitalcard,mpolicy-default-PDFCard,photo,mock,1.1,face,,admin,now(),admin,now() -146117,mpartner-default-digitalcard,mpolicy-default-PDFCard,iris,mock,1.1,iris,,admin,now(),admin,now() -146118,mpartner-default-digitalcard,mpolicy-default-PDFCard,fingerprint,mock,1.1,finger,,admin,now(),admin,now() +146098,mpartner-default-auth,mpolicy-default-auth,individualBiometrics,mock,1.1,face,,admin,now(),admin,now() +146099,mpartner-default-auth,mpolicy-default-auth,individualBiometrics,mock,1.1,iris,,admin,now(),admin,now() +146100,mpartner-default-auth,mpolicy-default-auth,individualBiometrics,mock,1.1,finger,,admin,now(),admin,now() +146101,mpartner-default-print,mpolicy-default-qrcode,individualBiometrics,mock,1.1,face,,admin,now(),admin,now() +146102,mpartner-default-print,mpolicy-default-qrcode,individualBiometrics,mock,1.1,iris,,admin,now(),admin,now() +146103,mpartner-default-print,mpolicy-default-qrcode,individualBiometrics,mock,1.1,finger,,admin,now(),admin,now() +146104,mpartner-default-print,mpolicy-default-euin,individualBiometrics,mock,1.1,face,,admin,now(),admin,now() +146105,mpartner-default-print,mpolicy-default-euin,individualBiometrics,mock,1.1,iris,,admin,now(),admin,now() +146106,mpartner-default-print,mpolicy-default-euin,individualBiometrics,mock,1.1,finger,,admin,now(),admin,now() +146107,mpartner-default-print,mpolicy-default-reprint,individualBiometrics,mock,1.1,face,,admin,now(),admin,now() +146108,mpartner-default-print,mpolicy-default-reprint,individualBiometrics,mock,1.1,iris,,admin,now(),admin,now() +146109,mpartner-default-print,mpolicy-default-reprint,individualBiometrics,mock,1.1,finger,,admin,now(),admin,now() +146110,mpartner-default-print,mpolicy-default-eUIN_with_QR,individualBiometrics,mock,1.1,face,,admin,now(),admin,now() +146111,mpartner-default-print,mpolicy-default-eUIN_with_QR,individualBiometrics,mock,1.1,iris,,admin,now(),admin,now() +146112,mpartner-default-print,mpolicy-default-eUIN_with_QR,individualBiometrics,mock,1.1,finger,,admin,now(),admin,now() +146113,mpartner-default-print,mpolicy-default-eUIN_with_faceQR,individualBiometrics,mock,1.1,face,,admin,now(),admin,now() +146114,mpartner-default-print,mpolicy-default-eUIN_with_faceQR,individualBiometrics,mock,1.1,iris,,admin,now(),admin,now() +146115,mpartner-default-print,mpolicy-default-eUIN_with_faceQR,individualBiometrics,mock,1.1,finger,,admin,now(),admin,now() +146116,mpartner-default-digitalcard,mpolicy-default-PDFCard,individualBiometrics,mock,1.1,face,,admin,now(),admin,now() +146117,mpartner-default-digitalcard,mpolicy-default-PDFCard,individualBiometrics,mock,1.1,iris,,admin,now(),admin,now() +146118,mpartner-default-digitalcard,mpolicy-default-PDFCard,individualBiometrics,mock,1.1,finger,,admin,now(),admin,now() From 04ce7874bb41f3ab8c5032491d9468616bc38d3a Mon Sep 17 00:00:00 2001 From: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 4 Jul 2023 11:53:20 +0530 Subject: [PATCH 45/74] Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql Signed-off-by: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 4805e0c829..4f6bb4acad 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'mpolicy-default-PDFCard', 'mpolicy-default-PDFCard', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', '1', 'https://schemas.mosip.io/v1/auth-policy', '2022-09-20 09:00:54.316627', '2025-04-28 09:37:00', true, 'admin', '2022-09-20 09:00:54.316627', 'admin', '2022-09-20 09:00:54.316627', false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From 77528fbebe0cde0d09a35c1b1273473daeee419a Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:01:12 +0530 Subject: [PATCH 46/74] Update pms-auth_policy.csv (#586) * Update pms-auth_policy.csv Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> * Update pms-auth_policy.csv * Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql * Update pms-auth_policy.csv * Update pms-auth_policy.csv * Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql * Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql --------- Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 4f6bb4acad..4805e0c829 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'mpolicy-default-PDFCard', 'mpolicy-default-PDFCard', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', '1', 'https://schemas.mosip.io/v1/auth-policy', '2022-09-20 09:00:54.316627', '2025-04-28 09:37:00', true, 'admin', '2022-09-20 09:00:54.316627', 'admin', '2022-09-20 09:00:54.316627', false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From fba37772198e883f4a019dff056f516f975ce0bd Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 17 Aug 2023 19:37:19 +0530 Subject: [PATCH 47/74] Revert "Update pms-auth_policy.csv (#586)" (#595) This reverts commit 694c8282f16c3de443d3938b1b8b1e6e2133fe02. Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 4805e0c829..5019373207 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"firstName","filter":[{"language":"eng"}]},{"attribute":"middleName","filter":[{"language":"eng"}]},{"attribute":"lastName","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"mobileno"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"permanentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"presentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"presentProvince"},{"attribute":"permanentProvince"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"permanentCity"},{"attribute":"presentCity"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"postalCode","source":[{"attribute":"presentZipcode","filter":[{"language":"eng"}]},{"attribute":"permanentZipcode","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"}]}],"encrypted":false,"format":"extraction"}],"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"}}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', '2020-12-16 12:30:14.183', '2025-04-28 09:37:00.000', true, 'admin', '2020-12-16 12:30:14.183', 'service-account-mosip-creser-client', '2021-02-09 06:50:22.065', false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From 50ffda5b4ee1423af361a9ac2c17e0f436fdec89 Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Fri, 18 Aug 2023 13:55:22 +0530 Subject: [PATCH 48/74] Revert "Revert "Update pms-auth_policy.csv (#586)" (#595)" (#596) This reverts commit c661c62563dba72a6617344a38c43b8e6bc981a3. Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 5019373207..4805e0c829 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"firstName","filter":[{"language":"eng"}]},{"attribute":"middleName","filter":[{"language":"eng"}]},{"attribute":"lastName","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"mobileno"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"permanentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"presentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"presentProvince"},{"attribute":"permanentProvince"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"permanentCity"},{"attribute":"presentCity"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"postalCode","source":[{"attribute":"presentZipcode","filter":[{"language":"eng"}]},{"attribute":"permanentZipcode","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"}]}],"encrypted":false,"format":"extraction"}],"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"}}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', '2020-12-16 12:30:14.183', '2025-04-28 09:37:00.000', true, 'admin', '2020-12-16 12:30:14.183', 'service-account-mosip-creser-client', '2021-02-09 06:50:22.065', false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From e4d5d6621550121609401f317aec505a169931ca Mon Sep 17 00:00:00 2001 From: bhumi46 <111699703+bhumi46@users.noreply.github.com> Date: Fri, 15 Sep 2023 13:12:46 +0530 Subject: [PATCH 49/74] [MOSIP-29256] updated reusable worklows (#602) * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/release-changes.yml | 26 +++++++++++++++++++++ .github/workflows/tag.yml | 33 +++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/release-changes.yml create mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml new file mode 100644 index 0000000000..2579ea836f --- /dev/null +++ b/.github/workflows/release-changes.yml @@ -0,0 +1,26 @@ +name: Release/pre-release Preparation. + +on: + workflow_dispatch: + inputs: + MESSAGE: + description: 'Triggered for release or pe-release' + required: false + default: 'Release Preparation' + RELEASE_TAG: + description: 'tag to update' + required: true + SNAPSHOT_TAG: + description: 'tag to be replaced' + required: true + BASE: + description: 'base branch for PR' + required: true +jobs: + maven-release-preparation: + uses: mosip/kattu/.github/workflows/release-changes.yml@master + with: + MESSAGE: ${{ inputs.MESSAGE }} + RELEASE_TAG: ${{ inputs.RELEASE_TAG }} + SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} + BASE: ${{ inputs.BASE }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000000..c4939a6e8c --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,33 @@ +name: Tagging of repos + +on: + workflow_dispatch: + inputs: + TAG: + description: 'Tag to be published' + required: true + type: string + BODY: + description: 'Release body message' + required: true + default: 'Changes in this Release' + type: string + PRE_RELEASE: + description: 'Pre-release? True/False' + required: true + default: False + type: string + DRAFT: + description: 'Draft? True/False' + required: false + default: False + type: string + +jobs: + tag-branch: + uses: mosip/kattu/.github/workflows/tag.yml@master + with: + TAG: ${{ inputs.TAG }} + BODY: ${{ inputs.BODY }} + PRE_RELEASE: ${{ inputs.PRE_RELEASE }} + DRAFT: ${{ inputs.DRAFT }} From 16adf97d3779ca1b6ab7052ec544c73ef72aaa5b Mon Sep 17 00:00:00 2001 From: bhumi46 <111699703+bhumi46@users.noreply.github.com> Date: Mon, 25 Sep 2023 20:18:34 +0530 Subject: [PATCH 50/74] [MOSIP-29256] updated reusable worklows (#603) * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/release-changes.yml | 5 ++++- .github/workflows/tag.yml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml index 2579ea836f..783d4896a2 100644 --- a/.github/workflows/release-changes.yml +++ b/.github/workflows/release-changes.yml @@ -23,4 +23,7 @@ jobs: MESSAGE: ${{ inputs.MESSAGE }} RELEASE_TAG: ${{ inputs.RELEASE_TAG }} SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} - BASE: ${{ inputs.BASE }} \ No newline at end of file + BASE: ${{ inputs.BASE }} + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + ACTION_PAT: ${{ secrets.ACTION_PAT }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index c4939a6e8c..c131f5aa9b 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -31,3 +31,5 @@ jobs: BODY: ${{ inputs.BODY }} PRE_RELEASE: ${{ inputs.PRE_RELEASE }} DRAFT: ${{ inputs.DRAFT }} + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} From 14cee22e5e77fad590f074903c6217842f7deccb Mon Sep 17 00:00:00 2001 From: PRAFUL RAKHADE <99539100+Prafulrakhade@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:33:27 +0530 Subject: [PATCH 51/74] [DSD-3932] removed release-changes.yml, tag.yml and updated push-trigger.yml file (#618) Signed-off-by: techno-467 Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/release-changes.yml | 29 ---------------------- .github/workflows/tag.yml | 35 --------------------------- 2 files changed, 64 deletions(-) delete mode 100644 .github/workflows/release-changes.yml delete mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml deleted file mode 100644 index 783d4896a2..0000000000 --- a/.github/workflows/release-changes.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Release/pre-release Preparation. - -on: - workflow_dispatch: - inputs: - MESSAGE: - description: 'Triggered for release or pe-release' - required: false - default: 'Release Preparation' - RELEASE_TAG: - description: 'tag to update' - required: true - SNAPSHOT_TAG: - description: 'tag to be replaced' - required: true - BASE: - description: 'base branch for PR' - required: true -jobs: - maven-release-preparation: - uses: mosip/kattu/.github/workflows/release-changes.yml@master - with: - MESSAGE: ${{ inputs.MESSAGE }} - RELEASE_TAG: ${{ inputs.RELEASE_TAG }} - SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} - BASE: ${{ inputs.BASE }} - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - ACTION_PAT: ${{ secrets.ACTION_PAT }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml deleted file mode 100644 index c131f5aa9b..0000000000 --- a/.github/workflows/tag.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Tagging of repos - -on: - workflow_dispatch: - inputs: - TAG: - description: 'Tag to be published' - required: true - type: string - BODY: - description: 'Release body message' - required: true - default: 'Changes in this Release' - type: string - PRE_RELEASE: - description: 'Pre-release? True/False' - required: true - default: False - type: string - DRAFT: - description: 'Draft? True/False' - required: false - default: False - type: string - -jobs: - tag-branch: - uses: mosip/kattu/.github/workflows/tag.yml@master - with: - TAG: ${{ inputs.TAG }} - BODY: ${{ inputs.BODY }} - PRE_RELEASE: ${{ inputs.PRE_RELEASE }} - DRAFT: ${{ inputs.DRAFT }} - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} From 77958ff3e8f739c3d68ac4bec1434ba55bb24174 Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:51:16 +0530 Subject: [PATCH 52/74] MOSIP-25622 : Updated OIDC Client Details For Audit Purpose Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java | 2 +- .../pms/oidc/client/controller/ClientManagementController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java index 3787e12d40..7efb5c08b2 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java @@ -97,4 +97,4 @@ public String getApplicationName() { this.applicationName = applicationName; } -} +} \ No newline at end of file diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java index 53dcc963d8..9d016c8e9f 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java @@ -57,4 +57,4 @@ public ResponseWrapper getClient(@PathVariable("client_id") String response.setResponse(clientManagementService.getClientDetails(clientId)); return response; } -} +} \ No newline at end of file From c321fceee0464a378edb91054d6bbf87376b93eb Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Thu, 13 Apr 2023 09:56:09 +0530 Subject: [PATCH 53/74] Updated the return type in the controller Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../ClientManagementController.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java index 9d016c8e9f..a22b0ee3ff 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java @@ -36,16 +36,30 @@ public ResponseWrapper createClient( var clientRespDto = clientManagementService.createOIDCClient(requestWrapper.getRequest()); var response = new ResponseWrapper(); auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT,requestWrapper.getRequest().getName(),"clientID"); +<<<<<<< HEAD +======= + response.setId(requestWrapper.getId()); + response.setVersion(requestWrapper.getVersion()); +>>>>>>> 4357b0a6 (Updated the return type in the controller) response.setResponse(clientRespDto); return response; } @RequestMapping(value = "/oidc/client/{client_id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseWrapper updateClient(@PathVariable("client_id") String clientId, +<<<<<<< HEAD @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { var clientRespDto = clientManagementService.updateOIDCClient(clientId, requestWrapper.getRequest()); var response = new ResponseWrapper(); auditUtil.setAuditRequestDto(ClientServiceAuditEnum.UPDATE_CLIENT, clientId, "clientID"); +======= + @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { + var clientRespDto = clientManagementService.updateOIDCClient(clientId, requestWrapper.getRequest()); + var response = new ResponseWrapper(); + auditUtil.setAuditRequestDto(ClientServiceAuditEnum.UPDATE_CLIENT, clientId, "clientID"); + response.setId(requestWrapper.getId()); + response.setVersion(requestWrapper.getVersion()); +>>>>>>> 4357b0a6 (Updated the return type in the controller) response.setResponse(clientRespDto); return response; } @@ -55,6 +69,11 @@ public ResponseWrapper getClient(@PathVariable("client_id") String throws Exception { var response = new ResponseWrapper(); response.setResponse(clientManagementService.getClientDetails(clientId)); +<<<<<<< HEAD +======= + response.setId(msg); + response.setVersion(version); +>>>>>>> 4357b0a6 (Updated the return type in the controller) return response; } } \ No newline at end of file From b543590267f37a5ee0ac0688160744970f588fcc Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Thu, 13 Apr 2023 13:30:34 +0530 Subject: [PATCH 54/74] Removed Set Items Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../ClientManagementController.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java index a22b0ee3ff..9d016c8e9f 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java @@ -36,30 +36,16 @@ public ResponseWrapper createClient( var clientRespDto = clientManagementService.createOIDCClient(requestWrapper.getRequest()); var response = new ResponseWrapper(); auditUtil.setAuditRequestDto(ClientServiceAuditEnum.CREATE_CLIENT,requestWrapper.getRequest().getName(),"clientID"); -<<<<<<< HEAD -======= - response.setId(requestWrapper.getId()); - response.setVersion(requestWrapper.getVersion()); ->>>>>>> 4357b0a6 (Updated the return type in the controller) response.setResponse(clientRespDto); return response; } @RequestMapping(value = "/oidc/client/{client_id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseWrapper updateClient(@PathVariable("client_id") String clientId, -<<<<<<< HEAD @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { var clientRespDto = clientManagementService.updateOIDCClient(clientId, requestWrapper.getRequest()); var response = new ResponseWrapper(); auditUtil.setAuditRequestDto(ClientServiceAuditEnum.UPDATE_CLIENT, clientId, "clientID"); -======= - @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { - var clientRespDto = clientManagementService.updateOIDCClient(clientId, requestWrapper.getRequest()); - var response = new ResponseWrapper(); - auditUtil.setAuditRequestDto(ClientServiceAuditEnum.UPDATE_CLIENT, clientId, "clientID"); - response.setId(requestWrapper.getId()); - response.setVersion(requestWrapper.getVersion()); ->>>>>>> 4357b0a6 (Updated the return type in the controller) response.setResponse(clientRespDto); return response; } @@ -69,11 +55,6 @@ public ResponseWrapper getClient(@PathVariable("client_id") String throws Exception { var response = new ResponseWrapper(); response.setResponse(clientManagementService.getClientDetails(clientId)); -<<<<<<< HEAD -======= - response.setId(msg); - response.setVersion(version); ->>>>>>> 4357b0a6 (Updated the return type in the controller) return response; } } \ No newline at end of file From 25ff718ec2d295c3807b9f294ddf7bb876c75630 Mon Sep 17 00:00:00 2001 From: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 4 Jul 2023 11:53:20 +0530 Subject: [PATCH 55/74] Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql Signed-off-by: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 4805e0c829..4f6bb4acad 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'mpolicy-default-PDFCard', 'mpolicy-default-PDFCard', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', '1', 'https://schemas.mosip.io/v1/auth-policy', '2022-09-20 09:00:54.316627', '2025-04-28 09:37:00', true, 'admin', '2022-09-20 09:00:54.316627', 'admin', '2022-09-20 09:00:54.316627', false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From 29ec188bab7d667796b9d70c1773b9782d0e8ce1 Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:01:12 +0530 Subject: [PATCH 56/74] Update pms-auth_policy.csv (#586) * Update pms-auth_policy.csv Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> * Update pms-auth_policy.csv * Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql * Update pms-auth_policy.csv * Update pms-auth_policy.csv * Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql * Update 1.2.0.1_to_1.2.0.1-B2_upgrade.sql --------- Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 4f6bb4acad..4805e0c829 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'mpolicy-default-PDFCard', 'mpolicy-default-PDFCard', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', '1', 'https://schemas.mosip.io/v1/auth-policy', '2022-09-20 09:00:54.316627', '2025-04-28 09:37:00', true, 'admin', '2022-09-20 09:00:54.316627', 'admin', '2022-09-20 09:00:54.316627', false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From 8118304de3c0d850086067de3a55de7ac3cea9a6 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 17 Aug 2023 19:37:19 +0530 Subject: [PATCH 57/74] Revert "Update pms-auth_policy.csv (#586)" (#595) This reverts commit 694c8282f16c3de443d3938b1b8b1e6e2133fe02. Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 4805e0c829..5019373207 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"firstName","filter":[{"language":"eng"}]},{"attribute":"middleName","filter":[{"language":"eng"}]},{"attribute":"lastName","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"mobileno"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"permanentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"presentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"presentProvince"},{"attribute":"permanentProvince"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"permanentCity"},{"attribute":"presentCity"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"postalCode","source":[{"attribute":"presentZipcode","filter":[{"language":"eng"}]},{"attribute":"permanentZipcode","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"}]}],"encrypted":false,"format":"extraction"}],"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"}}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', '2020-12-16 12:30:14.183', '2025-04-28 09:37:00.000', true, 'admin', '2020-12-16 12:30:14.183', 'service-account-mosip-creser-client', '2021-02-09 06:50:22.065', false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From 836b9bd4b8d3b9bb09563bab1dd3cccccde7b6bc Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Fri, 18 Aug 2023 13:55:22 +0530 Subject: [PATCH 58/74] Revert "Revert "Update pms-auth_policy.csv (#586)" (#595)" (#596) This reverts commit c661c62563dba72a6617344a38c43b8e6bc981a3. Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 5019373207..4805e0c829 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"firstName","filter":[{"language":"eng"}]},{"attribute":"middleName","filter":[{"language":"eng"}]},{"attribute":"lastName","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"mobileno"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"permanentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"presentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"presentProvince"},{"attribute":"permanentProvince"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"permanentCity"},{"attribute":"presentCity"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"postalCode","source":[{"attribute":"presentZipcode","filter":[{"language":"eng"}]},{"attribute":"permanentZipcode","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"}]}],"encrypted":false,"format":"extraction"}],"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"}}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', '2020-12-16 12:30:14.183', '2025-04-28 09:37:00.000', true, 'admin', '2020-12-16 12:30:14.183', 'service-account-mosip-creser-client', '2021-02-09 06:50:22.065', false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From 2657db1baacd30d2ddcaae47a5cca1059055095e Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Wed, 6 Sep 2023 14:43:41 +0530 Subject: [PATCH 59/74] [MOSIP-29315] Update pms-oidc_client.sql Signed-off-by: Keshav Mishra Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/ddl/pms-oidc_client.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_scripts/mosip_pms/ddl/pms-oidc_client.sql b/db_scripts/mosip_pms/ddl/pms-oidc_client.sql index dd7ec35e8f..8f87c7c37a 100644 --- a/db_scripts/mosip_pms/ddl/pms-oidc_client.sql +++ b/db_scripts/mosip_pms/ddl/pms-oidc_client.sql @@ -38,7 +38,7 @@ CREATE TABLE pms.oidc_client( CONSTRAINT uq_oidc_client_public_key UNIQUE (public_key) ); -- ddl-end -- -COMMENT ON TABLE pms.oidc_client IS 'Client ID: Unique id assigned to registered OIDC client.'; +COMMENT ON TABLE pms.oidc_client.id IS 'Client ID: Unique id assigned to registered OIDC client.'; -- ddl-end -- COMMENT ON COLUMN pms.oidc_client.name IS 'Client Name: Registered name of OIDC client.'; -- ddl-end -- From c17d2cb2a0eab460fafffe66ba3326fb29ce1252 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Wed, 6 Sep 2023 17:57:43 +0530 Subject: [PATCH 60/74] [MOSIP-29315] Signed-off-by: Keshav Mishra Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/ddl/pms-oidc_client.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_scripts/mosip_pms/ddl/pms-oidc_client.sql b/db_scripts/mosip_pms/ddl/pms-oidc_client.sql index 8f87c7c37a..dd7ec35e8f 100644 --- a/db_scripts/mosip_pms/ddl/pms-oidc_client.sql +++ b/db_scripts/mosip_pms/ddl/pms-oidc_client.sql @@ -38,7 +38,7 @@ CREATE TABLE pms.oidc_client( CONSTRAINT uq_oidc_client_public_key UNIQUE (public_key) ); -- ddl-end -- -COMMENT ON TABLE pms.oidc_client.id IS 'Client ID: Unique id assigned to registered OIDC client.'; +COMMENT ON TABLE pms.oidc_client IS 'Client ID: Unique id assigned to registered OIDC client.'; -- ddl-end -- COMMENT ON COLUMN pms.oidc_client.name IS 'Client Name: Registered name of OIDC client.'; -- ddl-end -- From 1ec1d06b4669fe2313db845af36f15fc62fe15ed Mon Sep 17 00:00:00 2001 From: bhumi46 <111699703+bhumi46@users.noreply.github.com> Date: Fri, 15 Sep 2023 13:12:46 +0530 Subject: [PATCH 61/74] [MOSIP-29256] updated reusable worklows (#602) * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 4 ++-- .github/workflows/release-changes.yml | 26 +++++++++++++++++++++ .github/workflows/tag.yml | 33 +++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release-changes.yml create mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index 6e58022b18..d202b3cc0a 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -4,7 +4,7 @@ on: release: types: [published] pull_request: - types: [opened, reopened, synchronize] + types: [opened] workflow_dispatch: inputs: message: @@ -35,7 +35,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} publish_to_nexus: - if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish' }}" + if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}" needs: build-maven-partner uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master with: diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml new file mode 100644 index 0000000000..2579ea836f --- /dev/null +++ b/.github/workflows/release-changes.yml @@ -0,0 +1,26 @@ +name: Release/pre-release Preparation. + +on: + workflow_dispatch: + inputs: + MESSAGE: + description: 'Triggered for release or pe-release' + required: false + default: 'Release Preparation' + RELEASE_TAG: + description: 'tag to update' + required: true + SNAPSHOT_TAG: + description: 'tag to be replaced' + required: true + BASE: + description: 'base branch for PR' + required: true +jobs: + maven-release-preparation: + uses: mosip/kattu/.github/workflows/release-changes.yml@master + with: + MESSAGE: ${{ inputs.MESSAGE }} + RELEASE_TAG: ${{ inputs.RELEASE_TAG }} + SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} + BASE: ${{ inputs.BASE }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000000..c4939a6e8c --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,33 @@ +name: Tagging of repos + +on: + workflow_dispatch: + inputs: + TAG: + description: 'Tag to be published' + required: true + type: string + BODY: + description: 'Release body message' + required: true + default: 'Changes in this Release' + type: string + PRE_RELEASE: + description: 'Pre-release? True/False' + required: true + default: False + type: string + DRAFT: + description: 'Draft? True/False' + required: false + default: False + type: string + +jobs: + tag-branch: + uses: mosip/kattu/.github/workflows/tag.yml@master + with: + TAG: ${{ inputs.TAG }} + BODY: ${{ inputs.BODY }} + PRE_RELEASE: ${{ inputs.PRE_RELEASE }} + DRAFT: ${{ inputs.DRAFT }} From 457741748e47fb8c263ee4d3976634dfa5eca7db Mon Sep 17 00:00:00 2001 From: bhumi46 <111699703+bhumi46@users.noreply.github.com> Date: Mon, 25 Sep 2023 20:18:34 +0530 Subject: [PATCH 62/74] [MOSIP-29256] updated reusable worklows (#603) * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/release-changes.yml | 5 ++++- .github/workflows/tag.yml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml index 2579ea836f..783d4896a2 100644 --- a/.github/workflows/release-changes.yml +++ b/.github/workflows/release-changes.yml @@ -23,4 +23,7 @@ jobs: MESSAGE: ${{ inputs.MESSAGE }} RELEASE_TAG: ${{ inputs.RELEASE_TAG }} SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} - BASE: ${{ inputs.BASE }} \ No newline at end of file + BASE: ${{ inputs.BASE }} + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + ACTION_PAT: ${{ secrets.ACTION_PAT }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index c4939a6e8c..c131f5aa9b 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -31,3 +31,5 @@ jobs: BODY: ${{ inputs.BODY }} PRE_RELEASE: ${{ inputs.PRE_RELEASE }} DRAFT: ${{ inputs.DRAFT }} + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} From 363b8758f9467304aa6ed65631ea1b07ef60c2a2 Mon Sep 17 00:00:00 2001 From: Rakshithb1 <79500257+Rakshithb1@users.noreply.github.com> Date: Wed, 15 Nov 2023 12:20:30 +0530 Subject: [PATCH 63/74] [MOSIP-29918] added db-test.yml (#612) Signed-off-by: Rakshithb1 Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/db-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/db-test.yml b/.github/workflows/db-test.yml index c3ed7de2b3..430c25da0d 100644 --- a/.github/workflows/db-test.yml +++ b/.github/workflows/db-test.yml @@ -5,6 +5,8 @@ on: types: [published] pull_request: types: [opened, reopened, synchronize] + paths: + - 'db_scripts/**' workflow_dispatch: inputs: message: From 0652ad3f0f1a30ead417d9e40962c87926b427d3 Mon Sep 17 00:00:00 2001 From: Rakshith B <79500257+Rakshithb1@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:31:47 +0530 Subject: [PATCH 64/74] [MOSIP-29961] Updated push-trigger.yml (#621) * [MOSIP-29961] removed paths from db-test.yml Signed-off-by: Rakshith B <79500257+Rakshithb1@users.noreply.github.com> * [MOSIP-29961] Updated push-trigger.yml Signed-off-by: Rakshith B <79500257+Rakshithb1@users.noreply.github.com> --------- Signed-off-by: Rakshith B <79500257+Rakshithb1@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/db-test.yml | 2 -- .github/workflows/push-trigger.yml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/db-test.yml b/.github/workflows/db-test.yml index 430c25da0d..c3ed7de2b3 100644 --- a/.github/workflows/db-test.yml +++ b/.github/workflows/db-test.yml @@ -5,8 +5,6 @@ on: types: [published] pull_request: types: [opened, reopened, synchronize] - paths: - - 'db_scripts/**' workflow_dispatch: inputs: message: diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index d202b3cc0a..c429dcc3d4 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -4,7 +4,7 @@ on: release: types: [published] pull_request: - types: [opened] + types: [opened, reopened, synchronize] workflow_dispatch: inputs: message: From 33feb19889d5079602a0d9c764e06b0ed6d56d11 Mon Sep 17 00:00:00 2001 From: PRAFUL RAKHADE <99539100+Prafulrakhade@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:33:27 +0530 Subject: [PATCH 65/74] [DSD-3932] removed release-changes.yml, tag.yml and updated push-trigger.yml file (#618) Signed-off-by: techno-467 Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 2 +- .github/workflows/release-changes.yml | 29 ---------------------- .github/workflows/tag.yml | 35 --------------------------- 3 files changed, 1 insertion(+), 65 deletions(-) delete mode 100644 .github/workflows/release-changes.yml delete mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index c429dcc3d4..6e58022b18 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -35,7 +35,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} publish_to_nexus: - if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}" + if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish' }}" needs: build-maven-partner uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master with: diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml deleted file mode 100644 index 783d4896a2..0000000000 --- a/.github/workflows/release-changes.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Release/pre-release Preparation. - -on: - workflow_dispatch: - inputs: - MESSAGE: - description: 'Triggered for release or pe-release' - required: false - default: 'Release Preparation' - RELEASE_TAG: - description: 'tag to update' - required: true - SNAPSHOT_TAG: - description: 'tag to be replaced' - required: true - BASE: - description: 'base branch for PR' - required: true -jobs: - maven-release-preparation: - uses: mosip/kattu/.github/workflows/release-changes.yml@master - with: - MESSAGE: ${{ inputs.MESSAGE }} - RELEASE_TAG: ${{ inputs.RELEASE_TAG }} - SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} - BASE: ${{ inputs.BASE }} - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - ACTION_PAT: ${{ secrets.ACTION_PAT }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml deleted file mode 100644 index c131f5aa9b..0000000000 --- a/.github/workflows/tag.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Tagging of repos - -on: - workflow_dispatch: - inputs: - TAG: - description: 'Tag to be published' - required: true - type: string - BODY: - description: 'Release body message' - required: true - default: 'Changes in this Release' - type: string - PRE_RELEASE: - description: 'Pre-release? True/False' - required: true - default: False - type: string - DRAFT: - description: 'Draft? True/False' - required: false - default: False - type: string - -jobs: - tag-branch: - uses: mosip/kattu/.github/workflows/tag.yml@master - with: - TAG: ${{ inputs.TAG }} - BODY: ${{ inputs.BODY }} - PRE_RELEASE: ${{ inputs.PRE_RELEASE }} - DRAFT: ${{ inputs.DRAFT }} - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} From 2012aa4791a94c69f0176b2fbaa901e702b68aa9 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 17 Aug 2023 19:37:19 +0530 Subject: [PATCH 66/74] Revert "Update pms-auth_policy.csv (#586)" (#595) This reverts commit 694c8282f16c3de443d3938b1b8b1e6e2133fe02. Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 4805e0c829..5019373207 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"firstName","filter":[{"language":"eng"}]},{"attribute":"middleName","filter":[{"language":"eng"}]},{"attribute":"lastName","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"mobileno"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"permanentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"presentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"presentProvince"},{"attribute":"permanentProvince"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"permanentCity"},{"attribute":"presentCity"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"postalCode","source":[{"attribute":"presentZipcode","filter":[{"language":"eng"}]},{"attribute":"permanentZipcode","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"}]}],"encrypted":false,"format":"extraction"}],"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"}}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', '2020-12-16 12:30:14.183', '2025-04-28 09:37:00.000', true, 'admin', '2020-12-16 12:30:14.183', 'service-account-mosip-creser-client', '2021-02-09 06:50:22.065', false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From 4a4713bd2f62369d3fad73dec588ffaacb2c0647 Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Fri, 18 Aug 2023 13:55:22 +0530 Subject: [PATCH 67/74] Revert "Revert "Update pms-auth_policy.csv (#586)" (#595)" (#596) This reverts commit c661c62563dba72a6617344a38c43b8e6bc981a3. Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql index 5019373207..4805e0c829 100644 --- a/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql +++ b/db_release_scripts/mosip_pms/sql/1.2.0.1_to_1.2.0.1-B2_upgrade.sql @@ -44,7 +44,7 @@ VALUES('mpolicy-default-digitalcard', 'mpolicygroup-deafult-digitalcard', 'mpoli INSERT INTO pms.auth_policy (id, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) -VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"firstName","filter":[{"language":"eng"}]},{"attribute":"middleName","filter":[{"language":"eng"}]},{"attribute":"lastName","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"mobileno"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"permanentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"presentAddressLine1"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"presentProvince"},{"attribute":"permanentProvince"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"permanentCity"},{"attribute":"presentCity"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"postalCode","source":[{"attribute":"presentZipcode","filter":[{"language":"eng"}]},{"attribute":"permanentZipcode","filter":[{"language":"eng"}]}],"encrypted":false},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"}]}],"encrypted":false,"format":"extraction"}],"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"}}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', '2020-12-16 12:30:14.183', '2025-04-28 09:37:00.000', true, 'admin', '2020-12-16 12:30:14.183', 'service-account-mosip-creser-client', '2021-02-09 06:50:22.065', false, NULL) ON CONFLICT (id) DO NOTHING; +VALUES('mpolicy-default-PDFCard', 'mpolicygroup-deafult-digitalcard', 'string', 'string', '{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":true},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}', 'DataShare', 'string', 'https://schemas.mosip.io/v1/auth-policy', NOW(), NOW() + INTERVAL '5 year', true, 'admin', NOW(), 'service-account-mosip-creser-client', NULL, false, NULL) ON CONFLICT (id) DO NOTHING; INSERT INTO pms.auth_policy_h (id, eff_dtimes, policy_group_id, "name", descr, policy_file_id, policy_type, "version", policy_schema, valid_from_date, valid_to_date, is_active, cr_by, cr_dtimes, upd_by, upd_dtimes, is_deleted, del_dtimes) From 0da63ae39a6d2911abf8132b128c452b7774aae7 Mon Sep 17 00:00:00 2001 From: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Date: Fri, 18 Aug 2023 22:52:33 +0530 Subject: [PATCH 68/74] Update pms-auth_policy.csv (#597) Signed-off-by: Balaji Alluru <74903654+balaji-alluru@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- db_scripts/mosip_pms/dml/pms-auth_policy.csv | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db_scripts/mosip_pms/dml/pms-auth_policy.csv b/db_scripts/mosip_pms/dml/pms-auth_policy.csv index cb14697d5c..4eba4bd655 100644 --- a/db_scripts/mosip_pms/dml/pms-auth_policy.csv +++ b/db_scripts/mosip_pms/dml/pms-auth_policy.csv @@ -9,6 +9,10 @@ mpolicy-default-adjudication,mpolicygroup-default-adjudication,mpolicy-default-a mpolicy-default-cert,mpolicygroup-default-cert,mpolicy-default-cert,mpolicy-default-cert,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":true},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":true},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":true},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":true},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":true},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":true},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":true},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":true},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":true},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":true},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":true},{""attributeName"":""individualBiometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics""}],""encrypted"":true,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() mpolicy-default-eUIN_with_QR,mpolicygroup-default-print,mpolicy-default-eUIN_with_QR,mpolicy-default-eUIN_with_QR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() mpolicy-default-eUIN_with_faceQR,mpolicygroup-default-print,mpolicy-default-eUIN_with_faceQR,mpolicy-default-eUIN_with_faceQR,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName"",""filter"":[{""language"":""eng""}]}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":true,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +<<<<<<< HEAD mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{"dataSharePolicies":{"typeOfShare":"direct","validForInMinutes":"30","transactionsAllowed":"2","encryptionType":"Partner Based","shareDomain":"datashare.datashare","source":"ID Repository"},"shareableAttributes":[{"attributeName":"fullName","source":[{"attribute":"fullName"}],"encrypted":false},{"attributeName":"dateOfBirth","source":[{"attribute":"dateOfBirth"}],"encrypted":false,"format":"DD/MM/YYYY"},{"attributeName":"gender","source":[{"attribute":"gender"}],"encrypted":false},{"attributeName":"phone","source":[{"attribute":"phone"}],"encrypted":false},{"attributeName":"email","source":[{"attribute":"email"}],"encrypted":false},{"attributeName":"addressLine1","source":[{"attribute":"addressLine1"}],"encrypted":false},{"attributeName":"addressLine2","source":[{"attribute":"addressLine2"}],"encrypted":false},{"attributeName":"addressLine3","source":[{"attribute":"addressLine3"}],"encrypted":false},{"attributeName":"region","source":[{"attribute":"region"}],"encrypted":false},{"attributeName":"province","source":[{"attribute":"province"}],"encrypted":false},{"attributeName":"city","source":[{"attribute":"city"}],"encrypted":false},{"attributeName":"UIN","source":[{"attribute":"UIN"}],"encrypted":false},{"attributeName":"PCN","source":[{"attribute":"VID","filter":[{"type":"PERPETUAL"}]}],"encrypted":false,"format":"RETRIEVE"},{"attributeName":"postalCode","source":[{"attribute":"postalCode"}],"encrypted":false},{"attributeName":"bestTwoFingers","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Finger"}]}],"encrypted":false,"format":"bestTwoFingers"},{"attributeName":"biometrics","group":"CBEFF","source":[{"attribute":"individualBiometrics","filter":[{"type":"Face"},{"type":"Finger","subType":["Left Thumb","Right Thumb"]}]}],"encrypted":false,"format":"extraction"}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,2022-09-20 09:00:54.316627,2025-04-28 09:37:00,TRUE,admin,2022-09-20 09:00:54.316627,admin,2022-09-20 09:00:54.316627 +======= +mpolicy-default-PDFCard,mpolicygroup-default-digitalcard,mpolicy-default-PDFCard,mpolicy-default-PDFCard,"{""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""},""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":true},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""PCN"",""source"":[{""attribute"":""VID"",""filter"":[{""type"":""PERPETUAL""}]}],""encrypted"":false,""format"":""RETRIEVE""},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""bestTwoFingers"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Finger""}]}],""encrypted"":false,""format"":""bestTwoFingers""},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""},{""type"":""Finger"",""subType"":[""Left Thumb"",""Right Thumb""]}]}],""encrypted"":false,""format"":""extraction""}]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() +>>>>>>> f87890c8 (Update pms-auth_policy.csv (#597)) mpolicy-default-digitalcard,mpolicygroup-default-digitalcard,mpolicy-default-digitalcard,mpolicy-default-digitalcard,"{""dataSharePolicies"":{""typeOfShare"":""Data Share"",""validForInMinutes"":""250"",""transactionsAllowed"":""10000"",""encryptionType"":""none"",""shareDomain"":""datashare.datashare"",""source"":""Print""},""shareableAttributes"":[]}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() mpolicy-default-mobile,mpolicygroup-default-mobile,mpolicy-default-mobile,mpolicy-default-mobile,"{""shareableAttributes"":[{""attributeName"":""fullName"",""source"":[{""attribute"":""fullName""}],""encrypted"":false},{""attributeName"":""dateOfBirth"",""source"":[{""attribute"":""dateOfBirth""}],""encrypted"":false,,""format"":""YYYY""},{""attributeName"":""gender"",""source"":[{""attribute"":""gender""}],""encrypted"":false},{""attributeName"":""phone"",""source"":[{""attribute"":""phone""}],""encrypted"":false},{""attributeName"":""email"",""source"":[{""attribute"":""email""}],""encrypted"":false},{""attributeName"":""addressLine1"",""source"":[{""attribute"":""addressLine1""}],""encrypted"":false},{""attributeName"":""addressLine2"",""source"":[{""attribute"":""addressLine2""}],""encrypted"":false},{""attributeName"":""addressLine3"",""source"":[{""attribute"":""addressLine3""}],""encrypted"":false},{""attributeName"":""region"",""source"":[{""attribute"":""region""}],""encrypted"":false},{""attributeName"":""province"",""source"":[{""attribute"":""province""}],""encrypted"":false},{""attributeName"":""city"",""source"":[{""attribute"":""city""}],""encrypted"":false},{""attributeName"":""UIN"",""source"":[{""attribute"":""UIN""}],""encrypted"":false},{""attributeName"":""postalCode"",""source"":[{""attribute"":""postalCode""}],""encrypted"":false},{""attributeName"":""biometrics"",""group"":""CBEFF"",""source"":[{""attribute"":""individualBiometrics"",""filter"":[{""type"":""Face""}]}],""encrypted"":false,""format"":""extraction""}],""dataSharePolicies"":{""typeOfShare"":""direct"",""validForInMinutes"":""30"",""transactionsAllowed"":""2"",""encryptionType"":""Partner Based"",""shareDomain"":""datashare.datashare"",""source"":""ID Repository""}}",DataShare,1,https://schemas.mosip.io/v1/auth-policy,now(),'2028-12-16 12:30:14.183',TRUE,admin,now(),admin,now() From 17c3d130e391966a2b1f96b311b7b4444d4415b7 Mon Sep 17 00:00:00 2001 From: bhumi46 <111699703+bhumi46@users.noreply.github.com> Date: Fri, 15 Sep 2023 13:12:46 +0530 Subject: [PATCH 69/74] [MOSIP-29256] updated reusable worklows (#602) * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/release-changes.yml | 26 +++++++++++++++++++++ .github/workflows/tag.yml | 33 +++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/release-changes.yml create mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml new file mode 100644 index 0000000000..2579ea836f --- /dev/null +++ b/.github/workflows/release-changes.yml @@ -0,0 +1,26 @@ +name: Release/pre-release Preparation. + +on: + workflow_dispatch: + inputs: + MESSAGE: + description: 'Triggered for release or pe-release' + required: false + default: 'Release Preparation' + RELEASE_TAG: + description: 'tag to update' + required: true + SNAPSHOT_TAG: + description: 'tag to be replaced' + required: true + BASE: + description: 'base branch for PR' + required: true +jobs: + maven-release-preparation: + uses: mosip/kattu/.github/workflows/release-changes.yml@master + with: + MESSAGE: ${{ inputs.MESSAGE }} + RELEASE_TAG: ${{ inputs.RELEASE_TAG }} + SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} + BASE: ${{ inputs.BASE }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000000..c4939a6e8c --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,33 @@ +name: Tagging of repos + +on: + workflow_dispatch: + inputs: + TAG: + description: 'Tag to be published' + required: true + type: string + BODY: + description: 'Release body message' + required: true + default: 'Changes in this Release' + type: string + PRE_RELEASE: + description: 'Pre-release? True/False' + required: true + default: False + type: string + DRAFT: + description: 'Draft? True/False' + required: false + default: False + type: string + +jobs: + tag-branch: + uses: mosip/kattu/.github/workflows/tag.yml@master + with: + TAG: ${{ inputs.TAG }} + BODY: ${{ inputs.BODY }} + PRE_RELEASE: ${{ inputs.PRE_RELEASE }} + DRAFT: ${{ inputs.DRAFT }} From 9fe5b431da4936cd43d2ff6164550a55cc2e38e9 Mon Sep 17 00:00:00 2001 From: bhumi46 <111699703+bhumi46@users.noreply.github.com> Date: Mon, 25 Sep 2023 20:18:34 +0530 Subject: [PATCH 70/74] [MOSIP-29256] updated reusable worklows (#603) * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows * [MOSIP-29256] updated reusable worklows Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/release-changes.yml | 5 ++++- .github/workflows/tag.yml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml index 2579ea836f..783d4896a2 100644 --- a/.github/workflows/release-changes.yml +++ b/.github/workflows/release-changes.yml @@ -23,4 +23,7 @@ jobs: MESSAGE: ${{ inputs.MESSAGE }} RELEASE_TAG: ${{ inputs.RELEASE_TAG }} SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} - BASE: ${{ inputs.BASE }} \ No newline at end of file + BASE: ${{ inputs.BASE }} + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + ACTION_PAT: ${{ secrets.ACTION_PAT }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index c4939a6e8c..c131f5aa9b 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -31,3 +31,5 @@ jobs: BODY: ${{ inputs.BODY }} PRE_RELEASE: ${{ inputs.PRE_RELEASE }} DRAFT: ${{ inputs.DRAFT }} + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} From 62499ecddcaaa306616bedd30521199419087df3 Mon Sep 17 00:00:00 2001 From: PRAFUL RAKHADE <99539100+Prafulrakhade@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:33:27 +0530 Subject: [PATCH 71/74] [DSD-3932] removed release-changes.yml, tag.yml and updated push-trigger.yml file (#618) Signed-off-by: techno-467 Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .github/workflows/release-changes.yml | 29 ---------------------- .github/workflows/tag.yml | 35 --------------------------- 2 files changed, 64 deletions(-) delete mode 100644 .github/workflows/release-changes.yml delete mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml deleted file mode 100644 index 783d4896a2..0000000000 --- a/.github/workflows/release-changes.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Release/pre-release Preparation. - -on: - workflow_dispatch: - inputs: - MESSAGE: - description: 'Triggered for release or pe-release' - required: false - default: 'Release Preparation' - RELEASE_TAG: - description: 'tag to update' - required: true - SNAPSHOT_TAG: - description: 'tag to be replaced' - required: true - BASE: - description: 'base branch for PR' - required: true -jobs: - maven-release-preparation: - uses: mosip/kattu/.github/workflows/release-changes.yml@master - with: - MESSAGE: ${{ inputs.MESSAGE }} - RELEASE_TAG: ${{ inputs.RELEASE_TAG }} - SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} - BASE: ${{ inputs.BASE }} - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - ACTION_PAT: ${{ secrets.ACTION_PAT }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml deleted file mode 100644 index c131f5aa9b..0000000000 --- a/.github/workflows/tag.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Tagging of repos - -on: - workflow_dispatch: - inputs: - TAG: - description: 'Tag to be published' - required: true - type: string - BODY: - description: 'Release body message' - required: true - default: 'Changes in this Release' - type: string - PRE_RELEASE: - description: 'Pre-release? True/False' - required: true - default: False - type: string - DRAFT: - description: 'Draft? True/False' - required: false - default: False - type: string - -jobs: - tag-branch: - uses: mosip/kattu/.github/workflows/tag.yml@master - with: - TAG: ${{ inputs.TAG }} - BODY: ${{ inputs.BODY }} - PRE_RELEASE: ${{ inputs.PRE_RELEASE }} - DRAFT: ${{ inputs.DRAFT }} - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} From 3afd9fcbe738071db50799ffc12ef8d0f3d5343f Mon Sep 17 00:00:00 2001 From: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 23 Jan 2024 18:34:50 +0530 Subject: [PATCH 72/74] Update ClientManagementController.java Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../oidc/client/controller/ClientManagementController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java index 9d016c8e9f..a686bc3e54 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java @@ -41,8 +41,8 @@ public ResponseWrapper createClient( } @RequestMapping(value = "/oidc/client/{client_id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseWrapper updateClient(@PathVariable("client_id") String clientId, - @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { + public ResponseWrapper updateClient(@PathVariable("client_id") String clientId, + @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { var clientRespDto = clientManagementService.updateOIDCClient(clientId, requestWrapper.getRequest()); var response = new ResponseWrapper(); auditUtil.setAuditRequestDto(ClientServiceAuditEnum.UPDATE_CLIENT, clientId, "clientID"); From 397334e644253eaecc829b335c48ee9a77a8c4b5 Mon Sep 17 00:00:00 2001 From: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 23 Jan 2024 18:35:17 +0530 Subject: [PATCH 73/74] Update ClientManagementController.java Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../pms/oidc/client/controller/ClientManagementController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java index a686bc3e54..2c10536bf8 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/controller/ClientManagementController.java @@ -41,7 +41,7 @@ public ResponseWrapper createClient( } @RequestMapping(value = "/oidc/client/{client_id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseWrapper updateClient(@PathVariable("client_id") String clientId, + public ResponseWrapper updateClient(@PathVariable("client_id") String clientId, @Valid @RequestBody RequestWrapper requestWrapper) throws Exception { var clientRespDto = clientManagementService.updateOIDCClient(clientId, requestWrapper.getRequest()); var response = new ResponseWrapper(); From bf2f39c8d99d9e35c15388d5121cf03641bba137 Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:29:08 +0530 Subject: [PATCH 74/74] fixed test case failures Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java index 37311566b0..7efb5c08b2 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oidc/client/contant/ClientServiceAuditEnum.java @@ -97,5 +97,4 @@ public String getApplicationName() { this.applicationName = applicationName; } -} - +} \ No newline at end of file