# Data Security and Privacy Policy

Version 1.0 · Last reviewed 2026-10-26 · Owner: Delora Legal (security@deloralegal.com)

Status: Draft v1.0. Describes controls in place today. Adoption date to be set.

## Purpose

This policy states how Delora Legal protects data in the Delora application: how it is encrypted, who can see it and how access is watched, how it is backed up and restored, how it is deleted, what cookies the site uses, how a data breach would be reported to customers, and how a firm gets its data out.

It supports, and does not replace, Delora's counsel-reviewed public notices: the [Privacy Policy](https://deloralegal.com/privacy) and the [Subprocessors page](https://deloralegal.com/subprocessors). Those notices were reviewed by counsel on 2026-10-26, and any wording change to them goes back to counsel. If this policy and a public notice ever appear to differ, the public notice governs until counsel has reviewed a correction.

## Scope

- All data in the Delora application: firm content (clients, matters, case profiles, forms, intake conversations, time entries, documents), firm users' account data, demo requests, and security logs.
- The vendors that process that data, listed on the Subprocessors page. All are in the United States.
- The marketing site and the Academy, which run on the same service, and the Android apps once they are released (they are in development and not available to customers yet).

For client and case data, the law firm is the controller and Delora is the processor, acting on the firm's instructions. For firm users' account data and demo requests, Delora is the controller.

## Roles and responsibilities

- **Owner and security officer (Delora Legal).** Delora has no employees today; the owner holds every role. The owner approves this policy, rotates keys, runs restore drills, answers deletion and export requests, and leads any incident.
- **Firm administrators.** Decide their firm's retention of firm content by choosing when to delete or close, export firm data, and manage their members.
- **Firms as controllers.** Decide on notices to their own clients and on how long to keep client records.
- **Counsel.** Reviews the public notices and the customer data processing agreement (DPA).

## Policy

### 1. Encryption

1. All traffic to Delora must use HTTPS. Vercel terminates TLS and serves TLS 1.2 and TLS 1.3. Every response must carry `Strict-Transport-Security` with a two-year `max-age`. Extending it to subdomains is pending the owner's subdomain check.
2. Database connections must require TLS. Calls to Anthropic, Resend, Amazon Web Services and Stripe must use HTTPS.
3. Stored data must be encrypted at rest. Neon encrypts database storage with provider-managed AES-256. Document upload is not live and no production bucket exists yet; when it goes live, uploaded files must be stored in Amazon S3 with provider-managed AES-256, and every upload must request server-side encryption (SSE-AES256).
4. Social Security numbers, A-Numbers, passport and travel document numbers and USCIS online account numbers must additionally be sealed inside the application with AES-256-GCM before storage, bound to the firm through the GCM additional data, shown masked everywhere, and decrypted only when a USCIS form is filled. A copy of the database alone does not reveal them.
5. Passwords must be stored as salted hashes. Authenticator secrets and backup codes must be stored encrypted.
6. The encryption key (`FORMS_ENCRYPTION_KEY`) must live outside the database and the repository, in Vercel's environment (sensitive, production scope) and the owner's password manager. Production must fail closed if it is missing.
7. Keys must be rotated at least yearly and on suspected exposure, through the key ring and the `pnpm secrets:reseal` runbook, never by replacing the value alone. The authentication secret rotates the same way. The first production rotation is an owner step before the SOC 2 audit.
8. Production, staging and CI must each use their own secrets.

### 2. Access monitoring

1. Reaching a firm's data must require membership in that firm, enforced by database row-level security. Delora staff must not sign in to customer firms.
2. Key actions must be written to the firm's append-only audit log, and account security events to the append-only security event log, as described in the Product and Application Security Policy. Users must be able to see their own events, and firm admins their members'.
3. Direct access to the production database by the owner role must be limited to migrations, incidents and restores, and each session must be recorded with who, when and why. Production data must not be copied to laptops.
4. Alerts must go to the owner. Uptime alerts are in place. Alerts on error spikes and failed sign-in spikes need the log drain, which is planned.
5. The owner must review alerts, failed sign-ins and failing compliance tests weekly and record the result, and review access to company systems quarterly. Both are proposed practices that begin with adoption in Vanta.

### 3. Backups and restore

1. The production database must be kept on a plan that gives point-in-time restore. Neon keeps a continuous history of the database. This is not a nightly dump. Any moment inside the restore window can be restored.
2. The restore window depends on the Neon plan: 1 day on Free, 7 days on Launch, up to 30 on Scale. Production's window is up to one day today. The target is a window of at least 7 days for production, and moving to a plan that provides it is an open owner step.
3. A restore must go into a new branch first and be checked before production is switched over.
4. A scripted restore drill (`pnpm restore:drill`) must be run on staging every quarter and after any database change. It checks row counts, that row-level security is still forced, that sealed identifiers still decrypt, that migrations are current, and records the recovery time. The drill is scheduled quarterly. The first run, on 2026-10-27, passed every check and is on record.
5. The encryption key must be backed up in the password manager and a sealed offline copy. A restored database is readable only with the key that sealed it.
6. Proposed targets in the draft continuity policy are a recovery point objective of 5 minutes and a recovery time objective of 4 hours. No uptime commitment is published; the internal goal is 99.5 percent monthly.
7. Source code and migrations are kept in GitHub. Generated USCIS forms are never stored, so they need no backup; firms keep the approved PDFs in their own files.

