Bento docs
Compliance

Compliance readiness

What the backends already do for GDPR and a SOC 2 Type II audit, what remains, what other rules are coming, and the work that belongs to the company rather than the code.

Go and NestJS backendsTechnical-control self-assessment · 16 October 2026Not a compliance certification

Where it stands

These are project checklists of selected software controls, not a percentage of GDPR compliance or of the complete SOC 2 Trust Services Criteria. “Met” describes the tracked technical implementation. Product, hosting, organisational controls and operating evidence still require assessment.

GDPR

9 / 10 met

Nine tracked technical areas are implemented. Security of processing (Art. 32) still needs the selected deployment's backup, encryption and recovery evidence.

SOC 2

5 / 10 met

Five of ten selected software areas are implemented; five remain partial. Recent tests strengthen the evidence for monitoring, recovery and change management. Production and organisational evidence remains open.

What code can and cannot do

Neither GDPR compliance nor a SOC 2 report is a property of code. SOC 2 is an auditor's opinion on the design and operation of controls over a defined review period. GDPR also needs a lawful basis, a privacy notice, processing agreements with vendors and a record of processing. The backend provides technical controls and test evidence. The AICPA SOC resources describe the examination framework.

Already in place

  • Events, audit entries, logs and telemetry carry IDs, not emails or names. The telemetry contract forbids personal attributes.
  • Session, verification and reset tokens are stored as keyed hashes. The sign-in throttle is keyed by an HMAC of the email and does not reveal whether an address is registered.
  • Deleting an identity removes its credentials, sessions, email and display name. Closing a workspace leads to a purge after 30 days that reaches every module, including stored files.
  • Users can list and revoke their own sessions. A password reset revokes all of them. Sign-in supports TOTP MFA, recovery codes, passkeys, and Google/Apple/Microsoft OAuth flows.
  • Four ranked workspace roles give least privilege. Service-to-service calls are signed per service, and each capability declares its callers.
  • The transactional outbox and inbox give ordered, idempotent state changes, with retention jobs for every table that grows.
  • CI runs lint, module-boundary checks, unit and contract suites, migration/catalog parity, and configured Go/Nest browser and backend journeys. Split-deployment checks are optional for the modular-monolith v1 path. See Testing.

Recent evidence

The testing expansion adds evidence relevant to the areas below. These are technical improvements and test results; the tracked SOC checklist stays at five implemented and five partial areas until the missing deployment and operating controls are established.

AreaImprovement and evidenceStill required
CC7 monitoring and responseBehavioral tests cover all 32 alert rules. Selected Go/Nest live drills verify fresh scrape samples, firing/resolved notifications and an independent observer during telemetry loss.Production probe scheduling, external notification delivery, on-call ownership and reviewed incident records.
A1 recoveryPaired fault drills verify durable state, retry/replay and recovery deadlines. Restore drills cover encrypted logical backups, stored file objects, current erasure ledgers and audit exports in fresh disposable environments.Provider backups/PITR, key custody, representative data volumes, approved RTO/RPO and scheduled restore exercises on the actual deployment.
CC8 change managementThe 16 October full root checkpoint passed all 65 default gates. Frozen source manifests, ordered results, superseded failures and cleanup records make local results reviewable. See Testing.Required repository checks, reviewer approvals, release records, deployed revision tracking and rollback exercises.
CC6 / C1 access and data protectionRole and tenant matrices, module database-role checks, erasure/export recovery and redaction regressions cover selected paths. Private test fixtures are removed; published test statuses use field allowlists.Access reviews, production encryption and bucket immutability, data classification and an end-to-end review of remaining free-form logs and reports. Service assertions remain replayable until expiry.

Live results qualify the backend, scenario and source recorded in each run. They are separate from default CI and from evidence of controls operating in production over an audit period.

Backend roadmap

Open an item for what was built and where it lives.

1 · Before real EU user data

Core backend controls are present; deployment qualification and legal documents remain.
  1. Invitation email hygieneSDone

    The invitee's email is cleared when an invitation is accepted, revoked or expires, so it can no longer re-identify a deleted user. Settled invitations are deleted after 30 days.

  2. Stale upload and purge cleanupSDone

    Pending uploads older than 24 hours are deleted with their objects. A purged workspace's storage prefix is swept again after upload links expire.

  3. Personal data export (Art. 15, 20)M–LDone

    POST /v1/identities/me/exports needs a recent sign-in and allows one export a day. The Privacy module gathers records from every module through <module>.personal_data.v1 and writes one JSON bundle, served through a 5-minute link and deleted after 24 hours. Requests, downloads and failures are audited.

  4. Operator commands for data requestsS–MDone

    The server binary includes erase-identity, suspend-identity, unsuspend-identity, erase-invitee, export-identity and reapply-erasures. Each needs an operator name and a reason, and both are audited. The runbook is backend/PRIVACY.md.

  5. Production transport guardsSDone

    In production the server refuses to start unless PostgreSQL uses verify-full or verify-ca, NATS uses TLS with a token, SMTP requires TLS, and internal URLs use HTTPS. HSTS is sent on every response.

  6. Audit log retentionSDone

    audit.prune_entries deletes entries older than AUDIT_RETENTION_DAYS (default 400). Retention for every table is in the data inventory.

  7. Terms and privacy acceptance recordSDone

    Sign-up requires the current TERMS_VERSION and records the acceptance. The record survives identity deletion as proof.

  8. Personal data inventoryS–MDone

    contracts/privacy/inventory.yaml lists every personal-data column, event payload, stored object, mail and log, with its purpose, lawful basis, retention, erasure path and subprocessors. New modules must add to it.

  9. Erasure ledger for backup restoresMDone

    Every erasure writes an entry to S3, outside the database, holding only IDs or a keyed hash of the email. reapply-erasures --since repeats them after a restore. In production the bucket must use Object Lock.

2 · Before the SOC 2 observation window

