1. compliance
prorm
  • prorm documentation
  • Known test gaps
  • Architecture
  • Core concepts
  • Database types & coverage
  • Getting started
  • Going further
  • compliance
    • Compliance
    • The security toolkit: `prorm audit`
    • Checklists by regulation
    • Declaring personal data
    • Evidence bundles
    • Evidence
    • Frameworks: `@Security`
    • Jurisdictions
    • Platform policies
    • Protecting data
    • The regulation dataset
    • Residency and cross-border transfers
    • Retention & integrity
    • Status
    • Subject rights
  • decorators
    • prorm with decorators
    • Models with decorators
    • Querying a decorated model
    • Relations with decorators
  • diagrams
    • Diagram generators
    • Chen diagram
    • Class diagram
    • Dependency diagram
    • ER diagram
    • Flow diagram
    • From your models to a diagram
    • Gantt diagram
    • Index diagram
    • Migration diagram
    • Model diagram
    • Package diagram
    • Crow’s-foot diagram
    • Schema documentation
    • Sequence diagram
    • State diagram
    • Tree diagram
  • dialects
    • SQL dialects
    • AlloyDB Dialect
    • AlloyDB Omni Dialect
    • Amazon Athena Dialect
    • Aurora DSQL Dialect
    • Amazon Aurora MySQL Dialect
    • Amazon Aurora PostgreSQL Dialect
    • Azure Database for MySQL Dialect
    • Azure Database for PostgreSQL Dialect
    • Azure SQL Database Dialect
    • Azure SQL Managed Instance Dialect
    • Google BigQuery Dialect
    • Citus Dialect
    • ClickHouse dialect
    • Cloud Authentication (`cloud-auth`)
    • Cloud SQL for SQL Server Dialect
    • Cloud SQL for MySQL Dialect
    • Cloud SQL for PostgreSQL Dialect
    • CockroachDB Dialect
    • Azure Cosmos DB for PostgreSQL Dialect
    • CrateDB Dialect
    • Cloudflare D1 Dialect
    • Databricks dialect
    • IBM Db2 Dialect
    • Dolt Dialect
    • Apache Doris Dialect
    • Druid Dialect
    • DuckDB Dialect
    • Exasol dialect
    • Microsoft Fabric Data Warehouse Dialect
    • Firebird Dialect
    • Greenplum Dialect
    • SAP HANA Dialect
    • MySQL HeatWave Dialect
    • Azure Data Explorer (Kusto) Dialect — T-SQL
    • MariaDB Dialect
    • Materialize Dialect
    • MonetDB Dialect
    • MotherDuck Dialect
    • Microsoft SQL Server Dialect
    • MySQL Dialect
    • Neon Dialect
    • OceanBase Dialect
    • openGauss Dialect
    • Oracle Dialect
    • Oracle Autonomous Database Dialect
    • ParadeDB Dialect
    • PolarDB Dialect
    • PostgreSQL Dialect
    • Presto Dialect
    • QuestDB Dialect
    • Aurora RDS Data API Dialect (`rdsdata`)
    • Amazon RDS for Db2 Dialect
    • Amazon RDS for MariaDB Dialect
    • Amazon RDS for SQL Server Dialect
    • Amazon RDS for MySQL Dialect
    • Amazon RDS for Oracle Dialect
    • Amazon RDS for PostgreSQL Dialect
    • Amazon Redshift
    • Amazon Redshift Data API Dialect
    • RisingWave Dialect
    • rqlite Dialect
    • SingleStore Dialect
    • Snowflake Dialect
    • Google Cloud Spanner Dialect
    • Spanner (PostgreSQL interface) Dialect
    • SQLite Dialect
    • StarRocks Dialect
    • Supabase Dialect
    • Azure Synapse Analytics (dedicated SQL pool)
    • Teradata Dialect
    • TiDB Dialect
    • TimescaleDB Dialect
    • Trino Dialect
    • Turso / libSQL Dialect
    • Vertica dialect
    • Vitess Dialect
    • Yellowbrick Dialect
    • YugabyteDB Dialect
  • guides
    • Access rules and behaviour profiles
    • ArangoDB (AQL)
    • Associations
    • Audit levels and escalation
    • Audit logging
    • In the browser
    • Bulk operations
    • Caching
    • Capabilities, tiers and team roles
    • CLI
    • Cloudflare
    • Compliance & data protection
    • Connection Pooling & Performance
    • Security in the console
    • Couchbase: structured N1QL queries
    • Data types
    • Decorators
    • Eager loading
    • Enums and constants
    • Error handling & error types
    • Extensions
    • External fields
    • Foreign data wrappers
    • Graph databases
    • Hooks & lifecycle events
    • Indexes & constraints
    • InfluxDB: structured Flux pipelines
    • klock-errors
    • klock — the `.klock` file
    • Local databases (`prorm db up`)
    • Structured log search — Splunk, Graylog, Papertrail, Sumo Logic
    • Logging
    • Grafana Loki: structured LogQL queries
    • MCP server
    • Migrate — the data transfer subsystem
    • Migrations & Schema Sync
    • Models from an existing database
    • Defining models
    • Multiple databases
    • OrientDB, Neptune and TigerGraph
    • Passwords
    • Importing a Prisma schema
    • Structured PromQL and MetricsQL
    • Query firewall
    • QueryInterface
    • Query operators reference
    • Query optimization
    • Composing find options with `pipe()` and `Q`
    • Query safety: the fail-closed WHERE guard
    • Querying
    • Raw Queries & Query Building
    • Read replicas
    • Schema diffing & migration generation
    • Views, triggers & other schema objects
    • Scopes & default scopes
    • Seeders
    • SPARQL / RDF triplestores
    • SQL constants
    • SQL features
    • SQL function builders
    • SQLite advanced features
    • StoreKey — a prod-orm database as the storage
    • Streaming results
    • Terraform
    • Transactions & Isolation Levels
    • Type mapping: legacy and modern
    • TypeScript types
    • Database users, roles & privileges
    • Validation & constraints
    • Virtual & Computed Fields
    • Writing docs
  • javascript
    • prorm in JavaScript
    • Models in JavaScript
    • Querying in JavaScript
    • Relations in JavaScript
  • runbooks
    • Operational runbooks
    • Connection failures
    • Credential rotation
    • Failover
    • Incident checklist
    • Deploying klock v2
    • Migration rollback
  • running-databases
    • Running databases in Docker
    • Running prorm under Bun in Docker
    • Running Cassandra in Docker with prorm
    • Running ClickHouse in Docker with prorm
    • Running CockroachDB in Docker with prorm
    • Running prorm under Deno in Docker
    • Running Elasticsearch in Docker with prorm
    • Running MariaDB in Docker with prorm
    • Running MongoDB in Docker with prorm
  • prorm control plane
    • Introduction
    • Authentication
    • Errors
    • Getting started
      • Service
        • Is it up
        • This description
    • Account
      • Sign-up and verification
        • Create an account
        • Exchange credentials for a token
        • Verify with the emailed code
        • Verify by clicking the emailed link
        • Name the parent or guardian
        • What a consent link is about
        • Give consent for a child's account
        • Ask the parent or guardian again
        • Send a new code and link
      • Family
        • Everyone this account is responsible for
        • One child, in detail
        • Turn a limit on or off
      • Profile
        • Who am I
        • Change the account
        • Every address on the account
        • Add an address
        • Confirm an address with the code mailed to it
        • Mail a fresh code to an unconfirmed address
        • Make an address primary
        • Remove an address
        • What this caller may do
    • Security
      • Sessions
        • Everywhere this account is signed in
        • Sign out everywhere else
        • Sign one out
        • A token for the CLI on a named machine
        • A token for the customer console, from the staff one
        • Park a sign-in for the CLI to collect
        • The CLI collecting its sign-in
        • The team's members' live sessions
        • Sign a member's session out
        • Sign an account out everywhere
        • Everywhere the account is signed in
        • Sign an account's session out
      • Single sign-on
        • Begin a single sign-on
        • The provider's return
        • Link the signed-in account to a team's provider
        • Which team an address signs in to
        • The team's single sign-on, as a member sees it
        • Set the team's OpenID Connect provider up, or change it
        • Remove the provider
        • The team's domain claims and the DNS record each needs
        • Prove a claimed domain
      • MFA and passwords
        • Start enrolling a second factor
        • Prove the app has it
        • Remove the second factor
        • Ask for a reset link
        • Set a new password with the emailed token
      • Klock
        • Open a device-bound klock session
        • Check in, for the next grant
        • Step up the session asking
        • Rotate the device key
        • Freeze a session
        • Unfreeze a session
        • A guest grant
        • The revocation feed
        • The published keyset
        • What this control plane supports
      • Devices
        • Your devices, or a team's
        • Approve a new device's pairing code
        • One device
        • Rename a device
        • Revoke a device
        • Suspend a device
        • Reinstate a suspended device
        • Wipe a device
        • Ask a device to rotate its key
        • The team's members' devices
        • Revoke a member's device
        • An account's devices
        • Revoke an account's device
        • Wipe an account's device
        • The device fleet
      • Access rules and behaviour
        • The access rules that bear on you
        • Add an access rule
        • This request, as the rules see it
        • One access rule
        • Remove an access rule
        • The behaviour profiles that bear on you
        • Add or change a behaviour profile
        • The profile presets
        • Your behaviour findings
        • Acknowledge a finding
        • One behaviour profile
        • Remove a behaviour profile
        • The team's access rules
        • Add a team access rule
        • Remove a team access rule
        • The team's behaviour profiles
        • Add or change a team behaviour profile
        • Remove a team behaviour profile
        • What the team's profiles caught
        • Acknowledge a team finding
      • Recovery and lockdown
        • Ask for a recovery link
        • Recover access with the emailed code
        • Is the account locked down
        • Lock the account down
        • Release a lockdown
        • Lock a member down
        • Release a member's lockdown
      • MCP tokens
        • Make a delegated token for one MCP client
        • The account's delegated tokens
        • Revoke a delegated token
        • What a delegated token may do now
        • Run one MCP tool with a delegated token
        • Run a device-signed MCP tool call relayed by the MCP Worker
      • Kerberos
        • Give the team its own Kerberos realm
        • The team's realm
        • Remove the team's realm
    • Logging and monitoring
      • Audit log
        • What has been done to the account
        • What has happened to this account
        • The account's audit trail
      • Operations
        • Everything that has been asked of this database
        • One, with its steps
        • Stop it
        • Put a failed one back in the queue
        • Every operation, across all accounts
      • Metrics and events
        • Every measurement, for a graph
        • Who did what to it
    • Billing
      • Plans and pricing
        • What the plans allow
        • The rate card
        • What one database would cost
        • What this account is paying for, itemised
      • Subscriptions and invoices
        • What this month's invoice will say
        • What this account is on
        • What it has been charged
        • Start a Stripe Checkout session
        • Open the customer portal
        • Stripe's events
        • Buy more connection pools
      • Team billing
        • The team's billing account
        • What the team has been charged
        • What this month's invoice will say
        • The team's cards
        • Add a card, through a Stripe-hosted setup session
        • Make a card the team's default
        • Remove a card
        • Start the team paying
        • Open the Stripe portal on the team's customer
        • Change the team's plan
        • Who receives the team's bills
        • How the team pays for transfers
    • Support
      • Support chat
        • My conversations
        • Start a conversation
        • Every support conversation, open first
        • A ticket for the socket
        • One conversation, with who is in it and who is connected
        • Rename a group; open or close a support conversation
        • The lines, oldest first
        • Say something
        • Add somebody
        • Mark read
    • Administration
      • Users
        • Every account
        • One account, with everything hanging off it
        • Grant or revoke admin
        • Verify an account by hand
        • Lock or unlock sign-in
        • Allow or hold provisioning
        • Send the verification mail again
        • Set the plan by hand
      • Platform
        • Every database and store, across all accounts
        • The counts worth putting on a dashboard
      • Staff and permissions
        • What kind of admin the caller is, and which scopes they hold
        • The admin presets
        • Every admin, and the scopes each resolves to
        • Make an account an admin of a kind
        • Change an admin's kind, or a custom admin's scopes
        • Revoke admin
      • Team administration
        • Every team, with its owner and size
        • One team in full — members with their accounts, and projects
        • Hand the team to another member
        • Put an account in the team, active at once
        • Change a member's role
        • Remove a member
      • Assumed identities
        • Assume an identity — act as a customer account
        • The identities the caller holds open
        • End an assumed identity
      • Support inbox
        • The platform's addresses
        • Add a platform address
        • One address, with its counts
        • Change an address's label, routing, or whether it accepts mail
        • Remove an address that holds no mail
        • Make, adopt or repair the address's routing rule
        • Every admin's personal address, made where missing
        • File a raw message, as if it had arrived
        • The inbox
        • One message, whole
        • Mark a message
        • Hand a message to an admin, or take it back
        • Leave an internal note
        • Reply, from the address the message came to
        • What is waiting
    • Databases
      • Databases
        • Data stores
          • Every data store on the account
          • Provision a data store
          • Change a data store that is already running
          • One data store
          • Deprovision it
          • Report what it is using
          • How to reach a data store
        • Connections and credentials
          • The api keys on a database
          • Issue a key
          • Revoke a key
          • The engine users we created
          • Create a user inside the database
          • Give a user a new password
          • Drop a user
          • How the database is reached
          • Set how it is reached
          • Revoke every api key on it
          • How to connect to it
          • The ssh keys that open its bastion
          • Add a key, or have one made
          • The private half of a generated key, once
          • Revoke an ssh key
        • Schema and objects
          • The SQL objects we put in it
          • Create one, and apply it
          • What is in the database, as the engine reports it
          • One table
          • What it would run, without running it
          • Redefine an object in place
          • Drop it
          • The extensions installed in it
        • Migrations
          • A plan compiled to statements, recording nothing
          • The migrations recorded for it
          • Record one
          • Apply everything recorded and not yet run
          • Apply everything pending, oldest version first
        • Lifecycle
          • Grow or shrink it
          • Stop it accepting connections
          • Start it again
          • Move it to another region
        • Backups and replicas
          • Take a backup
          • The backups it has
          • Restore one into it
          • What has been restored into it, and from where
          • Its read copies
          • Add one
        • Policies
          • The catalog
          • One policy
          • What this database is held to
          • Switch a policy on, or change its knobs
          • Switch it off
          • Mark the policies reviewed
          • Evaluate the periodic policies now
          • Who is behind a credential
        • Passwordless
          • The database's passwordless sessions
          • Issue a passwordless session (v1)
          • Revoke a passwordless session
          • Bind a session to a device key
          • Issue a v2 session for a host to bind
          • Redeem an enrolment ticket on the host
          • Check a passwordless credential
          • Run one described query under a passwordless credential
        • Database roles
          • The database's roles
          • Define a role
          • One role
          • Change what a role permits
          • Delete a role, and revoke every key granted it
          • Grant a role, which mints a key
          • Who holds a role
          • The api keys bound to a role
        • Pools
          • A database's connection pools, and how busy each is
          • Open another pool
          • Rename a pool or change its size
          • Close a pool
        • Data plane
          • Run a query against a database
          • Several statements, in order, over one connection
          • Is this database answering
          • What the proxy itself is holding
        • Transfers
          • The strategies this account's tier may use
          • Price a transfer without creating it
          • The account's transfer jobs, newest first
          • Create a transfer job
          • One job, and whether its certificate holds
          • Cancel an unfinished job
          • Start a created job, confirming its price
          • Report a job's status (the runner, or the owner's side of a local run)
        • Every database on the account
        • Provision a database
        • Change a database that is already running
        • One database
        • Deprovision it
        • Read or write it
        • Report what it is using
        • The engines this API will provision
        • Where a managed database can be put
    • Teams
      • Teams
        • Members
          • Who is on it
          • Invite somebody
          • Accept an invitation
          • Change somebody's role
          • Remove somebody
        • Projects
          • The projects a team runs
          • Start one
          • Rename a project, or move its environment
          • Delete a project
          • One project, and what is in it
          • Put a database or store in it
          • What is in a project
          • Take one out
        • The teams this account is on
        • Start one
        • The twelve roles, and what each may do
        • Rename a team
        • Close a team
        • One team
        • Hand the team to somebody else
        • Leave a team
    • Schemas
      • Error
      • ValidationErrors
      • Token
      • PolicyCategory
      • PolicySeverity
      • PolicyAction
      • PolicyTrigger
      • PolicyParam
      • Policy
      • PolicyCatalog
      • PolicyAssignment
      • PolicyOutcome
      • PolicyFiring
      • CredentialTrace
      • Relation
      • Restrictions
      • ChildSummary
      • SignupRequest
      • SigninRequest
      • UpdateMeRequest
      • User
      • Address
      • GeoPoint
      • D1Region
      • Usage
      • UsageReport
      • Resource
      • Database
      • DataStore
      • NewDatabase
      • NewDataStore
      • QueryRequest
      • DatabasePrivilege
      • ApiKey
      • DbUser
      • Access
      • AccessRequest
      • DatabaseObject
      • NewDatabaseObject
      • NewMigration
      • SchemaOperation
      • Migration
      • Operation
      • Session
      • AdminPowers
      • Admin
      • AuditEntry
      • TeamRole
      • Conversation
      • ChatMessage
      • TeamSso
      • Team
      • TeamMember
      • SshKey
      • ConnectionInfo
      • InboxAddress
      • InboxMailbox
      • InboxMessageSummary
      • InboxMessage
      • InboxNote
      • Page
      • Quote
      • Plan
      • ApiError
      • CapabilityRefusal
      • KlockErrorCode
      • PageWindow
      • SessionView
      • KlockStepUpRequest
      • KlockOpenRequest
      • KlockOpenedSession
      • UpdateMeResult
      • CapabilitiesView
      • SessionLimits
      • Device
      • DeviceListed
      • DeviceTeamRef
      • DeviceCommand
      • DeviceAuditLine
      • DeviceActionRequest
      • StaffActionRequest
      • ManagedSession
      • SessionRevoked
      • AccessRule
      • AccessRuleRequest
      • BehaviourProfile
      • BehaviourProfileRequest
      • BehaviourProfileSaved
      • BehaviourFinding
      • BehaviourFindingAck
      • StepUpProof
      • Removed
      • MemberLockdownRequest
      • McpClient
      • McpDelegatedView
      • McpToolCall
      • McpForwardRequest
      • PasswordlessScope
      • RoleScope
      • PasswordlessSession
      • PasswordlessTlsMaterial
      • PasswordlessKerberosMaterial
      • ServiceDeviceKeys
      • ServiceSession
      • DatabaseRole
      • TransferEndpoint
      • TransferJobRequest
      • TransferQuote
      • TransferStrategy
      • TransferJob
      • TransferJobAccess
      • Pool
      • PoolAllowance
      • BillingSubscription
      • Invoice
      • BillingContact
      • PaymentMethod
      • UpcomingCharges
      • TeamBilling
      • TeamKerberosRealm
      • TeamSsoDomain
      • TeamSsoResponse
      • StoreConnection
      • BatchFailure
      • ProxyStatus
  1. compliance

Platform policies

Everything on the previous pages runs inside your process. The managed
platform at prod-orm.io sits outside it — at the data plane every client
authenticates through, with the credentials, the backups and the region under
its control — and can therefore do things a library cannot: notice that a
credential is being guessed at from one address and rotate it, revoke a key
that has been used from a country it never was before, pause a database that
has left its jurisdiction.

Those responses are policies: 150 of them, each a sentence of the form
when this is observed, do that. You switch them on per database, tune the
numbers, and the platform enforces them while you sleep. This page is about
what they are, how they fit the checklists, and the one question they were
built to answer — who logged in?

The shape of a policy

{
  "id": "auth.failed.standard.rotate",
  "name": "Failed logins (standard): rotate the credentials",
  "category": "authentication",
  "severity": "critical",
  "description": "10 refused credentials within 5 minutes. The engine credentials are rotated — every client holding the old ones stops working until it is given the new ones — and the owner is told. …",
  "trigger": { "kind": "threshold", "on": "auth.failed", "count": 10, "withinMinutes": 5 },
  "actions": ["rotate-credentials", "notify-owner"],
  "params": {
    "count":         { "type": "integer", "default": 10, "min": 1, "max": 100000, "description": "How many occurrences before the policy fires" },
    "withinMinutes": { "type": "integer", "default": 5,  "min": 1, "max": 43200,  "description": "The window, in minutes" }
  },
  "cooldownMinutes": 5,
  "frameworks": ["SOC 2 CC6.1", "NIST 800-53 AC-7"]
}

The vocabulary is closed on both ends, on purpose. A policy can only name a
signal the platform actually emits and an action it actually implements, so
every one of the 150 is a control, not a promise.

Triggers — six kinds:

KindFires whenEvaluated
thresholdN events of a type within W minutes — grouped by address for the block-ip family, by key for the revoke-key familyas each event arrives
eventevery occurrence of an eventas it arrives
metrica reading crosses a line: usedPercent, cpu, memory, connections, requestsPerMinute, errorRate, monthlyCentsby the sweep
agesomething is older than N days: the last backup, the credentials, the oldest key, the last use, the last owner sign-in, the last policy reviewby the sweep
everya schedule, in daysby the sweep
statea fact about the database now: no ip allowlist, a key without expiry, the owner has no MFA, outside its region…by the sweep

Actions — fifteen, each doing only what a signed-in owner could do by
hand: rotate-credentials, revoke-key, revoke-all-keys,
revoke-idle-keys, expire-keys, block-ip, pause, resume, backup,
restrict-readonly, lock-provisioning, revoke-owner-sessions,
notify-owner, notify-admins, record. Actions run in order; each
outcome is recorded whether or not the previous one succeeded; notifications
come last so they can say what was done.

Cooldown stops a sustained condition rotating credentials every second.
Params are the knobs an assignment may turn — nothing else is accepted.

sequenceDiagram
  participant C as client with a guessed password
  participant DP as data plane
  participant P as policy engine
  participant O as owner
  C->>DP: authenticate (refused)
  DP->>P: auth.failed recorded in the events feed
  P->>P: every assigned policy on auth.failed: merge params over defaults
  P->>P: threshold: count auth.failed in the last withinMinutes
  alt below count, or inside the cooldown
    P-->>DP: nothing
  else threshold met
    P->>DP: rotate-credentials (queued as an operation)
    P->>O: notify-owner, naming what was done
    P->>DP: policy.fired with the reason and every outcome
  end

There is no retry. Each action is idempotent (revoke, block, downgrade) or
queued with an idempotency key, and the next event or sweep evaluates the
policy again.

Assigning

Switching on the policy above with a tighter threshold, three ways:

$ prorm policies show auth.failed.standard.rotate
$ prorm policies assign auth.failed.standard.rotate --db billing --param count=4,withinMinutes=5
✓ Failed logins (standard): rotate the credentials is on for billing: 4 × auth.failed in 5m → rotate-credentials, notify-owner
$ prorm policies assigned --db billing

--pause keeps an assignment without evaluating it; prorm policies unassign <id> switches it off. prorm policies firings reads the
policy.fired events back.

$ curl -X PUT https://api.prod-orm.io/provision/databases/$DB_ID/policies/auth.failed.standard.rotate \
    -H "authorization: Bearer $PRORM_TOKEN" -H 'content-type: application/json' \
    -d '{ "params": { "count": 4, "withinMinutes": 5 }, "enabled": true }'

