Skip to content

Commit

Permalink
[ES-1966] merge code from release to develop (#290)
Browse files Browse the repository at this point in the history
* ES-1638

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* ES-1638

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* Added docker compose file

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* Deleted external configuration file

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* Deleted external configuration file

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* ES-842 (#245)

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* ES-1638

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* ES-1638 (#247)

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* ES-1638

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* ES-842 corrected the verified claims logi (#249)

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* modified getLanguageValuesList method (#250)

Signed-off-by: Mohd Kaif Siddique <[email protected]>
Co-authored-by: Mohd Kaif Siddique <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [ES-1678] Added a new error message for the ekyc failure in i18n.

Signed-off-by: GurukiranP <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* Updated readme and docker compose

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] removed deployment script and updated chart

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] corrected chart lint yaml

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] moved deployment scripts to deploy

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] updarted chart values for latest changes to remove artifactory and config server dependency

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] moved db-init scripts to deploy

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] added updated db-init scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] added updated mock-identity-system scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] added updated mock-relying-party-service scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] added updated mock-relying-party-ui scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] added install-all.sh, delete-all.sh, restart-all.sh scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] updated installation scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] updated README and installation scripts comments

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] added changes for partner onboarder to store reports in volume

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] removed unused secret creation

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [INJICERT-434] optionally support using arbitrary field as PSUT value (#258)

* [INJICERT-434] optionally support using individualID as PSUT

Purpose: to break Certify <--> Mock DataProviderPlugin dependency wrt
         OIDCTransaction object stored in Redis

Config changes required:
* Introduces a config but does not break existing default behaviour, so
  no explicit change required

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-434] allow PSUT to set to any configured field

* by default the kycAuth response will have the psut field, but this can
  be configured to have some other user data in the clear if required

Breaking changes: None. The changes are backwards compatible

Signed-off-by: Harsh Vardhan <[email protected]>

---------

