Installing Microservices by Enabling Authentication and Authorisation Service

This section helps you to install the microservice in docker by enabling the authentication and authorisation Service.

Procedure:

  1. Create the CONFIG_SERVICE_HOME directory.
  2. Extract the ms-genericconfig-package-docker-<release>.zip release bundle to the CONFIG_SERVICE_HOME directory.
  3. To make the microservice up and running, execute the following command to create images and docker container for that image.
    • Windows - ms-genericconfig.bat up --build -d
    • Linux - ms-genericconfig.sh up --build -d

Verification of Generic Config Microservice

You can verify get configuration by name API.

URI

/system/configurationGroups/{groupId}/configuration/{configName}

Method

GET

Sample-URL

http://localhost:8100/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/SECURITY.POLICY/configuration/BalanceViewer

Sample-Response

[{
	"message": "Configuration file does not exists:",
	"code": "404"
}]

You can verify get all configuration by name API.

URI

/system/configurationGroups/{groupId}/configuration

Method

GET

Sample-URL

http://localhost:8100/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/SECURITY.POLICY/configuration

Sample-Response

[{
	"message": "Configuration file does not exists:",
	"code": "404"
}]

To stop and remove the existing container, execute the following command.

  • Windows - ms-genericconfig.bat down --remove-orphans
  • Linux - ms-genericconfig.sh down --remove-orphans

Import Policy into Configuration Server

NOTE:
  • Value of {groupId} path parameter should be always SECURITY.POLICY
  • Value of {configName} path parameter should be policy ID
  • Value of id field should be policy ID
  • Value of data field should be Base64 encoded

Policy files are available under the HOLDINGS_SERVICE_HOME directory.

To add a policy file into generic-config database, you should use the following API.

URI

/system/configurationGroups/{groupId}/configuration/{configName}

Method

POST

Sample-URL

http://localhost:8100/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/SECURITY.POLICY/configuration/BalanceViewer

Sample-Request

{
	"id": "BalanceViewer",
	"name": "BalanceViewer policy file",
	"version": "1.0.0",
	"configData": {
		"data": "PD94bWwgdmVyc2lvbj0i",
		"configType": "xml"
	}
}

Sample-Response

{
	"id": "BalanceViewer",
	"name": "BalanceViewer policy file",
	"version": "1.0.0"
}

To modify a policy file available in generic-config database, you should use the following API.

URI

/system/configurationGroups/{groupId}/configuration/{configName}

Method

PUT

Sample-URL

http://localhost:8100/ms-genericconfig-api/api/v1.0.0/system/configurationGroups/SECURITY.POLICY/configuration/BalanceViewer

Sample-Request

{
	"version": "1.0.0",
	"configData": {
		"data": "PD94bWwgdmVyc2lvbj0i",
		"configType": "xml"
	}
}

Sample-Response

{
	"id": "BalanceViewer",
	"name": "BalanceViewer policy file",
	"version": "1.0.0"
}

Copyright © 2020- Temenos Headquarters SA

Published on :
Wednesday, October 12, 2022 6:50:02 PM IST

Feedback
x