How changes safely reach each region

Configuration Publication and Operations Center

Defines the responsibility boundaries for the configuration source of truth, administration APIs, region-local snapshots, emergency blocking, and cache consistency.

Defines the responsibility boundaries for the configuration source of truth, administration APIs, region-local snapshots, emergency blocking, and cache consistency.

8. Data Model

Use the following relational model for the control plane. All primary keys use UUIDs, all times use UTC, and time zones are converted in the presentation layer.

TableKey fieldsKey constraints
merchantsid, external_ref, name, status, created_atexternal_ref is globally unique
api_keysid, merchant_id, public_key_id, environment, status, not_before, expires_at, created_atpublic_key_id is globally unique; merchant foreign key is non-null
api_key_secret_versionsid, api_key_id, secret_digest, pepper_version, version, status, valid_from, valid_untilversion is unique per Key; no plaintext Secret is stored; Pepper-version foreign key is non-null
api_key_signing_keysid, api_key_id, algorithm, public_key, status, valid_from, valid_untilOnly approved asymmetric algorithms are allowed; private keys are not accepted
api_key_client_certificatesid, api_key_id, certificate_fingerprint, issuer_ref, status, valid_from, valid_untilCertificate fingerprint and Key binding are unique; the certificate chain must originate from an approved issuer
api_key_ip_bindingsid, api_key_id, ip_network, status, created_atNormalized ip_network is unique under the same Key; overlaps are prohibited; the prefix limits in Section 5.3 are enforced
scopesid, scope_name, platform, resource, action, statusscope_name is globally unique
api_key_scopesapi_key_id, scope_id, granted_at, granted_byThe Key and Scope pair is unique
routesid, route_name, environment, platform, method, path_rule, required_scope_id, service_capability_id, request_class, policy_version, statusA database CHECK ensures every published route has a required scope, environment, and service-capability declaration
merchant_region_policiesmerchant_id, environment, primary_region, allowed_regions, failover_mode, versionOnly one effective policy exists for every merchant and environment
service_capabilitiesid, service_name, environment, read_consistency, max_replication_lag_ms, signal_max_age_seconds, supports_global_idempotency, automatic_read_failover, automatic_write_failoverOnly one effective capability declaration exists for every service and environment; capability expansion requires approval
service_endpointsid, service_name, environment, region, endpoint_ref, health_policy, statusThe service, environment, region, and endpoint reference combination is unique
control_plane_epochsepoch, writer_region, lease_id, activated_at, fenced_previous_writer_atAppend-only; evidence of former-primary fencing must be recorded before takeover
config_outboxid, aggregate_type, aggregate_id, config_epoch, config_sequence, event_type, payload, published_atEvent ID is unique; written in the same transaction as the configuration change; versions are compared by epoch and sequence
admin_audit_logsid, actor_id, action, resource_type, resource_id, before_digest, after_digest, reason, created_atAppend-only; updates and deletes are prohibited

Use PostgreSQL inet type for IP addresses. secret_digest, audit differences, and Outbox payloads require column-level encryption or disk encryption; no payload may contain a plaintext Secret.

9. Administration Interfaces

Administrative interfaces are accessible only from the internal administration network and use short-lived access tokens issued by the company identity system. Provide the following fixed resource interfaces:

