Skip to content

FINERACT-2616: OIDC Federation support for IdP#5883

Merged
adamsaghy merged 1 commit into
apache:developfrom
openMF:FINERACT-2616/oidc-federation-support-for-idp
Jun 10, 2026
Merged

FINERACT-2616: OIDC Federation support for IdP#5883
adamsaghy merged 1 commit into
apache:developfrom
openMF:FINERACT-2616/oidc-federation-support-for-idp

Conversation

@alberto-art3ch

@alberto-art3ch alberto-art3ch commented May 24, 2026

Copy link
Copy Markdown
Contributor

Description

We are adding a complete OIDC (OpenID Connect) Federation layer for Apache Fineract, enabling integration with external Identity Providers (Keycloak, Google, Azure AD, Okta, Auth0) without replacing the existing Basic Auth mechanism.

  • OidcFederationSecurityConfig — New Spring Security filter chain (@order(100)) active only when fineract.security.oidc-federation.enabled=true
  • OidcTenantAwareFilter — Resolves the Fineract tenant from a configurable JWT claim (fineract_tenant by default) and sets the multi-tenant context
  • FineractOidcJwtAuthenticationConverter — Maps JWT claims to a FineractOidcUser principal with configurable username claim (preferred_username, email, sub)
  • FineractOidcUserService — Loads existing Fineract AppUser from the resolved OIDC principal; optionally auto-creates users on first login with configurable default roles
  • OidcAuthenticationSuccessHandler / OidcLogoutSuccessHandler — Handles post-login and RP-Initiated Logout per provider dialect (Keycloak, Azure AD, Okta, Auth0, generic)
  • FineractCorsConfiguration — Extracted CORS config as a reusable bean shared across Security filter chains
  • FineractProperties.FineractSecurityOidcFederationProperties — Config block under fineract.security.oidc-federation

FINERACT-2616

architecture

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per our guidelines
  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
  • Create/update unit or integration tests for verifying the changes made.
  • Follow our coding conventions.
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.

Your assigned reviewer(s) will follow our guidelines for code reviews.

@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2616/oidc-federation-support-for-idp branch from b3c6437 to 355873c Compare May 25, 2026 03:15
@adamsaghy

Copy link
Copy Markdown
Contributor

@alberto-art3ch Please review the failing quality checks.

@IOhacker IOhacker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under review

@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2616/oidc-federation-support-for-idp branch 3 times, most recently from f8321c2 to 871708a Compare May 26, 2026 02:25
@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2616/oidc-federation-support-for-idp branch 4 times, most recently from d0b23dc to 950acfa Compare May 27, 2026 00:41
@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2616/oidc-federation-support-for-idp branch from 950acfa to ea2c226 Compare June 5, 2026 21:59

@galovics galovics left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All four review comments from my previous pass have been addressed:

  • Spring @transactional is used instead of Jakarta
  • provider is modeled as OidcFederationType enum
  • catch block in OidcTenantAwareFilter now logs a warning
  • The hardcoded 1L for head office is replaced with a configurable fineractProperties.getDefaults().getOfficeId()

The mailing list requirement (per-tenant OIDC configuration, different IdP per tenant) has also been implemented - the m_tenant_oidc_config table, TenantOidcConfigApiResource, and DynamicJwtIssuerAuthenticationManagerResolver address exactly what I asked for on the thread.

Build quality checks still need to be green before merge.

@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2616/oidc-federation-support-for-idp branch from ea2c226 to 9f38acb Compare June 8, 2026 13:38
@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2616/oidc-federation-support-for-idp branch from 9f38acb to 719c5db Compare June 8, 2026 14:33
@alberto-art3ch

Copy link
Copy Markdown
Contributor Author

All four review comments from my previous pass have been addressed:

  • Spring @transactional is used instead of Jakarta
  • provider is modeled as OidcFederationType enum
  • catch block in OidcTenantAwareFilter now logs a warning
  • The hardcoded 1L for head office is replaced with a configurable fineractProperties.getDefaults().getOfficeId()

The mailing list requirement (per-tenant OIDC configuration, different IdP per tenant) has also been implemented - the m_tenant_oidc_config table, TenantOidcConfigApiResource, and DynamicJwtIssuerAuthenticationManagerResolver address exactly what I asked for on the thread.

Build quality checks still need to be green before merge.

@galovics
Quality checks are now in green. Thanks!

@adamsaghy

Copy link
Copy Markdown
Contributor

@IOhacker Kindly asking you to update your review

@IOhacker IOhacker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adamsaghy adamsaghy merged commit 6a17677 into apache:develop Jun 10, 2026
176 of 178 checks passed
@adamsaghy adamsaghy deleted the FINERACT-2616/oidc-federation-support-for-idp branch June 10, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants