PMS Portal is used by the Partners to onboard with MOSIP and manage Devices, FTM, Create API Keys and Create OIDC clients etc.
Partner Management module has two services:
Partner Management service
Policy Management service
The documentation here will guide you through the prerequisites required for the developer's setup.
Below is a list of tools required in Partner Management Services:
JDK 11
Any IDE (like Eclipse, IntelliJ IDEA)
Apache Maven (zip folder)
pgAdmin
Postman
Git
Notepad++ (optional)
lombok.jar (file)
settings.xml (document)
Follow the steps below to set up Partner Management Services on your local system:
Download lombok.jar
and settings.xml
from here.
Install Apache Maven.
Copy the settings.xml
to ".m2" folder C:\Users\<username>\.m2
.
Install Eclipse.
Open the lombok.jar
file and wait for some time until it completes the scan for Eclipse IDE and then click Install/Update
. Specify the eclipse installation location if required by clicking the ‘Specify location…’ button. Then, click Install/Update
the button to proceed.
Check the Eclipse installation folder C:\Users\userName\eclipse\jee-2021-12\eclipse
to see if lombok.jar
is added. By doing this, you will not have to add the dependency of lombok in your pom.xml
file separately as it is auto-configured by Eclipse.
Configure the JDK (Standard VM) with your Eclipse by traversing through Preferences → Java → Installed JREs
.
For the code setup, clone the repository and follow the guidelines mentioned in the Code Contributions.
Open the project folder partner-management-services\partner
where pom.xml
is present.
Open the command prompt from the same folder.
Run the command mvn clean install -Dgpg.skip=true
to build the project and wait for the build to complete successfully.
After building a project, open Eclipse and select Import Projects → Maven → Existing Maven Projects → Next → Browse to project directory → Finish
This will import 5 projects into Eclipse: partner, partner-management-service, pms-common, policy-management-service and policy-validator
After successful importing of all the projects, update each project by right-clicking on Project → Maven → Update Project
.
For the environment setup, you need an external JAR that is available here with different versions. Download the below-mentioned JARs with appropriate latest/appropriate versions. You will need to input the appropriate artifact ID and version and other inputs. kernel-auth-adapter.jar
E.g.: You can download kernel-auth-adapter.jar
and add to the project Libraries → Classpath → Add External JARs → Select Downloaded JAR → Add → Apply
and Close).
Properties Files - Update application-dev.properties
and bootstrap.properties
files in below folder partner-management-services\partner\partner-management-service\src\main\resources
to run the Partner Management Service locally
Click the "run" option, the service will start locally on port 9109.
Policy management service also can run by following the above steps.
For API documentation, refer here.
The APIs can be tested with the help of Postman or Swagger-UI.
Swagger is an interface description language for describing restful APIs expressed using JSON. Can access Swagger-UI of partner-management-services for dev-environment from https://dev.mosip.net/v1/partnermanager/swagger-ui/index.html?configUrl=/v1/partnermanager/v3/api-docs/swagger-config
and localhost from http://localhost:9109/v1/partnermanager/swagger-ui/index.html?configUrl=/v1/partnermanager/v3/api-docs/swagger-config
.
Can access Swagger-UI of policy-management-services for dev-environment from https://dev.mosip.net/v1/policymanager/swagger-ui/index.html?configUrl=/v1/policymanager/v3/api-docs/swagger-config
and localhost from http://localhost:9107/v1/policymanager/swagger-ui/index.html?configUrl=/v1/policymanager/v3/api-docs/swagger-config
.
Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster. It is widely used tool for API testing.
Download the JSON collection and then import it in your postman.
Name of property
Value
File Name
spring.profiles.active
dev
bootstrap.properties
spring.cloud.config.uri
dev
bootstrap.properties
javax.persistence.jdbc.url
jdbc:postgresql://$HOST:$PORT/mosip_pms
application-dev.properties
javax.persistence.jdbc.password
Password of DB
application-dev.properties
Replace all URL’s https://dev.mosip.net with ${mosip.api.internal.url}
${mosip.api.internal.url} should be set to the URL to the your env where all below dependent services are running.
WebSub, MasterData, KeyManager, AuthManager, DataShare, Notifier, Esignet, IDP etc
application-dev.properties
mosip.iam.base-url
This should point to the URL of your env where KeyCloak is running. Ex: https://iam.dev.mosip.net
application-dev.properties
mosip.pmp.auth.secretKey
Key Cloak Secret of mosip-pms-client
application-dev.properties
pms.cert.service.token.request.clientId
mosip-pms-client
application-dev.properties
mosip.iam.module.clientsecret
Key Cloak Secret of mosip-pms-client
application-dev.properties
mosip.iam.adapter.clientsecret
Key Cloak Secret of mosip-pms-client
application-dev.properties
mosip.iam.module.login_flow.scope
application-dev.properties
mosip.iam.module.redirecturi
http://localhost:9109/v1/partnermanager/login-redirect/
application-dev.properties
auth.allowed.urls
http://localhost:3000/
application-dev.properties
mosip.pms.esignet.config-url
${mosip.api.internal.url}/v1/esignet/oidc/.well-known/openid-configuration
application-dev.properties
mosip.pms.esignet.claims-mapping-file-url
Config Server URL pointing to identity-mapping.json
application-dev.properties
mosip.pms.esignet.amr-acr-mapping-file-url
Config Server URL pointing to amr-acr-mapping.json
application-dev.properties
mosip.pms.esignet.oidc-client-create-url
${mosip.api.internal.url}/v1/esignet/client-mgmt/oidc-client
application-dev.properties
mosip.pms.esignet.oidc-client-update-url
${mosip.api.internal.url}/v1/esignet/client-mgmt/oidc-client
application-dev.properties
mosip.pms.esignet.oauth-client-create-url
${mosip.api.internal.url}/v1/esignet/client-mgmt/oauth-client
application-dev.properties
mosip.pms.esignet.oauth-client-update-url
${mosip.api.internal.url}/v1/esignet/client-mgmt/oauth-client
application-dev.properties