Skip to content

Commit b0ff10b

Browse files
authored
Merge pull request #91 from cipherstash/docs/v2-redirect-readiness
Make v2 legacy redirects merge-safe
2 parents 9ac42fd + 6badc9f commit b0ff10b

56 files changed

Lines changed: 960 additions & 188 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

IA.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ Two notes:
310310
- [x] `/integrations/drizzle` — overview and generated `@cipherstash/stack-drizzle` API reference
311311
- [x] `/integrations/prisma` — Prisma ORM 8 RC, EQL v3, Prisma Postgres, Prisma Compute, and generated API reference
312312
- [ ] `/integrations/aws/rds-aurora` — Proxy path
313-
- [ ] `/integrations/aws/dynamodb`
313+
- [x] `/integrations/aws/dynamodb` — Stack 1.0 helper, equality lookups, and legacy reads
314314
- [ ] `/integrations/clerk`
315315
- [ ] `/integrations/auth0` — end-to-end example (Clerk parity)
316316
- [ ] `/integrations/okta` — end-to-end example (Clerk parity)
@@ -349,13 +349,11 @@ and the old `/compare/*` paths redirect there (`v2-redirects.mjs`).
349349
- [ ] `/guides/development/schema-design` — which encrypted type/variant per column (CIP-3327)
350350
- [ ] `/guides/development/testing-and-ci` (port deploy/testing)
351351
- [ ] `/guides/development/team-onboarding` (port)
352-
- [ ] `/guides/migration/encrypt-existing-data` — the backfill guide, runnable (CIP-3329)
352+
- [x] `/guides/migration` — the backfill guide, runnable (CIP-3329)
353353
- [ ]`/guides/migration/upgrading-from-eql-v2` — REQUIRED; mechanics pending product answer (CIP-3329)
354354
- [ ] `/guides/migration/adopting-incrementally` (CIP-3329)
355355
- [ ] `/guides/migration/key-rotation-operations`
356-
- [ ] `/guides/deployment/going-to-production` (port)
357-
- [ ] `/guides/deployment/serverless-and-bundling` (merge bundling + sst)
358-
- [ ] `/guides/deployment/proxy-deployment` (merge proxy Docker + aws-ecs)
356+
- [x] `/guides/deployment` — production rollout, bundling, CI, onboarding, and Proxy deployment consolidated into one page
359357
- [ ] `/guides/troubleshooting` index — symptom-based router
360358
- [ ] `/guides/troubleshooting/query-performance` — seq-scan diagnosis, typed-operand gotcha
361359
- [ ] `/guides/troubleshooting/runtime-errors`
@@ -367,14 +365,14 @@ and the old `/compare/*` paths redirect there (`v2-redirects.mjs`).
367365
- [x] Section scaffold 🚧
368366
- [x] `/security/cryptography` — ONE reconciled ZeroKMS mechanism story (kills the 3 conflicting accounts)
369367
- [ ] `/security/zerokms`
370-
- [ ] `/security/cts` — auth layer architecture (CIP-3330)
368+
- [x] `/security/cts` — auth layer architecture (hidden from nav until the section is expanded)
371369
- [ ] `/security/stack-sdk`
372370
- [ ] `/security/proxy`
373371
- [ ] `/security/threat-scenarios`
374372
- [ ]`/security/availability-and-continuity` — DR (port) + SLA + exit story; pending SLA answer
375-
- [ ]`/security/audit-logging`pending retention answer
373+
- [x] `/security/audit-logging`Proxy event mechanics; retention/export remains deployment-specific and the nav stays hidden
376374
- [ ]`/security/key-ownership` — BYOK/self-hosted; pending product answer
377-
- [ ] `/security/compliance` index — framework mapping (port, good)
375+
- [x] `/security/compliance` index — capability/responsibility mapping (nav remains hidden)
378376
- [ ] `/security/compliance/hipaa` — BAA scope, §164.312 mapping (CIP-3332)
379377
- [ ] `/security/compliance/soc2` — verify Type II report exists
380378
- [ ] `/security/compliance/gdpr`
@@ -384,7 +382,7 @@ and the old `/compare/*` paths redirect there (`v2-redirects.mjs`).
384382
- [x] Section scaffold 🚧
385383
- [ ] `/solutions/protecting-pii` (new)
386384
- [ ] `/solutions/healthcare-hipaa` (new; pairs with compliance/hipaa)
387-
- [ ] `/solutions/ai-and-rag` (port use-cases/ai-rag)
385+
- [x] `/solutions/ai-and-rag` — source protection, retrieval flow, and isolation boundaries
388386
- [ ] `/solutions/data-residency` (port)
389387
- [ ] `/solutions/provable-access` (port)
390388

