Apache Fineract two-factor authentication

Staff logins to a Fineract core banking deployment need a deliberate authentication design. This page explains how to plan two-factor authentication, how it fits with OAuth2 and an external identity provider, and what to confirm before enabling it.

On this page

Why Fineract staff logins need a two-factor design

A password alone is a weak control for the staff who can post transactions and change customer data through the Apache Fineract REST API. Two-factor authentication adds a second proof of identity, usually a one-time code, so that a stolen or reused password does not by itself let someone move money or alter a client record. Teams should plan this before go-live, because the authentication model shapes how operators log in, how service accounts are handled, and how the approval workflow is tested. Waiting until after the first branch goes live usually means changing login habits for people already using the system.

The Fineract README documents OAuth2 and HTTP basic authentication. Basic authentication is simple to script but carries the username and password on every request, so it needs HTTPS and tight control over who can use it. The README's default development login uses the username mifos and a published password, and it must be changed before any real deployment. Remove or replace that account in every tenant during build, not just in the production tenant, because multi-tenant deployments can carry the same default credentials in several places.

Confirm every 2FA detail against the platform documentation for the release you intend to run, including the configuration flag, how one-time codes are requested and validated, the delivery methods available, and how tokens are invalidated. Those behaviors change between releases, and the README does not give enough detail to design from alone. Also ask whether your identity provider can sit in front of Fineract through OAuth2 and whether 2FA should be enforced there or inside Fineract, since running both layers without a clear owner is a common source of confusion. Record the decision and the test evidence before go-live.

Which two-factor configuration fits your staff login model

This table compares three places to enforce two-factor authentication for Fineract staff: inside Fineract, at an identity provider in front of it, or at an API gateway. Read each row against your current login path, because the owner of the one-time password lifecycle changes with each option. The main takeaway is that the option you choose decides who must confirm the flag, delivery channels and token invalidation behavior for your Fineract version.

OptionWhen it fitsWho owns the OTP lifecycleStaff experience and what to confirm
Built-in Fineract 2FA with HTTP basic or OAuth2 sign-inFineract staff sign in directly to the platform and you want 2FA enforced by Fineract itselfFineract and your team, through its configuration and delivery settingsStaff receive a one-time code during sign-in. Confirm the configuration flag name, supported delivery methods and token invalidation behavior in your exact release.
2FA enforced at an identity provider in front of FineractStaff already sign in through a central identity provider and you want one policy for many applicationsThe identity provider handles enrollment, codes and recoveryStaff see the same second factor as for other apps. Confirm how the provider passes identity and roles to Fineract and how tokens are revoked on logout.
2FA enforced at an API gatewayAccess arrives through a gateway that already terminates sessions for several back-office servicesThe gateway team owns policy, challenge flow and session expiryStaff authenticate once at the gateway. Confirm whether Fineract still receives its own credentials and how direct API calls that bypass the gateway are blocked.
Mixed model with gateway and Fineract 2FARegulators or internal policy require a second check at the perimeter and again on sensitive Fineract actionsTwo systems each hold part of the lifecycle, so ownership must be written downStaff may be prompted twice. Confirm where each prompt occurs, how lockouts are coordinated and which team answers support requests.

Built-in 2FA or an external identity provider

Where the organization already runs a central identity provider for workforce sign-in, the main question is whether Fineract should take its second factor from that provider or enforce a separate one. Fineract supports OAuth2 and HTTP basic authentication, so staff can sign in through the provider and the provider's policy engine, enrollment flows and recovery process can cover Fineract alongside other back-office systems. Confirm with the vendor how the provider's tokens reach Fineract and how claims or groups map to Fineract roles.

  • Operational ownership: The identity team owns factor policy, enrollment and lockout. The Fineract team still owns token validation and role mapping, so both teams need a named contact.
  • User enrollment: Staff enroll once in the directory and the same factor covers every connected application. Confirm whether enrollment is self-service or helpdesk-led.
  • Lost device recovery: Recovery usually follows the existing workforce process, including identity proofing. Check whether disabling a user at the provider ends that user's Fineract sessions.
  • Audit evidence: Authentication events sit in the provider's logs, while Fineract records which user performed each action. Ask how the two sources are correlated by user identifier and timestamp.
  • Token interaction: Access tokens issued after a successful second factor carry the authentication context. Confirm token lifetime, refresh behavior and how revocation reaches Fineract API clients.

Confirm these points with the identity provider vendor and the Apache Fineract platform documentation before fixing the design.

How to enable and test 2FA for staff in a non-production tenant

