Payment Software Security Only · ชั้น Payment Logic

ความปลอดภัยการชำระเงิน & การเชื่อมโยง Easy Pass / M-PassPayment Security & Easy Pass / M-Pass Integration

สถาปัตยกรรมการพิสูจน์การชำระเงินสำหรับ DOH Payment Orchestrator — ครอบคลุม mTLS, JWT Client Assertion, HMAC, Token Binding, Key Management, Fraud Detection และ PCI DSS v4.0 ComplianceComplete authentication architecture for DOH Payment Orchestrator covering mTLS, JWT Client Assertion, HMAC, Token Binding, Key Management, Fraud Detection & PCI DSS v4.0 Compliance.

หลักการสำคัญ: Payment is NOT in the lane critical path — ชั้น payment logic ไม่ใช่ critical path ของหน้าด่าน ด่านบันทึก trip event เท่านั้น การตัดเงินเกิดทีหลังบ้าน เป็น layered security — ไม่ใช่ security-as-gate Key Principle: Payment is NOT in the lane critical path — toll lanes only capture trip events. All payment processing happens asynchronously in the back office. Security is layered (defense-in-depth), not gated (security-as-gate).

Section 1 · สถาปัตยกรรม

ภาพรวมสถาปัตยกรรมความปลอดภัยSecurity Architecture Overview

DOH Payment Orchestrator เชื่อมต่อกับ PSP/Acquirer ผ่าน mTLS โดย DOH เก็บเฉพาะ token reference — ไม่เก็บ raw PAN เด็ดขาดDOH Payment Orchestrator connects to PSP/Acquirer through mTLS. DOH stores only token references — never raw PAN.

🏦
DOH Payment
Orchestrator
🔒
mTLS 1.3Mutual TLS
💳
PSP / Acquirer
🌐
Card Schemes
Visa / MC
🏦
Issuing Bank

Token-Only at DOHNo Raw PAN Storage

DOH เก็บเฉพาะ network token (VTS/MDES) ที่ผูกกับ DOH Merchant ID — PAN ดิบไม่เคยเข้า DOH infrastructure ลด PCI scope เหลือ SAQ ADOH stores only network tokens (VTS/MDES) bound to DOH Merchant ID. PAN never enters DOH infrastructure — reducing PCI scope to SAQ A.

Layered DefenseDefense-in-Depth

mTLS (transport) + JWT/HMAC (message) + Token Binding (credential) + Idempotency (replay) + Rate Limiting (abuse) ทุก layer ออกแบบให้ compromise ชั้นเดียวไม่พอเพียงที่จะทำให้ระบบล่มmTLS (transport) + JWT/HMAC (message) + Token Binding (credential) + Idempotency (replay) + Rate Limiting (abuse). Each layer is designed so that compromise of one layer does not collapse the system.

Not in Critical PathAsync Payment Processing

ระบบ payment ไม่อยู่ใน critical path ของหน้าด่าน — มี 300ms latency budget สำหรับ vehicle throughput แต่ไม่มีการตัดเงินสดที่หน้าด่าน การตัดเงินเกิดแบบ asynchronous ทีหลังบ้านPayment processing is not in the critical lane path. The lane has a 300ms latency budget, but no live payment authorization occurs at the lane — all payment is asynchronous, back-office processing.

Section 2 · การยืนยัน

Authentication Architecture DOH ↔ PSPAuthentication Architecture DOH ↔ PSP

mTLS สำหรับ transport security + JWT Client Assertion (RFC 7521) สำหรับ message-level authentication + HMAC-SHA256 fallbackmTLS for transport security + JWT Client Assertion (RFC 7521) for message-level auth + HMAC-SHA256 fallback.

🔐

Transport: mTLS 1.3Mutual TLS Channel

Protocol: TLS 1.3 mandatory (TLS 1.2 fallback). Client certificate: RSA 2048+ หรือ ECDSA P-256. Validation: Full chain + CRL/OCSP stapling. Certificate pinning ฝั่ง DOH. Ciphers: TLS_AES_256_GCM_SHA384, ECDHE-ECDSA-AES256-GCM-SHA384TLS 1.3 mandatory (1.2 fallback). Client cert: RSA 2048+ or ECDSA P-256. Full chain + CRL/OCSP validation. DOH-side certificate pinning. AES-256-GCM ciphers only.

PCI DSS Req 4.1, 4.3.1
🌿

Message: JWT Client AssertionRFC 7521 §4.2

Primary auth mechanism: JWT signed with RS256/ES256. Header: alg + kid. Payload: iss=DOH_MERCHANT, aud=PSP API, exp=now+600s, jti=UUIDv4. Signature: HSM-private-key. No shared secret required.Primary: JWT signed RS256/ES256. Header: alg + kid. Payload: iss=DOH_MERCHANT, aud=PSP API, exp=now+600s, jti=UUIDv4. Private key in HSM. PSP only needs public key.

PCI DSS Req 3.6.1 • No shared secret
#

Fallback: HMAC-SHA256HMAC Request Signing

Stripe-style canonical signing string. Headers: X-Merchant-Id, X-Request-Id (UUIDv4), X-Timestamp (epoch), X-Signature. Signing string = Merchant-Id + Request-Id + Timestamp + Method + URI + SHA256(Body). Secret: 256-bit CSPRNG. Timestamp skew: ±5 min.Canonical signing string (Stripe-style). Headers: X-Merchant-Id, X-Request-Id (UUIDv4), X-Timestamp, X-Signature. Secret: 256-bit CSPRNG. Timestamp tolerance: ±5 min.

Fallback only • 90-day rotation
📋

IdempotencyDuplicate Prevention

Every mutation includes Idempotency-Key (UUIDv4). PSP returns cached response within 24hr window. Prevents duplicate charges from network retries. Applies to: /v1/payments, /v1/tokens, /v1/refundsAll write operations include Idempotency-Key (UUIDv4). PSP caches response for 24hr window. Prevents duplicate charges from network retries. Applied to all mutation endpoints.

OWASP API6: Sensitive Business Flows

ช่องทาง API Key ฝั่ง PSPPSP-Side API Key Lifecycle

CREATED
ACTIVE
EXPIRED
ACTIVE
REVOKED

รูปแบบ: Opaque 256-bit random, Base64, prefix sk_live_. ส่งผ่าน Authorization: Bearer header (ไม่ใช่ URL). Server-side: bcrypt/scrypt hash เท่านั้น (ไม่เก็บ plaintext). หมุน 90 วัน พร้อม 7 วัน overlap. IP restriction: DOH egress CIDR. Rate limit: 100 req/s burst, 50 req/s sustained. Format: Opaque 256-bit random, Base64, sk_live_ prefix. Transmission via Authorization: Bearer (never URL). Server-side bcrypt/scrypt hash only. 90-day rotation with 7-day overlap. IP bound to DOH egress CIDR. Rate limit: 100 req/s burst.

Section 3 · การจัดการกุญแจ

การจัดการกุญแจ — PCI DSS v4.0 CompliantKey Management — PCI DSS v4.0 Compliant

Three-tier key hierarchy ใน FIPS 140-2 Level 3 HSM — กุญแจแยกตามหน้าที่ พร้อมการหมุนอัตโนมัติThree-tier key hierarchy inside FIPS 140-2 Level 3 HSM — with automated rotation schedule.

Level 0
HSMFIPS 140-2 L3
Level 1
Master KEKAES-256
Level 2
Application KeysmTLS / JWT / HMAC / Token
Level 3
Derived KeysSession / Ephemeral

ตารางการหมุนRotation Schedule

ประเภทกุญแจKey Type รอบการหมุนRotation Period Overlap การจัดเก็บStorage การเพิกถอนRevocation
mTLS Client CertificatemTLS Cert12 months30 daysHSM / PKCS#11HSM< 1 hr
JWT Signing Key (RS256/ES256)JWT Key180 days7 daysHSM (private) / JWKS (public)HSM / JWKS< 1 hr
HMAC Secret (256-bit)HMAC Secret90 days7 daysVault / Secrets ManagerVault / KMSImmediate
PSP API Key90 days7 daysbcrypt hash (server)bcrypt hashImmediate
Token Vault Encryption KeyToken Vault Key180 days7 daysHSM-wrappedHSM-wrapped< 1 hr
Master KEK (AES-256)Master KEK12 months30 daysHSM (never exported)HSM onlyFull re-wrap

