Skip to content

Security

Who can see and change a map, the threat model, and the checklist.

Applies to EngineCloud
View as Markdown
On this page
  1. Who can see and change a map
  2. In Sypnia Cloud
  3. Threat model
  4. Checklist for self-hosting

Who can see and change a map

  • Membership and roles decide everything (roles). The API checks them on every request, and checks the role again inside the transaction of an approval. The server’s own Postgres role owns its tables; versions and the audit refuse every change and deletion by trigger.
  • Reviewers you invite see the plain level only: no table names, no code, no production data.
  • Links read each product as you. Cases never shows you a table, a trace or a commit you could not open in that product. In Sypnia Cloud, the Cases server and Sypnia Data’s control plane share a key, kept in AWS Systems Manager. Cases calls the control plane with it (Authorization: Service <key>) and the id of the person it verified, so every kind of session works, those bound to a key included. The control plane accepts such a call only on the routes Cases needs (who you are, the Data project, its link to the map, its schema and the SQL that reads deliveries), and still checks your role in that project. The control plane forwards a map uploaded to Data to its Cases map the same way. A server you run yourself presents your own token to the other product. A Telemetry read token you link to a map is kept encrypted (AES-256-GCM, with CASES_SECRET_KEY).
  • Tokens: a session bound to a key is accepted only with its DPoP proof, so a copied one is useless; a personal access token is checked with its issuer; a Cases project token (syp_cpt_…) works on one map, as an editor, and never approves. Project tokens are shown once and kept as a SHA-256 hash and their last 4 characters (API).
  • Rate limit: 600 requests a minute per credential by default (CASES_RATE_LIMIT), then 429 with Retry-After.

In Sypnia Cloud

A workspace is a Sypnia organization. The server reads your role from Sypnia (GET /v1/me of the control plane, on your behalf), keeps it for 60 seconds, and reads it again for every approval. Roles map like this:

Role in the organizationRole in Cases
ownerowner
adminapprover
developereditor
viewerreviewer (plain level, comments)

Members and their roles are managed in the organization; Cases only invites reviewers.

Threat model

ThreatWhat stops it
Someone approves beyond their rolethe role is checked inside the transaction that creates the version
An agent rewrites the scopeagents and project tokens can only open proposals; approval needs a person with the role
A leaked repository tokenencrypted with KMS, the least access the sync needs (one repository, contents only), revocable from Settings
Malicious text in a case (script, Markdown tricks)case text is data: never rendered as HTML, escaped in every export
A map reveals sensitive internalsthe plain level hides data and code; table names show only to members
History rewritten to hide a changeversions are insert-only, enforced by a trigger; the audit table records every action and refuses changes too
A request that skips CloudFrontwith CASES_ORIGIN_SECRET set, the server answers only requests that carry the shared header

Checklist for self-hosting

  • Put the server behind TLS; set CASES_PUBLIC_URL to the HTTPS address.
  • Use a dedicated Postgres role for the server, without superuser, that owns the database (the compose file does this).
  • Set CASES_SECRET_KEY (32 bytes) so tokens of other products are kept encrypted.
  • Point CASES_AUTH_ISSUER only at an issuer you control.
  • Give the repository token access to one repository’s contents only.
  1. Who can see and change a map
  2. In Sypnia Cloud
  3. Threat model
  4. Checklist for self-hosting

    Search pages, sections and terms