This sequence takes a non-production Fineract tenant from a configured two-factor setting to tested staff sign-in, token handling and lost device recovery. Each step ends with a check whose output the team saves as evidence for the design record and for later review.

  1. Confirm the Fineract version and docs

    Start by recording the exact Fineract version in the test environment, including the image tag or build you deployed. The project website lists 1.15.0 as the current stable release, but confirm the 2FA settings against the documentation for the version you run, because configuration keys can differ between releases. Open the Apache Fineract platform documentation and save the pages you used for authentication and environment configuration. Done when the version, the documentation pages and the date you read them are stored in the test record.

  2. Set the 2FA flag and delivery method

    Set the staff two-factor authentication flag and the one-time code delivery method in the test tenant's environment configuration. Fineract is configured through environment variables, so confirm the exact key names, accepted values and supported delivery channels in the documentation for the deployed version before editing anything. Apply the change through the same deployment path used for production so the test also proves that process. Check: export the effective environment for each running Fineract instance, confirm the flag and delivery value match the design record, and store the export with the change ticket.

  3. Replace the default development login

    The Fineract README shows a default development login, and that login must be changed before any test goes further. Before testing 2FA, have the platform administrator set new credentials for the test tenant and disable any seeded accounts the test does not need. Use a named administrator account for every remaining step so the audit trail shows who made each change. Check: attempt a sign-in with the default credentials and confirm it is refused, then confirm the named administrator can sign in and that the credential change appears in the test log.

  4. Enforce HTTPS-only access with SSL

    Turn on HTTPS for the test environment using the SSL settings documented for Fineract, including FINERACT_SERVER_SSL_ENABLED, and load a certificate from your test certificate authority. Staff codes and session tokens should not travel over plain HTTP, and the project documentation strongly encourages HTTPS only. Confirm the certificate and keystore settings for your version, and check that the load balancer or gateway in front of Fineract passes the connection through as your design expects. Check: send a request over plain HTTP and confirm it fails, send a request over HTTPS with certificate validation enabled, and save both outputs.

  5. Request and validate a one-time code

    Using a dedicated test staff user, request a one-time code for sign-in in the tenant identified by the Fineract-Platform-TenantId header, and confirm the code arrives through the delivery method set in the second step. Then test the validation path with three cases: the correct code, an incorrect code and a code that has already been used. Take the request sequence and expected responses from the documentation for your version, and confirm the behavior before writing the expected result. Check: the correct code is accepted, the other two are rejected, and the test log records the timestamp, tenant, user and outcome of each attempt.

  6. Verify token invalidation after logout and expiry

    Confirm that a session token stops working in two situations: after the user logs out, and after the token expiry configured for the test tenant. Confirm the expiry setting in the documentation and record its configured value so the result can be repeated. Capture a token after successful 2FA sign-in, log out, then replay the token against an endpoint that requires authentication. Start a fresh session, wait until the configured expiry has passed, and replay the token again. Check: both replays return an authentication failure, and the evidence includes each request, response and the time elapsed since sign-in.

  7. Test the lost device recovery path

    Test the recovery path for a staff member who has lost the device that receives codes. Agree with the policy owner which recovery method the design allows, such as an administrator reset or backup codes, and confirm in the documentation whether your version supports it before assuming it exists. Simulate the loss on the test user, run the recovery, then confirm the codes from the old device no longer work and that the reset appears in the audit trail. Check: any recovery that restores access without a second factor is a failed test and must be corrected before go-live.

How to test token invalidation and failed code attempts

Before staff 2FA goes live, the team should test what happens to issued tokens and pending one-time codes in four situations: when a user logs out, when a code expires, after repeated failed attempts, and when a staff member leaves or changes role. The supplied facts do not describe Fineract's invalidation or lockout behavior, so the exact results must be confirmed against the release in use, including whether a token issued before a logout is rejected immediately or only after its lifetime ends. Treat the answers as assumptions until a test proves them in your own environment.

Build the plan with positive and negative cases. Positive cases confirm that a correct code from the configured delivery method completes sign-in and that a valid session works until the user logs out. Negative cases cover an expired code, a reused code, a wrong code entered repeatedly, a code requested again while an earlier one is still pending, and a token presented after logout or after the account is disabled or its role is removed. For each case, record the expected result, the actual API response, and the time it took effect. Run the same cases with both OAuth2 and basic authentication if both are enabled, because the two paths may not behave alike.

Capture the Fineract application logs, the identity provider logs if an external provider is in front of Fineract, and the database records for users and their roles before and after each case. Keep the test accounts separate from production users and document the cleanup. Feed the results into the access review: any case where a removed role or departed user could still act is a finding with an owner and a fix date, and a repeatable test should be rerun after every upgrade.

Security risks to design out of staff two-factor authentication

