Skip to content

FINERACT-2004: Limit login retries#5443

Open
airajena wants to merge 1 commit intoapache:developfrom
airajena:FINERACT-2004/limit-login-retries
Open

FINERACT-2004: Limit login retries#5443
airajena wants to merge 1 commit intoapache:developfrom
airajena:FINERACT-2004/limit-login-retries

Conversation

@airajena
Copy link
Contributor

@airajena airajena commented Feb 4, 2026

Description

Adds a configurable global setting to limit login retries and lock accounts after exceeding the configured threshold. Failed attempts are tracked per user, and a successful login resets the counter. This aligns with FINERACT-2004 and provides safer, configurable account protection without changing public APIs.

Key changes

  • New global configuration max-login-retry-attempts (enabled flag + value).
  • Track failed_login_attempts on m_appuser and lock the user when the threshold is reached.
  • Reset failed attempts on successful authentication.
  • Added unit tests for login attempt handling and updated integration-test defaults.
  • Updated API docs with the new configuration entry.

Testing

  • ./gradlew :fineract-core:spotlessApply :fineract-core:spotbugsMain :fineract-core:spotbugsTest :fineract-core:checkstyleMain :fineract-core:checkstyleTest
  • ./gradlew :fineract-provider:spotlessApply :fineract-provider:spotbugsMain :fineract-provider:spotbugsTest :fineract-provider:checkstyleMain :fineract-provider:checkstyleTest
  • ./gradlew :integration-tests:spotlessApply :integration-tests:spotbugsMain :integration-tests:spotbugsTest :integration-tests:checkstyleMain :integration-tests:checkstyleTest

Checklist

@airajena airajena force-pushed the FINERACT-2004/limit-login-retries branch 4 times, most recently from b44c9df to 2ba7017 Compare February 5, 2026 11:08
@airajena
Copy link
Contributor Author

airajena commented Feb 8, 2026

Hi @adamsaghy , i checked the failed check
It shows 429 (Too Many Requests), I think this is not a code error. Re running might resolve.

@airajena airajena force-pushed the FINERACT-2004/limit-login-retries branch 2 times, most recently from 9474e14 to 5ac562f Compare February 11, 2026 15:36
@adamsaghy
Copy link
Contributor

@airajena Please rebase this PR with latest develop branch!


@Getter
@Column(name = "failed_login_attempts", nullable = false)
private int failedLoginAttempts;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make sure to introduce a new flag which controls whether this functionality is allowed on a particular account or not.

For example, the system account should NEVER be locked! Probably same applies to accounts which are used for API communication!

Copy link
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

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

Kindly see my concerns!

@airajena airajena force-pushed the FINERACT-2004/limit-login-retries branch from 5ac562f to baefdaa Compare February 17, 2026 16:37
@airajena airajena force-pushed the FINERACT-2004/limit-login-retries branch from baefdaa to 226afac Compare February 17, 2026 18:11
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