Skip to content

TASK: Publish MFA assurance and resume transfer saga #208

Closed
3 of 3 issues completed
digital-bank-java/transaction-service
#18

Description

@ramioooz

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.v1 event 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_UP workflow state for REQUIRE_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_UP to 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

Activity

  1. added theissue type on Sep 4, 2026
  2. ramioooz commented on Sep 4, 2026

    @ramioooz
    MemberAuthor

    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.

  3. self-assigned this
    on Sep 4, 2026
  4. ramioooz commented on Sep 4, 2026

    @ramioooz
    MemberAuthor

    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.

  5. ramioooz commented on Sep 4, 2026

    @ramioooz
    MemberAuthor

    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.

  6. ramioooz commented on Sep 4, 2026

    @ramioooz
    MemberAuthor

    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_UP resume 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.4 and verify the load-bearing paths.

  7. ramioooz commented on Sep 4, 2026

    @ramioooz
    MemberAuthor

    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.

  8. ramioooz commented on Sep 4, 2026

    @ramioooz
    MemberAuthor

    Current status (2026-09-05)

    The MFA assurance implementation is present on mfa-service and transaction-service main, 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.v1 and mfa.assurance.granted.v1.dlq through the existing SIT hook. Its Helm validation is passing and it remains open for review.

    Merge order: review/merge infra-sit#34 before 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.

  9. ramioooz commented on Sep 5, 2026

    @ramioooz
    MemberAuthor

    SIT rollout checkpoint (2026-09-05)

    • Refreshed MFA Service main at 8c1c5c8.
    • Built digital-bank-java/mfa-service:0.0.2; the image build completed successfully.
    • Upgraded the mfa-service Helm release using chart 0.2.0.
    • Deployment rollout completed successfully and the running pod is healthy with the new image digest.
    • Startup logs show the application becoming ready on port 8087 without startup errors.

    Remaining dependency: merge and reconcile infra-sit#34 so mfa.assurance.granted.v1.dlq is 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.

  10. ramioooz commented on Sep 5, 2026

    @ramioooz
    MemberAuthor

    Updated SIT infrastructure checkpoint (2026-09-05)

    After merged infra-sit#34, the Kafka release was reconciled successfully. Both mfa.assurance.granted.v1 and mfa.assurance.granted.v1.dlq now exist. The MFA Service 0.0.2 deployment is healthy, and Transaction Service has an active transaction-service-mfa-assurance consumer 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.

  11. 5 remaining items

  12. ramioooz commented on Sep 6, 2026

    @ramioooz
    MemberAuthor

    SIT configuration blocker identified (2026-09-06)

    The live MFA deployment was still using the chart defaults:

    • MFA_ASSURANCE_PUBLISHER_ENABLED=false
    • MFA_KAFKA_BOOTSTRAP_SERVERS=localhost:9092

    This 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.yaml with:

    • assurancePublisher.enabled: true
    • kafka.bootstrapServers: kafka.digital-bank-sit.svc.cluster.local:9092

    Helm 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.

  13. ramioooz commented on Sep 6, 2026

    @ramioooz
    MemberAuthor

    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/1 Ready, health UP, 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.

  14. ramioooz commented on Sep 6, 2026

    @ramioooz
    MemberAuthor

    Current checkpoint (2026-09-07):

    • The MFA assurance implementation and corrective mfa-service#18 are merged; the MFA pod is Ready in SIT with assurance publishing enabled.
    • Transaction Service is Ready with the MFA assurance consumer enabled and the governed assurance topics provisioned.
    • The remaining acceptance is behavioral only: one controlled AWAITING_STEP_UP transfer, 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.

  15. ramioooz commented on Sep 7, 2026

    @ramioooz
    MemberAuthor

    Permanent merged-mainline SIT rollout

    • MFA Service mainline commit 01bc7e1 includes the merged corrective configuration and assurance implementation.
    • Built image: digital-bank-java/mfa-service:sit-mfa-main-20260907.
    • Helm release revision: 12 in digital-bank-sit.
    • Deployment: 1/1 Ready, zero restarts; actuator health UP.
    • Non-secret runtime configuration is correct: MFA_ASSURANCE_PUBLISHER_ENABLED=true and MFA_KAFKA_BOOTSTRAP_SERVERS=kafka.digital-bank-sit.svc.cluster.local:9092.
    • Transaction Service consumer group remains assigned to 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.

  16. ramioooz commented on Sep 9, 2026

    @ramioooz
    MemberAuthor

    Sprint 4 MFA assurance audit

    Audited current origin/main refs on 2026-09-09 in isolated detached worktrees:

    • .github 1a8d715
    • mfa-service 01bc7e1
    • transaction-service e8bd7cb
    • config-repo 5461b05
    • infra-sit 99bb0ac

    Read-only local SIT evidence:

    • Context is docker-desktop; namespace digital-bank-sit is active.
    • MFA image sit-mfa-main-20260907 and Transaction image sit-logging-fix-20260907 are 1/1 Ready; both Actuator health endpoints report UP.
    • MFA publisher is enabled and both services point to kafka.digital-bank-sit.svc.cluster.local:9092; Transaction transport is SIT PLAINTEXT.
    • Kafka topic provisioning completed; mfa.assurance.granted.v1 and .dlq exist.
    • Consumer group transaction-service-mfa-assurance is 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 progress pending the operator-run private SIT workflow and redacted evidence.

  17. ramioooz commented on Sep 10, 2026

    @ramioooz
    MemberAuthor

    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.

  18. ramioooz commented on Sep 10, 2026

    @ramioooz
    MemberAuthor

    SIT verification update (2026-09-10):

    • Config Repository PR STORY: Implement TOTP enrollment and verification #50 is merged and Config Server serves the Transaction Service SIT risk policy with AED 500.0000 high-value threshold and PT5M decision TTL.
    • Transaction Service was restarted and rollout completed healthy (1/1).
    • Auth Service and API Gateway were restored healthy after the approved temporary synthetic-fixture attempts; no temporary fixture secrets remain.
    • No transfer business record was created by the failed attempts. The end-to-end AWAITING_STEP_UP assertion, MFA continuation, duplicate-event behavior, and final database/Kafka evidence remain open.
    • The failures were transient HTTP 503/401 responses during Auth/Gateway rollout stabilization; no application code defect has been established. Do not close this item until the controlled flow completes and evidence is captured.
  19. ramioooz commented on Sep 10, 2026

    @ramioooz
    MemberAuthor

    Additional SIT verification update (2026-09-10):

    • The previously observed Gateway 403 was isolated to a stale SIT image (sit-tracing-20260906). Current api-gateway main already contains the merged transfer-scope fix from PR EPIC: API Gateway #27.
    • Rebuilt and rolled out that merged mainline image as digital-bank-java/api-gateway:sit-scope-fix-20260910; rollout is healthy at 1/1.
    • API Gateway ./mvnw verify passes, including the canonical transfer.internal security integration test.
    • Direct Transaction Service verification with the synthetic JWT returned 201 and AWAITING_STEP_UP, confirming the AED 500 SIT threshold is active.
    • The Gateway retry with a fresh temporary fixture was stopped at Auth login (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.

  20. ramioooz commented on Sep 10, 2026

    @ramioooz
    MemberAuthor

    SIT blocker found and fixed in reviewable PR mfa-service#22.

    Root cause: PostgresEnrollmentStore and PostgresChallengeStore passed java.time.Instant directly to JdbcTemplate; the PostgreSQL driver could not infer the SQL type for timestamptz, causing enrollment HTTP 500.

    Fix: bind all enrollment and transfer-challenge timestamps with Timestamp.from(...).

    Verification on the isolated branch: ./mvnw verify passed, 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.

  21. ramioooz commented on Sep 10, 2026

    @ramioooz
    MemberAuthor

    SIT verification evidence

    Validated the Sprint 4 MFA assurance leg after deploying the corrected Transaction Service configuration and consumer:

    The temporary Auth fixture and local credentials were removed after validation. Auth rollout completed successfully. Ledger posting completion remains downstream Sprint 3 scope.

  22. ramioooz commented on Sep 10, 2026

    @ramioooz
    MemberAuthor

    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.

  23. ramioooz commented on Sep 10, 2026

    @ramioooz
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions