~/talk

A Pattern for a Searchable, Encrypted JSON Document Service

Talkat PGCon 2023 · 2023-05-30..06-02· [security, databases]
links:none on file
slides:none on file

A searchable, encrypted JSON document service is built on Postgres using Tink AEAD encryption and KMS-rooted keyrings, storing only a plaintext UUID plus an encrypted entity blob and a compact JSONB lookup index. It implements JSON Schema validation, supports key rotation (requires re-encryption of old rows), and performs secondary-key search by hashing indexed JSON paths with HMACs and truncated four‑byte keys. Demos show working create, patch, rotate, and lookup flows. Tink AEAD + KMS-rooted keyring hashed lookup JSONB with truncated HMAC keys

AI-written summary · about

  1. 0:00Intro
  2. 0:40TEAM PRINCIPLES
  3. 1:25CENTRALIZED DOCUMENT MANAGEMENT
  4. 2:16AN INTUITIVE CRUD INTERFACE
  5. 6:47ENCRYPTION PATTERN
  6. 7:53TINK
  7. 14:47JSON SCHEMA BASICS
  8. 15:43USER TABLE
  9. 16:58USER SCHEMA
  10. 18:05PROFILE SCHEMA
  11. 19:36ENTITY SCHEMA
  12. 24:06FOSTER CONTINUITY
  13. 24:52EXTENSION SCHEMA
  14. 29:38EXTENSION LOOKUP
  15. 30:11TO THE DATABASE!
  16. 30:31WHAT TO DO?
  17. 37:36PATH CONFIG
  18. 38:42SECONDARY KEY API
  19. 39:30API LOGIC
  20. 40:37RESULTING QUERY
  21. 41:00SQL/JSON PATH PORT
  22. 42:48NODE HASHER
  23. 46:07DOWNSIDES
  24. 47:49FUTURE WORK
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.