From a428451bea28625c24a2dc34152bb1a201ee705b Mon Sep 17 00:00:00 2001 From: Harsh Vardhan Date: Tue, 17 Dec 2024 23:36:37 +0530 Subject: [PATCH] [INJICERT-657] remove & rename files Signed-off-by: Harsh Vardhan --- .../certify/core/constants/Constants.java | 2 +- .../exception/RenderingTemplateException.java | 7 -- .../certify/api/spi/DataProviderPlugin.java | 0 .../certify/CertifyServiceApplication.java | 2 - .../mosip/certify/config/TemplatesLoader.java | 93 ------------------- .../services/CertifyIssuanceServiceImpl.java | 1 - ...agerLibSigner.java => JsonLDVCSigner.java} | 10 +- .../services/{vcsigners => }/VCSigner.java | 4 +- .../resources/application-local.properties | 2 +- .../application-local.properties.rej | 63 ------------- .../CertifyIssuanceServiceImplTest.java | 1 - ...ignerTest.java => JsonLDVCSignerTest.java} | 10 +- .../sql/0.9.1_to_0.10.0_upgrade.sql | 1 + .../docker-compose-certify/certify_init.sql | 92 ------------------ 14 files changed, 15 insertions(+), 273 deletions(-) rename {certify-service => certify-integration-api}/src/main/java/io/mosip/certify/api/spi/DataProviderPlugin.java (100%) delete mode 100644 certify-service/src/main/java/io/mosip/certify/config/TemplatesLoader.java rename certify-service/src/main/java/io/mosip/certify/services/{vcsigners/KeymanagerLibSigner.java => JsonLDVCSigner.java} (94%) rename certify-service/src/main/java/io/mosip/certify/services/{vcsigners => }/VCSigner.java (79%) delete mode 100644 certify-service/src/main/resources/application-local.properties.rej rename certify-service/src/test/java/io/mosip/certify/services/{vcsigners/KeymanagerLibSignerTest.java => JsonLDVCSignerTest.java} (92%) delete mode 100644 docker-compose/docker-compose-certify/certify_init.sql diff --git a/certify-core/src/main/java/io/mosip/certify/core/constants/Constants.java b/certify-core/src/main/java/io/mosip/certify/core/constants/Constants.java index 45098b3e..8c98eb23 100644 --- a/certify-core/src/main/java/io/mosip/certify/core/constants/Constants.java +++ b/certify-core/src/main/java/io/mosip/certify/core/constants/Constants.java @@ -24,5 +24,5 @@ public class Constants { public static final String ED25519_REF_ID = "ED25519_SIGN"; public static final String TEMPLATE_NAME = "templateName"; public static final String ISSUER_URI = "issuerURI"; - public static final String RENDERING_TEMPLATE = "svgTemplate"; + public static final String RENDERING_TEMPLATE = "renderingTemplateId"; } diff --git a/certify-core/src/main/java/io/mosip/certify/core/exception/RenderingTemplateException.java b/certify-core/src/main/java/io/mosip/certify/core/exception/RenderingTemplateException.java index f04579b7..423d28bc 100644 --- a/certify-core/src/main/java/io/mosip/certify/core/exception/RenderingTemplateException.java +++ b/certify-core/src/main/java/io/mosip/certify/core/exception/RenderingTemplateException.java @@ -1,15 +1,8 @@ package io.mosip.certify.core.exception; -import io.mosip.certify.core.constants.ErrorConstants; - public class RenderingTemplateException extends RuntimeException { private String errorCode; - public RenderingTemplateException() { - super(ErrorConstants.UNKNOWN_ERROR); - this.errorCode = ErrorConstants.UNKNOWN_ERROR; - } - public RenderingTemplateException(String errorCode) { super(errorCode); this.errorCode = errorCode; diff --git a/certify-service/src/main/java/io/mosip/certify/api/spi/DataProviderPlugin.java b/certify-integration-api/src/main/java/io/mosip/certify/api/spi/DataProviderPlugin.java similarity index 100% rename from certify-service/src/main/java/io/mosip/certify/api/spi/DataProviderPlugin.java rename to certify-integration-api/src/main/java/io/mosip/certify/api/spi/DataProviderPlugin.java diff --git a/certify-service/src/main/java/io/mosip/certify/CertifyServiceApplication.java b/certify-service/src/main/java/io/mosip/certify/CertifyServiceApplication.java index f4e66619..134bc317 100644 --- a/certify-service/src/main/java/io/mosip/certify/CertifyServiceApplication.java +++ b/certify-service/src/main/java/io/mosip/certify/CertifyServiceApplication.java @@ -14,8 +14,6 @@ @EnableAsync @EnableCaching @SpringBootApplication(scanBasePackages = "io.mosip.certify,"+ - "io.mosip.certify.repository," + - "io.mosip.certify.entity," + "io.mosip.kernel.crypto," + "io.mosip.kernel.keymanager.hsm," + "io.mosip.kernel.cryptomanager," + diff --git a/certify-service/src/main/java/io/mosip/certify/config/TemplatesLoader.java b/certify-service/src/main/java/io/mosip/certify/config/TemplatesLoader.java deleted file mode 100644 index 80e6232d..00000000 --- a/certify-service/src/main/java/io/mosip/certify/config/TemplatesLoader.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ - -/* This is for temporary purpose till an API isn’t added to simplify Issuer onboarding. */ - -package io.mosip.certify.config; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import io.mosip.certify.entity.RenderingTemplate; -import io.mosip.certify.repository.RenderingTemplateRepository; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.CommandLineRunner; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; -import org.springframework.web.client.RestTemplate; - -import java.io.IOException; -import java.nio.file.Files; -import java.time.LocalDateTime; -import java.util.*; - - -@Configuration -@Slf4j -public class TemplatesLoader implements CommandLineRunner { - @Autowired - RenderingTemplateRepository svgRenderTemplateRepository; - - @Value("${mosip.certify.rendering-templates:}") - private String svgTemplateJson; - - @Autowired - private ObjectMapper objectMapper; - - @Autowired - private RestTemplate restTemplate; - - @Override - public void run(String... args) throws Exception { - Long count = svgRenderTemplateRepository.count(); - if (count != 0) { - return; - } - String svgTemplateContent = ""; - - if(svgTemplateJson.startsWith("http")) { - svgTemplateContent = restTemplate.getForObject(svgTemplateJson, String.class); - } else { - Resource resource = new ClassPathResource(svgTemplateJson); - // TODO: Verify this w.r.t local path - try { - svgTemplateContent = (Files.readString(resource.getFile().toPath())); - } catch (IOException e) { - log.error("Missing local json file for referring svg templates", e); - } - } - - if(!svgTemplateContent.isEmpty()) { - try { - List svgTemplateMap = objectMapper.readValue(svgTemplateContent, List.class); - svgTemplateMap.forEach((value) -> { - RenderingTemplate svgRenderTemplate = new RenderingTemplate(); - LinkedHashMap valueMap = (LinkedHashMap) value; - String id = valueMap.get("id").toString(); - svgRenderTemplate.setId(id); - String templateURI = valueMap.get("content").toString(); - if(templateURI.startsWith("http")) { - String templateFromUrl = restTemplate.getForObject(templateURI, String.class); - svgRenderTemplate.setTemplate(templateFromUrl); - } else { - svgRenderTemplate.setTemplate(templateURI); - } - LocalDateTime localDateTime = LocalDateTime.now(); - svgRenderTemplate.setCreatedtimes(localDateTime); - svgRenderTemplate.setUpdatedtimes(localDateTime); - log.info("Template inserted in svg template table."); - svgRenderTemplateRepository.save(svgRenderTemplate); - }); - } catch (JsonProcessingException e) { - log.error("Missing configuration for svg template content " + e.getMessage()); - } - - } - log.info("=============== CERTIFY TEMPLATE SETUP COMPLETED ==============="); - } -} diff --git a/certify-service/src/main/java/io/mosip/certify/services/CertifyIssuanceServiceImpl.java b/certify-service/src/main/java/io/mosip/certify/services/CertifyIssuanceServiceImpl.java index 3493b6de..599c0190 100644 --- a/certify-service/src/main/java/io/mosip/certify/services/CertifyIssuanceServiceImpl.java +++ b/certify-service/src/main/java/io/mosip/certify/services/CertifyIssuanceServiceImpl.java @@ -29,7 +29,6 @@ import io.mosip.certify.core.util.SecurityHelperService; import io.mosip.certify.api.spi.DataProviderPlugin; import io.mosip.certify.services.vcformatters.VCFormatter; -import io.mosip.certify.services.vcsigners.VCSigner; import io.mosip.certify.validators.CredentialRequestValidator; import io.mosip.certify.exception.InvalidNonceException; import io.mosip.certify.proof.ProofValidator; diff --git a/certify-service/src/main/java/io/mosip/certify/services/vcsigners/KeymanagerLibSigner.java b/certify-service/src/main/java/io/mosip/certify/services/JsonLDVCSigner.java similarity index 94% rename from certify-service/src/main/java/io/mosip/certify/services/vcsigners/KeymanagerLibSigner.java rename to certify-service/src/main/java/io/mosip/certify/services/JsonLDVCSigner.java index 9c5ac627..3d75550f 100644 --- a/certify-service/src/main/java/io/mosip/certify/services/vcsigners/KeymanagerLibSigner.java +++ b/certify-service/src/main/java/io/mosip/certify/services/JsonLDVCSigner.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -package io.mosip.certify.services.vcsigners; +package io.mosip.certify.services; import foundation.identity.jsonld.JsonLDException; import foundation.identity.jsonld.JsonLDObject; @@ -31,7 +31,7 @@ import java.util.Map; /** - * KeymanagerLibSigner is a VCSigner which uses the Certify embedded + * JsonLDVCSigner is a VCSigner which uses the Certify embedded * keymanager to perform VC signing tasks for JSON LD VCs. * These are the known external requirements: * - the public key must be pre-hosted for the VC & should be available @@ -41,7 +41,7 @@ */ @Slf4j @Service -public class KeymanagerLibSigner implements VCSigner { +public class JsonLDVCSigner implements VCSigner { @Autowired ProofGenerator proofGenerator; @@ -49,7 +49,7 @@ public class KeymanagerLibSigner implements VCSigner { private String issuerPublicKeyURI; @Override - public VCResult attachSignature(String unSignedVC, Map defaultSettings) { + public VCResult attachSignature(String unSignedVC, Map keyReferenceDetails) { // Can the below lines be done at Templating side itself ? VCResult VC = new VCResult<>(); JsonLDObject jsonLDObject = JsonLDObject.fromJson(unSignedVC); @@ -85,7 +85,7 @@ public VCResult attachSignature(String unSignedVC, Map attachSignature(String unSignedVC, Map defaultSettings); + VCResult attachSignature(String unSignedVC, Map keyReferenceDetails); } diff --git a/certify-service/src/main/resources/application-local.properties b/certify-service/src/main/resources/application-local.properties index d6eb9458..ef8e55ef 100644 --- a/certify-service/src/main/resources/application-local.properties +++ b/certify-service/src/main/resources/application-local.properties @@ -10,7 +10,7 @@ mosip.certify.security.ignore-csrf-urls=**/actuator/**,/favicon.ico,**/error,\ **/issuance/**,**/system-info/** mosip.certify.security.ignore-auth-urls=/actuator/**,**/error,**/swagger-ui/**,\ - **/v3/api-docs/**, **/issuance/**,/system-info/**,/rendering-templateKey/** + **/v3/api-docs/**, **/issuance/**,/system-info/**,/rendering-template/** ## ------------------------------------------ Discovery openid-configuration ------------------------------------------- diff --git a/certify-service/src/main/resources/application-local.properties.rej b/certify-service/src/main/resources/application-local.properties.rej deleted file mode 100644 index bc5e19d8..00000000 --- a/certify-service/src/main/resources/application-local.properties.rej +++ /dev/null @@ -1,63 +0,0 @@ -diff a/certify-service/src/main/resources/application-local.properties b/certify-service/src/main/resources/application-local.properties (rejected hunks) -@@ -14,7 +14,7 @@ mosip.certify.security.ignore-auth-urls=/actuator/**,**/error,**/swagger-ui/**,\ - - - ## ------------------------------------------ Discovery openid-configuration ------------------------------------------- --mosipbox.public.url=http://localhost:8090 -+mosipbox.public.url=https://injicertify.qa-inji.mosip.net - mosip.certify.discovery.issuer-id=${mosipbox.public.url}${server.servlet.path} - - ##--------------change this later--------------------------------- -@@ -22,11 +22,11 @@ mosip.certify.supported.jwt-proof-alg={'RS256','PS256'} - - ## ---------------------------------------------- VCI ------------------------------------------------------------------ - ##----- These are properties for any oauth resource server providing jwk------------### --mosip.certify.identifier=http://localhost:8090 -+mosip.certify.identifier=https://injicertify.qa-inji.mosip.net - mosip.certify.authn.filter-urls={ '${server.servlet.path}/issuance/credential', '${server.servlet.path}/issuance/vd12/credential', '${server.servlet.path}/issuance/vd11/credential'} - mosip.certify.authn.issuer-uri=http://localhost:8088/v1/esignet - mosip.certify.authn.jwk-set-uri=http://localhost:8088/v1/esignet/oauth/.well-known/jwks.json --mosip.certify.authn.allowed-audiences={ '${mosipbox.public.url}${server.servlet.path}/issuance/credential', 'http://localhost:8088/v1/esignet/vci/credential' } -+mosip.certify.authn.allowed-audiences={ '${mosipbox.public.url}${server.servlet.path}/issuance/credential', 'http://localhost:8088/v1/esignet/vci/credential', 'https://injicertify.qa-inji.mosip.net' } - - mosip.certify.key-values={\ - 'v11' : {\ -@@ -159,12 +159,12 @@ mosip.certify.key-values={\ - 'credential_configurations_supported' : { \ - "InsuranceCredential" : {\ - 'format': 'ldp_vc',\ -- 'scope' : 'sunbird_rc_insurance_vc_ldp',\ -+ 'scope' : 'sample_vc_ldp',\ - 'cryptographic_binding_methods_supported': {'did:jwk'},\ - 'credential_signing_alg_values_supported': {'Ed25519Signature2020'},\ - 'proof_types_supported': {'jwt': {'proof_signing_alg_values_supported': {'RS256', 'PS256'}}},\ - 'credential_definition': {\ -- 'type': {'VerifiableCredential','InsuranceCredential'},\ -+ 'type': {'VerifiableCredential','MockVerifiableCredential'},\ - 'credentialSubject': {\ - 'fullName': {'display': {{'name': 'Name','locale': 'en'}}}, \ - 'mobile': {'display': {{'name': 'Phone Number','locale': 'en'}}},\ -@@ -187,7 +187,7 @@ mosip.certify.key-values={\ - },\ - "LifeInsuranceCredential":{\ - 'format': 'ldp_vc',\ -- 'scope' : 'life_insurance_vc_ldp',\ -+ 'scope' : 'sample_vc_ldp',\ - 'cryptographic_binding_methods_supported': {'did:jwk'},\ - 'credential_signing_alg_values_supported': {'Ed25519Signature2020'},\ - 'proof_types_supported': {'jwt': {'proof_signing_alg_values_supported': {'RS256', 'ES256'}}},\ -@@ -252,11 +252,11 @@ mosip.certify.cache.security.secretkey.reference-id=TRANSACTION_CACHE - mosip.certify.cache.security.algorithm-name=AES/ECB/PKCS5Padding - - #spring.cache.type=redis --#spring.data.redis.host=localhost --#spring.data.redis.port=6379 -+spring.data.redis.host=localhost -+spring.data.redis.port=6379 - #spring.data.redis.password=eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81 - --spring.cache.type=simple -+spring.cache.type=redis - spring.cache.cache-names=${mosip.certify.cache.names} - management.health.redis.enabled=false - diff --git a/certify-service/src/test/java/io/mosip/certify/services/CertifyIssuanceServiceImplTest.java b/certify-service/src/test/java/io/mosip/certify/services/CertifyIssuanceServiceImplTest.java index 2b201670..dc5719ba 100644 --- a/certify-service/src/test/java/io/mosip/certify/services/CertifyIssuanceServiceImplTest.java +++ b/certify-service/src/test/java/io/mosip/certify/services/CertifyIssuanceServiceImplTest.java @@ -3,7 +3,6 @@ import io.mosip.certify.api.spi.AuditPlugin; import io.mosip.certify.api.spi.DataProviderPlugin; import io.mosip.certify.services.vcformatters.VCFormatter; -import io.mosip.certify.services.vcsigners.VCSigner; import io.mosip.certify.core.constants.ErrorConstants; import io.mosip.certify.core.constants.VCFormats; import io.mosip.certify.core.dto.CredentialDefinition; diff --git a/certify-service/src/test/java/io/mosip/certify/services/vcsigners/KeymanagerLibSignerTest.java b/certify-service/src/test/java/io/mosip/certify/services/JsonLDVCSignerTest.java similarity index 92% rename from certify-service/src/test/java/io/mosip/certify/services/vcsigners/KeymanagerLibSignerTest.java rename to certify-service/src/test/java/io/mosip/certify/services/JsonLDVCSignerTest.java index 71f5a907..56c36e43 100644 --- a/certify-service/src/test/java/io/mosip/certify/services/vcsigners/KeymanagerLibSignerTest.java +++ b/certify-service/src/test/java/io/mosip/certify/services/JsonLDVCSignerTest.java @@ -1,4 +1,4 @@ -package io.mosip.certify.services.vcsigners; +package io.mosip.certify.services; import foundation.identity.jsonld.JsonLDObject; import info.weboftrust.ldsignatures.LdProof; @@ -23,13 +23,13 @@ import java.util.Map; @RunWith(MockitoJUnitRunner.class) -public class KeymanagerLibSignerTest { +public class JsonLDVCSignerTest { @Mock SignatureService signatureService; @Mock ProofGenerator signProps; @InjectMocks - private KeymanagerLibSigner signer; + private JsonLDVCSigner jsonLDVCSigner; private static final String VC_1 = """ { "@context": [ @@ -64,7 +64,7 @@ public class KeymanagerLibSignerTest { @Before public void setup() { - ReflectionTestUtils.setField(signer, "issuerPublicKeyURI", "https://example.com/sample.pub.key.json/"); + ReflectionTestUtils.setField(jsonLDVCSigner, "issuerPublicKeyURI", "https://example.com/sample.pub.key.json/"); } @Test @@ -84,7 +84,7 @@ public void testAttachSignatureSuccess_VC2() { defaultSettings.put(Constants.APPLICATION_ID, "fake-application-id"); defaultSettings.put(Constants.REFERENCE_ID, "fake-reference-id"); // invoke - VCResult vcResult = signer.attachSignature(templatedVC, defaultSettings); + VCResult vcResult = jsonLDVCSigner.attachSignature(templatedVC, defaultSettings); // test assert vcResult != null; diff --git a/db_upgrade_script/mosip_certify/sql/0.9.1_to_0.10.0_upgrade.sql b/db_upgrade_script/mosip_certify/sql/0.9.1_to_0.10.0_upgrade.sql index f9b2017b..4b80fb91 100644 --- a/db_upgrade_script/mosip_certify/sql/0.9.1_to_0.10.0_upgrade.sql +++ b/db_upgrade_script/mosip_certify/sql/0.9.1_to_0.10.0_upgrade.sql @@ -1,4 +1,5 @@ +INSERT INTO certify.key_policy_def(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES('CERTIFY_VC_SIGN_RSA', 1095, 60, 'NA', true, 'mosipadmin', now()); INSERT INTO certify.key_policy_def(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES('CERTIFY_VC_SIGN_ED25519', 1095, 60, 'NA', true, 'mosipadmin', now()); INSERT INTO certify.key_policy_def(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES('BASE', 1095, 60, 'NA', true, 'mosipadmin', now()); diff --git a/docker-compose/docker-compose-certify/certify_init.sql b/docker-compose/docker-compose-certify/certify_init.sql deleted file mode 100644 index 4f26ad21..00000000 --- a/docker-compose/docker-compose-certify/certify_init.sql +++ /dev/null @@ -1,92 +0,0 @@ -CREATE DATABASE inji_certify - ENCODING = 'UTF8' - LC_COLLATE = 'en_US.UTF-8' - LC_CTYPE = 'en_US.UTF-8' - TABLESPACE = pg_default - OWNER = postgres - TEMPLATE = template0; - -COMMENT ON DATABASE inji_certify IS 'certify related data is stored in this database'; - -\c inji_certify postgres - -DROP SCHEMA IF EXISTS certify CASCADE; -CREATE SCHEMA certify; -ALTER SCHEMA certify OWNER TO postgres; -ALTER DATABASE inji_certify SET search_path TO certify,pg_catalog,public; - -CREATE TABLE certify.key_alias( - id character varying(36) NOT NULL, - app_id character varying(36) NOT NULL, - ref_id character varying(128), - key_gen_dtimes timestamp, - key_expire_dtimes timestamp, - status_code character varying(36), - lang_code character varying(3), - cr_by character varying(256) NOT NULL, - cr_dtimes timestamp NOT NULL, - upd_by character varying(256), - upd_dtimes timestamp, - is_deleted boolean DEFAULT FALSE, - del_dtimes timestamp, - cert_thumbprint character varying(100), - uni_ident character varying(50), - CONSTRAINT pk_keymals_id PRIMARY KEY (id), - CONSTRAINT uni_ident_const UNIQUE (uni_ident) -); - -CREATE TABLE certify.key_policy_def( - app_id character varying(36) NOT NULL, - key_validity_duration smallint, - is_active boolean NOT NULL, - pre_expire_days smallint, - access_allowed character varying(1024), - cr_by character varying(256) NOT NULL, - cr_dtimes timestamp NOT NULL, - upd_by character varying(256), - upd_dtimes timestamp, - is_deleted boolean DEFAULT FALSE, - del_dtimes timestamp, - CONSTRAINT pk_keypdef_id PRIMARY KEY (app_id) -); - -CREATE TABLE certify.key_store( - id character varying(36) NOT NULL, - master_key character varying(36) NOT NULL, - private_key character varying(2500) NOT NULL, - certificate_data character varying NOT NULL, - cr_by character varying(256) NOT NULL, - cr_dtimes timestamp NOT NULL, - upd_by character varying(256), - upd_dtimes timestamp, - is_deleted boolean DEFAULT FALSE, - del_dtimes timestamp, - CONSTRAINT pk_keystr_id PRIMARY KEY (id) -); - -CREATE TABLE certify.rendering_template ( - id UUID NOT NULL, - template VARCHAR NOT NULL, - cr_dtimes timestamp NOT NULL, - upd_dtimes timestamp, - CONSTRAINT pk_svgtmp_id PRIMARY KEY (id) -); - -CREATE TABLE certify.credential_template( - context character varying(1024) NOT NULL, - credential_type character varying(512) NOT NULL, - template VARCHAR NOT NULL, - cr_dtimes timestamp NOT NULL default now(), - upd_dtimes timestamp, - CONSTRAINT pk_template PRIMARY KEY (context, credential_type) -); - - - -INSERT INTO certify.KEY_POLICY_DEF(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES('ROOT', 2920, 1125, 'NA', true, 'mosipadmin', now()); -INSERT INTO certify.KEY_POLICY_DEF(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES('CERTIFY_SERVICE', 1095, 50, 'NA', true, 'mosipadmin', now()); -INSERT INTO certify.KEY_POLICY_DEF(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES('CERTIFY_PARTNER', 1095, 50, 'NA', true, 'mosipadmin', now()); -INSERT INTO certify.KEY_POLICY_DEF(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES('CERTIFY_VC_SIGN_RSA', 1095, 50, 'NA', true, 'mosipadmin', now()); -INSERT INTO certify.KEY_POLICY_DEF(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES('CERTIFY_VC_SIGN_ED25519', 1095, 50, 'NA', true, 'mosipadmin', now()); -INSERT INTO certify.KEY_POLICY_DEF(APP_ID,KEY_VALIDITY_DURATION,PRE_EXPIRE_DAYS,ACCESS_ALLOWED,IS_ACTIVE,CR_BY,CR_DTIMES) VALUES('BASE', 730, 30, 'NA', true, 'mosipadmin', now()); -