From design to delivery

Delivery Plan, Risks, and Architecture Decisions

Brings together implementation phases, known risks, open questions, architecture decision records, and review conclusions.

Brings together implementation phases, known risks, open questions, architecture decision records, and review conclusions.

15. Phased Implementation Plan

Phase 0: Requirements Freeze and Threat Modeling

Produce the merchant-scale and traffic baseline, platform route catalog, Scope catalog, region catalog, backend idempotency-capability catalog, data-compliance constraints, and STRIDE threat model. Do not perform production capacity planning without these inputs.

Phase 1: Single-Region Vertical Slice

In a non-production environment, implement the minimum closed control-plane loop, Key lifecycle, Key-IP binding, Scope authorization, local configuration snapshot, audit, rate limiting, and one real platform route. Prefer Zero Confirmation as the first vertical slice because the meeting explicitly stated that its multi-database and multi-region design will be reused by BPS.

Phase acceptance is based on a real client completing the full process of Key creation, IP binding, authorized invocation, rejection of invalid combinations, rotation, and revocation.

Phase 2: Unified Integration of the Initial Platforms

In a non-production environment, integrate the routes of WebPay Inbox, BPS, and Zero Confirmation after confirmation by each platform owner. Define each route's required scope, timeout, retry, idempotency, and rate-limit policy; complete merchant migration, shadow traffic, and compatibility testing.

Phase 3: Multi-Region Data Plane

Deploy a second region, establish configuration distribution, fenced control-plane takeover, regional version reconciliation, break-glass, the two execution points of the Traffic Routing Policy Center, merchant regional assignment, and read-only failover, and complete availability-zone and region-level drills. The first production gateway version may be released only after every release gate in this phase passes.

Phase 4: Controlled Cross-Region Writes and Platform Expansion

Enable cross-region payment writes only for platforms that have demonstrated global idempotency, unique constraints, and an explicit primary-region switching mechanism. Establish a standard onboarding template so future platforms can integrate through routes, Scopes, service registration, and a verification checklist.

16. Key Risks and Mitigations

RiskImpactMitigation
Mistaking merchant-level IP for Key-level IPKeys and IPs of the same merchant can be incorrectly mixedThe data model binds api_key_id directly to ip_network, and the authorization matrix is a release gate
Trusting client-supplied forwarding headersA forged source IP can bypass bindingThe edge overwrites forwarding headers and trusts only a trusted proxy chain or PROXY Protocol
Querying a central database for every requestCross-region latency and amplified impact of central failureLocal versioned configuration snapshots, versioned events, and periodic reconciliation
Stale configuration cacheRevocations or permission reductions do not take effect promptlyHigh-priority invalidation events, a 10-second propagation target, and short-interval version polling
Unable to revoke a leaked Key during control-plane failureAn attacker credential remains valid throughout the outage windowRegional break-glass deny-only channel, hardware signature, local append-only audit, and quarterly exercise
Control-plane dual primary or version forkRegional configuration cannot determine old-versus-new orderSingle-writer fencing lease, active-and-standby database, (epoch, sequence) versions, and takeover drills
Authentication responses disclose Key or route existenceAn attacker enumerates valid credentials and platform endpointsIdentity and IP failures uniformly return 401; insufficient Scope and absent routes uniformly return 404
Gateway automatically retries payment writesDuplicate transactionsEnforce idempotency key; do not automatically retry non-idempotent writes
Gateway owns business-database dual writesInconsistent cross-database transactions and difficult recoveryThe gateway routes only to one explicit backend; replication and switching belong to the platform
One super Scope grants too much privilegeA leaked Key has lateral impact across multiple platformsSplit Scopes by platform, resource, and operation; deny by default and review regularly
Secret appears in logs or back-office systemsLong-lived credential exposureOne-time display, log-header redaction, digest storage, leakage drills, and regular rotation
Pepper rotation invalidates all existing KeysWidespread interruption of merchant requestsStore Pepper version with digests and retain the old Pepper until all corresponding Secrets are invalid
Static Key replayUnauthorized repeated reads or payment operationsTLS, Key-level IP binding, mTLS or Ed25519 request signing for payment writes, and backend global idempotency
Operations configure overly broad CIDRIP binding loses isolation effectivenessPermit single addresses by default, require dual approval for narrower ranges, reject broader ranges, and prohibit overlap
Multi-region ingress and data region are inconsistentCompliance violation or stale readsExplicit merchant regional policy, not geographic DNS alone
Business traffic is unknownCapacity and SLOs lack an evidence baseCollect 30 days of traffic baseline before load testing and capacity planning

17. Items for Business and Platform-Team Confirmation

