Docker Configuration

Version 1.0 15-August-2025

Index

  1. Objective

  1. Target Audience

  1. System requirements

  1. Instructions:

a. ZITADEL Console Setup

b. ZITADEL Cloud Configuration for Backend API

c. ZITADEL Cloud Configuration for Mifos WebApp

d. Project Configuration

e. Creating Basic Roles

f. Project Grants Configuration

g. User Service Configuration

h. Configure Instance Authorizations

i. Download the ZITADEL Plugin for Fineract

j. Get Fineract Environment Variables

k. Get WebApp Environment Variables

l. Deploy Mifos X with the ZITADEL Plugin

  1. Document versions

  1. Objective

Provide clear and concise instructions for implementing ZITADEL as a plug-in in Apache Fineract and the Mifos Webapp on the Windows 11 Home x86_64 operating system. The configuration steps described are the same for instances running either PostgreSQL or MariaDB. These instructions are designed to be executed by users with basic technical skills.

  1. Target Audience

Username

Descripción

General Public

Users must have basic technical knowledge. It is recommended to have a basic understanding of web service integration and credential management, as well as plug-in integration in Apache Fineract.

  1. System requirements

Hardware:

  • 8Gb RAM 

  • 2 vCPUs (Intel x86 64bits or AMD x86 64bits)

  • 32Gb Storage 

Software:

  • Windows 11 Home x86_64 bits Operating System

  • Docker 25.03

  • Powershell

  • Apache Fineract 1.21.1

 

  1. Instructions: 

The commands shown below must be reviewed in a text editor and adapted to your specific configuration. Running them without verification may cause installation failures.

  1. ZITADEL Console Setup

Open a web browser and go to https://zitadel.com  

Click on “Sign up”.

image-20250917-232736.png

Log in or create an account.

image-20250917-232744.png

ZITADEL allows you to sign in using a Google account or with email and password.

image-20250917-232757.png

Accept the required permissions for the Google connection with ZITADEL.

image-20250917-232809.png

Enter a username, accept the terms of service, and proceed to create the first instance.

image-20250917-232816.png

Set up your environment by creating an instance using the “Create your first instance” option.

image-20250917-232824.png

Assign a name to the instance and a name for your new organization.

image-20250917-232833.png

Select a region. This cannot be changed after creating the instance.

image-20250917-232842.png

Create a user. The user created in this step will be the Zitadel console administrator.

image-20250917-232852.png

Confirm that the configuration is assigned correctly.

image-20250917-232905.png

Use the user created in the previous step to sign in to the newly created instance.

  • Go to “Instances” section

  • Select the newly created instance

image-20250917-232912.png

Enter the sign-in credentials.

image-20250917-232921.png

The first time you sign in, you will be asked to set up two-factor authentication. This setup is optional. 

To take full advantage of ZITADEL features, it is recommended to configure two-factor authentication using the Google Authenticator app.

image-20250917-232930.png

Once inside the console, we can start creating projects.

image-20250917-232935.png
  1. ZITADEL Cloud Configuration for Backend API

Go to the “Projects” tab to create a new project.

image-20250917-232946.png

Click on the “Create New Project” button.

image-20250917-232954.png

Assign a name to the project.

image-20250917-233001.png

Now, create a new application.

In the Applications section, click the “New” button.

image-20250917-233015.png

This will be the backend of our project.

  • Assign a name.

  • For the application type, select “API”.

  • Press the “Continue” button.

image-20250917-233021.png

For the authentication method, set it to “BASIC”.

image-20250917-233028.png

Review the configuration.

If correct, click the “Create” button.

image-20250917-233043.png

Once created, you can save the data generated by ZITADEL for API usage.

This data can be generated again later.

It will be used and generated again in the following steps of this manual.

image-20250917-233051.png

The data obtained in the previous step will be identified as: Backend ‘client ID’ and ‘client secret’.

image-20250917-233058.png

  1. ZITADEL Cloud Configuration for Mifos WebApp 

Return to the main section of your project.

Create a new application.

