Data sovereignty

The data, the key, or the switch

Customer-held controls that keep the most sensitive slice in your hands while Snowflake does the analytics.

Kevin Keller · kevinkeller.org

Why it matters

A small sensitive slice often blocks the whole programme

  • National IDs, bank details, salaries and patient identifiers carry legal and reputational risk.
  • A standard cloud setup cannot fully answer that risk.
  • So projects stall, data stays in silos and the rest of the data goes unused.

The framework

Keep one decisive control, let the platform do the rest

If we put this in your platform, what is still in our hands?
You keepWhat it means
The dataIt never lives in Snowflake. Reached only when you allow it, or never.
The keyStored encrypted in Snowflake. You decide when, and for whom, the key is released.
The switchYou cut access instantly, with a time limit and an audit trail.

The data

The tunnel and the local join keep records on your premises

  • On-demand tunnel: outbound only, opened with a TTL of at most 4 hours and a written reason. Closed means zero rows.
  • Local join: sensitive rows never leave. Only k-anonymous aggregates (k ≥ 5) go back.
  • Snowflake's own query history shows no sensitive value.

The key

Encrypted in Snowflake, released by an external broker

  1. Columns are encrypted with AES-256-GCM before they reach Snowflake.
  2. A user completes a step-up outside Snowflake: TOTP code plus a justification.
  3. The broker confirms this exact query is running for this user.
  4. Replays of a finished query and revoked grants get no key.

Variants of the key

Lighter transport, phone approval, or a key that never enters

OptionWhat changes
2b Direct key fetchFar less infrastructure, no step-up
2c Approve on your phoneQR code, TOTP and reason, bound to the query
2d Remote decryptThe broker decrypts in AWS, the key never enters Snowflake
4 Your own appCiphertext in Snowflake, key only on-premises

Beyond unlocking

Compute on ciphertext, or share a synthetic copy

  • Homomorphic encryption: Snowflake sums, averages and scores encrypted salaries with no secret key
  • Its price: about 86 KB per value, so a few columns only
  • Synthetic data: segment averages within about 5%, zero exact copies of real rows
  • Its limit: not an audited differential-privacy guarantee

What it costs

The switch costs little. Per-query key control costs seconds.

Optionp50
Plaintext baseline0.1 s
Tunnel live join0.3 s
Phone approval (2c)2.8 s
Key broker (2)4.1 s

Single demo account, a laptop as on-prem. Orders of magnitude, not a sizing guide.

The key distinction

Key custody is not data custody.

"The key stays with us" and "the data stays with us" lead to different patterns. Requirements documents often blur the two.

Choosing

Two questions do most of the work

  1. May the data be stored in Snowflake at all, even encrypted? If not: the tunnel or the local join.
  2. If so, do people read values or only compute on them? Compute only: homomorphic encryption. Read in Snowflake: the key broker options. Read on-premises: your own app.

What none of this solves

No pattern stops an authorised user copying what they can see

  • Most options control when and for whom plaintext exists, not whether.
  • Revocation is not instant everywhere: brokers renew cached keys every 30 minutes.
  • Some behaviour is observed, not documented.
  • The demos take shortcuts to replace before production.

The takeaway

Classify the sensitive slice, then decide which thing you keep.

Read the full article

Kevin Keller · kevinkeller.org · Personal project, "art of the possible" examples, not official Snowflake solutions