@@ -419,8 +417,8 @@ and the old `/compare/*` paths redirect there (`v2-redirects.mjs`).
419417
- **Auth (CIP-3330):**
420418
- [ ] `/reference/auth/lock-contexts`
421419
- [ ] `/reference/auth/cts-tokens`
422-
- [ ] `/reference/auth/oidc-configuration`
423-
- [ ] `/reference/auth/access-keys` (+ clients)
420+
- [x] `/reference/auth/oidc-configuration`
421+
- [x] `/reference/auth/access-keys` + `/reference/auth/clients`
424422
- **CLI / Proxy / Workspace:**
425423
- [ ] `/reference/cli/*` (port 9 pages)
426424
- [ ] `/reference/proxy/*` (configuration, message-flow, multitenant, errors)

content/docs/concepts/key-management.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ The design deliberately keeps the durable pieces small and separated:
161161
| ZeroKMS | Authority keys and access-control state |
162162
| Nowhere | Plaintext data keys |
163163

164-
Your encrypted data stays in your database. ZeroKMS handles key material, not application data. This separation also shapes recovery: restoring ZeroKMS restores the ability to reproduce keys; it does not require CipherStash to restore or move your encrypted database. See [Disaster recovery](/stack/cipherstash/kms/disaster-recovery).
164+
Your encrypted data stays in your database. ZeroKMS handles key material, not application data. This separation also shapes recovery: restoring ZeroKMS restores the ability to reproduce keys; it does not require CipherStash to restore or move your encrypted database. Multi-region application patterns are covered in [Data residency](/solutions/data-residency#multi-region-with-regional-key-isolation).
165165

166166
## ZeroKMS and searchable encryption
167167

content/docs/get-started/choose-your-stack.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ EQL installs into any Postgres you can connect to. It needs no extension, no sup
3333
| Neon, RDS, Aurora, Cloud SQL | Yes | `stash eql install` detects a non-superuser role and adapts. |
3434
| Self-hosted Postgres | Yes | Full operator-class support, so the ORE ordering mechanism is available. |
3535
| Postgres behind PgBouncer | Yes | Transaction pooling is fine. Proxy has its own pooling. |
36-
| DynamoDB | Yes, without EQL | [DynamoDB integration](/stack/cipherstash/encryption/dynamodb). Encrypted attributes and HMAC key lookups; no EQL, because there's no Postgres. |
36+
| DynamoDB | Yes, without EQL | [DynamoDB integration](/integrations/aws/dynamodb). Encrypted attributes and HMAC key lookups; no EQL, because there's no Postgres. |
3737
| MySQL, MongoDB, others | Not yet | The SDK still encrypts values for you, but nothing is queryable server-side. |
3838

3939
<Callout type="info">

content/docs/get-started/what-is-cipherstash.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ flowchart TB
6262

6363
You rarely need all of them at once. The Stack SDK plus EQL is the common case. Proxy is the alternative to the SDK, not an addition to it.
6464

65-
Note that **EQL is only for Postgres**. The SDK also encrypts values that never touch a database, and non-Postgres stores like [DynamoDB](/stack/cipherstash/encryption/dynamodb), with no EQL involved.
65+
Note that **EQL is only for Postgres**. The SDK also encrypts values that never touch a database, and non-Postgres stores like [DynamoDB](/integrations/aws/dynamodb), with no EQL involved.
6666

6767
## Choosing what each column reveals
6868

@@ -99,7 +99,7 @@ Encryption in use is usually assumed to be slow. It is, if you do it with fully
9999
| vs fully homomorphic encryption | [410,000x faster](https://github.com/cipherstash/tfhe-ore-bench) on the per-row primitives a database actually executes. |
100100
| vs AWS KMS | Up to 14x the throughput, because ZeroKMS derives keys in bulk rather than one call per value. |
101101

102-
The FHE comparison is an open benchmark harness you can run yourself. See [CipherStash vs FHE](/stack/reference/comparisons/fhe) for the methodology, and for the workloads where FHE is genuinely the right tool.
102+
The FHE comparison is an open benchmark harness you can run yourself. See [CipherStash vs FHE](/concepts/compare/fhe) for the methodology, and for the workloads where FHE is genuinely the right tool.
103103

104104
## What it protects against
105105

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: Deployment
3-
navTitle: Overview
43
description: "Deploy CipherStash changes safely across environments, with explicit credential, migration, rollout, monitoring, and rollback gates."
54
type: guide
65
components: [encryption, eql, cli]
@@ -9,7 +8,7 @@ audience: [developer]
98

109
CipherStash deployments coordinate application code, database schema, and credentials. Treat each independently deployable stage as a release with its own verification and rollback gate.
1110

12-
For the detailed dual-write, backfill, and cutover procedure for populated columns, follow [Encrypt existing data](/guides/migration/encrypt-existing-data). This page covers the production rollout around that migration.
11+
For the detailed dual-write, backfill, and cutover procedure for populated columns, follow [Data migration](/guides/migration). This page covers the production rollout around that migration.
1312

1413
## Before the first deployment
1514

@@ -96,3 +95,90 @@ Test the correctness of returned values, not only request success rates. An inco
9695
Prefer application rollbacks while both plaintext and encrypted columns are being maintained. Before plaintext removal, a read cutover can be reversed without changing data: point reads back to the original columns and leave dual-writes running.
9796

9897
After plaintext is dropped, rollback becomes a data-recovery operation. Avoid reaching that stage until operational evidence shows the encrypted path is stable and every supported application version has moved forward.
98+
99+
## Serverless and bundled applications
100+
101+
`@cipherstash/stack` must remain a runtime dependency when a build tool creates
102+
a server bundle. Configure the bundler to leave the package external, then make
103+
sure the deployment artifact installs it for the target platform.
104+
105+
For Next.js, use `serverExternalPackages`:
106+
107+
```typescript filename="next.config.ts"
108+
const nextConfig = {
109+
serverExternalPackages: ["@cipherstash/stack"],
110+
}
111+
112+
export default nextConfig
113+
```
114+
115+
For esbuild, pass `--external:@cipherstash/stack`; for webpack, declare it as a
116+
CommonJS external. An SST function needs both the esbuild exclusion and a
117+
runtime install:
118+
119+
```typescript filename="sst.config.ts"
120+
{
121+
nodejs: {
122+
esbuild: { external: ["@cipherstash/stack"] },
123+
install: ["@cipherstash/stack"],
124+
},
125+
}
126+
```
127+
128+
Build and start the artifact in a Linux container before release when local
129+
development uses macOS or Windows. This catches a lockfile or deployment bundle
130+
that omitted the target platform's runtime package.
131+
132+
## Testing and CI
133+
134+
Use a separate workspace and database for integration tests. Supply the test
135+
workspace's four `CS_*` credentials only to the CI job, install the same EQL
136+
release used by production, and test:
137+
138+
- encryption followed by decryption returns the original typed value;
139+
- every required equality, range, ordering, token, or JSON query returns the
140+
expected records;
141+
- a client without the required keyset grant cannot decrypt the data;
142+
- schema migrations and application code work in both rolling-deployment
143+
orders.
144+
145+
Mocks are useful for business logic that merely passes encrypted values
146+
through, but they do not test ciphertext compatibility, key access, query
147+
terms, or EQL behavior. Keep at least one real end-to-end test for every
148+
encrypted query capability used in production.
149+
150+
## Team onboarding
151+
152+
Invite each developer to the organization and workspace, then have them run:
153+
154+
```bash
155+
npx stash init
156+
```
157+
158+
Each device receives its own developer identity and client key. Do not share
159+
production credentials with developers or copy one developer's local profile
160+
into CI. Remove a departing developer from the workspace and revoke their
161+
device client keys without changing application credentials.
162+
163+
See [workspace members](/reference/workspace/members) and
164+
[client keys](/reference/auth/clients) for the complete access model.
165+
166+
## Deploying Proxy
167+
168+
Run CipherStash Proxy as a container in the same private network as PostgreSQL.
169+
Supply database credentials and CipherStash application credentials from the
170+
platform's secret manager, expose the PostgreSQL listener only to application
171+
clients, and expose health or metrics endpoints only to the monitoring plane.
172+
173+
For ECS, Kubernetes, or another orchestrator, keep these concerns separate:
174+
175+
1. Pull the published Proxy image from the approved registry.
176+
2. Grant the task or pod permission to read only its deployment secrets.
177+
3. Configure security groups or network policies for application → Proxy and
178+
Proxy → database traffic.
179+
4. Roll out at least two instances where connection availability requires it.
180+
5. Verify a plaintext write, encrypted database value, encrypted query, and
181+
decrypted read through the deployed endpoint.
182+
183+
Use the [Proxy configuration reference](/reference/proxy/configuration) for
184+
environment variables, TOML settings, ports, logging, and metrics.

content/docs/guides/deployment/meta.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

content/docs/guides/development/index.mdx

Lines changed: 0 additions & 9 deletions
This file was deleted.

content/docs/guides/development/meta.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

content/docs/guides/development/schema-design.mdx

Lines changed: 0 additions & 9 deletions
This file was deleted.

content/docs/guides/index.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
22
title: Guides
3-
navTitle: Overview
4-
description: "Task-oriented guides: development workflow, data migration, deployment, and troubleshooting."
3+
description: "Deployment and data migration guidance for CipherStash."
54
type: guide
65
---
76

8-
This section is being built as part of the docs V2 overhaul ([CIP-3307](https://linear.app/cipherstash/issue/CIP-3307)). Track progress in [IA.md](https://github.com/cipherstash/docs/blob/v2/IA.md).
9-
10-
Until it lands, current documentation lives in the [existing docs](/stack).
7+
{/*
8+
Fumadocs requires an index document when generating a metadata-backed folder.
9+
meta.json excludes this file from the page tree, and Next redirects its route
10+
to Deployment.
11+
*/}

0 commit comments

Comments
 (0)