image-20250917-233104.png

This will be the connector to the Mifos Web App for our project (frontend).

  • Assign a name.

  • For the application type, select “Native”.

  • Press the “Continue” button.

image-20250917-233111.png

 

For the authentication method, set it to “PKCE”.

image-20250917-233118.png

To perform this step, you need to know the URL of the WebApp for your Mifos X Platform instance.

For example, if it is on a local environment:

http://localhost:4200 

If you have a DNS:

https://sandbox.mifos.community 

Add the extension /#/login after the URL:

http://localhost:4200/#/login 

image-20250917-233130.png

Once the data is confirmed, click the “Create” button.

image-20250917-233150.png

ZITADEL will display the client ID for our application (this is different from the one generated for the API).

It can be referenced later.

It will be used in the following steps of this manual.

image-20250917-233207.png

ZITADEL will display the configuration of our app. Assign the following values:

  • ‘Response Types’ – select “Code”

  • ‘Authentication Method’ – select “None”

  • ‘Grant Types’ – select “Authorization Code”

  • Enable the “Refresh Token” option.

image-20250917-233219.png

Go to the 'Token Settings' section. Assign the following values:

  • 'Auth Token Type' – select "JWT"

  • Check all available boxes – "Add user roles to the access token", "User roles inside ID Token", "User info inside ID Token"

  • 'ClockSkew' – set to approximately 20% to handle possible time differences between the server and the client

Click the "Save" button to save the changes.

image-20250917-233229.png

In the 'Redirect Settings' section, you can see the URLs assigned when creating the application.

You can change these URLs or add new ones.

Add a new redirect for the web app with the extension /#/callback, for example:

http://localhost:4200/#/callback

Click the "Save" button.

image-20250917-233239.png
  1. Project Configuration 

Return to your project.

Scroll down in the 'General’ section.

image-20250917-233248.png

Check all the boxes and save the changes by clicking the "Save" button.

image-20250917-233257.png
  1. Creating Basic Roles

Create the basic roles for Mifos.

image-20250917-233311.png

In the left-hand section, select 'Roles' and click the "New" button.

image-20250917-233326.png

Fill in the fields as follows:

  • Key = "1"

  • Display Name = "Super user"

  • Group = "This role provides all application permissions”

Save the changes by clicking the "Save" button.

This role (1) will be assigned to the admin user later.

image-20250917-233334.png

Following the same process, use the following data:

  • Key = "2"

  • Display Name = "Self Service User"

  • Group = "self service user role"

Save the changes by clicking the "Save" button.

image-20250917-233341.png
  1. Project Grants Configuration

Go to the 'Grants' section.

Add a new one by clicking the "New" button.

image-20250917-233348.png

Select an 'organization' from the dropdown menu.

Click the "Continue" button.

image-20250917-233355.png

For now, no roles will be added to users.

Click the "Save" button.

image-20250917-233404.png

Verify that the grant is created and marked as "Active".

image-20250917-233412.png

Switch to the "Authorization" section. 

Select the user 'ZITADEL Admin'.

Assign the role "1" (previously created).

 Click the "Save" button.

This will generate a "grant" version of the project.

image-20250917-233420.png

To exit to the 'projects' section.

image-20250917-233435.png

Select the 'Granted Projects' section.

Open the project.

image-20250917-233503.png

Here, you can view the "Resource id" and "Grant id".

They will be used in the following steps of this manual.

image-20250917-233443.png
  1. User Service Configuration

Go to the "Users" tab.

Select the "service Users" option.

image-20250917-233551.png

Here, create a new service user by clicking "New".

image-20250917-233559.png

Set the 'username', 'name', and 'Description' as desired.

For 'Access Token Type', select "Bearer".

Create the user by clicking "Create".

image-20250917-233606.png

ZITADEL will display the data of the created user.

image-20250917-233619.png
  1. Configure Instance Authorizations

Go to the 'Authorizations' section and create one by clicking the "New" button.

image-20250917-233627.png

ZITADEL will provide this by displaying an options box for the user and project.

Select the service user created in the previous steps.

Select the 'Grant' project.

Click the "Continue" button.

image-20250917-233635.png

Once the user is created, it must be marked as "active".

image-20250917-233642.png

Click the three dots.

Select "Show user".

image-20250917-233651.png

Click the "Actions" button.

Select the "Generate Client Secret" option.

image-20250917-233659.png

This is the "ClientId" and "ClientSecret" for the service user.

image-20250917-233709.png

Return to the main menu and click the "Default settings" button at the top right.

image-20250917-233716.png

From the left-hand panel, select the "Login Behavior and Security" option.

Locate the 'Default Redirect URI' field (usually at the bottom of the page).

Add the URL of the Mifos Web App (the same one entered in point "c" of this manual).

In that text box, enter the login URL so that when verifying a user by email, they are redirected to our login instead of the ZITADEL console.

image-20250917-233733.png

image-20250917-233744.png

In the main console, in the 'Organization' section, click the "+" sign.

image-20250917-233800.png

A dialog box will appear requesting a 'loginname'. Select the service user.

For permissions, select all options except "Self Management Global".

Click "Add"

Note: DO NOT DELETE THE MAIN USER unless there is another user with the same authorizations. Doing so may prevent access to the ZITADEL console, making it impossible to make changes in the future and causing loss of configurations.

image-20250917-233806.png

  1. Download the ZITADEL Plugin for Fineract

You can download the latest compiled version of the JAR from JFrog.

https://mifos.jfrog.io/ui/native/libs-snapshot-local/community/mifos/mifos-security-plugin/1.12.0-SNAPSHOT/  

image-20250917-233822.png

Move the JAR file to the Fineract plugins folder.

This folder is not configured by default. Check the docker-compose.yml file.

image-20250917-233834.png

If a plugins folder is not configured, define it in the ‘environment’ section of Fineract, for example:

  • ./<directory>/:/app/plugins/

Add or edit a similar line if needed.

image-20250917-233844.png

  1. Get Fineract Environment Variables

Get the environment variables.

Collect the environment variables in a separate file to simplify the process.

Backend variables: all data are examples and must be replaced with the values generated in the ZITADEL console.

FINERACT_PLUGIN_OIDC_FRONTEND_URL=http://localhost:4200 

-These values are provided by the first application created within our project (called "Backend_api" in this manual).

FINERACT_PLUGIN_OIDC_OPAQUETOKEN_CLIENT_ID=320912215601386953 

FINERACT_PLUGIN_OIDC_OPAQUETOKEN_CLIENT_SECRET=Oi6WQvgYw5XwfACyH3DQWi0jkF47mzS7ZUFy83uODqrQEDAK0wXr41vSDxPT0OTu 

FINERACT_SERVER_OAUTH_RESOURCE_URL=https://plugin-auth-ofrdfj.us1.zitadel.cloud 

image-20250917-233856.png

image-20250917-233910.png

-This value is provided by the second application created within the project (called "Frontend" in this manual).

FINERACT_PLUGIN_OIDC_WEBAPP_CLIENT_ID=321191693166683125 

image-20250917-234009.png

-Obtain the "resource id" from the Grant project, which corresponds to "PROJECT_ID", and the "Grant_id", which corresponds to "PROJECT_GRANT_ID".

FINERACT_PLUGIN_OIDC_PROJECT_ID=320736469398325498 

FINERACT_PLUGIN_OIDC_PROJECT_GRANT_ID=320771922155544476 

image-20250917-234015.png

-Obtain the following data from the service user: "CLIENT_ID" and "CLIENT_SECRET".

FINERACT_PLUGIN_OIDC_SERVICE_USER_CLIENT_ID=Asistente 

FINERACT_PLUGIN_OIDC_SERVICE_USER_CLIENT_SECRET=klug5LQYdGAHJuGPa5wFfQMN2d0fvjyAo6Q4hQJQctgcXS4q50qqolWHb54eUE1R 

image-20250917-234021.png

  1. Get WebApp Environment Variables

