Documentation › The Platform

Security

The gateway checks what every call sends to a model and receives, for personal data, financial and identity numbers, special categories, secrets, prompt injection and your own patterns. A gauge, alerts by e-mail and webhook, a data policy per node that flags, masks or blocks, and a line on every passport.

What it is#

Security answers one question about your calls: what kind of sensitive data goes to a model, and what comes back. OSPP's gateway checks every call at the moment it leaves for the model, and records how many of each kind of data it found. It records counts, never the data.

The check stores no text of its own. What OSPP stores of a call is a separate matter: the node's definition (model, parameters, system prompt, tool definitions) always, and the conversation and the answer only as Model Compare says. Text that must not be stored goes in the conversation, not in the system prompt.

Open it from the menu: Security.

What is checked#

The gateway looks at the text it sends to the model (the system prompt and the messages of the call, tool results included) and at the answer it receives.

BandKinds of data
Personal dataPerson names, postal addresses, e-mail addresses, phone numbers, dates of birth, public IP addresses
Financial and identity numbersPayment card numbers, IBANs, national identity numbers (US SSN, Dutch BSN, UK National Insurance number)
Special categoriesHealth, religion or belief, ethnic origin, political opinion, trade-union membership, sexual orientation, genetic or biometric data, criminal records
SecretsPrivate keys, cloud access keys, API tokens, signed session tokens, passwords and connection strings

Special categories are the data the GDPR protects most (article 9, and article 10 for criminal records). Their words count only when the same text also identifies a person: "diabetes" in an article about diabetes is a topic, "Anna de Vries has diabetes" is special-category data about a person.

Names are found after a greeting ("Dear Anna"), a title ("Mr Jansen"), a label ("Name:", "From:") or under a sign-off, and as a known first name followed by a surname ("Anna de Vries"). Addresses are found as a street with a house number and as postal codes of the Netherlands, the UK, Germany, France and the US. The word lists cover English, Dutch, German, French and Spanish.

A call's band is the most sensitive band found in what it sent and received. A call in which nothing was found is in the band "Nothing detected".

The detector uses patterns, checksums and a few context words. Card numbers must pass the Luhn check and IBANs the mod-97 check; a nine-digit number counts as a BSN only next to the word. Reserved addresses such as example.com and private IP ranges are left out. The same text always gives the same result, no second model sees your data, and the check costs nothing.

What it does not do#

A special-category word counts only near something that identifies a person, within about 300 characters, and never inside an e-mail address, a web address or code.

It is a floor, not a guarantee. A surname alone, a first name without context, names in capitals or in scripts other than Latin, health or belief described in words that are not on the lists, and an injection phrased in an unusual word order are not detected. "Nothing detected" does not mean "nothing there".

Prompt injection#

Text that tries to instruct the model can hide in data: a ticket that says "ignore the previous instructions", chat-template tokens, role lines, hidden characters. The gateway looks for it in the conversation only: the user, assistant and tool messages of the call. The system prompt instructs the model by design and is never counted.

A call with such text is counted on the Security page and raises an alert. Under Prompt injection, owners choose to flag it or to block the call; a blocked call fails with the reason before anything leaves.

The page#

  • The gauge shows the most sensitive band seen in the period, from least to most sensitive.
  • Data exposure shows the calls checked, the calls with sensitive data, the calls beyond a declared policy, and the calls per band.
  • Alerts list what needs a person: secrets in what a node's calls send or receive, calls beyond the declared policy, calls that were blocked, financial or identity numbers in a model's answers, a kind of data seen for the first time on a node, and nodes that process sensitive data without a policy.
  • Runs per day shows the checked calls by band.
  • Nodes lists every node with its highest band, its calls by band, its policy and the calls beyond it. A row opens the node: what was detected in what was sent and in the answers, where its calls go, and the latest calls with a finding, each with its passport.

Calls from before the check existed count as not checked, not as clean.

The data policy#

A data policy declares the most sensitive kind of data a node is meant to send to a model: nothing sensitive, up to personal data, up to financial and identity numbers, up to special categories, or anything. Owners declare one for the whole organisation and, where a node differs, one for that node. The policy also says what happens to more than that.

