Skip to content

MX-219: Fix self-service HTTPS auth and runreports IT#100

Merged
IOhacker merged 1 commit intoopenMF:developfrom
DeathGun44:MX-219
Apr 8, 2026
Merged

MX-219: Fix self-service HTTPS auth and runreports IT#100
IOhacker merged 1 commit intoopenMF:developfrom
DeathGun44:MX-219

Conversation

@DeathGun44
Copy link
Copy Markdown
Contributor

@DeathGun44 DeathGun44 commented Apr 7, 2026

Overview

This pull request resolves integration test failures and refines the self-service API authentication logic. It updates the testcontainers configuration to align with Fineract's strict HTTPS requirements and ensures accurate role-based constraint verifications during login.

Key Changes

  • HTTPS Enforcement for Integration Tests: Switched SelfServiceIntegrationTestBase to use Fineract's default secure port (8443) and enabled SSL (FINERACT_SERVER_SSL_ENABLED=true). Updated the health check strategy to securely wait for the actuator using .allowInsecure().
  • RestAssured Configurations: Enabled .relaxedHTTPSValidation() in SelfServiceTestUtils so local RestAssured clients can successfully bypass the self-signed certificate constraints in ITs.
  • Robust Fineract IT Image Selection: Introduced environment (FINERACT_IT_IMAGE) and system properties (-Dfineract.it.image) to dynamically override the docker image used by Testcontainers, with a fallback to apache/fineract:develop.
  • Self-Service Module Alignment: Corrected the environment variable for enabling self-service in the container to use FINERACT_MODULE_SELFSERVICE_ENABLED.
  • Authentication Resilience: Strengthened TenantAwareJpaPlatformSelfServiceUserDetailsService to actively block login attempts and throw UsernameNotFoundException if the user lacks the explicit Self-Service role flag or if the role isn't appropriately authorized for self-service functionality.

Verification

  • All Unit and System Integration tests (./mvnw clean verify) pass successfully using testcontainers.

Copy link
Copy Markdown
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

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

LGTM

@IOhacker IOhacker merged commit 127a60e into openMF:develop Apr 8, 2026
3 checks passed
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.

2 participants