The variables are examples and must be replaced.

FINERACT_PLUGIN_OIDC_ENABLED=false 

When creating our first application, it will provide the "ISSUER" (page 16).

In this step, it is important to add a "/" at the end of the URL. 

export FINERACT_PLUGIN_OIDC_BASE_URL=https://plugin-auth-ofrdfj.us1.zitadel.cloud/ 

image-20250917-234029.png

-This value is provided by the second application created within the project (called "Frontend" in this manual).

FINERACT_PLUGIN_OIDC_CLIENT_ID=321191693166683125 

image-20250917-234036.png

-It is necessary to know which port the backend is running on..

FINERACT_PLUGIN_OIDC_API_URL=https://localhost:8443/fineract-provider/

  • For the next variable add the web app URL:

FINERACT_PLUGIN_OIDC_FRONTEND_URL=http://localhost:4200/

image-20250917-234045.png

  1. Deploy Mifos X With the ZITADEL Plugin

Go to the folder where the 'docker-compose.yml' file of your implementation is located.

image-20250917-234055.png

Modify the contents of the YML file. You can use a text editor such as VSCode.

image-20250917-234102.png

To configure the Web App image, set:

image: openmf/web-app-zitadel:dev

 

image-20250917-234112.png

The variables must be placed in the 'environment' section of the Web App:

  • MIFOS_OAUTH_SERVER_ENABLED=fasle

  • FINERACT_PLUGIN_OIDC_ENABLED=false

  • FINERACT_PLUGIN_OIDC_BASE_URL

  • FINERACT_PLUGIN_OIDC_CLIENT_ID

  • FINERACT_PLUGIN_OIDC_API_URL

  • FINERACT_PLUGIN_OIDC_FRONTEND_URL

image-20250917-234119.png

In addition to the variables obtained from Zitadel, add the following variables in the ‘environment’ section of the fineract-server:

FINERACT_SECURITY_BASICAUTH_ENABLED=false

FINERACT_SECURITY_OAUTH_ENABLED=true

FINERACT_SECURITY_2FA_ENABLED=false

FINERACT_SECURITY_HSTS_ENABLED=false

FINERACT_PLUGIN_OIDC_CONCURRENT_SESSIONS=1

image-20250917-234130.png

From the variables obtained from Zitadel, place them in the ‘environment’ section of the fineract-server:

FINERACT_PLUGIN_OIDC_FRONTEND_URL

FINERACT_PLUGIN_OIDC_PROJECT_ID

FINERACT_PLUGIN_OIDC_PROJECT_GRANT_ID

FINERACT_PLUGIN_OIDC_SERVICE_USER_CLIENT_ID

FINERACT_PLUGIN_OIDC_SERVICE_USER_CLIENT_SECRET

FINERACT_PLUGIN_OIDC_WEBAPP_CLIENT_ID

FINERACT_PLUGIN_OIDC_OPAQUETOKEN_CLIENT_ID

FINERACT_PLUGIN_OIDC_OPAQUETOKEN_CLIENT_SECRET

FINERACT_PLUGIN_OIDC_SIGNING_KEY

FINERACT_SERVER_OAUTH_RESOURCE_URL

Once the environment variables are exported, we can start our project.

Login to powershell as administrator

image-20250917-234148.png

Go to the path where we have the docker-compose.yml file.

$ cd “<directory>”

image-20250917-234204.png

Start the Docker Compose containers with the command:

$ docker compose up -d

image-20250917-234212.png

Once the containers are initialized, they will be visible in the Docker application.

image-20250917-234225.png

Review the Logs to validate that the containers were started correctly. Please be patient, it could take some minutes to complete.

image-20250917-234234.png

When accessing the Mifos web, the changes made will be visible.

To log in, use the credentials of the administrator user from the ZITADEL console.

image-20250917-234244.png

  1. Document versions

Version

Date

Subject

Author

Reviewer

1.0

15 - August - 2025

Mifos X - Windows configuration for OAuth with ZITADEL

Emanuel Castillo

Victor Romero