diff --git a/.github/keys/mosipgpgkey_pub.gpg b/.github/keys/mosipgpgkey_pub.gpg index 86e5dfe34c..4bdb1a947b 100644 Binary files a/.github/keys/mosipgpgkey_pub.gpg and b/.github/keys/mosipgpgkey_pub.gpg differ diff --git a/.github/keys/mosipgpgkey_sec.gpg b/.github/keys/mosipgpgkey_sec.gpg index b0180d5433..97de55678f 100644 Binary files a/.github/keys/mosipgpgkey_sec.gpg and b/.github/keys/mosipgpgkey_sec.gpg differ diff --git a/.github/workflows/push_trigger.yml b/.github/workflows/push_trigger.yml index 5cdfae99e2..e97ccedffa 100644 --- a/.github/workflows/push_trigger.yml +++ b/.github/workflows/push_trigger.yml @@ -100,7 +100,7 @@ jobs: ${{ 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 + run: echo " ossrh ${{secrets.RELEASE_USER}} ${{secrets.RELEASE_TOKEN}} 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: | @@ -113,7 +113,7 @@ jobs: - name: Publish the maven package run: | chmod +x ./deploy.sh - cd partner && mvn deploy -DskipTests -s $GITHUB_WORKSPACE/settings.xml -f pom.xml + cd partner && mvn deploy -DaltDeploymentRepository=ossrh::default::${{ secrets.RELEASE_URL }} -s $GITHUB_WORKSPACE/settings.xml -f pom.xml env: GPG_TTY: $(tty) diff --git a/.github/workflows/release_changes.yml b/.github/workflows/release_changes.yml new file mode 100644 index 0000000000..c6febb6c51 --- /dev/null +++ b/.github/workflows/release_changes.yml @@ -0,0 +1,56 @@ +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: + 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 }} + token: ${{ secrets.ACTION_PAT }} diff --git a/db_release_scripts/mosip_pms/pms_release_db_deploy.sh b/db_release_scripts/mosip_pms/mosip_pms_release_db_deploy.sh similarity index 100% rename from db_release_scripts/mosip_pms/pms_release_db_deploy.sh rename to db_release_scripts/mosip_pms/mosip_pms_release_db_deploy.sh diff --git a/db_release_scripts/mosip_pms/pms_release_deploy.properties b/db_release_scripts/mosip_pms/mosip_pms_release_deploy.properties similarity index 100% rename from db_release_scripts/mosip_pms/pms_release_deploy.properties rename to db_release_scripts/mosip_pms/mosip_pms_release_deploy.properties diff --git a/db_release_scripts/mosip_pms/pms_revoke_db_deploy.sh b/db_release_scripts/mosip_pms/mosip_pms_revoke_db_deploy.sh similarity index 100% rename from db_release_scripts/mosip_pms/pms_revoke_db_deploy.sh rename to db_release_scripts/mosip_pms/mosip_pms_revoke_db_deploy.sh diff --git a/db_release_scripts/mosip_pms/sql/1.1.5_pms-scripts_release.sql b/db_release_scripts/mosip_pms/sql/1.1.5_pms-scripts_release.sql index 2c5111772c..842f324513 100644 --- a/db_release_scripts/mosip_pms/sql/1.1.5_pms-scripts_release.sql +++ b/db_release_scripts/mosip_pms/sql/1.1.5_pms-scripts_release.sql @@ -1,46 +1,48 @@ -- ------------------------------------------------------------------------------------------------- -- Database Name: mosip_pms --- Release Version : 1.1.5 +-- Release Version : 1.1.5.2 -- Purpose : Database Alter scripts for the release for PMS DB. -- Create By : Ram Bhatt -- Created Date : Jan-2021 -- -- Modified Date Modified By Comments / Remarks -- ------------------------------------------------------------------------------------------------- +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 +------------------------------------------------------------------------------------------------------ \c mosip_pms sysadmin ---------------------------------------------------------------------------------------------------- -ALTER TABLE pms.misp ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.misp_license ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.auth_policy_h ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.policy_group ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.partner_policy ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.auth_policy ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.partner ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.partner_policy_request ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.partner_type ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.partner_h ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.partner_contact ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.otp_transaction ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.partner_policy_credential_type ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.partner_policy_bioextract ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.misp ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.misp_license ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.auth_policy_h ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.policy_group ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.partner_policy ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.auth_policy ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.partner ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.partner_policy_request ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.partner_type ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.partner_h ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.partner_contact ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.otp_transaction ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.partner_policy_credential_type ALTER COLUMN is_deleted SET NOT NULL; +--ALTER TABLE pms.partner_policy_bioextract ALTER COLUMN is_deleted SET NOT NULL; -ALTER TABLE pms.misp ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.misp_license ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.auth_policy_h ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.policy_group ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.partner_policy ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.auth_policy ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.partner ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.partner_policy_request ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.partner_type ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.partner_h ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.partner_contact ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.otp_transaction ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.partner_policy_credential_type ALTER COLUMN is_deleted SET DEFAULT FALSE; -ALTER TABLE pms.partner_policy_bioextract ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.misp ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.misp_license ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.auth_policy_h ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.policy_group ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.partner_policy ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.auth_policy ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.partner ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.partner_policy_request ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.partner_type ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.partner_h ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.partner_contact ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.otp_transaction ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.partner_policy_credential_type ALTER COLUMN is_deleted SET DEFAULT FALSE; +--ALTER TABLE pms.partner_policy_bioextract ALTER COLUMN is_deleted SET DEFAULT FALSE; ----------------------------------------------------------------------------------------------- diff --git a/db_release_scripts/mosip_pms/sql/1.1.5_pms-scripts_revoke.sql b/db_release_scripts/mosip_pms/sql/1.1.5_pms-scripts_revoke.sql index 91557b8178..689b461d64 100644 --- a/db_release_scripts/mosip_pms/sql/1.1.5_pms-scripts_revoke.sql +++ b/db_release_scripts/mosip_pms/sql/1.1.5_pms-scripts_revoke.sql @@ -1,6 +1,6 @@ -- ------------------------------------------------------------------------------------------------- -- Database Name: mosip_pms --- Release Version : 1.1.5 +-- Release Version : 1.1.5.2 -- Purpose : Revoking Database Alter deployement done for release in PMS DB. -- Create By : Ram Bhatt -- Created Date : Jan-2021 diff --git a/db_scripts/mosip_pms/ddl/pms-auth_policy.sql b/db_scripts/mosip_pms/ddl/pms-auth_policy.sql index 337b409aa0..253bfe36ed 100644 --- a/db_scripts/mosip_pms/ddl/pms-auth_policy.sql +++ b/db_scripts/mosip_pms/ddl/pms-auth_policy.sql @@ -10,7 +10,8 @@ -- ------------------------------------------------------------------------------------------ -- Aug-2020 Sadanndegowda Added policy_type, version, schema and validity -- Aug-2020 Sadanndegowda Updated Schema name --- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.auth_policy | type: TABLE -- @@ -31,7 +32,7 @@ CREATE TABLE pms.auth_policy( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_apol PRIMARY KEY (id), CONSTRAINT uk_apol UNIQUE (policy_group_id,name) diff --git a/db_scripts/mosip_pms/ddl/pms-auth_policy_h.sql b/db_scripts/mosip_pms/ddl/pms-auth_policy_h.sql index c2ca1cb4ba..cafb3a0ae9 100644 --- a/db_scripts/mosip_pms/ddl/pms-auth_policy_h.sql +++ b/db_scripts/mosip_pms/ddl/pms-auth_policy_h.sql @@ -11,6 +11,7 @@ -- Aug-2020 Sadanndegowda Added policy_type, version, schema and validity -- Aug-2020 Sadanndegowda Updated Schema name -- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.auth_policy_h | type: TABLE -- @@ -32,7 +33,7 @@ CREATE TABLE pms.auth_policy_h( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_apolh PRIMARY KEY (id,eff_dtimes), CONSTRAINT uk_apolh UNIQUE (eff_dtimes,policy_group_id,name) diff --git a/db_scripts/mosip_pms/ddl/pms-misp.sql b/db_scripts/mosip_pms/ddl/pms-misp.sql index 915f499fa7..dde7306a8b 100644 --- a/db_scripts/mosip_pms/ddl/pms-misp.sql +++ b/db_scripts/mosip_pms/ddl/pms-misp.sql @@ -9,6 +9,7 @@ -- Modified Date Modified By Comments / Remarks -- ------------------------------------------------------------------------------------------ -- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------- -- object: pms.misp | type: TABLE -- @@ -26,7 +27,7 @@ CREATE TABLE pms.misp( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_misp PRIMARY KEY (id), CONSTRAINT uk_misp UNIQUE (name) diff --git a/db_scripts/mosip_pms/ddl/pms-misp_license.sql b/db_scripts/mosip_pms/ddl/pms-misp_license.sql index 5ec1809eb9..77b07e9a0d 100644 --- a/db_scripts/mosip_pms/ddl/pms-misp_license.sql +++ b/db_scripts/mosip_pms/ddl/pms-misp_license.sql @@ -10,6 +10,7 @@ -- ------------------------------------------------------------------------------------------ -- Aug-2020 Sadanndegowda Updated Schema name -- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.misp_license | type: TABLE -- @@ -24,7 +25,7 @@ CREATE TABLE pms.misp_license( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_mlic PRIMARY KEY (misp_id,license_key) diff --git a/db_scripts/mosip_pms/ddl/pms-otp_transaction.sql b/db_scripts/mosip_pms/ddl/pms-otp_transaction.sql index 7d6b5b4e98..f69a02066c 100644 --- a/db_scripts/mosip_pms/ddl/pms-otp_transaction.sql +++ b/db_scripts/mosip_pms/ddl/pms-otp_transaction.sql @@ -9,6 +9,7 @@ -- Modified Date Modified By Comments / Remarks -- ------------------------------------------------------------------------------------------ -- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.otp_transaction | type: TABLE -- @@ -26,7 +27,7 @@ CREATE TABLE pms.otp_transaction( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_otpt_id PRIMARY KEY (id) diff --git a/db_scripts/mosip_pms/ddl/pms-partner.sql b/db_scripts/mosip_pms/ddl/pms-partner.sql index 7ef30568b8..106204f276 100644 --- a/db_scripts/mosip_pms/ddl/pms-partner.sql +++ b/db_scripts/mosip_pms/ddl/pms-partner.sql @@ -9,6 +9,7 @@ -- Modified Date Modified By Comments / Remarks -- ------------------------------------------------------------------------------------------ -- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.partner | type: TABLE -- @@ -29,7 +30,7 @@ CREATE TABLE pms.partner( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_part PRIMARY KEY (id) diff --git a/db_scripts/mosip_pms/ddl/pms-partner_contact.sql b/db_scripts/mosip_pms/ddl/pms-partner_contact.sql index e153844c5f..15a9fcf0c6 100644 --- a/db_scripts/mosip_pms/ddl/pms-partner_contact.sql +++ b/db_scripts/mosip_pms/ddl/pms-partner_contact.sql @@ -8,7 +8,8 @@ -- -- Modified Date Modified By Comments / Remarks -- ------------------------------------------------------------------------------------------ --- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.partner_contact | type: TABLE -- @@ -24,7 +25,7 @@ CREATE TABLE pms.partner_contact( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT partcnt PRIMARY KEY (id), CONSTRAINT uk_partcnt_idcnt UNIQUE (partner_id,contact_no), diff --git a/db_scripts/mosip_pms/ddl/pms-partner_h.sql b/db_scripts/mosip_pms/ddl/pms-partner_h.sql index 0e4d4ae703..bba68b182a 100644 --- a/db_scripts/mosip_pms/ddl/pms-partner_h.sql +++ b/db_scripts/mosip_pms/ddl/pms-partner_h.sql @@ -9,6 +9,7 @@ -- Modified Date Modified By Comments / Remarks -- ------------------------------------------------------------------------------------------ -- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.partner_h | type: TABLE -- @@ -30,7 +31,7 @@ CREATE TABLE pms.partner_h( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_parth PRIMARY KEY (id,eff_dtimes) diff --git a/db_scripts/mosip_pms/ddl/pms-partner_policy.sql b/db_scripts/mosip_pms/ddl/pms-partner_policy.sql index 3cf18c3d04..413464fbc1 100644 --- a/db_scripts/mosip_pms/ddl/pms-partner_policy.sql +++ b/db_scripts/mosip_pms/ddl/pms-partner_policy.sql @@ -10,6 +10,7 @@ -- ------------------------------------------------------------------------------------------ -- Aug-2020 Sadanndegowda Updated Schema name -- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.partner_policy | type: TABLE -- @@ -25,7 +26,7 @@ CREATE TABLE pms.partner_policy( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_ppol PRIMARY KEY (policy_api_key), CONSTRAINT uk_ppol UNIQUE (part_id,policy_id,valid_from_datetime) diff --git a/db_scripts/mosip_pms/ddl/pms-partner_policy_bioextract.sql b/db_scripts/mosip_pms/ddl/pms-partner_policy_bioextract.sql index 77a3a8d05b..4a6d0fa493 100644 --- a/db_scripts/mosip_pms/ddl/pms-partner_policy_bioextract.sql +++ b/db_scripts/mosip_pms/ddl/pms-partner_policy_bioextract.sql @@ -9,6 +9,7 @@ -- Modified Date Modified By Comments / Remarks -- ------------------------------------------------------------------------------------------ -- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.partner_policy_bioextract | type: TABLE -- -- DROP TABLE IF EXISTS pms.partner_policy_bioextract CASCADE; @@ -25,7 +26,7 @@ CREATE TABLE pms.partner_policy_bioextract( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_ppbe_id PRIMARY KEY (id) diff --git a/db_scripts/mosip_pms/ddl/pms-partner_policy_credential_type.sql b/db_scripts/mosip_pms/ddl/pms-partner_policy_credential_type.sql index ccf384e01b..7a898d961c 100644 --- a/db_scripts/mosip_pms/ddl/pms-partner_policy_credential_type.sql +++ b/db_scripts/mosip_pms/ddl/pms-partner_policy_credential_type.sql @@ -9,6 +9,7 @@ -- Modified Date Modified By Comments / Remarks -- ------------------------------------------------------------------------------------------ -- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.partner_policy_credential_type | type: TABLE -- @@ -22,7 +23,7 @@ CREATE TABLE pms.partner_policy_credential_type( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_ppctyp_id PRIMARY KEY (part_id,policy_id,credential_type) diff --git a/db_scripts/mosip_pms/ddl/pms-partner_policy_request.sql b/db_scripts/mosip_pms/ddl/pms-partner_policy_request.sql index 0627195690..4f4c3786be 100644 --- a/db_scripts/mosip_pms/ddl/pms-partner_policy_request.sql +++ b/db_scripts/mosip_pms/ddl/pms-partner_policy_request.sql @@ -9,6 +9,7 @@ -- Modified Date Modified By Comments / Remarks -- ------------------------------------------------------------------------------------------ -- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.partner_policy_request | type: TABLE -- diff --git a/db_scripts/mosip_pms/ddl/pms-partner_type.sql b/db_scripts/mosip_pms/ddl/pms-partner_type.sql index a300fffb93..b54937751d 100644 --- a/db_scripts/mosip_pms/ddl/pms-partner_type.sql +++ b/db_scripts/mosip_pms/ddl/pms-partner_type.sql @@ -9,6 +9,7 @@ -- Modified Date Modified By Comments / Remarks -- ------------------------------------------------------------------------------------------ -- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.partner_type | type: TABLE -- @@ -22,7 +23,7 @@ CREATE TABLE pms.partner_type( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_partyp_code PRIMARY KEY (code) diff --git a/db_scripts/mosip_pms/ddl/pms-policy_group.sql b/db_scripts/mosip_pms/ddl/pms-policy_group.sql index 0122c859bc..a837522898 100644 --- a/db_scripts/mosip_pms/ddl/pms-policy_group.sql +++ b/db_scripts/mosip_pms/ddl/pms-policy_group.sql @@ -10,6 +10,7 @@ -- ------------------------------------------------------------------------------------------ -- Aug-2020 Sadanndegowda Updated Schema name -- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false +-- Mar-2021 Ram Bhatt Reverting is_deleted flag not null changes for 1.1.5.2 -- ------------------------------------------------------------------------------------------ -- object: pms.policy_group | type: TABLE -- @@ -24,7 +25,7 @@ CREATE TABLE pms.policy_group( cr_dtimes timestamp NOT NULL, upd_by character varying(256), upd_dtimes timestamp, - is_deleted boolean NOT NULL DEFAULT FALSE, + is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_polg PRIMARY KEY (id), CONSTRAINT uk_polg UNIQUE (name) diff --git a/partner/partner-management-service/pom.xml b/partner/partner-management-service/pom.xml index 08d0c0ff2c..7b5798a739 100644 --- a/partner/partner-management-service/pom.xml +++ b/partner/partner-management-service/pom.xml @@ -5,10 +5,10 @@ pms-parent io.mosip.pms - 1.1.5-SNAPSHOT + 1.1.5.4-P2 - 1.1.5-SNAPSHOT + 1.1.5.4-P2 partner-management-service partner-management-service @@ -31,7 +31,7 @@ io.mosip.pms pms-common - 1.1.5-SNAPSHOT + 1.1.5.4-P2 org.springframework.boot @@ -83,7 +83,7 @@ io.mosip.kernel kernel-authcodeflowproxy-api - 1.1.5-SNAPSHOT + 1.1.5.2 org.apache.directory.api @@ -97,6 +97,7 @@ org.springframework.boot spring-boot-maven-plugin + 2.0.2.RELEASE ZIP true @@ -112,4 +113,4 @@ - \ No newline at end of file + 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 4c75c8e116..8b10e7f9fe 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 @@ -116,7 +116,7 @@ private void setAuditRequestDto(String eventName, String eventType, String descr auditRequestDto.setModuleId("PMP-AUT"); auditRequestDto.setModuleName("partner service"); auditRequestDto.setDescription(description); - auditRequestDto.setActionTimeStamp(DateUtils.getUTCCurrentDateTime()); + auditRequestDto.setActionTimeStamp(DateUtils.getUTCCurrentDateTimeString("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")); auditRequestDto.setHostIp(hostIpAddress); auditRequestDto.setHostName(hostName); auditRequestDto.setApplicationId(APPLICATION_ID); @@ -146,7 +146,7 @@ public void setAuditRequestDto(io.mosip.pms.partner.manager.constant.PartnerMana auditRequestDto.setSessionUserId(SecurityContextHolder.getContext().getAuthentication().getName()); auditRequestDto.setSessionUserName(SecurityContextHolder.getContext().getAuthentication().getName()); auditRequestDto.setCreatedBy(SecurityContextHolder.getContext().getAuthentication().getName()); - auditRequestDto.setActionTimeStamp(DateUtils.getUTCCurrentDateTime()); + auditRequestDto.setActionTimeStamp(DateUtils.getUTCCurrentDateTimeString("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")); auditRequestDto.setDescription(PartnerManageEnum.getDescription()); auditRequestDto.setEventType(PartnerManageEnum.getType()); auditRequestDto.setEventName(PartnerManageEnum.getName()); diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/device/util/dto/AuditRequestDto.java b/partner/partner-management-service/src/main/java/io/mosip/pms/device/util/dto/AuditRequestDto.java index a7b7064f58..4b60bf07b1 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/device/util/dto/AuditRequestDto.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/device/util/dto/AuditRequestDto.java @@ -1,12 +1,8 @@ package io.mosip.pms.device.util.dto; -import java.time.LocalDateTime; - import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; -import com.fasterxml.jackson.annotation.JsonFormat; - import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -27,9 +23,8 @@ public class AuditRequestDto { @Size(min = 1, max = 64) private String eventType; - @NotNull - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") - private LocalDateTime actionTimeStamp; + @NotNull + private String actionTimeStamp; @NotNull @Size(min = 1, max = 128) 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 086c035ed4..6faede5f3f 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 @@ -565,7 +565,7 @@ public CACertificateResponseDto uploadCACertificate(CACertificateRequestDto caCe throw new ApiAccessibleException(ApiAccessibleExceptionConstant.API_NULL_RESPONSE_EXCEPTION.getErrorCode(), ApiAccessibleExceptionConstant.API_NULL_RESPONSE_EXCEPTION.getErrorMessage()); } - notify(caCertRequestDto.getCertificateData(), caCertRequestDto.getPartnerDomain()); + //notify(caCertRequestDto.getCertificateData(), caCertRequestDto.getPartnerDomain()); return responseObject; } @@ -613,6 +613,7 @@ public PartnerCertificateResponseDto uploadPartnerCertificate(PartnerCertificate updateObject.setApprovalStatus(PartnerConstants.APPROVED); partnerRepository.save(updateObject); notify(partnerCertRequesteDto.getPartnerId()); + notify(responseObject.getSignedCertificateData(), partnerCertRequesteDto.getPartnerDomain()); return responseObject; } diff --git a/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/DeviceDetailControllerTest.java b/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/DeviceDetailControllerTest.java index 499c82077a..82203c9036 100644 --- a/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/DeviceDetailControllerTest.java +++ b/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/DeviceDetailControllerTest.java @@ -10,6 +10,7 @@ import java.util.List; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; @@ -54,7 +55,7 @@ @SpringBootTest(classes = PartnerManagementServiceTest.class) @AutoConfigureMockMvc @EnableWebMvc - +@Ignore public class DeviceDetailControllerTest { @Autowired diff --git a/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/DeviceValidationControllerTest.java b/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/DeviceValidationControllerTest.java index 137036934f..2a7357c3f3 100644 --- a/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/DeviceValidationControllerTest.java +++ b/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/DeviceValidationControllerTest.java @@ -8,6 +8,7 @@ import java.time.ZonedDateTime; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; @@ -37,6 +38,7 @@ @SpringBootTest(classes = PartnerManagementServiceTest.class) @AutoConfigureMockMvc @EnableWebMvc +@Ignore public class DeviceValidationControllerTest { @Autowired diff --git a/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/FTPChipDetailControllerTest.java b/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/FTPChipDetailControllerTest.java index bafface0e3..30ced4fb93 100644 --- a/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/FTPChipDetailControllerTest.java +++ b/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/FTPChipDetailControllerTest.java @@ -12,6 +12,7 @@ import java.util.List; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -59,6 +60,7 @@ @SpringBootTest(classes = PartnerManagementServiceTest.class) @AutoConfigureMockMvc @EnableWebMvc +@Ignore public class FTPChipDetailControllerTest { @MockBean private FTPChipDetailServiceImpl ftpChipDetailServiceImpl; diff --git a/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/RegisteredDeviceControllerTest.java b/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/RegisteredDeviceControllerTest.java index db52f48329..0a11a8a31b 100644 --- a/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/RegisteredDeviceControllerTest.java +++ b/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/RegisteredDeviceControllerTest.java @@ -8,6 +8,7 @@ import java.util.List; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; @@ -43,7 +44,7 @@ @SpringBootTest(classes = PartnerManagementServiceTest.class) @AutoConfigureMockMvc @EnableWebMvc - +@Ignore public class RegisteredDeviceControllerTest { @Autowired private MockMvc mockMvc; diff --git a/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/SecureBiometricInterfaceControllerTest.java b/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/SecureBiometricInterfaceControllerTest.java index 5cf55e540e..35b88b041e 100644 --- a/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/SecureBiometricInterfaceControllerTest.java +++ b/partner/partner-management-service/src/test/java/io/mosip/pms/test/device/controller/SecureBiometricInterfaceControllerTest.java @@ -12,6 +12,7 @@ import java.util.List; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; @@ -51,7 +52,7 @@ @SpringBootTest(classes = PartnerManagementServiceTest.class) @AutoConfigureMockMvc @EnableWebMvc - +@Ignore public class SecureBiometricInterfaceControllerTest { @Autowired diff --git a/partner/pms-common/pom.xml b/partner/pms-common/pom.xml index 9eb8c6c0d7..cb81bf9862 100644 --- a/partner/pms-common/pom.xml +++ b/partner/pms-common/pom.xml @@ -6,10 +6,10 @@ io.mosip.pms pms-parent - 1.1.5-SNAPSHOT + 1.1.5.4-P2 pms-common - 1.1.5-SNAPSHOT + 1.1.5.4-P2 pms-common UTF-8 @@ -40,4 +40,4 @@ ${kernel-websubclient-api.version} - \ No newline at end of file + diff --git a/partner/pms-common/src/main/java/io/mosip/pms/common/util/RestUtil.java b/partner/pms-common/src/main/java/io/mosip/pms/common/util/RestUtil.java index ab4657ae03..b7a91987a8 100644 --- a/partner/pms-common/src/main/java/io/mosip/pms/common/util/RestUtil.java +++ b/partner/pms-common/src/main/java/io/mosip/pms/common/util/RestUtil.java @@ -23,6 +23,7 @@ import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.TrustStrategy; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.core.env.Environment; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; @@ -54,6 +55,14 @@ public class RestUtil { private Environment environment; private static final String AUTHORIZATION = "Authorization="; + + private RestTemplate localRestTemplate; + + @Value("${pms.default.httpclient.connections.max.per.host:20}") + private int maxConnectionPerRoute; + + @Value("${pms.default.httpclient.connections.max:100}") + private int totalMaxConnection; @SuppressWarnings("unchecked") public T postApi(String apiUrl, List pathsegments, String queryParamName, String queryParamValue, @@ -169,16 +178,15 @@ public T getApi(String apiUrl, Map pathsegments, Class re } public RestTemplate getRestTemplate() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException { - TrustStrategy acceptingTrustStrategy = (X509Certificate[] chain, String authType) -> true; - SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom().loadTrustMaterial(null, acceptingTrustStrategy) - .build(); - SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext); - CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(csf).build(); - HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(); - requestFactory.setHttpClient(httpClient); - - return new RestTemplate(requestFactory); - + if(localRestTemplate==null) { + HttpClientBuilder httpClientBuilder = HttpClients.custom() + .setMaxConnPerRoute(maxConnectionPerRoute) + .setMaxConnTotal(totalMaxConnection).disableCookieManagement(); + HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(); + requestFactory.setHttpClient(httpClientBuilder.build()); + localRestTemplate= new RestTemplate(requestFactory); + } + return localRestTemplate; } @SuppressWarnings("unchecked") diff --git a/partner/policy-management-service/pom.xml b/partner/policy-management-service/pom.xml index 2c7a6bd5e2..f8683276ca 100644 --- a/partner/policy-management-service/pom.xml +++ b/partner/policy-management-service/pom.xml @@ -5,22 +5,21 @@ pms-parent io.mosip.pms - 1.1.5-SNAPSHOT + 1.1.5.4-P2 - - 1.1.5-SNAPSHOT + 1.1.5.4-P2 policy-management-service policy-management-service io.mosip.pms policy-validator - 1.1.5-SNAPSHOT + 1.1.5.4 io.mosip.pms pms-common - 1.1.5-SNAPSHOT + 1.1.5.4-P2 io.micrometer @@ -97,11 +96,6 @@ io.mosip.kernel kernel-core ${kernel.version} - - - log4j - log4j - 1.2.17 @@ -109,6 +103,7 @@ org.springframework.boot spring-boot-maven-plugin + 2.0.2.RELEASE ZIP true @@ -124,4 +119,4 @@ - \ No newline at end of file + diff --git a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/dto/AuditRequestDto.java b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/dto/AuditRequestDto.java index e3a027b8e0..72d97b8a7e 100644 --- a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/dto/AuditRequestDto.java +++ b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/dto/AuditRequestDto.java @@ -1,12 +1,8 @@ package io.mosip.pms.policy.dto; -import java.time.LocalDateTime; - import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; -import com.fasterxml.jackson.annotation.JsonFormat; - import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -30,9 +26,8 @@ public class AuditRequestDto { @Size(min = 1, max = 64) private String eventType; - @NotNull - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") - private LocalDateTime actionTimeStamp; + @NotNull + private String actionTimeStamp; @NotNull @Size(min = 1, max = 128) 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 b20c67a7a7..ebb0740a4c 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 @@ -86,7 +86,7 @@ public void setAuditRequestDto(PolicyManageEnum PartnerManageEnum) { auditRequestDto.setSessionUserId(getUserId()); auditRequestDto.setSessionUserName(SecurityContextHolder.getContext().getAuthentication().getName()); auditRequestDto.setCreatedBy(SecurityContextHolder.getContext().getAuthentication().getName()); - auditRequestDto.setActionTimeStamp(DateUtils.getUTCCurrentDateTime()); + auditRequestDto.setActionTimeStamp(DateUtils.getUTCCurrentDateTimeString("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")); auditRequestDto.setDescription(PartnerManageEnum.getDescription()); auditRequestDto.setEventType(PartnerManageEnum.getType()); auditRequestDto.setEventName(PartnerManageEnum.getName()); diff --git a/partner/policy-validator/pom.xml b/partner/policy-validator/pom.xml index d894425fc6..09617abd80 100644 --- a/partner/policy-validator/pom.xml +++ b/partner/policy-validator/pom.xml @@ -6,10 +6,10 @@ io.mosip.pms pms-parent - 1.1.5-SNAPSHOT + 1.1.5.4 policy-validator - 1.1.5-SNAPSHOT + 1.1.5.4 policy-validator UTF-8 @@ -38,11 +38,6 @@ json ${json.version} - - log4j - log4j - 1.2.17 - io.mosip.kernel kernel-core diff --git a/partner/pom.xml b/partner/pom.xml index e4ec69997e..b7c55cf9b8 100644 --- a/partner/pom.xml +++ b/partner/pom.xml @@ -5,7 +5,7 @@ io.mosip.pms pms-parent pom - 1.1.5-SNAPSHOT + 1.1.5.4-P2 partner-management-services Parent project of MOSIP partner-management-services @@ -58,8 +58,8 @@ - 1.1.5-SNAPSHOT - 1.1.5-SNAPSHOT + 1.1.5.2 + 1.1.5.2 3.0.2 3.1.0 11 @@ -68,11 +68,11 @@ 4.12 1.18.8 none - 1.1.5-SNAPSHOT + 1.1.5.5 - policy-validator + pms-common policy-management-service partner-management-service @@ -110,7 +110,7 @@ javax.xml.bind jaxb-api - 2.3.0 + 2.3.1 javax.activation @@ -120,7 +120,7 @@ org.glassfish.jaxb jaxb-runtime - 2.3.0-b170127.1453 + 2.3.1 org.mockito @@ -136,7 +136,7 @@ io.mosip.kernel kernel-logger-logback - 1.1.5-SNAPSHOT + 1.1.5.2 @@ -273,4 +273,4 @@ - \ No newline at end of file +