The answer is { "assignment": { … } }. A param the catalog does not
declare, or one outside its range, is a 400: colour is not a parameter,
count must be at least 1.

Open the database, then Policies. Find the policy in The catalog
(search takes soc 2, gdpr, backup), press Switch on, then set
count and withinMinutes on the assigned row and Save. Mark reviewed and
Check now sit above the list.

The routes in full:

GET    /policies                                    the catalog, grouped; ?category= ?severity= ?framework=soc%202 ?q=
GET    /policies/{policyId}

GET    /provision/databases/{id}/policies           what is on, and what is not
PUT    /provision/databases/{id}/policies/{policyId}   { "params": { "count": 4 }, "enabled": true }
DELETE /provision/databases/{id}/policies/{policyId}
POST   /provision/databases/{id}/policies/review    "I have looked at these" — the quarterly-review clock
POST   /provision/databases/{id}/policies/check     evaluate the periodic ones now
GET    /provision/databases/{id}/policies/trace?credential=prk_…   who is behind a credential

Every firing is written to the database's events feed as policy.fired, with
the reason and every action's outcome — the evidence, in the place the rest
of the evidence already is.

The watermark

Every api key is prefix.secret. The prefix is the watermark: it is what
appears in the engine's logs, in every auth.* event, in a leaked config
file — the half that is safe to write down. Given a whole key or just its
prefix, the trace names the person:

{
  "prefix": "prk_3f9a1c2e",
  "key": { "name": "billing-worker", "privilege": "readwrite", "createdAt": "…", "lastUsedAt": "…", "revokedAt": null, "live": true },
  "issuedTo": { "username": "ada", "email": "ada@example.com" },
  "addresses": [
    { "ip": "203.0.113.9", "first": "…", "last": "…", "count": 1412 },
    { "ip": "198.51.100.4", "first": "…", "last": "…", "count": 3 }
  ],
  "recent": [ /* the last fifty auth and query events for this key */ ]
}

That is the answer to "an authenticated device had access — who was it?":
the account that was issued the key, and every address it has been used
from. A prefix that belongs to no key on that database is a 404, not a lead;
only the prefix is used and only the prefix is echoed back.

The catalog

authentication (27)

PolicyWhenDoes
auth.failed.strict.notify5 × auth.failed in 5 minnotify-owner, record
auth.failed.strict.block-ip5 × auth.failed in 5 minblock-ip, notify-owner
auth.failed.strict.rotate5 × auth.failed in 5 minrotate-credentials, notify-owner
auth.failed.strict.pause5 × auth.failed in 5 minpause, notify-owner, notify-admins
auth.failed.standard.notify10 × auth.failed in 5 minnotify-owner, record
auth.failed.standard.block-ip10 × auth.failed in 5 minblock-ip, notify-owner
auth.failed.standard.rotate10 × auth.failed in 5 minrotate-credentials, notify-owner
auth.failed.standard.pause10 × auth.failed in 5 minpause, notify-owner, notify-admins
auth.failed.lenient.notify25 × auth.failed in 15 minnotify-owner, record
auth.failed.lenient.block-ip25 × auth.failed in 15 minblock-ip, notify-owner
auth.failed.lenient.rotate25 × auth.failed in 15 minrotate-credentials, notify-owner
auth.failed.lenient.pause25 × auth.failed in 15 minpause, notify-owner, notify-admins
auth.failed.high-volume.notify100 × auth.failed in 60 minnotify-owner, record
auth.failed.high-volume.block-ip100 × auth.failed in 60 minblock-ip, notify-owner
auth.failed.high-volume.rotate100 × auth.failed in 60 minrotate-credentials, notify-owner
auth.failed.high-volume.pause100 × auth.failed in 60 minpause, notify-owner, notify-admins
auth.new-ip.notifyevery auth.new-ipnotify-owner
auth.new-country.notifyevery auth.new-countrynotify-owner
auth.new-country.revokeevery auth.new-countryrevoke-key, notify-owner
auth.revoked-key.presented3 × auth.revoked-key in 60 minblock-ip, notify-owner
auth.expired-key.presented5 × auth.expired-key in 1440 minnotify-owner
auth.readonly-write.repeated10 × auth.readonly-write in 60 minnotify-owner
auth.readonly-write.revoke25 × auth.readonly-write in 60 minrevoke-key, notify-owner
auth.owner-signin-failed10 × owner.signin-failed in 15 minrevoke-owner-sessions, restrict-readonly, notify-owner
auth.succeeded.new-key-first-useevery auth.succeedednotify-owner
auth.succeeded.burst1000 × auth.succeeded in 5 minnotify-owner
auth.failed.spray20 × auth.failed in 10 minblock-ip, notify-owner

credentials (18)

PolicyWhenDoes
credentials.rotate.30devery 30 drotate-credentials, notify-owner
credentials.rotate.60devery 60 drotate-credentials, notify-owner
credentials.rotate.90devery 90 drotate-credentials, notify-owner
credentials.rotate.180devery 180 drotate-credentials, notify-owner
credentials.key-age.30doldest-active-key > 30 drevoke-idle-keys, notify-owner
credentials.key-age.60doldest-active-key > 60 drevoke-idle-keys, notify-owner
credentials.key-age.90doldest-active-key > 90 drevoke-idle-keys, notify-owner
credentials.key-age.180doldest-active-key > 180 drevoke-idle-keys, notify-owner
credentials.key-age.365doldest-active-key > 365 drevoke-idle-keys, notify-owner
credentials.idle-key.14dlast-use > 14 drevoke-idle-keys, notify-owner
credentials.idle-key.30dlast-use > 30 drevoke-idle-keys, notify-owner
credentials.idle-key.60dlast-use > 60 drevoke-idle-keys, notify-owner
credentials.idle-key.90dlast-use > 90 drevoke-idle-keys, notify-owner
credentials.key-without-expirystate: key-without-expiryexpire-keys, notify-owner
credentials.owner-key-existsstate: has-owner-keyrestrict-readonly, notify-owner
credentials.key-created.notifyevery key.creatednotify-owner
credentials.role-privileged.notifyevery role.privilegednotify-owner
credentials.key-churn10 × key.created in 60 minnotify-owner