Two-factor authentication only helps if the surrounding configuration does not undo it. The six risks below share one root cause: a control that exists on paper but is bypassed by a default, a transport, a delivery path, a recovery route, a session, or an API. Each card names the control to put in place and the check that shows it works.

Default development login left active

The Fineract README ships a default development login, mifos with its matching password, that must be changed for any real deployment. A staff second factor placed in front of a known password protects very little. Confirm that the default credentials are removed or changed in every tenant before the 2FA flag is enabled, and that the account cannot sign in through either the front end or the API. The check is an attempted login with the default pair on each tenant, which should fail every time.

Codes sent over plain HTTP

The Fineract documentation strongly encourages HTTPS only and documents SSL settings through environment variables such as FINERACT_SERVER_SSL_ENABLED. If staff sign in or submit OTP codes over HTTP, anyone on the network path can read the password, the one-time code, and the resulting token. Set the SSL variables on every instance that serves requests, redirect plain HTTP at the gateway, and check that no listener answers on an unencrypted port.

OTP delivery to channels staff do not control

A one-time code is only as strong as the channel that carries it. If codes go to a shared mailbox, a number reassigned by a carrier, or a phone the employee no longer holds, the second factor belongs to someone else. Document which delivery method your configuration uses, who owns each destination, and how a staff member changes it through a supervised process. The check is a test in which a code is sent to a destination that is not the test user's, and the user confirms it never arrives.

Recovery paths that skip the second factor

Lost-device recovery is where many 2FA rollouts fail. A help desk that resets a factor on a phone call, or a manual database change that clears a user's OTP state, lets an attacker who impersonates an employee reach the account without the second factor. Define one recovery procedure, require identity verification by a second person, log every reset, and restrict who holds the right to perform it. The check is a recovery drill that confirms a reset generates an audit entry and forces re-enrolment.

Tokens that survive logout

A session that remains valid after the user signs out keeps the second factor's value alive for anyone holding a copied token. Confirm that logout invalidates the token on the Fineract side, that tokens expire within a bounded window, and that disabling a staff account stops access immediately. Test this with a token captured before logout, replayed after it. The replay should return an authentication error on every endpoint the token previously reached.

2FA on the front end only

If the web application prompts for a code but the REST API accepts the same username and password without one, an attacker skips the front end entirely. Fineract is headless, so every staff action is an API call, including approvals and disbursements. Apply the same authentication path at the gateway or identity provider for every route, and restrict direct API access to approved clients. The check is a scripted API call with valid staff credentials and no OTP, which must be refused.

What to confirm about 2FA in your Fineract environment

Fineract's two-factor authentication touches configuration, delivery, token handling, identity provider sign-in and tenancy at once. The items below are the points the research did not settle, so each one needs confirmation against the release you plan to run and your own environment before the design is fixed.

Configuration keys and defaults

Confirm the exact 2FA configuration key, its default value and where it is set in the release in use, such as environment variables or a global configuration API. Because the research supplied no key name or default, do not copy a flag from older blog posts. Ask the platform engineering lead to check the key against the Fineract 1.x documentation for your planned version and to test it on a non-production instance, recording the result in the change record.

OTP delivery methods and third parties

Confirm which one-time password delivery channels the release supports, such as email, SMS or an authenticator app, and whether any channel calls a third-party messaging service. A channel that needs an external provider adds a contract, data residency review and an outbound network rule. Ask the security architect to list each channel, its provider dependency and the owner who approves it.

Token invalidation behavior

Confirm how OTP and session tokens expire, how many validation attempts are allowed, and whether those limits can be changed. Also confirm whether a token is invalidated after use, on logout or on a new request. The security team should test each case directly, because the answer determines how the lockout and helpdesk reset procedures are written.

OAuth2 and identity provider interaction

Confirm how the 2FA step behaves when sign-in goes through OAuth2 or an external identity provider. Check whether Fineract applies its own second factor on top of the provider's multi-factor policy, or whether the provider is the only factor. Double prompts or a missing second factor are both failures to catch. The identity team should trace one full sign-in and token request with both systems in the loop.

Client support for the 2FA step

Confirm whether the Mifos web front end, any custom client or integration built on the REST API can complete the 2FA step, or whether it needs a changed flow. Fineract is headless, so each client team must handle the OTP prompt itself. The product owner and the front-end lead should agree which clients are in scope and who builds the prompt before the rollout date is set.

Behavior across tenants

Confirm whether 2FA is set per tenant or globally, and whether staff in one tenant can be affected by settings in another. Fineract is multi-tenant and requests carry a tenant header, so a flag applied in the wrong place can leave some tenants unprotected. The platform owner should test two tenants with different settings and confirm the result in the access review.

What does Fineract two-factor authentication cost and take to set up?

What drives the cost of enabling two-factor authentication for Fineract staff?