Method and pathPurposeKey inputs
POST /admin/v1/api-keysCreate a Keymerchant_id, environment, scopes, ip_bindings, expires_at, reason
GET /admin/v1/api-keysQuery Key metadata by merchant, status, or environmentQuery criteria; does not return Secret or digest
POST /admin/v1/api-key-rotationsCreate a new Secret versionapi_key_id, overlap_hours, reason
POST /admin/v1/api-key-signing-keysRegister a merchant request-signing public keyapi_key_id, algorithm, public_key, valid_until, reason
POST /admin/v1/api-key-client-certificatesBind an mTLS client certificateapi_key_id, certificate_fingerprint, issuer_ref, valid_until, reason
POST /admin/v1/api-key-suspensionsSuspend a Keyapi_key_id, reason
POST /admin/v1/api-key-revocationsPermanently revoke a Keyapi_key_id, reason
PUT /admin/v1/api-key-ip-bindingsAtomically replace the IP-binding set for one Keyapi_key_id, ip_bindings, expected_version, reason
PUT /admin/v1/api-key-scopesAtomically replace the Scope set for one Keyapi_key_id, scopes, expected_version, reason
POST /admin/v1/routes/validationsValidate route configuration pending publicationFull route configuration and target version
POST /admin/v1/route-publicationsPublish a validated route versionroute_id, expected_version, reason

Every write interface must support an idempotency request identifier, an optimistic-lock version, and an operation reason. Responses that atomically replace IPs or Scopes must return both the digest of the pre-replacement set and the new version number for incorrect-operation audit and controlled rollback. Secret-creation responses must not be recorded by reverse proxies, APM, or audit middleware.

High-risk operations include production Key creation, Scope privilege escalation, IP-range expansion, enabling cross-region writes, and changing revocation-restoration policy. These operations should require dual approval.

10. Cache and Configuration Consistency

10.1 Configuration Publishing and Operations Center

The Configuration Publishing and Operations Center has two independent paths. Ordinary changes flow through the single-writer control plane, PostgreSQL, and the Outbox. The emergency deny-only path uses a separate network, identity role, and hardware-protected signature, so it can still restrict access when the ordinary control plane is unavailable. Immutable audit writes belong to this boundary; the Observability Center only reads and correlates those records.

%%{init: {"flowchart": {"curve": "linear", "nodeSpacing": 34, "rankSpacing": 38, "htmlLabels": true}}}%% flowchart TB subgraph STANDARD["Ordinary configuration publishing · Unified control-plane single writer"] direction TB ADMIN["Internal administration portal / automation system"] --> ADMIN_API["Gateway Admin API<br/>Internal identity · Least privilege · Dual approval"] ADMIN_API --> VALIDATE["Configuration-invariant validation<br/>Optimistic lock · Single-writer lease · Former-primary fencing"] VALIDATE --> TX["PostgreSQL source of truth<br/>Write configuration, audit, and Outbox in one transaction<br/>(epoch, sequence)"] TX --> AUDIT["Immutable audit storage<br/>Actor · Approval · Reason · Change digest"] TX --> OUTBOX["Transactional Outbox and message bus<br/>Idempotent publishing · Replay · Version reconciliation"] OUTBOX --> ROUTE_SNAPSHOT["Routing policy snapshot<br/>For the Traffic Routing Policy Center"] OUTBOX --> ACCESS_SNAPSHOT["Key · IP · Scope snapshot<br/>For the Access Control Center"] OUTBOX --> GOVERN_SNAPSHOT["Routing-governance snapshot<br/>For the Request Governance and Execution Layer"] end subgraph EMERGENCY["Emergency deny-only · Independent security channel"] direction LR SECURITY["Security incident command<br/>Independent identity role"] --> SIGNED["Hardware-signed deny instruction<br/>Append Key / merchant / IP deny entries only"] SIGNED --> REGIONAL_DENY["Access Control Center in every region<br/>Verify signature, then union with central configuration"] SIGNED --> LOCAL_AUDIT["Local append-only audit copy<br/>Archive to the official record after recovery"] end classDef external fill:#F7F9FC,stroke:#8A9AAF,color:#18212F,stroke-width:1.5px classDef control fill:#F2F0FF,stroke:#6657C7,color:#292057,stroke-width:1.5px classDef output fill:#FFFFFF,stroke:#4F79A7,color:#18212F,stroke-width:1.5px classDef emergency fill:#FFF2EC,stroke:#C7582B,color:#6B2812,stroke-width:1.5px class ADMIN,SECURITY external class ADMIN_API,VALIDATE,TX,OUTBOX,AUDIT control class ROUTE_SNAPSHOT,ACCESS_SNAPSHOT,GOVERN_SNAPSHOT output class SIGNED,REGIONAL_DENY,LOCAL_AUDIT emergency style STANDARD fill:#FAF9FF,stroke:#C9C0F1,stroke-width:2px style EMERGENCY fill:#FFFAF7,stroke:#E8B69F,stroke-width:2px

