Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This guide contains all the information required for successful deployment and running of Partner Management Portal. It includes information about the Database and roles.
Partner Management Service DB Scripts to be run: DB scripts
mosip-pms-client
needs to have below roles in keycloak:
CREATE_SHARE
`
DEVICE_PROVIDER
PARTNER
PARTNER_ADMIN
PMS_ADMIN
PMS_USER
PUBLISH_APIKEY_APPROVED_GENERAL
PUBLISH_APIKEY_UPDATED_GENERAL
PUBLISH_CA_CERTIFICATE_UPLOADED_GENERAL
PUBLISH_MISP_LICENSE_GENERATED_GENERAL
PUBLISH_MISP_LICENSE_UPDATED_GENERAL
PUBLISH_OIDC_CLIENT_CREATED_GENERAL
PUBLISH_OIDC_CLIENT_UPDATED_GENERAL
PUBLISH_PARTNER_UPDATED_GENERAL
PUBLISH_POLICY_UPDATED_GENERAL
REGISTRATION_PROCESSOR
SUBSCRIBE_CA_CERTIFICATE_UPLOADED_GENERAL
ZONAL_ADMIN
Add below property to partner-management-default.properties file in mosip-config repository to Deploy PMS Revamp 1.3.0-DP.1 release in your env.
PMS Revamp Portal web application is currently compatible and certified with the following list of browsers:
Scope for Release 1.3.0-dp.1 - Compatible on standard browser size (laptop/desktop) and UI responsiveness in laptop/desktop.
Compatibility on Mobile and also on specific tablet and mobile sizes will be taken up only after Release 1.3.0-dp.1.
The following guide outlines some important properties that can be customized for a given installation. Please note that this list is not exhaustive but serves as a checklist for reviewing properties that are likely to differ from the default settings. For a complete list of properties, refer to the files listed below.
Partner Management Services uses the following configuration files:
Copy
This property is used by kernel-authcodeflowproxy-api to check request is coming from allowed urls not.
These properties are used to specify the keymanager API to upload certificates and get original partner uploaded certificates.
These properties are used to set attributes for partner management services.
app id : ApplicationId for partner
client id : Kernel auth client ID for partner management services
client secret : Kernel auth secret key for partner management services
These configurations are used to create user in keycloak and map to a role.
Note : All partner types should be created as roles in keycloak.
These properties are used to specify the auth manager API to validate the token.
This property is used to populate required roles which should be allowed in UI.(Roles are nothing but partner types)
These properties specify the url to redirect after logout and the end session endpoint in OIDC.
These configurations specify the E-Signet claims mapping file url, amr-acr mapping file url and the service apis for create and update OIDC and OAuth Client.
These properties are used to set the user inactivity idle time.
Inactivity Timer : Specifies the duration (in minutes) before the session is timed out due to inactivity.
Prompt Timer : Specifies the duration (in minutes) before the user is prompted about the impending session timeout.
Copy
This property is used to set the server request and response time(in minutes) for Axios.
Copy
These properties are used to set attributes for OIDC client creation and update.
Grant Types : Specifies the grant types used by the OIDC client.
Client Authentication Methods : Specifies the client authentication methods.
Copy
These properties specify partner type roles that are used to grant access to various APIs in partner management service.
Copy
SL No | Browser | Version |
Chrome |
|
Firefox |
|
Edge |
|
Safari |
|
This repository contains the UI code for Partner Management portal. To know more about the features and functions present on the portal, refer here.
Note: The code is written in React JS.
Install node.js
- To build the react JS code that runs on node, recommended Node: 21.7.3, Package Manager: npm 5.2+
Check out the source code from GIT – To download the source code from git, follow the steps below to download source code on your local system.
git clone https://github.com/mosip/partner-management-portal (to clone the source code repository from git)
Build the code
Follow the steps below to build the source code on your system.
Navigate to the pmp-reactjs-ui directory inside the cloned repository.
Run the command npm run
build in that directory to build the code.
Build Docker image
Follow the steps below to build the docker image on your system.
docker build -t name .
(replace name with the name of the image you want, "." signifies the current directory from where the docker file has to be read.)
Example: docker build -t pmp-reactjs-ui .
Run the Docker image
Follow the steps to build docker image on your system.
docker run –d –p 80:80 --name container-name image-name
(to run the docker image created with the previous step,-d
signifies to run the container in detached mode, -p
signifies the port mapping left side of the":" is the external port that will be exposed to the outside world and right side is the internal port of the container that is mapped with the external port. Replace container-name
with the name of your choice for the container, replace image-name
with the name of the image specified in the previous step)
Example: docker run -d -p 3000:3000--name nginx pmp-reactjs-ui
Now you can access the user interface over the internet via browser.
Example: http://localhost:3000
Build & deploy the code locally
Follow the steps below to build the source code on your system.
Navigate to the pmp-reactjs-ui directory inside the cloned repository. Then, run the following command in that directory:
npm install
npm start
Now, you can access the user interface via browser.
Example: http://localhost:3000
PMS Portal UI:
The table below outlines the frameworks, tools, and technologies used in PMS Portal.
Partner Management Services:
The table below outlines the frameworks, tools, and technologies employed by Partner Management Services.
Tool / Technology | Version | Description | License |
React JS | 18.2.0 | React JS is used to develop the UI web application |
Node JS | 21.7.3 | Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. |
Tailwind CSS | 3.4.3 | Tailwind CSS is a Utility-first CSS framework for building rapid custom UI. |
Tool / Technology | Version | Description | License |
Java SE 11 | OpenJDK 11 | Language Runtime in Docker Image | GNU General Public License, version 2, with the Classpath Exception |
Ubuntu Server | 20.04 | Docker base image Operating System | Free |
Spring | 5 | Application Framework | Apache License 2.0 |
Apache commons | Version compatible with Spring 5 | Utilities | Apache License 2.0 |
Hibernate | 5.2.17.Final | ORM | Apache Software License 2.0 |
Hibernate validator | 6.0.12.Final | validator | Apache Software License 2.0 |
Jackson | 2.12.0 | JSON marshal/unmarshal | Apache Software License 2.0 |
Junit | 4.x and above | Unit Testing | Common Public License - v 1.0 |
mockito | 2.22.0 | Junit - Mock Objects | MIT |
logback | 1.1.6 | Log | GNU Lesser GPL Version 2.1 |
velocity | 1.7 | Templating | Apache Software License 2.0 |
Swagger | Open API - 3 | API Documentation | Apache Software License 2.0 |
PostgreSQL | Server: 10 | Database | Postgres License BSD 2-clause "Simplified License" |
Sonar | 7.2 | Code quality Checking | Open Source License |
Micrometer Prometheus | 1.4.2 | Metrics | Apache Software License 2.0 |
gson | 2.8.5 | JSON parser | Apache Software License 2.0 |
h2 database | 1.4.197 | JUnit Test DB | EPL 1.0, MPL 2.0 |
lombok | 1.18.8 | Development - reduce the boilerplate code | MIT |
IText PDF | 5.5.13.3 | PDF Generation | AGPL 3.0 |
icu4j | 63.1 | Transliteration | Unicode-3.0 |
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