access (14)

PolicyWhenDoes
access.require-ip-allowliststate: no-ip-allowlistnotify-owner
access.require-verify-fullstate: ssl-not-verify-fullnotify-owner
access.allowlist-cleared.notifyevery access.ip-allowlist-clearednotify-owner, notify-admins
access.allowlist-cleared.revertevery access.ip-allowlist-clearedpause, notify-owner, notify-admins
access.changed.notifyevery access.changednotify-owner
access.role-created.notifyevery role.creatednotify-owner
access.role-churn5 × role.created in 60 minnotify-owner
access.bulk-read.bulk.notify1 × query.bulk-read in 1 minnotify-owner
access.bulk-read.very-large.notify1 × query.bulk-read in 1 minnotify-owner
access.bulk-read.exfiltration-scale.notify1 × query.bulk-read in 1 minnotify-owner
access.bulk-read.exfiltration-scale.revoke1 × query.bulk-read in 1 minrevoke-key, notify-owner, notify-admins
access.bulk-read.repeated5 × query.bulk-read in 60 minrestrict-readonly, notify-owner
access.blocked-queries.notify10 × query.blocked in 15 minnotify-owner
access.blocked-queries.revoke50 × query.blocked in 60 minrevoke-key, notify-owner

data-protection (17)

PolicyWhenDoes
data.storage.70pct.notifyusedPercent >= 70notify-owner
data.storage.80pct.notifyusedPercent >= 80notify-owner
data.storage.90pct.notifyusedPercent >= 90notify-owner
data.storage.95pct.notifyusedPercent >= 95notify-owner
data.storage.full.backupusedPercent >= 95backup, notify-owner
data.storage.over.pauseusedPercent >= 120backup, pause, notify-owner
data.backup-age.1dlast-backup > 1 dbackup, notify-owner
data.backup-age.7dlast-backup > 7 dbackup, notify-owner
data.backup-age.30dlast-backup > 30 dbackup, notify-owner
data.no-backup-everstate: no-backup-everbackup, notify-owner
data.dedicated-without-backupstate: dedicated-without-backupbackup, notify-owner
data.restore-test.90dlast-successful-restore-test > 90 dnotify-owner
data.backup-failed.notifyevery backup.failedbackup, notify-owner
data.backup-failed.repeated3 × backup.failed in 1440 minnotify-owner, notify-admins
data.restore-failed.notifyevery restore.failednotify-owner, notify-admins
data.replica-lag.notifyevery replica.laggingnotify-owner
data.moved.notifyevery resource.movednotify-owner, notify-admins

availability (17)

PolicyWhenDoes
availability.cpu.80pctcpu >= 80notify-owner
availability.memory.80pctmemory >= 80notify-owner
availability.cpu.90pctcpu >= 90notify-owner
availability.memory.90pctmemory >= 90notify-owner
availability.cpu.95pctcpu >= 95notify-owner
availability.memory.95pctmemory >= 95notify-owner
availability.connections.50connections >= 50notify-owner
availability.connections.100connections >= 100notify-owner
availability.connections.200connections >= 200notify-owner
availability.error-rate.5pcterrorRate >= 5notify-owner
availability.error-rate.25pcterrorRate >= 25notify-owner, notify-admins
availability.slow-queries20 × query.slow in 15 minnotify-owner
availability.paused.notifyevery resource.pausednotify-owner
availability.resumed.notifyevery resource.resumednotify-owner
availability.requests.10krequestsPerMinute >= 10000notify-owner
availability.requests.zerorequestsPerMinute <= 0notify-owner
availability.storage-mb.1024usedMb >= 1024notify-owner, record

operations (13)

PolicyWhenDoes
operations.idle.30d.notifylast-use > 30 dnotify-owner
operations.idle.60d.notifylast-use > 60 dnotify-owner
operations.idle.90d.notifylast-use > 90 dnotify-owner
operations.idle.180d.notifylast-use > 180 dnotify-owner
operations.idle.60d.pauselast-use > 60 dbackup, pause, notify-owner
operations.idle.90d.pauselast-use > 90 dbackup, pause, notify-owner
operations.idle.180d.pauselast-use > 180 dbackup, pause, notify-owner
operations.failed.notifyevery operation.failednotify-owner
operations.failed.repeated3 × operation.failed in 1440 minnotify-owner, notify-admins
operations.owner-absent.90dlast-owner-signin > 90 dnotify-owner, notify-admins
operations.owner-absent.365d.readonlylast-owner-signin > 365 drestrict-readonly, notify-owner, notify-admins
operations.require-replicastate: no-replicanotify-owner
compliance.rotation.backup-afterevery key.rotatedbackup

