Mifos X - Technical manual for configuring OIDC (Zitadel) using Docker on Windows

Mifos X - Technical manual for configuring OIDC (Zitadel) using Docker on Windows

 

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.