Platform

Security

How Trellaris keeps the credentials it holds β€” people's sessions, connector tokens, API keys, webhook secrets and your organisation's own secrets β€” and the standards each mechanism follows. The design decision behind all of it is recorded as ADR-041.

At a glance

CredentialWhere it livesHow it is protected
Your sign-in sessionA session record on the server, and an encrypted, HttpOnly cookie in your browser15-minute access tokens signed ES256; refresh tokens checked against the session, rotated on every use, with reuse detection; 30-minute idle and 12-hour absolute limits enforced by the server
Connector tokens (Google, Microsoft, ServiceNow…)The refresh token in the vault; the access token only in the cache, for its own lifetimeEnvelope-encrypted and bound to their owner; renewed on use; revoked at the provider when you disconnect
Your secrets and your organisation'sThe vaultEnvelope-encrypted; owned (personal, or org-level for admins); every read audited
API keysA SHA-256 hashShown once; scoped; expire (90 days by default, at most a year); carry a checksum
Webhook URLsA SHA-256 hash of the tokenShown once; rotatable; signing secrets encrypted in the vault
Platform keysAzure Key Vault in the cloudThe vault's key-encryption key never leaves Key Vault; the process refuses to start on development defaults

Sessions and tokens

However you sign in β€” company SSO, Google, GitHub β€” Trellaris opens a session on the server. The session record is the authority: tokens are only ever as valid as the session they belong to.

Access tokens

Refresh tokens

A refresh token is opaque and checked against its session on every use. Nothing replayable is stored: the token carries the session id, a generation number and an HMAC (RFC 2104) under a key held β€” encrypted β€” in the session record.

The browser never holds a platform token

The web app keeps the tokens in an encrypted Auth.js session cookie marked HttpOnly, Secure and SameSite=Lax (RFC 6265 and its successor draft), which page scripts cannot read. Every API call goes through the app's own /api route, which attaches the token on the server. A script injected into a page therefore has no token to steal. This is the backend-for-frontend pattern described in the IETF guidance on OAuth for browser-based applications.

The vault

Every credential Trellaris stores β€” in its own table or inside another component's configuration β€” is sealed and opened through one piece of code.

Envelope encryption

Bound to where it belongs

Every value is encrypted with associated data naming what it is for, which organisation it belongs to, and exactly where it is stored. A ciphertext copied into another row, another organisation or another purpose fails to decrypt instead of quietly opening as someone else's secret.

Rotation

Each value records which version of the key-encryption key wrapped it. After a rotation, new values use the new version while old ones still open, and a daily re-seal task re-wraps everything under the current version. The same task upgraded every value stored before this design. Administrators can see counts by purpose and key version β€” never values β€” at GET /secrets/inventory.

Who may touch a secret

KindWho manages itExample
PersonalIts owner onlyAn API token you use for an MCP server you registered; your passenger details for the Travel Desk
OrganisationOrg admins onlyA connector's OAuth client secret
Platform-managedNobody, through the API β€” only the component that owns itYour connector tokens; a remote agent's credentials

Connector tokens

Connectors act as the person who connected them, under a delegated OAuth 2.0 grant (RFC 6749) obtained with PKCE (RFC 7636) and sent to providers as a bearer token (RFC 6750).

API keys and webhooks

Refusing unsafe configuration

Every signing and encryption secret has a development default so the platform runs with no configuration on a laptop. Outside development those defaults would be published keys, so the API and the worker refuse to start without a token-signing key, with the default master key as the vault's key-encryption key, or with the default exchange secret β€” and say which setting is missing.

Standards referenced

StandardTitleHow Trellaris uses it
RFC 7519JSON Web Token (JWT)Access, agent and on-behalf-of tokens
RFC 7515JSON Web Signature (JWS)How those tokens are signed
RFC 7518JSON Web Algorithms (JWA)ES256 (Β§3.4) as the only accepted algorithm
RFC 7517JSON Web Key (JWK)The published key set at /.well-known/jwks.json
RFC 7638JWK ThumbprintEach signing key's kid
RFC 8725JWT Best Current PracticesA fixed algorithm, issuer and type checks, no shared-secret fallback
RFC 6749The OAuth 2.0 Authorization FrameworkConnector consent and renewal; the error codes (Β§5.2) that decide whether a failed renewal is final
RFC 7636Proof Key for Code Exchange (PKCE)Every connector consent flow
RFC 6750OAuth 2.0 Bearer Token UsageHow connector and platform tokens are presented
RFC 7009OAuth 2.0 Token RevocationRevoking a grant at the provider on disconnect or deprovisioning
RFC 9700Best Current Practice for OAuth 2.0 SecurityRefresh-token rotation with reuse detection (Β§4.14.2); serialised renewal for rotating providers
RFC 2104HMACRefresh-token integrity; webhook signatures (HMAC-SHA256)
RFC 5116An Interface for Authenticated EncryptionAES-256-GCM with associated data binding each value to its place
NIST SP 800-38DGalois/Counter Mode (GCM)The vault's authenticated encryption
RFC 8017PKCS #1 v2.2RSA-OAEP key wrapping in Key Vault
RFC 5869HKDFDeriving development-only keys, and the local key-encryption key when no keyring is configured
RFC 5958Asymmetric Key Packages (PKCS #8)The format of the token-signing private key
RFC 6265HTTP State Management (cookies)The HttpOnly, Secure session cookie (SameSite from its successor draft)
RFC 6797HTTP Strict Transport SecuritySent by the ingress in the cloud deployments
RFC 9457Problem Details for HTTP APIsEvery refusal, e.g. auth.session_ended, secret.forbidden
W3C CSP Level 3Content Security PolicyLimits on script sources, connections and framing
W3C Fetch MetadataFetch Metadata Request HeadersRefusing cross-site writes (Sec-Fetch-Site)
IETF draftOAuth 2.0 for Browser-Based ApplicationsThe backend-for-frontend pattern: no token in the browser
Where this sits with the rest Governance decides what an agent may do; this page is about how the credentials it does it with are kept. See Identity & tenancy for sign-in, SCIM and organisations, and Governance for DLP, approvals and audit.