Signed-off-by: Harsh Vardhan <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [ES-1689] added test case (#259)

Signed-off-by: Venkata Saidurga Polamraju <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* moved tomcat and prometheus configuration to bootstrap.properties

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35987] updated onboarder to support storing reports in nfs volume

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* Updated Readme and pom version

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [DSD-6382] added prompt to install services

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [DSD-6382] removed unused clusterRolebinding

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [DSD-6382] updated changes to fix dev testing issues

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [DSD-6382] updated correct onboarder chart version (#272)

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* Added JsonIgnoreProperties for kyc auth and exchange requests (#269)

Signed-off-by: piyush-shukla03_infosys <[email protected]>
Co-authored-by: piyush-shukla03_infosys <[email protected]>
Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [DSD-6382] updated partner onboarder install script

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] removed deployment script and updated chart

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] added updated mock-identity-system scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] added install-all.sh, delete-all.sh, restart-all.sh scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] updated installation scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] updated README and installation scripts comments

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35816] added changes for partner onboarder to store reports in volume

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [ES-1689] (#271)

* [ES-1689]

Signed-off-by: Venkata Saidurga Polamraju <[email protected]>

* [ES-1689]

Signed-off-by: Venkata Saidurga Polamraju <[email protected]>

* [ES-1689] Updated the review comments

Signed-off-by: Venkata Saidurga Polamraju <[email protected]>

---------

Signed-off-by: Venkata Saidurga Polamraju <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [DSD-6445]Updated install.sh

Signed-off-by: Rakshitha650 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [DSD-6445]Updated install.sh

Signed-off-by: Rakshitha650 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [ES-1842] i18n translation changes.

Signed-off-by: GurukiranP <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* Fixed the properties file, created only master copy of properties

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* Corrected test case and active profile

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* Updated the image name

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* Release 0.10.x (#275)

* ES-842 corrected the verified claims logi (#249)

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* modified getLanguageValuesList method (#250)

Signed-off-by: Mohd Kaif Siddique <[email protected]>
Co-authored-by: Mohd Kaif Siddique <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [ES-1678] Added a new error message for the ekyc failure in i18n.

Signed-off-by: GurukiranP <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* Updated readme and docker compose

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] removed deployment script and updated chart

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] corrected chart lint yaml

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] moved deployment scripts to deploy

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] updarted chart values for latest changes to remove artifactory and config server dependency

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] moved db-init scripts to deploy

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] added updated db-init scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] added updated mock-identity-system scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] added updated mock-relying-party-service scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] added updated mock-relying-party-ui scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] added install-all.sh, delete-all.sh, restart-all.sh scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] updated installation scripts

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] updated README and installation scripts comments

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] added changes for partner onboarder to store reports in volume

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35816] removed unused secret creation

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [INJICERT-434] optionally support using arbitrary field as PSUT value (#258)

* [INJICERT-434] optionally support using individualID as PSUT

Purpose: to break Certify <--> Mock DataProviderPlugin dependency wrt
         OIDCTransaction object stored in Redis

Config changes required:
* Introduces a config but does not break existing default behaviour, so
  no explicit change required

Signed-off-by: Harsh Vardhan <[email protected]>

* [INJICERT-434] allow PSUT to set to any configured field

* by default the kycAuth response will have the psut field, but this can
  be configured to have some other user data in the clear if required

Breaking changes: None. The changes are backwards compatible

Signed-off-by: Harsh Vardhan <[email protected]>

---------

Signed-off-by: Harsh Vardhan <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [ES-1689] added test case (#259)

Signed-off-by: Venkata Saidurga Polamraju <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* moved tomcat and prometheus configuration to bootstrap.properties

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [MOSIP-35987] updated onboarder to support storing reports in nfs volume

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* Updated Readme and pom version

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [DSD-6382] added prompt to install services

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [DSD-6382] removed unused clusterRolebinding

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [DSD-6382] updated changes to fix dev testing issues

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [DSD-6382] updated correct onboarder chart version (#272)

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* Added JsonIgnoreProperties for kyc auth and exchange requests (#269)

Signed-off-by: piyush-shukla03_infosys <[email protected]>
Co-authored-by: piyush-shukla03_infosys <[email protected]>
Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* [DSD-6382] updated partner onboarder install script

Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>

* resolved lint failures (#277)

Signed-off-by: Chandra Keshav Mishra <[email protected]>

---------

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Mohd Kaif Siddique <[email protected]>
Signed-off-by: GurukiranP <[email protected]>
Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Harsh Vardhan <[email protected]>
Signed-off-by: Venkata Saidurga Polamraju <[email protected]>
Signed-off-by: piyush-shukla03_infosys <[email protected]>
Co-authored-by: ase-101 <[email protected]>
Co-authored-by: Kaif Siddique <[email protected]>
Co-authored-by: Mohd Kaif Siddique <[email protected]>
Co-authored-by: GurukiranP <[email protected]>
Co-authored-by: Harsh Vardhan <[email protected]>
Co-authored-by: pvsaidurga <[email protected]>
Co-authored-by: Piyush7034 <[email protected]>
Co-authored-by: piyush-shukla03_infosys <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [ES-1859] Added a new error code in the i18n.

Signed-off-by: GurukiranP <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-35892] Updated helm charts to add range

Signed-off-by: Rakshithb1 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [ES-1842] i18n translation changes.

Signed-off-by: GurukiranP <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [ES-1899] Added log for testing. (#284)

Signed-off-by: GurukiranP <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-37447] updated install.sh script for mosipid check

Signed-off-by: bhumi46 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [MOSIP-37447] updated install.sh script for mosipid check

Signed-off-by: bhumi46 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

* [ES-1860] Updated package.json and package-lock.json files .

Signed-off-by: GurukiranP <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>

---------

Signed-off-by: ase-101 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>
Signed-off-by: Chandra Keshav Mishra <[email protected]>
Signed-off-by: Mohd Kaif Siddique <[email protected]>
Signed-off-by: GurukiranP <[email protected]>
Signed-off-by: ckm007 <[email protected]>
Signed-off-by: Harsh Vardhan <[email protected]>
Signed-off-by: Venkata Saidurga Polamraju <[email protected]>
Signed-off-by: piyush-shukla03_infosys <[email protected]>
Signed-off-by: Rakshitha650 <[email protected]>
Signed-off-by: Rakshithb1 <[email protected]>
Signed-off-by: bhumi46 <[email protected]>
Signed-off-by: Zeeshan Mehboob <[email protected]>
Co-authored-by: ase-101 <[email protected]>
Co-authored-by: Kaif Siddique <[email protected]>
Co-authored-by: Mohd Kaif Siddique <[email protected]>
Co-authored-by: GurukiranP <[email protected]>
Co-authored-by: ckm007 <[email protected]>
Co-authored-by: Harsh Vardhan <[email protected]>
Co-authored-by: pvsaidurga <[email protected]>
Co-authored-by: Piyush7034 <[email protected]>
Co-authored-by: piyush-shukla03_infosys <[email protected]>
Co-authored-by: Rakshitha650 <[email protected]>
Co-authored-by: Rakshithb1 <[email protected]>
Co-authored-by: Gk <[email protected]>
Co-authored-by: bhumi46 <[email protected]>
  • Loading branch information
14 people authored Dec 3, 2024
1 parent 026c64d commit b62821f
Show file tree
Hide file tree
Showing 19 changed files with 104 additions and 110 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Repository contains mock implementations for eSignet. Only for non-production us
|[Postgres Init](https://github.com/mosip/mosip-infra/tree/v1.2.0.1-B3/deployment/v3/external/postgres) | 12.0.1-B3 |
|[mock-identity-softhsm](https://github.com/mosip/esignet/blob/v1.0.0/helm/install-all.sh) | 12.0.1-B2 |


### Install Pe-req for mock services
* Install `kubectl` and `helm` utilities.
* Run `prereq.sh` to setup below mentioned pre-requisites for mock services.
Expand All @@ -29,6 +28,7 @@ Repository contains mock implementations for eSignet. Only for non-production us
```
export KUBECONFIG=path/to/kubeconfig.config
```

* Execute installation script:
```
./instll-mock.sh
Expand Down
1 change: 0 additions & 1 deletion deploy/delete-mock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ set -o nounset ## set -u : exit the script if you try to use an uninitialised
set -o errtrace # trace ERR through 'time command' and other functions
set -o pipefail # trace ERR through pipes
deleting_mock # calling function

2 changes: 1 addition & 1 deletion docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- 8082:8082
environment:
- container_user=mosip
- active_profile_env=local
- active_profile_env=default,local
- SPRING_DATASOURCE_URL=jdbc:postgresql://database:5432/mosip_mockidentitysystem?currentSchema=mockidentitysystem
- SPRING_DATASOURCE_USERNAME=postgres
- SPRING_DATASOURCE_PASSWORD=postgres
Expand Down
4 changes: 2 additions & 2 deletions docker-compose/mock-relying-party-portal-docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
mock-relying-party-service:
image: 'mosipdev/mock-relying-party-service:develop'
image: 'mosipdev/mock-relying-party-service:release-0.10.x'
user: root
ports:
- 8888:8888
Expand All @@ -14,7 +14,7 @@ services:


mock-relying-party-ui:
image: 'mosipdev/mock-relying-party-ui:develop'
image: 'mosipdev/mock-relying-party-ui:release-0.10.x'
user: root
ports:
- 3000:3000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class IdentityController {
@PostMapping(value = "identity", consumes = { MediaType.APPLICATION_JSON_VALUE }, produces = {
MediaType.APPLICATION_JSON_VALUE })
public ResponseWrapper<IdentityStatus> createIdentity
(@Valid @RequestBody RequestWrapper<IdentityData> requestWrapper) throws MockIdentityException {
(@Valid @RequestBody RequestWrapper<CreateIdentity> requestWrapper) throws MockIdentityException {

ResponseWrapper response = new ResponseWrapper<IdentityStatus>();
IdentityStatus identityStatus = new IdentityStatus();
Expand All @@ -43,7 +43,7 @@ public class IdentityController {
@PutMapping(value = "identity", consumes = { MediaType.APPLICATION_JSON_VALUE }, produces = {
MediaType.APPLICATION_JSON_VALUE })
public ResponseWrapper<IdentityStatus> updateIdentity
(@Valid @RequestBody RequestWrapper<IdentityData> requestWrapper) throws MockIdentityException {
(@Valid @RequestBody RequestWrapper<UpdateIdentity> requestWrapper) throws MockIdentityException {

ResponseWrapper response = new ResponseWrapper<IdentityStatus>();
IdentityStatus identityStatus = new IdentityStatus();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* 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/.
*/
package io.mosip.esignet.mock.identitysystem.dto;

import io.mosip.esignet.mock.identitysystem.validator.IdData;

@IdData(action = "CREATE")
public class CreateIdentity extends IdentityData {
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import lombok.Data;

@Data
@IdData
@JsonIgnoreProperties(ignoreUnknown = true)
public class IdentityData {

Expand All @@ -25,8 +24,6 @@ public class IdentityData {

String pin;

List<LanguageValue> name;

List<LanguageValue> fullName;

String preferredLang;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* 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/.
*/
package io.mosip.esignet.mock.identitysystem.dto;

import io.mosip.esignet.mock.identitysystem.validator.IdData;

@IdData(action = "UPDATE")
public class UpdateIdentity extends IdentityData {
}
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ private KycAuth saveKycAuthTransaction(String transactionId, String relyingParty
}

private Map<String, Object> buildKycDataBasedOnPolicy(String individualId, JsonNode identityData, Map<String, JsonNode> claims, List<String> locales) {
log.info("Accepted claim details {} for locales : {}", claims, locales);
Map<String, Object> kyc = new HashMap<>();
if (CollectionUtils.isEmpty(locales)) {
locales = Arrays.asList(defaultLanguage);
Expand All @@ -392,6 +393,7 @@ private Map<String, Object> buildKycDataBasedOnPolicy(String individualId, JsonN
for (Map.Entry<String, JsonNode> claimDetail : claims.entrySet()) {

Optional<Map.Entry<String, String>> keyMappingEntry = oidcClaimsMapping.entrySet().stream().filter(entry -> entry.getValue().equals(claimDetail.getKey()) ).findFirst();
log.info("Mapping for claim {} is found : {}", claimDetail.getKey(), keyMappingEntry.isPresent());

switch (claimDetail.getKey()) {
case "verified_claims":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@

Class<? extends Payload>[] payload() default {};

String action() default "CREATE";

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,18 @@
@Component
public class IdentityDataValidator implements ConstraintValidator<IdData, IdentityData> {

@Value("#{T(java.util.Arrays).asList('${mosip.esignet.mock.supported-fields:}')}")
private List<String> supportedFields;
@Value("#{T(java.util.Arrays).asList('${mosip.mock.identity.create.required.fields:}')}")
private List<String> createRequiredFields;

@Value("#{T(java.util.Arrays).asList('${mosip.mock.identity.update.required.fields:}')}")
private List<String> updateRequiredFields;

private String action;

@Override
public void initialize(IdData constraintAnnotation) {
this.action = constraintAnnotation.action();
}

@Override
public boolean isValid(IdentityData value, ConstraintValidatorContext context) {
Expand All @@ -37,7 +47,7 @@ public boolean isValid(IdentityData value, ConstraintValidatorContext context) {

fields.values().removeIf(Objects::isNull);

return fields.keySet().containsAll(supportedFields);
return fields.keySet().containsAll(this.action.equals("UPDATE") ? updateRequiredFields : createRequiredFields);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,27 @@ spring.jpa.hibernate.ddl-auto=none
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
mosip.esignet.mock.authenticator.ida.otp-channels=email,phone

mosip.mock.identity.create.required.fields=individualId,fullName,givenName,familyName,gender,dateOfBirth,email,phone,streetAddress,locality,region,postalCode,country
mosip.mock.identity.update.required.fields=individualId

mosip.esignet.mock.supported-fields=individualId,pin,givenName,familyName,gender,dateOfBirth,email,phone,streetAddress,locality,region,postalCode,country
mosip.mock.ida.kba.default.field-language=eng
mosip.mock.ida.kyc.psut.field=psut

#Related to health check of hsm
mosip.kernel.keymgr.hsm.health.check.enabled=false
mosip.kernel.keymgr.hsm.health.key.app-id=MOCK_AUTHENTICATION_SERVICE
mosip.kernel.keymgr.hsm.healthkey.ref-id=HEALTH_KEY

## Value to be used as partner specific token, if configured value is psut, token is generated using individualId & partnerId. if it is
# configured to use any other identity fields eg: individualId
mosip.mock.ida.kyc.psut.field=psut

##---------------------------------kbi Configurations------------------------------------------------------

#We can use any field from the IdentityData for kbi
mosip.esignet.authenticator.auth-factor.kbi.field-details={{"id":"phone", "type":"text", "format":""},{"id":"email", "type":"text", "format":""},{"id":"dateOfBirth", "type":"date", "format":"yyyy-MM-dd"}}
mosip.esignet.authenticator.auth-factor.kbi.field-language=eng
mosip.mock.ida.kbi.default.field-language=eng

mosip.mock.ida.identity-openid-claims-mapping={"fullName":"name","name":"name","email":"email","phone":"phone_number","gender":"gender","dateOfBirth":"birthdate","encodedPhoto":"picture"}
mosip.mock.ida.identity-openid-claims-mapping={"fullName":"name","givenName":"given_name","familyName":"family_name","email":"email","phone":"phone_number","gender":"gender","dateOfBirth":"birthdate","encodedPhoto":"picture"}
Original file line number Diff line number Diff line change
@@ -1,76 +1,12 @@
##----------------------------------------- Database properties --------------------------------------------------------
##-----------------------------------------local database properties --------------------------------------------------------

spring.datasource.url=jdbc:postgresql://localhost:5455/mosip_mockidentitysystem?currentSchema=mockidentitysystem
spring.datasource.username=postgres
mosip.mockidentitysystem.database.hostname=localhost
mosip.mockidentitysystem.database.port=5455
mosip.mockidentitysystem.database.name=mosip_mockidentitysystem
mosip.mockidentitysystem.database.username=postgres
spring.datasource.password=postgres
spring.datasource.driver-class-name=org.postgresql.Driver

spring.jpa.database-platform=org.hibernate.dialect.PostgreSQL95Dialect
spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=none
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true

#------------------------------------ Key-manager specific properties --------------------------------------------------
#Crypto asymmetric algorithm name
mosip.kernel.crypto.asymmetric-algorithm-name=RSA/ECB/OAEPWITHSHA-256ANDMGF1PADDING
#Crypto symmetric algorithm name
mosip.kernel.crypto.symmetric-algorithm-name=AES/GCM/PKCS5Padding
#Keygenerator asymmetric algorithm name
mosip.kernel.keygenerator.asymmetric-algorithm-name=RSA
#Keygenerator symmetric algorithm name
mosip.kernel.keygenerator.symmetric-algorithm-name=AES
#Asymmetric algorithm key length
mosip.kernel.keygenerator.asymmetric-key-length=2048
#Symmetric algorithm key length
mosip.kernel.keygenerator.symmetric-key-length=256
#Encrypted data and encrypted symmetric key separator
mosip.kernel.data-key-splitter=#KEY_SPLITTER#
#GCM tag length
mosip.kernel.crypto.gcm-tag-length=128
#Hash algo name
mosip.kernel.crypto.hash-algorithm-name=PBKDF2WithHmacSHA512
#Symmtric key length used in hash
mosip.kernel.crypto.hash-symmetric-key-length=256
#No of iterations in hash
mosip.kernel.crypto.hash-iteration=100000
#Sign algo name
mosip.kernel.crypto.sign-algorithm-name=RS256
#Certificate Sign algo name
mosip.kernel.certificate.sign.algorithm=SHA256withRSA

mosip.kernel.keymanager.hsm.config-path=local.p12
## Keymanager configuration
mosip.kernel.keymanager.hsm.keystore-type=PKCS12
mosip.kernel.keymanager.hsm.keystore-pass=local

mosip.kernel.keymanager.certificate.default.common-name=www.mosip.io
mosip.kernel.keymanager.certificate.default.organizational-unit=MOSIP-TECH-CENTER
mosip.kernel.keymanager.certificate.default.organization=IITB
mosip.kernel.keymanager.certificate.default.location=BANGALORE
mosip.kernel.keymanager.certificate.default.state=KA
mosip.kernel.keymanager.certificate.default.country=IN

mosip.kernel.keymanager.softhsm.certificate.common-name=www.mosip.io
mosip.kernel.keymanager.softhsm.certificate.organizational-unit=MOSIP
mosip.kernel.keymanager.softhsm.certificate.organization=IITB
mosip.kernel.keymanager.softhsm.certificate.country=IN

# Application Id for PMS master key.
mosip.kernel.partner.sign.masterkey.application.id=PMS
mosip.kernel.partner.allowed.domains=DEVICE

mosip.kernel.keymanager-service-validate-url=https://${mosip.hostname}/keymanager/validate
mosip.kernel.keymanager.jwtsign.validate.json=false
mosip.keymanager.dao.enabled=false
crypto.PrependThumbprint.enable=true
## ------------------------------------------- Integrations ------------------------------------------------------------
#Mock IDA integration props
mosip.esignet.mock.authenticator.ida.otp-channels=email,phone

#Mock IDA OIDC Specified Cliams
mosip.mock.ida.identity-openid-claims-mapping={"fullName":"name","name":"name","email":"email","phone":"phone_number","gender":"gender","dateOfBirth":"birthdate","encodedPhoto":"picture"}

##---------------------------------KBI Configurations------------------------------------------------------
#We can use any field from the IdentityData for KBI
mosip.esignet.authenticator.auth-factor.kbi.field-details={{"id":"phone", "type":"text", "format":""},{"id":"email", "type":"text", "format":""},{"id":"dateOfBirth", "type":"date", "format":"yyyy-MM-dd"}}
mosip.mock.ida.kbi.default.field-language=eng
mosip.mock.ida.kyc.psut.field=psut
mosip.kernel.keymanager.hsm.config-path=mock_local.p12
mosip.kernel.keymanager.hsm.keystore-pass=localtest
5 changes: 2 additions & 3 deletions mock-identity-system/src/main/resources/bootstrap.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
spring.application.name=mock-identity-system
#spring.cloud.config.uri=http://localhost:8888
spring.profiles.active=local
#spring.cloud.config.label=master
spring.cloud.config.name=mock-identity-system
spring.profiles.active=default,local

spring.main.allow-bean-definition-overriding=true

server.port=8082
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import io.mosip.esignet.mock.identitysystem.dto.*;
import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -69,6 +70,8 @@ public void init() {
identityRequest.setPin("1289001");
identityRequest.setRegion(Arrays.asList(langValue));
identityRequest.setFullName(Arrays.asList(langValue));
identityRequest.setGivenName(Arrays.asList(langValue));
identityRequest.setFamilyName(Arrays.asList(langValue));
identityRequest.setStreetAddress(Arrays.asList(langValue));
identityRequest.setPhone("9090909090");
}
Expand Down Expand Up @@ -100,7 +103,7 @@ public void createIdentity_withInvalidIdentity_returnErrorResponse() throws Exce
mockMvc.perform(post("/identity").content(objectMapper.writeValueAsString(requestWrapper))
.contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk())
.andExpect(jsonPath("$.errors").isNotEmpty())
.andExpect(jsonPath("$.errors[0].errorCode").value(ErrorConstants.INVALID_INDIVIDUAL_ID));
.andExpect(jsonPath("$.errors[*].errorCode").value(Matchers.containsInAnyOrder(ErrorConstants.INVALID_REQUEST, ErrorConstants.INVALID_INDIVIDUAL_ID)));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ public void kycExchangeV2_withDetail_thenPass() {
LanguageValue languageValueName = new LanguageValue();
languageValueName.setLanguage("eng");
languageValueName.setValue("Siddharth K Mansour");
identityData.setName(List.of(languageValueName));
identityData.setFullName(List.of(languageValueName));



Expand Down Expand Up @@ -859,7 +859,7 @@ public void kycExchangeV2_withDetailAndMatchedClaims_thenPass() {
LanguageValue languageValueName = new LanguageValue();
languageValueName.setLanguage("eng");
languageValueName.setValue("Siddharth K Mansour");
identityData.setName(List.of(languageValueName));
identityData.setFullName(List.of(languageValueName));

// Convert IdentityData to JsonNode
ObjectMapper objectMapper = new ObjectMapper();
Expand Down Expand Up @@ -968,7 +968,7 @@ public void kycExchangeV2_withOutVerifiedClaims_thenPass() throws InvocationTarg
LanguageValue languageValueName = new LanguageValue();
languageValueName.setLanguage("eng");
languageValueName.setValue("Siddharth K Mansour");
identityData.setName(List.of(languageValueName));
identityData.setFullName(List.of(languageValueName));

KycExchangeRequestDtoV2 kycExchangeRequestDtoV2 = new KycExchangeRequestDtoV2();
kycExchangeRequestDtoV2.setIndividualId("individualId");
Expand Down Expand Up @@ -1090,12 +1090,7 @@ public void kycAuth2_withValidKbiChallenge_thenPass() throws Exception {
languageValueFullName.setValue("Siddharth K Mansour");
identityData.setFullName(List.of(languageValueFullName));

LanguageValue languageValueName = new LanguageValue();
languageValueName.setLanguage("eng");
languageValueName.setValue("Siddharth");
identityData.setName(List.of(languageValueName));

identityData.setEncodedPhoto("encodedPhoto");
identityData.setEncodedPhoto("encodedPhoto");
identityData.setDateOfBirth("1987/11/25");
identityData.setEmail("[email protected]");

Expand Down Expand Up @@ -1160,11 +1155,6 @@ public void kycAuth2_withValidKbiChallenge_and_withOutVerifiedClaim_thenPass() t
languageValueFullName.setValue("Siddharth K Mansour");
identityData.setFullName(List.of(languageValueFullName));

LanguageValue languageValueName = new LanguageValue();
languageValueName.setLanguage("eng");
languageValueName.setValue("Siddharth");
identityData.setName(List.of(languageValueName));

identityData.setEncodedPhoto("encodedPhoto");
identityData.setDateOfBirth("1987/11/25");
identityData.setEmail("[email protected]");
Expand Down
Loading

0 comments on commit b62821f

Please sign in to comment.