Technical controls have broad coverage; release, operations, and organisational evidence remain.
  1. Trust and self-serviceLDone

    TOTP MFA with recovery codes, WebAuthn passkeys, OAuth sign-in, email change confirmed at the new address, password change that revokes other sessions, a 10-minute re-authentication window for sensitive actions, and security notice emails. Go/Nest and browser journeys cover the local flows; configure and verify real OAuth providers and callback origins before launch.

  2. Audit completenessMDone

    Audit records sign-out, session revocations, profile changes, throttle trips, MFA, email and password changes, re-authentication, operator actions and exports, each with the client IP. Behind the edge the IP arrives in a signed header.

  3. Tamper-evident audit logMDone

    Every entry is hash-chained over the previous one. An hourly job verifies the chain and raises a critical alert on a break. Entries are exported every 5 minutes to an S3 feed, whose bucket must use Object Lock in production, and the audit database role can only insert and read.

  4. Audit read and exportMDone

    Workspace owners and admins read their log at GET /v1/accounts/{id}/audit-log. Every user sees their own security activity at GET /v1/identities/me/security-activity. The S3 export feed can be connected to a selected SIEM.

  5. Security alertingSDone

    Alert rules cover sign-in and MFA failures, throttling, rate limiting, authorization denials, audit chain breaks and export lag. On-call routing is organisational.

  6. Database least privilegeMDone

    Each module connects as its own bento_rt_<schema> role, limited to its schema. Only the migrator changes schemas. Local development runs the same way.

  7. CI security gatesSDone

    Current workflows include HTTP breaking-change checks, Go vulnerability scanning, Nest dependency auditing, secret scanning, dependency updates, and Go/Nest CI. Confirm required checks and branch rules in the chosen repository before release.

  8. Session hardeningS–MDone

    A 72-hour idle timeout, session secret rotation, and a per-IP limit of 30 requests a minute on POST /v1/auth/*.

  9. Backups, point-in-time recovery, restore testsMInfrastructure

    Encrypted backup primitives and selected Go/Nest restore drills already exist, including object recovery and erasure-ledger replay. Provision provider backups/PITR, schedule those checks against the selected deployment, approve RTO/RPO, and connect external uptime checks. Disposable drills do not establish production disaster recovery.

3 · Later

Improves the posture; not needed to start.
  1. Seal the email in invitation mail eventsS

    The same sealed-token approach Identity already uses for its mail events.

  2. Explicit SSE-KMS on S3 writesS

    Set server-side encryption explicitly and check the bucket policy at startup.

  3. Breached-password check, argon2idS

    Part of the trust work.

  4. Field allowlist in the Nest loggerS

    Go's logger is safe by construction; Nest's is safe by convention.

  5. Billing obligations—

    Cancel the provider subscription on close, include billing contacts in export and erasure, and list the provider as a subprocessor.

  6. AI obligations—

    Zero-retention provider terms, no prompt logging, and a DPIA before launch.

GDPR requirements

RequirementStatusWhere it stands
Art. 5 storage limitationMetRetention jobs for every growing table, the 30-day workspace purge, pruning of settled invitations and stale uploads, and 400-day audit retention.
Art. 5 integrityMetTransactional outbox and inbox, version checks, idempotent consumers.
Art. 15, 20 access and portabilityMetSelf-service JSON export, plus an operator export for requests that arrive by email.
Art. 16 rectificationMetDisplay name, workspace name and email (verified at the new address) can be changed.
Art. 17 erasureMetSelf-service identity deletion, workspace purge across every module, operator erasure, and a ledger that survives a backup restore. Security logs with IPs are kept under legitimate interest, which the privacy notice must state.
Art. 18, 21 restriction and objectionMetOperators can suspend and unsuspend an identity, which revokes its sessions. There is no marketing or profiling.
Art. 25 privacy by designMetID-only events and audit, hashed tokens, no account enumeration, strict cookies.
Art. 30 record of processingMetA per-column inventory with lawful basis and retention. The written record itself is organisational.
Art. 32 security of processingPartialStrong application controls and TLS for every dependency in production. Encryption at rest relies on managed services, and backups are not provisioned.
Art. 33 breach detectionMetSecurity events with source IPs in a tamper-evident log, alert rules and audit read APIs. The 72-hour notification process is organisational.

SOC 2 criteria

AreaStatusWhere it stands
CC6 authenticationMetPassword authentication, throttling/backoff, TOTP MFA and recovery codes, passkeys, OAuth sign-in, and re-authentication for sensitive actions.
CC6 sessionsMetHashed tokens, 7-day lifetime, 72-hour idle timeout, list and revoke, secret rotation.
CC6 authorizationMetRanked roles. Closed and purged workspaces deny every permission.
CC6 service accessMetPer-service Ed25519 assertions with caller allowlists and key rotation.
CC6 production data accessPartialLeast-privilege database roles per module; operator actions audited. Break-glass and access reviews are organisational.
CC7 monitoringMetOpenTelemetry, dashboards, operational and security alert rules. On-call routing is organisational.
CC7 audit loggingPartialBroad event coverage, source IPs, hash-chain verification, S3 export, 400-day retention and read APIs. Production bucket immutability, access review and alert routing need deployment evidence.
CC8 change managementPartialCI includes contract, vulnerability and secret checks; local root runs retain ordered gate results and source manifests. A product still needs release records, enforced repository rules and deployment evidence.
A1 availabilityPartialHealth checks, durable replay, bounded recovery, alert and restore drills have selected Go/Nest evidence. Production backups/PITR, capacity, key custody, approved recovery objectives and recurring exercises remain deployment work.
C1 confidentialityPartialRetention documented, purge deletes files, short-lived download links. No data classification yet.

Beyond GDPR and SOC 2

Other topics to assess for a SaaS product with EU users, an AI module and billing. Scope and obligations depend on the product, role and jurisdiction; confirm current official requirements before relying on this list. HIPAA, ISO 27701 and ISO 42001 are left out until the product or a buyer calls for them.

A · Start now

Code work that builds on what Bento already has.
  1. EU AI Act transparency (Art. 50)SLaw

    Assess which AI Act roles and transparency requirements apply to the product and each AI feature. Bento stores task/run records and supports provider adapters; product UI disclosures, provider terms, user notices and any required AI-literacy or risk process need a product-specific review.

  2. EU Data Act: workspace export and switchingMLaw

    Assess whether the service falls within applicable cloud-switching and portability requirements. Bento currently provides a personal-data export; a product that needs workspace-level portability should define and verify an export format for members, files, audit history, Chat and AI records.

  3. Accessibility: WCAG 2.2 AAMLaw

    Review whether the product and target market are in scope, then assess the web and mobile interfaces against applicable accessibility requirements. Current UX/accessibility qualification remains product work; automated axe checks, theme contrast review, and keyboard and screen-reader journeys are useful next checks.

  4. US state privacy laws (CCPA/CPRA and others)SLaw

    The GDPR controls already cover access, deletion and correction. What remains is mostly the privacy notice, plus honouring the Global Privacy Control signal if analytics or advertising tracking is ever added. There is none today.

B · With the payment provider

Decide before anyone builds a checkout.
  1. PCI DSS scopeSStandard

    Keep card data out of Bento entirely by using the provider's hosted checkout or payment elements, which keeps the business at the lightest self-assessment, SAQ A. Record this constraint in backend/BILLING.md.

C · When enterprise buyers ask

Largely organisational; the code controls already exist.
  1. ISO 27001LStandardCustomer-driven

    Many EU buyers ask for ISO 27001 instead of SOC 2. The controls overlap heavily, so the evidence map in backend/SECURITY-CONTROLS.md carries over; the new work is a formal information security management system and a certification audit.

  2. Security questionnairesSCustomer-driven

    Keep a completed CSA CAIQ, or similar, ready to send. It takes hours once and saves weeks per deal.

  3. DORA and NIS2 obligationsMCustomer-driven

    These EU rules bind financial and critical-sector customers, who pass clauses on to suppliers: incident notification times, exit plans, audit rights and subcontractor lists. The incident response policy and the workspace export above cover most of it.

D · Hygiene

Cheap, and noticed by auditors and buyers.
  1. Vulnerability disclosure policy and security.txtSHygiene

    Publish how to report a vulnerability, and a /.well-known/security.txt on the product domain.

  2. Software bill of materialsSHygiene

    Generate an SBOM in CI for both backends and the frontends, next to govulncheck and npm audit. The EU Cyber Resilience Act mostly does not apply to pure SaaS, but buyers increasingly ask for one.

  3. Data residency and transfersSHygiene

    Record where each subprocessor stores data, relying on the EU–US Data Privacy Framework with standard contractual clauses as a fallback. Add a region setting once infra/deployments exists.

Outside the code

Needed for both GDPR and SOC 2, and owned by the company rather than the codebase.

Policies
  • Information security
  • Access control
  • Change management
  • Incident response, with the 72-hour breach clock
  • Business continuity and disaster recovery
  • Retention and disposal
  • Vendor management
  • Encryption and keys
Legal
  • Data processing agreement for customers
  • Public subprocessor list
  • Privacy notice (co-members can see member emails)
  • Terms of service
  • Transfer assessments for non-EU vendors
  • DPIA before the AI module ships
Operations
  • Data request runbook with a 30-day deadline
  • Quarterly access reviews
  • Onboarding and offboarding
  • Annual vendor reviews
  • Security training
  • Background checks
Assurance
  • Annual penetration test
  • Readiness assessment
  • Auditor selection
  • An evidence tool connected to GitHub, cloud, identity provider and HR

Evidence in the repository

backend/SECURITY-CONTROLS.mdEach SOC 2 control mapped to its evidence.
infra/testing/completion.mdSource-specific CI, domain, fault and recovery results with qualification limits.
infra/testing/restore/README.mdEncrypted database/object restore drills and erasure/audit recovery boundaries.
infra/testing/alerts-live/README.mdLive scrape, alert notification and recovery checks.
backend/V1-READINESS.mdDeployment inputs, provider readiness and recorded verification.
backend/PRIVACY.mdData request runbook and operator commands.
contracts/privacy/inventory.yamlEvery piece of personal data and its lifecycle.
contracts/audit/hash-chain.mdHow the audit chain is built and verified.
contracts/audit/export.mdThe audit export feed, for SIEM integration.