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 keep | What it means |
|---|---|
| The data | It never lives in Snowflake. Reached only when you allow it, or never. |
| The key | Stored encrypted in Snowflake. You decide when, and for whom, the key is released. |
| The switch | You 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
- Columns are encrypted with AES-256-GCM before they reach Snowflake.
- A user completes a step-up outside Snowflake: TOTP code plus a justification.
- The broker confirms this exact query is running for this user.
- 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
| Option | What changes |
|---|---|
| 2b Direct key fetch | Far less infrastructure, no step-up |
| 2c Approve on your phone | QR code, TOTP and reason, bound to the query |
| 2d Remote decrypt | The broker decrypts in AWS, the key never enters Snowflake |
| 4 Your own app | Ciphertext 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.
| Option | p50 |
|---|---|
| Plaintext baseline | 0.1 s |
| Tunnel live join | 0.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
- May the data be stored in Snowflake at all, even encrypted? If not: the tunnel or the local join.
- 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.
Kevin Keller · kevinkeller.org · Personal project, "art of the possible" examples, not official Snowflake solutions