Secrets StackInfrastructure

Primary: HashiCorp Vault Enterprise (HSM auto-unseal) หรือ cloud: AWS Secrets Manager / Azure Key Vault / GCP Secret Manager
Regulated: Thales/Entrust/Utimaco HSM via PKCS#11
Principle: ไม่มี plaintext keys ใน disk/config/env/VC เด็ดขาด
Primary: HashiCorp Vault Enterprise (HSM auto-unseal) or cloud KMS. Regulated: Thales/Entrust HSM via PKCS#11. NEVER plaintext on disk, config, env, or VC.

Key DestructionNIST SP 800-88

Compliant destruction per NIST SP 800-88. All key access logged. Quarterly inventory audit. Split-knowledge for HMAC secrets. Dual authorization for create/revoke operations.NIST SP 800-88 compliant destruction. All key access logged. Quarterly inventory audit. Split-knowledge provisioning. Dual authorization for create/revoke.

Section 4 · Token Security

Token Security — Network TokensToken Security — Network Token Architecture

Network tokens (Visa VTS / Mastercard MDES) แนะนำเหนือ gateway tokens เพื่อ PSP portability และความปลอดภัยสูงสุดNetwork tokens (Visa VTS / Mastercard MDES) recommended over gateway tokens for PSP portability and maximum security.

Network Token vs Gateway TokenComparison

ด้านAspect Network Token (VTS/MDES)Network Token Gateway Token (Stripe/Adyen)Gateway Token
IssuerIssuerCard network (Visa/MC) directlyPayment gateway/processor
PortabilityPortabilityPortable across acquirers/gatewaysLocked to issuing gateway
Liability ShiftLiabilityFull network liability shiftGateway-dependent
PAN Lifecycle SyncPAN SyncAutomatic (Account Updater)Manual/gateway-specific
CryptogramSingle-use per authorizationMay not support
Assurance LevelAssuranceToken Assurance Level (TAL)Gateway-specific scoring
Time to MarketT2M4-6 months (MDES onboarding)Faster via single API

สำหรับ Easy Pass Postpaid: Network Tokens แนะนำสำหรับ portability ระหว่าง EXAT, BEM, DOH. Gateway tokens เป็น fallback สำหรับ issuers ที่ยังไม่รองรับ VTS/MDES ในไทย Recommendation: Network Tokens for portability across EXAT, BEM, DOH operators. Gateway tokens as fallback for issuers not yet supporting VTS/MDES in Thailand.

Token Binding ControlsBinding Controls

  • Merchant Binding: Token ผูกกับ DOH Merchant ID — ไม่มีค่าถ้านำไปใช้กับ merchant อื่นToken bound to DOH Merchant ID — rejected if replayed elsewhere
  • Domain Restriction: จำกัดการใช้งานสเปค (channel, use case)Domain restriction: specific channel and use case
  • Single-Use Cryptogram: TA cryptogram (Visa) / UCAF (MC) ใหม่ต่อการ authorize แต่ละครั้ง — replay impossibleSingle-use cryptogram per authorization — replay impossible
  • TSP Validation: Visa/Mastercard ตรวจ token binding ก่อน authorizeTSP validates token domain binding before authorization

Token Lifecycle — EMVCo v2.3EMVCo Payment Tokenisation v2.3

INACTIVE
ACTIVE
SUSPENDED
DELETED

Operations: Provision → Activate → Suspend/Resume → Delete. Account Updater: auto-refresh เมื่อ PAN expires/reissues (VAU 2.0 / ABU). DELETE เป็น terminal state. Operations: Provision → Activate → Suspend/Resume → Delete. Account Updater auto-refreshes on card expiry/reissue. DELETE is terminal (non-recoverable).