billing (5)

PolicyWhenDoes
billing.monthly.50monthlyCents >= 5000notify-owner
billing.monthly.100monthlyCents >= 10000notify-owner
billing.monthly.250monthlyCents >= 25000notify-owner
billing.monthly.500monthlyCents >= 50000notify-owner
billing.payment-failed.readonlyevery billing.payment-failedrestrict-readonly, notify-owner

change-management (12)

PolicyWhenDoes
change.schema.notifyevery schema.changednotify-owner
change.schema.backup-firstevery schema.changedbackup
change.schema.burst10 × schema.changed in 15 minnotify-owner
change.migration.applied.notifyevery migration.appliednotify-owner
change.migration.failed.notifyevery migration.failednotify-owner, notify-admins
change.resized.notifyevery resource.resizednotify-owner
change.rotated.notifyevery key.rotatednotify-owner
change.role-rotated.notifyevery role.rotatednotify-owner
change.stale-schema.180dlast-schema-change > 180 drecord
change.policy-review.90dlast-policy-review > 90 dnotify-owner
change.operation-cancelled.notifyevery operation.cancellednotify-owner
change.policy-fired.adminsevery policy.firednotify-admins

compliance (22)

PolicyWhenDoes
compliance.owner-without-mfastate: owner-without-mfanotify-owner
compliance.mfa-removed.readonlyevery owner.mfa-removedrevoke-owner-sessions, restrict-readonly, notify-owner, notify-admins
compliance.password-changed.notifyevery owner.password-changednotify-owner
compliance.residency.eustate: region-outsidepause, notify-owner, notify-admins
compliance.residency.usstate: region-outsidepause, notify-owner, notify-admins
compliance.residency.ukstate: region-outsidepause, notify-owner, notify-admins
compliance.residency.castate: region-outsidepause, notify-owner, notify-admins
compliance.residency.austate: region-outsidepause, notify-owner, notify-admins
compliance.residency.brstate: region-outsidepause, notify-owner, notify-admins
compliance.residency.instate: region-outsidepause, notify-owner, notify-admins
compliance.residency.jpstate: region-outsidepause, notify-owner, notify-admins
compliance.residency.sgstate: region-outsidepause, notify-owner, notify-admins
compliance.shared-tier-forbiddenstate: shared-tiernotify-owner
compliance.owner-is-childstate: owner-is-childrecord
compliance.breach-clock.72hlast-policy-review > 3 dnotify-owner, notify-admins
compliance.retention-purge.7devery 7 drecord, notify-owner
compliance.access-review.30devery 30 dnotify-owner
compliance.access-review.90devery 90 dnotify-owner
compliance.sheet.30devery 30 dnotify-owner
compliance.policies-never-reviewedstate: no-policies-reviewednotify-owner
compliance.restore.notifyevery restore.completednotify-owner, notify-admins
compliance.credentials-check.1devery 1 drecord

family (5)

PolicyWhenDoes
compliance.child-write.notifyevery child.write-attemptnotify-owner
compliance.child-write.repeated10 × child.write-attempt in 1440 minnotify-owner
family.child-owner-no-ip-allowliststate: no-ip-allowlistnotify-owner
family.child-key-created.notifyevery key.creatednotify-owner
family.child-idle.30dlast-use > 30 dnotify-owner

Children and families

The platform carries the parental side of the age gate
end to end, because a library cannot email a parent:

  • an account under 16 gives a date of birth, then a parent's email and
    username; the parent must already hold an account, and both must match
  • the child's verification waits on the parent's consent; the consent link
    expires in fourteen days and can be re-sent
  • the parent gets a Family view: every child's databases, stores, usage
    and estimated cost, with two switches — may they provision, may they sign in
  • every email to a child is copied to the parent, except the ones that carry
    a code or a link
  • a child's account cannot start billing
  • at 18 the account is released automatically, the relation kept for the
    record

And the family.* policies — a parent told when a child's account is
refused a restricted action, creates a key, or leaves a database idle.

A starting set

Switch on three, and tune from there:

PolicyWhy first
auth.failed.standard.rotatethe control the whole feature was built for
auth.new-country.notifythe cheapest signal that a key has travelled without its owner
data.backup-age.1dbecause everything else assumes there is a backup

Then the pair every auditor asks about: compliance.access-review.30d and
change.policy-review.90d.

[!WARNING]
A rotate-credentials action stops every client holding the old engine
credentials until it is given the new ones, the attacker's and your own
workers alike. Before switching on a *.rotate or *.pause policy, make
sure your deploys can pick up new credentials without a person, or start
with the *.notify variant of the same threshold. The
credential rotation runbook covers
the application side.

Next: Status — what is production-grade, and what is not.

Modified at 2026-10-04 00:40:16
Previous
Jurisdictions
Next
Protecting data
Built with