1. Sovereign Hosting Topology
AWS Istanbul Local Zone & Two-Copy In-Country DR
Application compute, object storage, and encrypted backups run exclusively inside Türkiye with AWS Partner ArcheonCloud, preventing unencrypted third-party CDN decryption or foreign PII egress under KVKK Art. 9.
- Direct Istanbul Ingress:
app.gocmenim.com terminates TLS 1.3 directly on the AWS Istanbul Local Zone (eu-central-1-ist-1) Elastic IP without foreign proxy termination.
- 15-Minute Sovereign Backups: Private-subnet PostgreSQL 16 +
pgvector creates zstd+age encrypted dumps every 15 minutes into a secondary Istanbul S3 Directory Bucket and pull-syncs to an off-AWS host in Türkiye - never outside the country.
- Zero Foreign AI or Telemetry: No OpenAI, Anthropic, Google Analytics, Mixpanel, Sentry, or PostHog Cloud SDK touches user uploads or OCR output.
2. Envelope Encryption & HYOK Key Custody
AES-256-GCM (GCMN1), OpenBao HYOK & Memory Zeroing
- Split-Custody HYOK: Infrastructure storage volumes use AWS KMS, while application-level PII and biometric scans are wrapped by our isolated OpenBao HYOK KMS server reachable strictly over
WireGuard + mTLS 1.3 (:8200).
- Immediate Buffer Wiping (
dekBuffer.fill(0)): Plaintext Data Encryption Keys (DEKs) exist only ephemerally in locked runtime RAM to seal or unseal GCMN1 envelopes and are zeroed immediately via dekBuffer.fill(0).
- KVKK Art. 7 Cryptographic Erasure: Deleting an account shreds its wrapped OpenBao key record alongside S3 objects and active profiles, making any residual snapshot mathematically unreadable.
3. Local OCR Sandboxing & 24-Hour TTL
Read-Only noexec tmpfs, Deterministic Redaction & Opaque S3 Keys
- Memory-Only Zero-Swap Container: Local Poppler and Tesseract OCR run inside a hardened read-only
noexec tmpfs worker container with zero disk swap and zero outbound internet access.
- Pre-Indexing Incidental Redaction (Decision 2018/10): Incidental religion, blood type, TCKN, and MRZ patterns detected on identity/passport pages are redacted deterministically prior to any structured text extraction.
- Opaque Object Keys & 24h Default TTL: S3 keys contain random identifiers only (never names or YKN/TCKN tokens). Raw uploaded scans expire after 24 hours by default unless the user opts into the optional 7-year renewal archive.
4. Tenant Isolation & Immutable Audit Ledger
PostgreSQL 16 Force RLS, pgaudit & SQLSTATE 42501
- Mandatory Row-Level Security: Every tenant query executes inside a transaction bound to the authenticated account via PostgreSQL 16 Force RLS.
- Append-Only Consent & Erasure Ledger: Consent grants, revocations, privacy policy SHA-256 digests, and Art. 7 destruction receipts are protected by
SQLSTATE 42501 append-only triggers and HMAC chaining (retained 5 years / 3 years per Erasure Regulation Art. 7/3).
- Clean Telemetry Logs:
pgaudit.log_parameter=off guarantees SQL bind parameters containing personal data never reach log files, and AWS CloudTrail records control-plane API events only.
5. Sovereign Anti-Abuse & Settlement
Self-Hosted ALTCHA v2 PoW & Strict First-Party CSP
- Zero Foreign Captcha Scripts: SMS OTP, Email OTP, and Magic Link endpoints are protected by self-hosted ALTCHA v2 Proof-of-Work inside Türkiye rather than Cloudflare Turnstile or Google reCAPTCHA, avoiding unlawful Art. 9 browser metadata transfers.
- Strict Content Security Policy:
default-src 'self', script-src 'self', and connect-src 'self' ensure zero external scripts, trackers, or third-party fonts are loaded in any session.
- Direct Domestic Billing: Dossier upgrades settle directly via Turkish bank IBAN / EFT / FAST with local OCR receipt verification while third-party foreign payment widgets remain disabled.