ModeWhat happens
Flag itThe call goes on. It is flagged on the page and its passport says it went beyond the policy.
Mask it in the inputsOn OSPP Cloud, the values are replaced by placeholders such as [iban 1] before the call goes to the model. The same value gets the same placeholder, so the model can still tell two people apart.
Block the model callA call that would carry more than the policy is refused before anything leaves. It fails with the reason: the kinds and counts, never the values.

Masking covers the calls OSPP signs for you, which are the calls through the endpoint on OSPP Cloud. Text values and numbers are masked; the names of fields are not. If a call cannot be masked, it does not start. Masking covers the conversation, not the system prompt or the tool definitions: sensitive values there are flagged, not masked; use block mode to stop them. On a Self-hosted installation the local proxy signs each call and seals its conversation to your gateway on your side, so OSPP cannot read it; those calls are checked and flagged by your own gateway, not masked. Use block mode when nothing beyond the policy may ever reach a model: it applies to every call, on Cloud and Self-hosted. With masking, the passport's inputs fingerprint is over what the model received, and with Model Compare on, the kept content is the masked text, as it was sent to the model.

Your own terms and patterns#

Add what only you know is sensitive: a customer number, a project name. Each entry has a name, a band, and a term or a pattern. A term matches the words as written, in any case. A pattern uses characters, \d, \w, \s, classes such as [A-Z0-9], . and the counts {6}, {2,4} and ?, for example CUS-\d{6}. Groups, alternation, * and + are not accepted, so a pattern can never slow the gateway down. A pattern is 2 to 200 characters and at most one part of it may vary in length ({2,4} or ?); a term is 3 to 120 characters. Your entries count like the built-in kinds: on the gauge, in the policy, in masking and blocking. At most 40.

Alerts by e-mail and webhook#

Under "Where alerts go", owners add up to five e-mail addresses and one https webhook. Alerts marked "act" and "look" are delivered once per kind, node and day. They carry kinds and counts, never a value.

The webhook receives a JSON body {"type": "ospp.security.alert", "organization_id", "alert": {kind, severity, version_id, runs, last_at, title, detail}, "url"}. Each delivery is signed: the header X-OSPP-Signature is sha256= followed by the HMAC-SHA256 of the body with your signing secret, which is shown once when you save a new address. "Send a test" delivers a test alert and says what each destination answered. E-mail delivery depends on the mail server of the OSPP installation; the page says when it is not switched on.

On the passport#

Every passport of a checked call carries the extension ospp.data-check: the detector version, how many model calls were checked, the policy and mode in force when it was issued, whether the call stayed within it, and whether values were masked in its inputs. The public passport page shows the same as one line. The passport never says what was found: the categories and counts stay in the usage records of your organisation, which the execution receipts hash, so they cannot be changed afterwards.

On a Self-hosted installation#

A Self-hosted gateway runs the same check on your own server, and its findings stay in that server's own database. The conversation and the answer it checks never reach OSPP in readable form when the call is made through the local proxy; the node's definition, system prompt and tool definitions included, is registered with OSPP. The installation's admin UI has the same Security page, read from those records: the gauge, the alerts, the nodes, the data policy, your own patterns, prompt injection and where alerts go. Alerts are delivered from your server. Flag and block are offered there; masking is not, because it happens where OSPP signs a call for you and a Self-hosted installation signs its own calls. E-mail alerts use the mail server you set in .env (OSPP_SMTP_HOST, OSPP_SMTP_PORT, OSPP_SMTP_USER, OSPP_SMTP_PASSWORD, OSPP_SMTP_FROM). An operator can switch the check off with OSPP_DATA_CHECK=0.

Notifications#

The bell in the top bar of the Platform and of the admin UI lists what needs a person: Security alerts that ask to act or look, calls that failed or are held, and a plan that is nearly used up. In the admin UI it also lists an available update, an integrity difference and the licence ending. Opening the bell marks what it shows as read, in this browser.

API#

GET /v1/security?days=30 returns the summary (7, 30 or 90 days); GET /v1/security/node?version_id=… one node; PUT /v1/security/policy with {"family_id": "", "accept": "personal", "mode": "mask"} declares a policy (family_id empty for the organisation, accept null to withdraw, mode observe, mask or block); GET and PUT /v1/security/settings read and set custom and alerts; POST /v1/security/alerts/test sends a test.