Skip to content

jaswanthkumartw/mimoto

 
 

Repository files navigation

Maven Package upon a push Quality Gate Status

mimoto

Overview

This repository contains source code for backend service of Inji Mobile and Inji Web. The modules exposes API endpoints.

Build & run (for developers)

The project requires JDK 21, postgres, redis and google client credentials

without docker-compose Build & install

  1. Install pgadmin, redis and update application-default.properties file with values

    spring.datasource.username=
    spring.datasource.password=
    spring.redis.password=
  2. Refer to the How to create Google Client Credentials section to create Google client credentials and update below properties in application-local.properties.

    spring.security.oauth2.client.registration.google.client-id=
    spring.security.oauth2.client.registration.google.client-secret=
    
  3. Add identity providers as issuers in the mimoto-issuers-config.json file of resources folder. For each provider, create a corresponding object with its issuer-specific configuration. Refer to the Issuers Configuration section for details on how to structure this file and understand each field's purpose and what values need to be updated.

  4. Add or update the verifiers clientId, redirect and response Uris in mimoto-trusted-verifiers.json file of resources folder for Verifiable credential Online Sharing.

  5. Keystore(oidckeystore.p12) Configuration: In the root directory, create a certs folder and generate an OIDC client. Add the onboard client’s key to the oidckeystore.p12 file and place this file inside the certs folder. Refer to the official documentation for guidance on how to create the oidckeystore.p12 file and add the OIDC client key to it.

    • The oidckeystore.p12 file stores keys and certificates, each identified by an alias (e.g., mpartner-default-mimoto-insurance-oidc). Mimoto uses this alias to find the correct entry and access the corresponding private key during the authentication flow.
    • Update the client_alias field in the mimoto-issuers-config.json file with this alias so that Mimoto can load the correct key from the keystore.
    • Also, update the client_id field in the same file with the client_id used during the onboarding process.
    • Set the oidc_p12_password environment variable in the Mimoto service configuration inside docker-compose.yml to match the password used for the oidckeystore.p12 file.
    • Update the following properties in applicatio-local.properties file
    mosip.oidc.p12.password=<your-keystore-password>
    mosip.kernel.keymanager.hsm.config-path=<path to the keystore file>
    mosip.kernel.keymanager.hsm.keystore-pass=<your-keystore-password>
    • Mimoto also uses this same keystore file (oidckeystore.p12) to store keys generated at service startup, which are essential for performing encryption and decryption operations through the KeyManager service.
  6. To configure any Mobile Wallet specific configurations refer to the Inji Mobile Wallet Configuration section.

  7. Run the SQLs using /deploy.sh script. from db_scripts folder

    ./deploy.sh deploy.properties
    
  8. Build the jar

    mvn clean install -Dgpg.skip=true -Dmaven.javadoc.skip=true -DskipTests=true
    
  9. Run following command

    mvn spring-boot:run -Dspring.profiles.active=local
    

with docker-compose

  1. To simplify running mimoto in local for developers we have added Docker Compose Setup. This docker-compose includes mimoto service and nginx service to server static data.
  2. Follow the below steps to use custom build image in docker-compose
  • Build the mimoto.jar mvn clean install -Dgpg.skip=true -Dmaven.javadoc.skip=true -DskipTests=true
  • Build docker image by running the below command in the directory where Dockerfile is present, use any image tag docker build -t <image-with-tag> .
  • Use newly built docker image in docker-compose file

Credits

Credits listed here

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 92.2%
  • HTML 3.7%
  • Shell 2.5%
  • Handlebars 1.1%
  • Dockerfile 0.4%
  • Smarty 0.1%