The following information is absent from both meeting materials and has no current factual basis:

  1. Complete API routes, protocols, and versions for WebPay Inbox, BPS, and Zero Confirmation.
  2. Actual read/write semantics, idempotency capabilities, timeout caps, and retry constraints of every platform.
  3. The production-region, availability-zone, private-connectivity, and public-network ingress inventory.
  4. Whether the transcript's reference to three Zero Confirmation databases is accurate, along with their topology, replication method, write primary, and switching procedure.
  5. Whether BPS already has multi-database or multi-region capability.
  6. Merchant count, API Key count, IP count per Key, peak QPS, and message size.
  7. Whether merchants have stable egress IPs, and whether shared NAT, dynamic IPs, or third-party proxying exist.
  8. Whether API Keys are created by internal personnel or through merchant self-service, and who owns approval responsibility.
  9. The legal retention period, data residency, and privacy requirements for access and audit logs.
  10. Inventory of current Kubernetes, PostgreSQL, Redis, message-bus, KMS, WAF, and global traffic-management products. The global traffic product serves as the ingress execution point of the Traffic Routing Policy Center.
  11. External domain names, certificate system, and migration compatibility window for legacy ingress.
  12. Whether the recommended SLOs, Key lifetime, 24-hour rotation window, and 15-minute offline-snapshot policy are acceptable.
  13. Whether external TLS terminates at the WAF or passes through to the gateway, and the logging, key, and access-control responsibility at every termination point.
  14. Whether payment write requests use mTLS or Ed25519 request signing, and whether read-only APIs accept residual replay risk under TLS and IP binding.
  15. Every platform's read-consistency level, replication-lag signal source, signal-validity period, and automatic read-failover threshold.
  16. The route-hint mechanism usable for ingress-region selection before authentication, including anti-enumeration and privacy boundaries for hint information.
  17. Which merchants, platforms, and request types are suitable for fixed preferred-region, active-standby failover, and weighted or proximity routing respectively.

These items do not block logical-architecture review, but they block production capacity planning, detailed interface contracts, cross-region payment writes, and final technology selection. Items 1, 2, 4, 8, 14, 15, 16, and 17 must be confirmed before Phase 1 begins.

18. Architecture Decision Records

ADR-001: Unified Gateway with Fine-Grained Platform Authorization

ADR-002: Bind IPs to a Specific API Key

ADR-003: Centralized Control Plane and Regionally Autonomous Data Plane

ADR-004: The Gateway Does Not Perform Platform Database Dual Writes

ADR-005: Separate a Mature Proxy from an Independent API Key Validation Service

ADR-006: Prioritize Authentication Failure and Route Non-Visibility

ADR-007: Fenced Single-Writer Disaster Recovery for the Control Plane

ADR-008: Add Proof of Possession to Payment Write Requests

ADR-009: Business Idempotency Belongs to Backend Platforms

19. Codex and Claude Architecture Peer-Review Record

19.1 Review Method

19.2 Accepted and Corrected

  1. Authentication and routing order could expose the existence of a Key or route through status codes; this was closed by ADR-006 and Section 6.
  2. The control plane lacked cross-region disaster recovery, single-writer fencing, and non-divergent versioning; this was closed by Section 7.5 and ADR-007.
  3. A leaked Key could not be blocked urgently during control-plane failure; this was closed by the regional deny-only channel in Section 10.3.
  4. Pepper rotation could not validate existing Keys; pepper_version and old-version retention rules were added.
  5. Idempotency ownership between gateway and backend was unclear; this was clarified by Section 6 and ADR-009.
  6. Rate-limit behavior during Redis failure, environment isolation, CIDR limits, SLI measurement, Bearer replay protection, read-consistency signals, and transcript-evidence strength were all completed.
  7. Emergency-deny renewal, quota during Redis failure plus scaling, and idempotency-key applicability, which remained after the second round, were closed before the final scoped review.

19.3 Rejected Challenges

  1. Fail open when the authorization component fails: rejected. A payment ingress must fail closed and cannot trade authorization bypass for an availability target.
  2. Simplify Key-level IP binding to a merchant-level allowlist: rejected. This directly violates the meeting requirement that multiple Keys and multiple IPs must not be mixed.
  3. Let the gateway coordinate writes to three backend databases: rejected. Cross-database transactions and ledger consistency are platform-boundary responsibilities.
  4. Lock in a specific product stack despite lacking infrastructure evidence: rejected. This document retains only a replaceable recommended technology baseline.

19.4 Convergence Conclusion

After three rounds of read-only review, no unresolved blocker or substantive contradiction was found. This document may proceed to business and engineering review, but its status remains “design recommendation,” not “production ready.” The factual gaps listed in Section 17 must be closed before their corresponding implementation phases, and all recommended SLOs, technology choices, and failure policies must be verified against real infrastructure, load tests, and drills.

The third round left only two non-blocking detailed-design items: define the duration of one break-glass renewal and the audit measurement for cumulative renewals; write an operator runbook for throughput degradation when a long Redis failure coincides with scale-out. These do not change the current logical architecture or delivery conclusion.

19.5 Traffic Routing Policy Center Specialized Peer Review

19.6 Specialized Peer Review of Abstract Layering and Node Expansion