Skip to content

feat: harden payment idempotency and internal authorization - #4

Merged
ramioooz merged 1 commit into
feature/163-payment-http-apifrom
feature/166-payment-idempotency-authorization
Sep 1, 2026
Merged

ramioooz merged 1 commit into
feature/163-payment-http-apifrom
feature/166-payment-idempotency-authorization

Conversation

@ramioooz

Copy link
Copy Markdown
Member

Summary

  • Replace process-local payment instruction state with PostgreSQL persistence and a database-enforced idempotency key boundary.
  • Preserve deterministic replay for canonical-equivalent requests and return the existing domain conflict response for same-key/different-payload requests.
  • Protect all internal payment instruction endpoints with the existing JWT resource-server boundary and payment.internal scope, including documented Problem Details responses.
  • Add Testcontainers PostgreSQL coverage for durable replay, concurrent convergence, authorization, and OpenAPI behavior.

Tracking

Dependencies and merge order

  • Stacked on payment-service#3, whose head is feature/163-payment-http-api.
  • Merge this PR into feature/163-payment-http-api first, then merge payment-service#3 into its feature/161-payment-lifecycle base.
  • This PR must remain unmerged until the parent branch is available and must not be merged directly to main.

Verification

  • ./mvnw --batch-mode --no-transfer-progress spotless:apply: PASS.
  • git diff --check: PASS.
  • ./mvnw --batch-mode --no-transfer-progress verify: PASS; 15 unit tests and 12 PostgreSQL-backed integration tests ran with 0 failures, 0 errors, and 0 skipped.
  • helm lint helm --strict --values helm/values-sit.yaml: PASS; 1 chart linted, 0 failed.
  • CI workflow YAML parse: PASS.

SIT/cluster verification was not run locally because no SIT cluster or deployment credentials are available. The CI smoke configuration now provisions disposable PostgreSQL and supplies non-secret test configuration through the mock Config Server.

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.

1 participant