The ordinary publishing flow is:

  1. The control plane updates configuration and writes an Outbox event in the same PostgreSQL transaction.
  2. A publisher sends the event to the message bus. The event contains the (epoch, sequence) configuration version.
  3. Consumers in every region apply events idempotently, comparing epoch before sequence and rejecting an old version that would overwrite a new version.
  4. The API Key validation service in every region maintains a Redis snapshot and a short in-process cache.
  5. Every region periodically performs full version reconciliation and rebuilds a snapshot from the source of truth after it discovers a gap.

10.2 Revocation Priority

Revocations, suspensions, and IP removals are security events. They must use a high-priority path and push invalidation notifications to every region. The recommended target is that 99.9% of security changes take effect within 10 seconds.

If the message bus fails, regions use short-interval version polling as compensation. For a new Key or uncached Key whose state cannot be confirmed, the data plane must reject it; authorization must not be bypassed for availability.

10.3 Emergency Deny-Only Channel

When the control plane or PostgreSQL is unavailable, security personnel must still be able to block a leaked Key immediately. Every region provides an independent break-glass emergency blocking ingress and follows these constraints:

  1. The ingress may only add deny entries for a public Key ID, merchant ID, or source IP. It cannot add allow entries, expand permissions, or delete a central revocation record.
  2. Instructions are signed by a hardware-protected internal security-signing key. The API Key validation service in every region first verifies the signature, then unions deny entries with central configuration.
  3. Under normal conditions, approval from two authorized security personnel is required. A declared highest-severity security incident permits the incident commander to act first, but a second approver must review within 15 minutes.
  4. The initial lease period for a regional local deny entry is 24 hours. If the control plane remains unavailable, security personnel can renew it through the same signing and approval process. The API Key validation service alerts two hours and one hour before expiry, and must not automatically restore an allow decision merely because the lease expires while the control plane is unavailable and the deny entry has not been formally archived. After control-plane recovery, the entry must be converted into a formal suspension or revocation record; it must not be removed early before archival is complete.
  5. Every region writes the actor, approver, reason, signature digest, receipt time, and effective time to local append-only audit storage.
  6. The break-glass ingress uses a network path, identity role, and signing key distinct from the ordinary Gateway Admin API, and is exercised once per quarter.

10.4 Degradation Strategy

FailureBehavior
PostgreSQL control-plane primary database unavailableStop ordinary management writes; the data plane continues with the last verified snapshot; emergency blocking uses the channel in Section 10.3
Message bus unavailableThe control plane commits configuration but marks it pending publication; regions compensate through version polling; do not declare a change effective before publication completes
Regional Redis unavailableThe API Key validation service uses a bounded in-process snapshot; unknown Keys and Keys beyond snapshot validity are denied. Distributed rate limiting degrades to per-instance token buckets. An instance may use only quota shares leased before the failure and not yet expired, while a new instance gets zero quota; therefore, the sum of shares across all instances must not exceed the merchant's or Key's global quota
API Key validation service unavailableGateway authentication fails closed and returns 503; authorization validation is not bypassed
One backend instance unavailableHealth checking removes it and selects a healthy instance in the same service pool
Entire backend region unavailableDecide failover or return 503 according to the read and write preconditions in Section 7.3

The recommended maximum offline-use time for the last verified snapshot is 15 minutes. If no newer version is available after that period, reject high-risk write requests; whether read requests may continue must be confirmed by every platform according to its risk classification.