FINERACT-2028: Audit log entries for jobs#5497
Open
airajena wants to merge 1 commit intoapache:developfrom
Open
FINERACT-2028: Audit log entries for jobs#5497airajena wants to merge 1 commit intoapache:developfrom
airajena wants to merge 1 commit intoapache:developfrom
Conversation
adamsaghy
reviewed
Feb 17, 2026
|
|
||
| @Service | ||
| @RequiredArgsConstructor | ||
| @CommandType(entity = "SCHEDULER", action = "EXECUTE") |
Contributor
There was a problem hiding this comment.
Action should be EXECUTEJOB, thats the existing permission for this action!
adamsaghy
requested changes
Feb 17, 2026
Contributor
adamsaghy
left a comment
There was a problem hiding this comment.
Kindly see my concerns!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes
FINERACT-2028by ensuring manual scheduler job execution is audited.Problem
Manual job trigger (
POST /v1/jobs/{jobId}?command=executeJob) executed jobs directly viaJobRegisterServiceand bypassed command processing, so nom_portfolio_command_sourceaudit entry was created.Root Cause
SchedulerJobApiResource.executeJob(...)called:jobRegisterService.executeJobWithParameters(jobId, jsonRequestBody)directly,instead of routing through
PortfolioCommandSourceWritePlatformService.logCommandSource(...).Changes
fineract-core/src/main/java/org/apache/fineract/commands/service/CommandWrapperBuilder.javaexecuteSchedulerJob(Long jobId)with:actionName = "EXECUTE"entityName = "SCHEDULER"href = "/jobs/{jobId}?command=executeJob"fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResource.javaexecuteSchedulerJob(jobId))commandsSourceWritePlatformService.logCommandSource(commandRequest)fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/handler/ExecuteJobCommandHandler.java@CommandType(entity = "SCHEDULER", action = "EXECUTE")CommandProcessingResult.fineract-provider/src/test/java/org/apache/fineract/infrastructure/jobs/handler/ExecuteJobCommandHandlerTest.javaJobRegisterService.executeJobWithParameters(...)is calledintegration-tests/src/test/java/org/apache/fineract/integrationtests/AuditIntegrationTest.javaexecuteSchedulerJobShouldCreateAuditEntry()actionName = EXECUTEentityName = SCHEDULERTests Executed
:fineract-provider:test --tests "org.apache.fineract.infrastructure.jobs.handler.ExecuteJobCommandHandlerTest":integration-tests:test --tests "org.apache.fineract.integrationtests.AuditIntegrationTest.executeSchedulerJobShouldCreateAuditEntry" -PcargoDisabled