### 4. Retention, deletion and certificates of destruction

1. Firm content must be kept while the firm's account is open, and deleted when the firm closes its account (`close_firm_data()`), with files removed from storage after the database commit.
2. A daily purge (`purge_expired_data()`, run by Vercel Cron, failing closed without its secret) must delete data on the schedule in the table under Data out of the system.
3. Deleted data remains in database restore history until the restore window passes.
4. Firm admins and individual users must be able to delete their account themselves. People who cannot sign in can ask through the account deletion page.
5. **Certificate of destruction.** On request, after a firm closes its account or a deletion is completed, Delora will issue a written confirmation of deletion. It states what was deleted and when, and that restore history expires after the restore window, giving the date on which that window ends. It lists no personal data. The owner prepares it by hand; no template or automation exists yet.

### 5. Cookies

1. Delora must use only strictly necessary first-party cookies, with one exception: Google Analytics cookies on the public marketing pages, never in the app, client intake or payment pages. It must not use advertising, tracking or social media cookies, and must not load any other third-party scripts, fonts or frames; the Content Security Policy enforces this for the pages Delora serves.
2. Today the cookies are:
   - the sign-in session cookie set by Better Auth (7 days, refreshed daily; httpOnly; SameSite Lax), needed to keep a user signed in;
   - a short-lived two-factor challenge cookie (10 minutes), set only between entering a password and entering a second-factor code;
   - on the public marketing pages only, the Google Analytics cookies `_ga` and `_ga_<id>` (up to 2 years), used to count visits in aggregate;
   - the intake cookie `delora_intake`, set when a prospect agrees to the intake notice and starts a chat: httpOnly, SameSite Lax, Secure in production, limited to that firm's intake link path, valid for 7 days, and holding a random secret whose SHA-256 hash is stored on the server.
3. The light, dark or system colour preference is stored in the browser's `localStorage` under `delora-theme`. It is not a cookie and is never sent to Delora's servers.
4. The mobile apps do not use cookies; they use device-bound bearer tokens.
5. Stripe's hosted Checkout and Customer Portal pages are on Stripe's domain and are governed by Stripe's own notices.
6. A cookie banner and consent mode are in place on the marketing pages: analytics storage is denied by default, and the Google Analytics cookies are set only after a visitor allows them. The choice can be changed with "Cookie settings" in the footer, and the Privacy Policy discloses this and how to block the cookies (wording approved by counsel). Any new cookie that is not strictly necessary must be approved by the owner and by counsel, and the Privacy Policy updated first.

### 6. Data breach notification

1. Delora must tell affected firms without undue delay, and within 72 hours of confirming unauthorized access to or disclosure of their data. This 72-hour commitment is contractual for each customer that signs the customer DPA (counsel-reviewed, version 1.1, signed on request), and is policy for the others.
2. The notice must say what happened, what data was involved, what Delora did, what the firm should do, and who to contact.
3. Firms, as controllers, decide on notices to their own clients and to regulators. Delora gives them what they need to do that.
4. State breach-notification laws and any regulator notices are decided with counsel.
5. If a subprocessor reports a breach that touches Delora data, Delora treats it as its own incident.
6. Anyone who suspects an incident reports it at once to security@deloralegal.com. The draft incident response policy sets severity levels, containment, a post-incident review within 5 business days for serious incidents, and a yearly tabletop exercise.

### 7. Data out of the system

1. **Export.** A firm admin must be able to export everything the firm has in Delora from Settings, then Data export, including while the firm is read-only after its subscription ends. One JSON file holds members, clients, matters, case and attorney profiles, form records, intake links and transcripts, document metadata, time entries, invoices, checklists, case events, devices and the firm's audit log. Sensitive identifiers are masked (they appear only in generated forms) and A-numbers typed in chats are masked. CSV files of the main lists (clients, matters, time entries, invoices, checklists and deadlines, case events) open in a spreadsheet, with no identifier columns and cells guarded against formula injection. Document upload is not live, so the export holds no document files today. When it goes live, uploaded files will come as a ZIP, in parts for a large firm, organized by client and matter, exactly as uploaded. Each download is recorded in the audit log with counts only. Generated USCIS forms are never stored, so the attorney keeps each approved PDF in the firm's own files.
2. **Account and firm deletion.** From the Account page a user can leave a firm (the firm keeps its data), close a firm if they are its only member (the firm becomes read-only and closes 14 days later unless the user cancels; then all firm data is deleted in one transaction and files are removed from storage), or is blocked if they are the last admin of a firm that has other members. Audit entries keep the user id only.
3. **Requests from a firm's clients.** Requests about firm data from a firm's own clients are forwarded to the firm, which controls that data.

