diff --git a/db_release_scripts/mosip_keymgr/sql/1.2.0-release.sql b/db_release_scripts/mosip_keymgr/sql/1.2.0-release.sql index ee7746d9..c7728d97 100644 --- a/db_release_scripts/mosip_keymgr/sql/1.2.0-release.sql +++ b/db_release_scripts/mosip_keymgr/sql/1.2.0-release.sql @@ -9,6 +9,10 @@ ALTER TABLE keymgr.key_alias ADD CONSTRAINT uni_ident_const UNIQUE (uni_ident); ALTER TABLE keymgr.key_policy_def ADD COLUMN pre_expire_days smallint; ALTER TABLE keymgr.key_policy_def ADD COLUMN access_allowed character varying(1024); +insert into keymgr.key_policy_def(app_id, key_validity_duration, is_active, cr_by, cr_dtimes, pre_expire_days, access_allowed) values('ADMIN_SERVICES',1095,TRUE,'mosipadmin',now(),60,'NA'); +insert into keymgr.key_policy_def(app_id, key_validity_duration, is_active, cr_by, cr_dtimes, pre_expire_days, access_allowed) values('RESIDENT',1095,TRUE,'mosipadmin',now(),60,'NA'); + + -- updating default values for pre_expire_days & access_allowed columns update keymgr.key_policy_def set pre_expire_days=60, access_allowed='NA' where app_id='PRE_REGISTRATION'; update keymgr.key_policy_def set pre_expire_days=60, access_allowed='NA' where app_id='REGISTRATION'; @@ -17,6 +21,4 @@ update keymgr.key_policy_def set pre_expire_days=60, access_allowed='NA' where a update keymgr.key_policy_def set pre_expire_days=60, access_allowed='NA' where app_id='KERNEL'; update keymgr.key_policy_def set pre_expire_days=1125, access_allowed='NA' where app_id='ROOT'; update keymgr.key_policy_def set pre_expire_days=30, access_allowed='NA' where app_id='BASE'; -update keymgr.key_policy_def set pre_expire_days=395, access_allowed='NA' where app_id='PMS'; -update keymgr.key_policy_def set pre_expire_days=60, access_allowed='NA' where app_id='RESIDENT'; -update keymgr.key_policy_def set pre_expire_days=60, access_allowed='NA' where app_id='ADMIN_SERVICES'; \ No newline at end of file +update keymgr.key_policy_def set pre_expire_days=395, access_allowed='NA' where app_id='PMS'; \ No newline at end of file diff --git a/db_release_scripts/mosip_keymgr/sql/1.2.0-revoke.sql b/db_release_scripts/mosip_keymgr/sql/1.2.0-revoke.sql index 6b5ac76d..4aea7686 100644 --- a/db_release_scripts/mosip_keymgr/sql/1.2.0-revoke.sql +++ b/db_release_scripts/mosip_keymgr/sql/1.2.0-revoke.sql @@ -1,5 +1,7 @@ \c mosip_keymgr sysadmin +delete from keymgr.key_policy_def where app_id in ('ADMIN_SERVICES','RESIDENT'); + ALTER TABLE keymgr.key_alias DROP COLUMN IF EXISTS uni_ident; diff --git a/db_scripts/mosip_keymgr/dml/keymgr-key_policy_def.csv b/db_scripts/mosip_keymgr/dml/keymgr-key_policy_def.csv index 7248539a..346050fb 100644 --- a/db_scripts/mosip_keymgr/dml/keymgr-key_policy_def.csv +++ b/db_scripts/mosip_keymgr/dml/keymgr-key_policy_def.csv @@ -8,4 +8,5 @@ ROOT,2920,TRUE,mosipadmin,now(),1125,NA BASE,730,TRUE,mosipadmin,now(),30,NA PMS,1460,TRUE,mosipadmin,now(),395,NA RESIDENT,1095,TRUE,mosipadmin,now(),60,NA -ADMIN_SERVICES,1095,TRUE,mosipadmin,now(),60,NA \ No newline at end of file +ADMIN_SERVICES,1095,TRUE,mosipadmin,now(),60,NA +DIGITAL_CARD,1095,TRUE,mosipadmin,now(),60,NA \ No newline at end of file