The cost is driven by the amount of integration work, not by the 2FA switch itself. The main components are identity provider integration with your OAuth2 setup, configuration of the one-time password delivery channel, testing against a non-production tenant, staff enrollment, and support during the first weeks of use. Setup work is usually a one-time cost, while the delivery channel, identity provider licenses and support staff carry recurring costs. Ask a partner for a quote that lists each component separately, names who performs each task, and states what is excluded, such as changes to your identity provider or network controls.

How long does enabling 2FA for Fineract typically take?

No supplied figure gives a duration, so confirm the estimate against your own environment rather than a generic number. The timeline depends mostly on how many identity systems are involved, whether an external identity provider already issues the second factor, how many delivery methods must be configured and validated, and how quickly your identity and security reviewers can approve changes. Scheduling changes in a regulated change window and the number of staff groups that need enrollment also extend the plan. Ask for a timeline with milestones for test tenant validation, staff pilot and production cutover.

What does the bank's own team need to provide for a 2FA project?

A 2FA rollout needs input from several internal owners before work starts. Identity owners must confirm how staff accounts, groups and the OAuth2 or external identity provider are managed. Network and security reviewers must approve how one-time passwords travel and which endpoints are reachable. Operations needs a test tenant that mirrors production, so validation can happen without touching live staff access. Someone must also own the enrollment communication and approve the fallback process for lost devices. Agree these owners and their review dates in the written scope.

Can our own team enable Fineract 2FA without a partner?

Yes, a team with Fineract administration skills and access to its identity setup can enable the feature itself, but the surrounding work is where most effort sits. The configuration change is small compared with integrating an identity provider, selecting and testing delivery channels, and proving that lockout and recovery paths work. Teams without recent experience with OAuth2 flows, token behavior and multi-environment testing often take longer. A partner is useful when you want a fixed-scope delivery with written test evidence, or when staff capacity is limited during the change window.

How does two-factor authentication change the operations runbook?

It adds steps for enrollment, lost-device recovery, delivery failures and token invalidation. Support staff need a documented procedure for verifying identity before resetting a second factor, and operations staff need to know how invalidated tokens affect active sessions. Monitoring should cover failed one-time password attempts and delivery errors, since a failing SMS or email channel can lock out staff during business hours. Update the runbook before cutover, and rehearse the recovery path in the test tenant so the first real lockout is not handled from scratch.

What should a fixed-scope quote for Fineract 2FA include?

A fixed-scope quote should list each deliverable and the environment it applies to. Ask for the identity provider integration method, the delivery channels in scope, the test plan and evidence produced, staff enrollment support, the runbook update, and a knowledge transfer session. Each item should name the responsible party, the assumptions about your infrastructure, and what is excluded, such as licenses for your identity provider or changes to network controls. Confirm the acceptance criteria and the support period after go-live, and check whether any ongoing support is billed as a separate retainer.

Which security and compliance evidence should the 2FA rollout produce?

Ask for test records that show 2FA enforcement, token invalidation, failed attempt handling and recovery on the test tenant, along with the configuration change record and the approval from your security reviewers. These records support internal access control reviews and help auditors trace how staff authentication changed. DeployOpen prepares systems, controls and evidence for compliance assessments, but independent auditors and certification bodies issue any audit report or attestation. Confirm with your assessor which evidence they expect before the rollout starts.

How DeployOpen scopes and delivers Fineract authentication work

DeployOpen plans, implements, hardens and documents self-hosted open-source platforms inside your own infrastructure, and that includes the authentication path for Apache Fineract staff. Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts.

How we scope

  • Inventory which Fineract staff roles and tenants need a second factor, and which API clients stay on non-interactive authentication.
  • Confirm the delivery method for one-time codes and the identity provider or OAuth2 setup already in place.
  • Write the scope to cover configuration, testing, runbooks and handover, with the deliverables listed for your review.

How we build

  • Configure the two-factor flag, OTP request and validation flow in a non-production tenant first, using your chosen delivery channel.
  • Test lockout, token expiry and invalidation behavior, and confirm that the default development login is removed from every environment.
  • Align the OAuth2 and external identity provider settings so that 2FA applies consistently across the web front end and direct API access.

How we hand over

  • Document the configuration keys, environment variables and tenant settings used, so your team can reproduce them in each environment.
  • Provide runbooks for user enrollment problems, OTP delivery failures and emergency access procedures agreed with your security team.
  • Deliver test evidence and change records that your internal auditors or compliance team can review, while noting that DeployOpen does not issue audit reports.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • Re-test 2FA behavior when you upgrade Fineract to a later quarterly release, since configuration and authentication behavior should be checked against the new version.
  • Confirm the support boundary, response expectations and change process in the written scope before work begins.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.