PCI Scope Reduction: Tokenized PAN may qualify for SAQ A-EP
Section 5 · Easy Pass / M-Pass

Easy Pass / M-Pass IntegrationEasy Pass / M-Pass Integration Architecture

ระบบ 5.8 GHz DSRC, passive RFID OBU, prepaid, cached balance ที่ lane, T+1 batch settlement ผ่าน Central Clearing House5.8 GHz DSRC, passive RFID OBU, prepaid model, cached balance at lane, T+1 batch settlement through Central Clearing House.

ผู้มีส่วนได้เสีย & ระบบปัจจุบันStakeholders & Current System

หน่วยงานAuthority ระบบSystem ถนนที่ดูแลManaged Roads ประเภทType
EXATEasy PassChalerm Mahanakhon, Si Rat, Udon Ratthaya, Ramindra-At Narong, Bang Phli-Suk SawatรัฐวิสาหกิจState Enterprise
BEMEasy PassSi Rat (2nd Stage), Udon Ratthaya (Bang Pa-in), MRT Blue/PurpleบริษัทมหาชนPublic Company
DOHM-PassMotorway 7 (Bangkok-Chonburi), Motorway 9 (Kanchanaphisek)กรมราชการGovt Dept

Key Fact: Easy Pass และ M-Pass ใช้ร่วมกันได้ (interoperable). OBU tag เดียวใช้ได้ทั้ง EXAT, BEM, DOH. DSRC protocol เดียวกัน (CEN DSRC EN 12253/EN 13372). Central Clearing House เป็น platform ร่วม. Easy Pass and M-Pass are interoperable. A single OBU tag works across EXAT, BEM, and DOH toll plazas. Systems share a common DSRC protocol (CEN DSRC EN 12253/EN 13372) and use the same passive RFID tag standard.

Toll Event Data FormatStandard Toll Transaction Record

1{
2 "txId": "string (unique)",
3 "plazaId": "string",
4 "operatorCode": "EXAT | BEM | DOH",
5 "laneId": "string",
6 "timestamp": "ISO 8601",
7 "tagId": "string (OBU UID)",
8 "accountNumber": "string (prepaid account)",
9 "vehicleClass": "4W | 6W | 8W | 10W+",
10 "axleCount": "int",
11 "plateNumber": "string (ANPR)",
12 "entryPlazaId": "string (for closed system)",
13 "entryTimestamp": "ISO 8601",
14 "tollAmount": "decimal (THB)",
15 "discountApplied": "decimal",
16 "transactionStatus": "SUCCESS | VIOLATION",
17 "paymentMethod": "PREPAID | POSTPAID",
18 "balanceAfter": "decimal",
19 "settlementBatchId": "string"
20}

สาม Integration OptionsThree Integration Options

Option A

Real-Time AuthorizationLane Controller Upgrade

Lane controller queries central host แบบ real-time ก่อน authorize การผ่าน. ต้อง upgrade lane controller ทุก lane. Latency budget 300ms. ต้นทุนสูง.Lane controller queries central host for real-time authorization. Requires lane controller upgrade at every lane. 300ms latency budget. Highest cost.

⬆ Highest cost, lowest latency
⭐ Option B — ชั้น POC

Post-Facto Invoice ModelBatch Payment — RECOMMENDED

Toll events batched แล้ว settle payment ทีหลัง. ไม่ต้องเปลี่ยน lane controller. T+1 batch เหมาะสำหรับ POC. มีใช้อยู่แล้วสำหรับ corporate fleet.Toll events batched, payment settled later. No lane controller changes needed. T+1 batch model is already partially in use for corporate fleet accounts. Simplest path.

✔ No lane hardware changes • POC-ready
Option C

Token-Backed Card NetworkCard-on-File with MIT/UCOF

Register card token linked to Easy Pass. Toll events trigger token-based MIT/UCOF charges. Similar to TfL London / EZ-Pass NY. Requires payment gateway integration + token provisioning.Card token linked to Easy Pass account. Toll events trigger token-based MIT/UCOF charges. TfL London / EZ-Pass NY model. Requires payment gateway integration.

🔗 Target architecture post-POC

Discovery Deliverable — ชั้น POC GateCritical Discovery Before POC Gate

ชั้น POC Gate: ช่องทางการเข้าถึงข้อมูล (API pull vs daily batch vs manual CSV) ต้องยืนยันก่อน POC live. ไม่มี public API documentation — integration เป็น proprietary ต้องมี commercial agreement กับ EXAT/BEM/DOH ก่อน POC Gate Requirement: Confirm the exact data access mechanism (API pull vs daily batch vs manual CSV delivery) before POC goes live. No public API documentation exists — integration is proprietary and requires commercial agreements with EXAT, BEM, and DOH before integration can proceed.

Section 6 · Fraud Detection

Real-Time Fraud Detection ไม่ใช่ Post-Hoc ReconciliationReal-Time Fraud Detection — Not Just Post-Hoc

Real-time anomaly scoring บน event stream ควบคู่ไปกับ 8-layer reconciliation เป็น defense-in-depthReal-time anomaly scoring on event stream — paired with 8-layer reconciliation as defense-in-depth.

🏢
Toll EventTrip Record
🔄
NormalizeStandardize
📊
Feature ExtractVectorize
📈
ScoreRisk Score
🚨
Alert / BlockEscalate

Detection RulesAnomaly Detection Rules

  • Velocity Check: >20 trips/day จาก tag เดียว>20 trips/day from single tag
  • Geographic Impossibility: tag เดียวกัน อยู่ 2 plazas ภายใน 5 minSame tag at two plazas within 5 min
  • Card-Tag Mismatch: 1 card ใช้กับ 5+ tagsOne card used for 5+ different tags
  • Night-Pattern Anomaly: vehicle class ที่ไม่เคยเดินทาง 3AMVehicle class that never travels at 3AM

การผสานกับ 8-Layer ReconciliationDefense-in-Depth Integration

Real-time fraud scoring เป็น layer แรก ไม่ใช่ layer เดียว — ทำงานคู่กับ reconciliation แบบ defense-in-depth: Real-time fraud scoring is the first layer — not the only layer. It works with reconciliation as defense-in-depth:

  1. Real-time anomaly scoring → alert/block
  2. Tag-plate reconciliation (ANPR cross-check)
  3. Vehicle class validation
  4. Entry/exit pair matching (closed system)
  5. Operator-to-CCH reconciliation
  6. PSP settlement reconciliation
  7. Customer dispute workflow
  8. Monthly audit + pattern review
Section 7 · Compliance

PCI DSS v4.0 Compliance MapPCI DSS v4.0 Compliance Requirements

SAQ A applies (token-only storage at DOH) BUT trip/tag data มี obligations ของตัวเองSAQ A applies (token-only storage at DOH) but trip/tag data carries its own security obligations.

🔒 Req 3.5 / 3.6 / 3.7

Key Management & PAN Protection

PAN ไม่ stored post-tokenization. Token refs AES-256 encrypted at rest. Documented key lifecycle policies. All keys in FIPS 140-2 HSM or KEK-wrapped.PAN never stored post-tokenization. Token refs AES-256 encrypted at rest. Documented key lifecycle policies.

🌐 Req 4.1 / 4.2

Encrypted Transmission

mTLS 1.2+ สำหรับ ทุก PSP/TSP channel. Strong ciphers (AES-256-GCM). Certificate pinning ฝั่ง DOH. HSTS: max-age=31536000.mTLS 1.2+ for all PSP/TSP channels. Strong ciphers. Certificate pinning on DOH side. HSTS enforced.

💻 Req 6.4 / 6.5

Secure Coding & Change Control

API security review ก่อน deployment. Formal change control สำหรับ cert/key rotation. OWASP API Top 10 mitigations applied. Idempotency บังคับ.API security review before deployment. Formal change control for cert/key rotation. OWASP API Top 10 mitigations.

📋 Req 12.9

Third-Party Security

Documented responsibility matrix DOH↔PSP. PSP security assessment ก่อน integration. Annual penetration testing บังคับก่อน live POC.Documented responsibility matrix DOH↔PSP. PSP security assessment before integration. Annual pen test mandated before live POC.

⚠ ข้อมูล Trip/Tag

Beyond PCI Scope

Trip/tag data เป็น sensitive-by-context (รู้รูปแบบการเดินทาง). ต้องทำ DPIA. Data minimization. Role-based access. Audit logs. Incident response plan.Trip/tag data is sensitive-by-context (reveals movement patterns). Requires DPIA, data minimization, RBAC, audit logs, and incident response plan.

🚨 Mandatory Before Live POCPre-POC Security Requirements

✔ Annual penetration test โดย PCI ASVAnnual pen test by PCI ASV
✔ PSP security assessment (Req 12.9)
✔ DPIA สำหรับ trip/tag dataDPIA for trip/tag data
✔ Quarterly key inventory audit
✔ Incident response plan ซ้อมIR plan exercised
✔ BOT regulatory classification
Section 8 · Roadmap

Implementation Roadmap — Payment SW OnlyImplementation Roadmap — Payment Software Only

14 สัปดาห์ เฉพาะ payment software, logic, และ security — ไม่รวม physical infrastructure14 weeks focused exclusively on payment software, logic, and security — no physical infrastructure.

Week 1-2

HSM Deployment + Certificate IssuanceFoundation

Deploy FIPS 140-2 Level 3 HSM (or cloud HSM). Generate mTLS client key pair in HSM. Submit CSR to PSP. Install client certificate. Configure cert expiry monitoring.Deploy FIPS 140-2 L3 HSM or cloud HSM. Generate client key pair. Submit CSR to PSP. Install certs. Deploy monitoring.

Week 3-4

mTLS Channel DOH ↔ PSPTransport Security

Establish mTLS 1.3 channel. Configure outbound TLS with cert pinning. Validate full chain + CRL/OCSP. Deploy secrets management (Vault / KMS). PSP-side enforcement on /v1/payments, /v1/tokens paths.Establish mTLS 1.3 channel. Configure cert pinning. Validate CRL/OCSP. Deploy secrets management. PSP enforces client certs on payment/token paths.

Week 5-6

JWT/OAuth2 Auth FlowMessage Authentication

Implement JWT Client Assertion (RS256/ES256, RFC 7521). Implement HMAC-SHA256 fallback signing. Implement idempotency keys (UUIDv4) on all write operations. Add timestamp validation (±5 min skew).Implement JWT Client Assertion (RS256/ES256). Implement HMAC-SHA256 fallback. Add idempotency keys. Add timestamp validation.

Week 7-8

Token Binding + Idempotency LayerToken Security

Onboard as Token Requestor (Visa VTS / MC MDES). Implement token provisioning (CIT → token → store ref). Implement MIT/UCOF flow (token + cryptogram → auth). Token lifecycle management. Account Updater integration.Onboard as Token Requestor. Implement token provisioning. Implement MIT/UCOF flow. Token lifecycle management. Account Updater.

Week 9-10

Real-Time Fraud Pipeline MVPFraud Detection

Implement event normalization pipeline. Deploy feature extraction (velocity, geographic, card-tag, night-pattern). Score-and-alert engine. Integration with ledger and reconciliation workflows.Implement event normalization. Deploy feature extraction. Score-and-alert engine. Integration with ledger and reconciliation.

Week 11-12

Penetration Test + RemediationSecurity Validation

Annual penetration test by PCI ASV. Remediate all findings. PSP security assessment (Req 12.9). Verify all PCI DSS controls. OWASP API Top 10 verification. DPIA completion for trip/tag data.Annual pen test by PCI ASV. Remediate findings. PSP security assessment. PCI DSS control verification. OWASP API Top 10 checks.

Week 13-14

Security Architecture Review GateGo/No-Go Gate

Final security architecture review. Key inventory audit. BOT regulatory classification confirmed. All gates documented. Go/No-Go decision for controlled POC launch. Evidence report + TOR/RFP draft readiness.Final security architecture review. Key inventory audit. BOT classification confirmed. All gates documented. Go/No-Go for controlled POC. Evidence report ready.

หลัง 14 สัปดาห์: Security-Ready POC FoundationAfter Week 14: Security-Ready POC Foundation

HSM deployed ✔ • mTLS channel live ✔ • JWT + HMAC auth operational ✔ • Token binding active ✔ • Fraud pipeline running ✔ • Pen test passed ✔ • All PCI DSS controls verified ✔ • Ready for Controlled POC with 5,000-10,000 opt-in users ✔ HSM deployed ✔ • mTLS channel live ✔ • JWT/HMAC auth operational ✔ • Token binding active ✔ • Fraud pipeline running ✔ • Pen test passed ✔ • All PCI DSS controls verified ✔ • Ready for Controlled POC ✔

Appendix · OWASP

Attack Surface Analysis — OWASP API Top 10Attack Surface Analysis — OWASP API Security Top 10

API1: Broken Object Auth

PSP validates merchant_id in JWT matches resource. No cross-merchant token access.PSP validates merchant_id in JWT matches target resource.

CRITICAL

API2: Broken Authentication

mTLS + JWT/HMAC dual auth. No basic auth. No keys in URLs. Token exp: 600s.mTLS + JWT/HMAC dual auth. No basic auth. No keys in URLs.

CRITICAL

API6: Sensitive Business Flows

Idempotency keys prevent duplicate charges. PSP caches response 24hr. UUIDv4 keys.Idempotency keys prevent duplicate charges. UUIDv4 keys with 24hr window.

HIGH

API4: Rate Limiting

Per-cert + per-key rate limiting. 100 req/s burst, 50 req/s sustained. Alert on breach.Per-cert + per-key rate limits. 100 req/s burst, 50 req/s sustained.

HIGH

API3: Broken Property Auth

Allowlist of DOH-submittable fields. No mass assignment. Input validation server-side.Allowlist of DOH-submittable fields. Server-side input validation.

MEDIUM

API5: Broken Function Auth

DOH cert scoped to /payments/*, /tokens/* only. No admin endpoint access from DOH cert.DOH cert scoped to payment/token paths only.

MEDIUM

API8: Security Misconfig

TLS 1.3 only. HSTS max-age=31536000. CSP: default-src 'none'. X-Content-Type-Options: nosniff.TLS 1.3 only. HSTS. CSP. nosniff. Cache-Control: no-store.

MEDIUM

API10: Unsafe Consumption

DOH validates PSP responses: certificate, signature, amount. Callback URL allowlist.DOH validates PSP response integrity. Callback URL allowlist.

MEDIUM

Security Headers — DOH Payment OrchestratorRecommended Security Headers

1Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
2X-Content-Type-Options: nosniff
3Cache-Control: no-store, no-cache, must-revalidate
4Content-Security-Policy: default-src 'none'; frame-ancestors 'none'
5X-Frame-Options: DENY
6X-Request-Id: <UUIDv4>
References · ้างอิง

มาตรฐาน และเอกสารอ้างอิงStandards & References

PCI DSS

  • PCI DSS v4.0
  • PCI TSP Standard
  • PCI SAQ A / SAQ A-EP

EMVCo

  • Payment Tokenisation v2.3
  • EMV Token Requestor ID (TRID)
  • EMV 3-D Secure 2.x

OWASP / IETF

  • API Security Top 10
  • REST Security Cheat Sheet
  • TLS Cheat Sheet
  • RFC 7521 (JWT Assertion)
  • RFC 8996 (TLS 1.3)

NIST

  • SP 800-133 (Key Management)
  • SP 800-52 Rev 2 (TLS)
  • SP 800-88 (Media Sanitization)
  • SP 800-90A (CSPRNG)
  • FIPS 140-2 / 140-3

Visa / Mastercard

  • Visa Developer Center (VTS)
  • Mastercard MDES
  • VAU 2.0 / ABU

ญี่ปุ่นJapan ETC

  • ETC 2.0 Postpaid Model
  • Issuer-Bank Architecture
  • CEN DSRC EN 12253
  • ISO 14906 (EFC)