The daily purge applies the retention periods below. The schedule matches the draft data retention policy.

| Data | Kept | Then |
|---|---|---|
| Firm content (clients, matters, case profiles, forms, accepted intakes) | While the firm's account is open | Deleted when the firm closes |
| Intake sessions never sent to the firm | 30 days | Deleted |
| Intake sessions sent but not accepted | 180 days | Deleted |
| Demo requests, Academy notify-me addresses, deletion requests | 24 months | Deleted |
| Expired sessions and verification tokens | 30 days after expiry | Deleted |
| Rate-limit counters | A day after their window | Deleted |
| Handled billing webhook event ids | 30 days | Deleted |
| Security events | 1 year | Deleted |
| Generated USCIS forms | Never stored | Not applicable |
| Audit log | Life of the firm today; proposed life of the firm plus 1 year | Deletion after a firm closes needs a closed-firm date, a follow-up item |
| Database restore history | The Neon restore window for the plan | Ages out |
| AI provider copies | Anthropic's standard API retention applies today; zero data retention is being put in place and is not confirmed | See the AI policy |

Per-firm retention settings are not available yet.

## Current implementation

| Control | State |
|---|---|
| HTTPS everywhere, HSTS with a two-year max-age | In place; `includeSubDomains` and `preload` pending |
| TLS on database connections and vendor calls | In place |
| Provider-managed AES-256 at rest (Neon; S3) | In place for the database. Not applicable to files yet: document upload is not live and no production bucket exists; when it goes live, SSE-AES256 will be requested on every S3 upload and copy |
| AES-256-GCM sealing of restricted identifiers | In place |
| Key ring and `pnpm secrets:reseal` rotation | In place; first production rotation pending |
| Row-level security, no staff access to firms | In place |
| Audit log and security events (append-only) | In place |
| Uptime alerts | In place since 2026-10-26 |
| Alerts on logs; one-year log drain | Not yet; planned |
| Weekly alert review and quarterly access review | Proposed |
| Neon continuous point-in-time restore | In place; window depends on plan, at least 7 days targeted |
| Quarterly restore drill | First run passed 2026-10-27; quarterly |
| Proposed RPO 5 minutes and RTO 4 hours | Proposed |
| Daily retention purge | In place |
| Self-service account and firm deletion | In place |
| Written confirmation of deletion on request | Policy commitment; handled by hand by the owner |
| Strictly necessary cookies only, except Google Analytics on the marketing pages, set only with consent; no advertising cookies | In place |
| 72-hour breach notification | Contractual for customers who sign the counsel-reviewed DPA (2026-10-26); policy for others |
| Customer DPA template | In place: counsel-reviewed, version 1.1 (changes approved 2026-10-29), signed on request |
| Firm data export (JSON and CSV) | In place |
| ZIP of uploaded documents in the firm data export | Not live: added when document upload goes live |
| Per-firm retention settings | Not yet; no date committed |

## Exceptions

An exception must be requested in writing to the owner, with the risk, compensating controls and an end date, and is recorded in Vanta and reviewed quarterly. No exception to this policy is approved today. A legal hold requested by a firm or counsel is handled by the owner, who pauses the daily purge until the held data is copied out and records it; there is no per-firm pause yet.

## Enforcement

Breaking this policy may lead to loss of access and, for employees and contractors, disciplinary action up to termination. Suspected violations are handled as security incidents.

## Review

The owner reviews this policy at least once a year, after any incident, and when a subprocessor, retention period or cookie changes, and records the review in Vanta. Next review due: 2027-10-26.

## Related documents

- [Privacy Policy](https://deloralegal.com/privacy) (counsel-reviewed public notice)
- [Subprocessor list](https://deloralegal.com/subprocessors) (counsel-reviewed public notice)
- [Trust Center](https://deloralegal.com/trust)
- [Encryption and key management policy (draft)](../../soc2/policies/encryption.md)
- [Data classification, retention and disposal policy (draft)](../../soc2/policies/data-retention.md)
- [Privacy policy, internal program (draft)](../../soc2/policies/privacy.md)
- [Business continuity and disaster recovery policy (draft)](../../soc2/policies/business-continuity.md)
- [Incident response policy (draft)](../../soc2/policies/incident-response.md)
- [Logging and monitoring policy (draft)](../../soc2/policies/logging-monitoring.md)
- [Vendor and subprocessor management policy (draft)](../../soc2/policies/vendor-management.md)
- [Product and application security policy](01-product-and-app-security.md)
- [AI governance policy](03-ai-overview-and-governance.md)
