Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_int-kms

Key Management Service (KMS / HSM) Internals (Envelope Encryption)

7 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Key Management Service (KMS / HSM) Internals (Envelope Encryption) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_int-kms/opengraph-image)](https://archos.sageideas.dev/d/dgm_int-kms)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-kms)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-kms" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Key Management Service (KMS / HSM) Internals (Envelope Encryption) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["App Service"]
  api_1["KMS API Frontend"]
  hsm_2[("FIPS 140-3 HSM")]
  dek_3[("Local DEK Cache")]
  aud_4[("Immutable Audit Log")]
  rot_5["Key Version Rotator"]
  downstream_6["Downstream & OTel"]
  client_0 -->|"1. GenerateDa · HTTPS"| api_1
  api_1 -->|"2a. Wrap DEK · PKCS#11"| hsm_2
  api_1 -->|"2b. Return · TLS"| dek_3
  api_1 -.->|"2c. Log · Async"| aud_4
  rot_5 -->|"Mint KEK · Admin"| hsm_2
  dek_3 -.->|"3. Emit / · OTLP/API"| downstream_6

COMPONENT STACK (7)

  • App ServiceSTATELESS
    Encrypts PII / Blobs
  • KMS API FrontendSTATELESS
    IAM policy + Key Policy eval
  • FIPS 140-3 HSMSTATEFUL
    Non-exportable Root KEK
  • Local DEK CacheSTATEFUL
    Encrypts data locally AES-GCM
  • Immutable Audit LogSTATEFUL
    Every GenerateDataKey/Decrypt
  • Key Version RotatorSTATELESS
    Annual KEK rotation, old decrypts
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. App Service → KMS API Frontend (GenerateDa)[HTTPS]
  2. KMS API Frontend → FIPS 140-3 HSM (Wrap DEK)[PKCS#11]
  3. KMS API Frontend → Local DEK Cache (Return)[TLS]
  4. KMS API Frontend → Immutable Audit Log (Log)[Async]
  5. Key Version Rotator → FIPS 140-3 HSM (Mint KEK)[Admin]
  6. Local DEK Cache → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →