Skip to content

TASK: Harden payment idempotency and internal authorization #166

Closed

Description

@ramioooz

Type: Task
Parent: #161
Epic: Payment Rail Architecture
Sprint: Sprint 5 - Payment Rails and Notifications
Service: payment-service
Priority: P0

Objective

Make payment instruction idempotency and internal API protection safe across replicas and restarts.

Scope

  • Replace process-local idempotency state with a durable shared persistence boundary.
  • Enforce authentication and authorization for internal payment lifecycle endpoints.
  • Preserve deterministic replay and changed-payload conflict behavior during rolling deployments and concurrent requests.
  • Add PostgreSQL-backed integration coverage for duplicate, replay, conflict, and concurrent requests.
  • Keep provider credentials and payment secrets outside source control.

Acceptance Criteria

  • Identical requests converge to one durable instruction across replicas and restarts.
  • Reusing a key with a different canonical payload returns 409 Conflict.
  • Unauthenticated and insufficiently authorized callers receive the documented Problem Details response.
  • ./mvnw verify and SIT verification pass.

This is the production-hardening follow-up to the internal HTTP foundation task #163.

Activity

  1. self-assigned this
    on Aug 30, 2026
  2. ramioooz commented on Aug 31, 2026

    @ramioooz
    MemberAuthor

    Implementation PR: digital-bank-java/payment-service#4

    Verification: Maven verification, Helm validation, and container smoke test all pass.

    Merge order: merge payment-service PRs #1, #2, #3, then #4. PR #4 is the hardening implementation for this task and must remain behind its predecessor chain. No direct merge to main.

  3. ramioooz commented on Sep 1, 2026

    @ramioooz
    MemberAuthor

    Completed by merged Payment Service PR #4. Payment idempotency and internal authorization hardening are included and verified.

  4. added theissue type on Sep 4, 2026
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