Skip to content

Commit

Permalink
Merge pull request #130 from ase-101/script_change_release-1.2.0.1
Browse files Browse the repository at this point in the history
Added missing insert stmts in key_policy table
  • Loading branch information
ckm007 authored Aug 18, 2022
2 parents d4c842e + 2ed43fe commit 680631b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
8 changes: 5 additions & 3 deletions db_release_scripts/mosip_keymgr/sql/1.2.0-release.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
update keymgr.key_policy_def set pre_expire_days=395, access_allowed='NA' where app_id='PMS';
2 changes: 2 additions & 0 deletions db_release_scripts/mosip_keymgr/sql/1.2.0-revoke.sql
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
3 changes: 2 additions & 1 deletion db_scripts/mosip_keymgr/dml/keymgr-key_policy_def.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
ADMIN_SERVICES,1095,TRUE,mosipadmin,now(),60,NA
DIGITAL_CARD,1095,TRUE,mosipadmin,now(),60,NA

0 comments on commit 680631b

Please sign in to comment.