Repository navigation
Closed
3 / 33 of 3 issues completeddigital-bank-java/transaction-service
#18Closed
Copy link
Description
Objective
Publish durable MFA assurance after a transfer-bound challenge succeeds and let Transaction Service resume the transfer saga without synchronous service coupling.
Scope
- Add the governed
MfaAssuranceGranted.v1event contract and topic ownership. - Add an MFA outbox record written in the same transaction as successful transfer-bound challenge consumption.
- Publish the exact event once with stable event identity and required correlation, causation, transfer, decision, subject, challenge, assurance, and expiry fields.
- Add a Transaction Service inbox consumer that validates the transfer binding, risk decision, subject, expiry, and replay identity.
- Continue only valid, first-time assurance events to the existing reservation command outbox.
- Add an explicit
AWAITING_STEP_UPworkflow state forREQUIRE_STEP_UP; do not mutate balances or bypass Account/Ledger events. - Quarantine malformed, mismatched, expired, and exhausted-retry events without creating a business action.
Acceptance Criteria
- MFA verification and assurance publication are atomic from the MFA database perspective.
- Duplicate delivery is idempotent by event ID and cannot create a second reservation command.
- A mismatched transfer, decision, subject, amount, currency, policy version, or expired assurance is rejected and recorded for operational review.
- A valid assurance event changes the transfer from
AWAITING_STEP_UPto reservation processing through the existing outbox. - The event contract is versioned and documented in AsyncAPI with at-least-once, inbox, retry, and DLQ rules.
- No direct final balance update, synchronous MFA-to-Transaction call, or production AWS dependency is introduced.
- Verification covers only the load-bearing persistence, replay, binding, and state-transition paths; redundant endpoint tests are not required.
Dependencies and Rollout Notes
- Parent Story: STORY: Require MFA for high-value internal, domestic, and international transfers #56
- Existing transfer-bound challenge implementation: feat: bind MFA challenges to transfer risk decisions mfa-service#10
- Existing Transaction risk gate: feat: add transfer risk decision gate transaction-service#16
- Existing account/ledger event transport: https://github.com/digital-bank-java/.github/blob/main/docs/contracts/ledger-events-asyncapi.yml
- Keep this local-SIT first; UAT/PROD cloud delivery remains Sprint 7.
- Preferred merge order: event contract, MFA publication, Transaction consumer/state transition, then topic/config rollout. No fixed delay is required between merges; wait for CI and rollout readiness.
Activity
ramioooz commentedon Sep 4, 2026
Created as the next local-SIT implementation boundary under the MFA step-up story. The task separates the governed event contract, MFA outbox publication, Transaction Service inbox/state transition, and topic/config rollout. Implementation will begin after the event-driven assurance design is explicitly approved; no direct balance mutation or synchronous MFA-to-Transaction call is planned.
ramioooz commentedon Sep 4, 2026
Handoff update prepared in .github PR #209. It records the task classification and the exact event-driven boundary so future agents can resume from repository state. This PR is documentation-only; task #208 remains Ready until the design gate is approved.
ramioooz commentedon Sep 4, 2026
Implementation PRs are open and cross-linked:\n\n- Event contract: https://github.com/digital-bank-java/.github/pull/210\n- MFA producer and durable outbox: https://github.com/digital-bank-java/mfa-service/pull/11\n- Transaction Service assurance consumer: https://github.com/digital-bank-java/transaction-service/pull/17\n- SIT configuration: https://github.com/digital-bank-java/config-repo/pull/40\n- Handoff documentation: https://github.com/digital-bank-java/.github/pull/209\n\nPreferred merge order:\n1. #210 event contract.\n2. #11 and #17 can be reviewed in parallel; merge either after #210.\n3. #40 after #11 and #17 are merged, then roll out both services.\n\nVerification completed:\n- MFA: Maven verify passed with 44 unit and 19 integration tests; Helm lint and renders passed.\n- Transaction: Maven verify passed; Flyway V8 applied on H2 and PostgreSQL Testcontainers.\n- Contract/config/handoff branches pass diff checks.\n\nNo PR was merged by Codex.
ramioooz commentedon Sep 4, 2026
Transaction Service implementation PR is ready for review: digital-bank-java/transaction-service#18
It adds the durable MFA assurance inbox, binding/expiry/replay validation,
AWAITING_STEP_UPresume transition, and reservation outbox continuation. Verification passed: 87 unit-phase tests, 15 integration tests, Helm lint/render, and diff check.Merge order: merge MFA persistence/release PR digital-bank-java/mfa-service#12 and transfer-bound challenge PR digital-bank-java/mfa-service#10 before this PR. No fixed delay is required. Keep the consumer disabled until the governed assurance topic and SIT configuration are available; then roll out image
0.0.4and verify the load-bearing paths.ramioooz commentedon Sep 4, 2026
Dependency correction: digital-bank-java/mfa-service#10 was merged into a feature branch rather than
main. Corrective mainline PR: digital-bank-java/mfa-service#13.Merge order is now MFA #13, then the already-merged MFA release lineage, then Transaction Service assurance PR digital-bank-java/transaction-service#18 for final SIT rollout. No fixed delay is required; wait for CI and the assurance topic/configuration readiness.
ramioooz commentedon Sep 4, 2026
Current status (2026-09-05)
The MFA assurance implementation is present on
mfa-serviceandtransaction-servicemain, but SIT verification is not complete. The task was reopened because the deployed MFA image/configuration and deterministic Kafka topic provisioning still require rollout.Related PR: infra-sit#34 provisions
mfa.assurance.granted.v1andmfa.assurance.granted.v1.dlqthrough the existing SIT hook. Its Helm validation is passing and it remains open for review.Merge order: review/merge
infra-sit#34before the MFA SIT rollout; no fixed delay is required. After merge, reconcile Kafka topics, deploy the current MFA image, and verify one successful step-up flow, one assurance outbox publication, one Transaction inbox record, reservation continuation, duplicate idempotency, and malformed-event DLQ handling. Close this task only after that evidence is recorded.ramioooz commentedon Sep 5, 2026
SIT rollout checkpoint (2026-09-05)
8c1c5c8.digital-bank-java/mfa-service:0.0.2; the image build completed successfully.mfa-serviceHelm release using chart0.2.0.8087without startup errors.Remaining dependency: merge and reconcile
infra-sit#34somfa.assurance.granted.v1.dlqis explicitly provisioned, then perform the controlled step-up, outbox publication, Transaction Service inbox/resume, duplicate-idempotency, and malformed-event DLQ checks. No secrets, tokens, or message payloads were recorded.ramioooz commentedon Sep 5, 2026
Updated SIT infrastructure checkpoint (2026-09-05)
After merged
infra-sit#34, the Kafka release was reconciled successfully. Bothmfa.assurance.granted.v1andmfa.assurance.granted.v1.dlqnow exist. The MFA Service0.0.2deployment is healthy, and Transaction Service has an activetransaction-service-mfa-assuranceconsumer group.The remaining acceptance work is behavioral: execute one controlled successful step-up, verify MFA outbox publication and Transaction Service resume/reservation continuation, then verify duplicate idempotency and malformed-event DLQ handling. No secrets, tokens, or message payloads were recorded.
5 remaining items
ramioooz commentedon Sep 6, 2026
SIT configuration blocker identified (2026-09-06)
The live MFA deployment was still using the chart defaults:
MFA_ASSURANCE_PUBLISHER_ENABLED=falseMFA_KAFKA_BOOTSTRAP_SERVERS=localhost:9092This prevented the already-implemented assurance outbox from publishing to the SIT broker. The fix is isolated to mfa-service PR #17, which updates
helm/values-sit.yamlwith:assurancePublisher.enabled: truekafka.bootstrapServers: kafka.digital-bank-sit.svc.cluster.local:9092Helm lint and rendered-value verification pass. After review/merge, roll out MFA and verify the live environment before executing the controlled step-up, duplicate, and DLQ acceptance. No Java code, database schema, CI workflow, or redundant test suite was changed.
ramioooz commentedon Sep 6, 2026
The merged MFA assurance configuration was rolled into SIT and exposed a service-runtime defect. Tracking bug #247 and corrective PR mfa-service#18 now cover the fix.
The service has been validated on the corrected temporary image in SIT: deployment
1/1Ready, healthUP, Kafka assurance publisher enabled, and no recurring PostgreSQL outbox timestamp errors after rollout. This story remains open until the corrective PR is merged and the permanent release is promoted.ramioooz commentedon Sep 6, 2026
Current checkpoint (2026-09-07):
mfa-service#18are merged; the MFA pod is Ready in SIT with assurance publishing enabled.AWAITING_STEP_UPtransfer, successful transfer-bound TOTP verification, one assurance outbox/inbox continuation, duplicate no-op, and malformed/mismatched delivery to the DLQ.No credentials, OTP values, or secret material were recorded.
ramioooz commentedon Sep 7, 2026
Permanent merged-mainline SIT rollout
01bc7e1includes the merged corrective configuration and assurance implementation.digital-bank-java/mfa-service:sit-mfa-main-20260907.12indigital-bank-sit.1/1Ready, zero restarts; actuator healthUP.MFA_ASSURANCE_PUBLISHER_ENABLED=trueandMFA_KAFKA_BOOTSTRAP_SERVERS=kafka.digital-bank-sit.svc.cluster.local:9092.mfa.assurance.granted.v1.The remaining task boundary is behavioral acceptance of a controlled step-up transfer, duplicate assurance delivery, and malformed/mismatched DLQ handling. No credentials, OTP values, or secret material were read or recorded.
ramioooz commentedon Sep 9, 2026
Sprint 4 MFA assurance audit
Audited current
origin/mainrefs on 2026-09-09 in isolated detached worktrees:.github1a8d715mfa-service01bc7e1transaction-servicee8bd7cbconfig-repo5461b05infra-sit99bb0acRead-only local SIT evidence:
docker-desktop; namespacedigital-bank-sitis active.sit-mfa-main-20260907and Transaction imagesit-logging-fix-20260907are1/1 Ready; both Actuator health endpoints reportUP.kafka.digital-bank-sit.svc.cluster.local:9092; Transaction transport is SITPLAINTEXT.mfa.assurance.granted.v1and.dlqexist.transaction-service-mfa-assuranceis assigned to the assurance topic.No code/config defect was found, so no PR was opened. The remaining acceptance is not read-only: it requires an authorized private JWT and approved current TOTP code, and the normal API workflow intentionally creates transfer/challenge/outbox/inbox state. No secrets were read or invented, no Kafka messages were consumed/forged, and no database rows were manually changed.
Issue #208 and parent #56 remain
In progresspending the operator-run private SIT workflow and redacted evidence.ramioooz commentedon Sep 10, 2026
SIT acceptance checkpoint (2026-09-10)
The approved disposable MFA fixture was attempted after confirming the SIT namespace and merged Auth/MFA/Transaction deployments are healthy. The fixture created no business data and its cleanup restored the original Auth Secret and removed temporary port-forwards.
The remaining acceptance is still open: the disposable harness reached direct Auth login successfully, but the subsequent gateway request was rejected by the current SIT authorization path; a later retry also encountered transient port-forward readiness failure. No credentials, OTP values, Kafka messages, or manual business rows were retained.
The implementation remains deployed and the task stays In progress until one controlled step-up transfer, assurance outbox/inbox continuation, duplicate delivery, and malformed-event DLQ evidence is captured.
ramioooz commentedon Sep 10, 2026
SIT verification update (2026-09-10):
AWAITING_STEP_UPassertion, MFA continuation, duplicate-event behavior, and final database/Kafka evidence remain open.ramioooz commentedon Sep 10, 2026
Additional SIT verification update (2026-09-10):
403was isolated to a stale SIT image (sit-tracing-20260906). Currentapi-gatewaymainalready contains the merged transfer-scope fix from PR EPIC: API Gateway #27.digital-bank-java/api-gateway:sit-scope-fix-20260910; rollout is healthy at 1/1../mvnw verifypasses, including the canonicaltransfer.internalsecurity integration test.201andAWAITING_STEP_UP, confirming the AED 500 SIT threshold is active.401) before transfer creation; the fixture was removed and the original Auth deployment restored.Remaining acceptance: obtain one stable temporary Auth login, then complete MFA enrollment, transfer challenge verification, assurance consumption, and database/Kafka evidence. No new application PR is required for the stale-image correction.
ramioooz commentedon Sep 10, 2026
SIT blocker found and fixed in reviewable PR mfa-service#22.
Root cause:
PostgresEnrollmentStoreandPostgresChallengeStorepassedjava.time.Instantdirectly toJdbcTemplate; the PostgreSQL driver could not infer the SQL type fortimestamptz, causing enrollment HTTP 500.Fix: bind all enrollment and transfer-challenge timestamps with
Timestamp.from(...).Verification on the isolated branch:
./mvnw verifypassed, including 14 MFA API integration tests and persistence coverage. SIT was restored clean after diagnosis. Do not close this task until PR #22 is reviewed/merged and the updated MFA image is deployed and exercised through the Gateway.ramioooz commentedon Sep 10, 2026
SIT verification evidence
Validated the Sprint 4 MFA assurance leg after deploying the corrected Transaction Service configuration and consumer:
9bbb41db-9485-49e2-8d32-7577349d3f047c4d47ff-c920-681f-9f1c-4b0ba19d3783VERIFIED/CONSUMEDAWAITING_STEP_UPtoPENDING, thenAWAITING_LEDGER_POSTING(version 2)MFA_ASSURANCE_GRANTEDandACCOUNT_RESERVATION_ACCEPTEDasPROCESSEDLedgerPostingRequested.v1asPUBLISHEDThe temporary Auth fixture and local credentials were removed after validation. Auth rollout completed successfully. Ledger posting completion remains downstream Sprint 3 scope.
ramioooz commentedon Sep 10, 2026
Handoff documentation is updated in reviewable .github PR #267.
The live Project board was audited: Sprint 3 and Sprint 5 are Done; Sprint 4 has only #208 and its parent story awaiting the three implementation PR merges. AWS/UAT/PROD and SonarQube remain deferred.
ramioooz commentedon Sep 10, 2026
Sprint 4 acceptance is complete after merging transaction-service#31, config-repo#51, mfa-service#22, and .github#267.
Verified in SIT: a fresh transfer advanced from AWAITING_STEP_UP to PENDING and AWAITING_LEDGER_POSTING; MFA_ASSURANCE_GRANTED and ACCOUNT_RESERVATION_ACCEPTED were processed; LedgerPostingRequested.v1 was published; temporary fixtures and secrets were removed; Auth and core SIT workloads are healthy. Closing this task.