SHADE is young: 0.1.0-next.2 is a pre-release, and 0.1.0 isn't out yet.

SHADE
People, security and privacy

Errors and security alerts

SHADE keeps its own error log. When something goes wrong in the API, in a module, in a background job or in a visitor's browser on the site, the error is grouped with the same error from before, counted and kept with one example, on the client's own server. Next to it, a few rules watch what SHADE already records (sign-ins, tokens, modules, roles, refused actions, new errors) and email the admins when something needs a look.

What users can do

  • Admins read the Errors screen: every error group, with how often it happened and the latest example, and the security alerts the rules raised. They resolve a group once it is fixed; if the error happens again, the group opens again by itself. A group is an error or a warning: a warning is something that went wrong while the work around it went on (a module's live update that could not go out). Warnings are listed and counted, and the screen filters by level, but a warning never raises the new-error alert and never marks a module as needing attention; its health card counts them apart.
  • Admins switch alert rules on and off under Settings, in the Security alerts card. Every rule is on until someone switches it off; switching one off is emailed to every active admin, so nobody silences the alerts unseen.
  • Every active admin gets an email when a rule raises an alert, in their own admin language, at most once per rule per hour. Without email set up, alerts are only listed on the Errors screen.
  • Editors and AI users never see the error log or the alerts, and cannot switch rules.
  • A site can report its visitors' browser errors to the same log, if its developer turns that on (see On the website).
  • The admin reports a module's dashboard card, entry panel or settings section that failed on an editor's screen, under the module's name, with which part it was and the screen's address; never who was signed in (see Modules, Where modules appear). Its text comes from the editor's browser, so, like a site's errors, it is counted in the alert emails and never quoted, and it never mixes with the module's own server errors.

Who may do it

ActionPermissionRoles
Read the error log, the alerts and the alert ruleserrors.readadmin
Resolve or reopen an error grouperrors.manageadmin
See the failed deliverieserrors.readadmin
Send a failed delivery againerrors.manageadmin
Switch alert rules on or offerrors.manageadmin
Report a site errornone (from the Site URL's address only)the site
  • errors.read and errors.manage belong to admins only. They can never be part of a custom role, and AI assistants (MCP) can never use them.
  • An admin's automation token given errors.read may read the log, for a script. Resolving errors and switching alert rules (errors.manage) are never given to a token: only an admin signed in to the admin does that.

In the admin

Errors (Settings → Records, needs errors.read):

  • A table of error groups, last seen first, 50 per page: Last seen, Source (API, Module hook, Background job, Untrusted module, Site, or Module name for a module that could not load), Error (its name and message, the request's method and path, and Happened again for a resolved group that came back), Times and Last 14 days (small bars, one per day).
  • A search over the name and the message, and Filters beside it: Status (Open, Resolved, All; Open by default) and Source. A filter that is on shows under the search, where × takes it off.
  • The info button opens Details: first and last seen, how often, the source, Reported by (SHADE itself, or a browser: then the message is the browser's own text, or anyone's), the module and the hook or job it came from, the request's method, path and id, the SHADE version, and the stack.
  • Resolve (in the row and in Details) marks a group resolved, with Undo in the message; Reopen undoes it later. Both are in the audit log. A group that happened again after you opened the screen stays open, and the message says so: the new occurrence is never hidden.
  • Below, Failed deliveries: changes SHADE told its own parts about (an entry saved, published or deleted, heard by search, moved addresses and reviews) that did not get through after all their tries, newest first, 50 per page: Event (its name and what it is about), Subscriber (the part that did not get it, such as search.index), Tries, Last error and Gave up. Resend tries it once more, on the worker; it is in the audit log. An event no longer kept (after its retention) can't be sent again and says so. A feature's health card on the Modules page links here when its jobs gave up.
  • Below that, Security alerts: the latest alerts, newest first, each with its rule, how often it fired within its hour, whether the admins were emailed, when, and what it saw.

Settings → Security alerts (admins only): one switch per rule, each saved at once. A warning shows when email is not set up.

Background work is not running (every screen, every team member). Scheduled publish, retention, email retries, the security alerts themselves and the modules' schedules run in the instance's worker container, never in the admin's. When no worker container has answered for two minutes, a red message stays in the corner of every screen: Background work is not running: no worker container answers (Dutch: Achtergrondwerk draait niet: geen container met de containerrol worker antwoordt). Admins also see when the last heartbeat came in and from which worker container. It goes away within a minute once a worker runs again. The error log gets the same message once an hour while it lasts (source API, background work), so it is in the log even when nobody is signed in. On a development instance (everything in one process) it never shows. Whoever runs the instance starts the worker container: Setting up an instance: the template has one.

The alert rules

RuleRaised when
Many failed sign-insTen or more failed sign-ins within 15 minutes, for any accounts.
Repeated refusals for too many requestsThree or more addresses refused for too many requests within an hour.
A new API tokenSomeone created an API token.
A module installed or stoppedA module was installed, or an untrusted module was stopped over its limits.
A new admin or a role changeSomeone was created as an admin or made an active admin again, someone's role or custom role changed, or a custom role was created or changed.
A user was given a role that gives rolesA user was given a module's account role whose members may give roles themselves (such as a manager), by an admin or by another user. Taking a role away, or giving one that gives none, raises nothing.
Many refused actions by one accountOne account was refused 20 or more actions within an hour (in the admin, over the API or over MCP). A module acting as itself is no account and is not counted here: anyone on the internet can make its public routes try what it may not do.
Many refused actions by one moduleA module acting on its own (its background work, its routes for visitors and for anyone) was refused 10 or more actions within an hour: actions its consent did not give it. The alert names the module. A module that keeps trying is broken, or someone is pushing it.
Rules of a moduleA trusted module may bring alert rules of its own, listed here with its name once it is installed. Payments brings Payment webhooks are being refused: calls to its webhook named no Mollie payment, or one this site never started, in 5 or more minutes of the last 15 (Payments).
A module needs attentionA module has needed attention for 10 minutes: a process that stopped, a schedule whose last run failed, 10 or more errors in two hours, or its own check. Raised once per stretch; the alert says in plain words what is wrong and what to do, and never quotes the module's own note. See the module's health on the Modules page.
An outside service keeps failingSHADE has not called an outside service for 10 minutes in a row because it kept failing: a payment provider, email, storage, a webhook address or a host a module calls. Named by who calls it and its host, once per stretch. See Outside services on the Modules page.
A module needs attentionA switchable module was paused after repeated failures (the alert says why; resume it under Settings, Modules), or a module SHADE needs has kept failing for 10 minutes. See Site settings: a paused module.
A program approved or revokedAn admin approved one of the client's programs, which gives it a token of its own, or revoked one (Programs).
A new errorAn error that was not in the log before. What browsers reported is only counted, never quoted: a site's errors ("2 new browser errors") come from visitors' browsers, and modules' admin parts that failed ("2 new errors reported from the team's browsers") from editors'. A server error is quoted, without addresses or secrets, in at most 120 characters.
A usage limit is nearly or fully reachedOne of the limits whoever runs your server set (storage, the database, entries, team members, users, emails a day, queued jobs, API requests) reached 80% or 100%. Raised once per limit and level a day. See Settings, Usage.
Email to your own address is blockedA team member's address, or one a form sends its submissions to, was blocked after a bounce or a spam complaint. The alert names the team member or the form, never the address. Unblock it on the Email screen once the mailbox works (Email: bounces and complaints).

The rules are checked every minute. An alert takes in what follows within its hour (counted on the same alert, no new email); after the hour, the rule can raise a new one. A rule that fails is skipped for that minute without stopping the others, and an alert is emailed only once it is stored, so the same alert never goes out twice.

On the website

Nothing changes on the site by itself. A site's developer can turn on error reports (see Frameworks): the visitor's browser then sends errors the page did not handle to SHADE, without cookies, with the page's path only. They show on the Errors screen as Site.

SHADE takes these reports only from the Site URL's own address (not from the other frontends listed under Settings), at most 16 KB each and 30 per visitor address per ten minutes. After 100 new kinds of site error in an hour, further new ones are counted in one group, so nobody can fill the log with made-up errors; errors already in the log keep being counted on their own group.

Rules and limits

What is kept. One group per error, by its fingerprint (where it came from, the error's name and the top of its stack, without line numbers or build hashes), with:

  • first and last seen, a count, and a count per hour (for the screen's last 14 days);
  • one example, the latest: name, message, stack, request id, method and path. The request id is the one in the log's lines and the X-Request-Id header; for a job that failed it is the id of the request that queued it (Logs and request ids);
  • the SHADE version, and whether it is resolved.

What is never kept: request bodies, headers, cookies, IP addresses and query strings. Email addresses, IP addresses, query strings, user names and passwords in addresses (https://user:password@…), API tokens, bearer and basic credentials, and payment providers' keys (live_…, test_…, sk_live_…) are also taken out of messages and stacks before anything is stored.

Where errors come from: a request to SHADE that fails unexpectedly (the visitor still sees a plain Internal server error) or is turned away because too many passwords are waiting to be checked, visitors' sign-ins on the site included; an AI assistant's tool call that fails inside (the assistant only reads Internal error); a module's hook or background job that fails; a module's server part that SHADE leaves out when loading; an untrusted module that cannot be loaded or whose process stops; a failure inside SHADE's server that nothing handled (recorded, then the server restarts, as it always did); and the site. Every one is still written to the server's console as well.

Sign-ins and refusals. Every failed sign-in (a wrong password, an unknown address, a wrong two-factor or backup code) is in the audit log as team.login-failed, with the address tried and a hash of the IP address. Every refused action (FORBIDDEN) is counted per account per hour, for the Many refused actions by one account rule; a module acting as itself is counted per module per hour instead, for Many refused actions by one module. The first refusal of each hour is also in the audit log (refusal.permission or refusal.package), with the action and why it was refused, so "why can't they?" can be looked up there.

How long. Error groups are kept for 30 days after they last happened, together with the refused-action counts and the alerts; admins can change it, down to 7 days (Data retention). Failed sign-ins follow the audit log's period.

Personal data. The Personal data screen lists the error log as a kind that holds no personal data, with the reason. The refused-action counts of an editor and the alerts about the editor (something they did, or something done to their account) are security records, found by the editor's address and kept for the error log's period. Each alert keeps the accounts it is about, so the screen never finds an alert because a name happens to be in its text. Failed sign-ins are found by the address tried.

Outside services. None, unless the operator turns it on: everything stays on the client's server. The operator can send each stored error, scrubbed of personal data, to a GlitchTip or Sentry the client chooses, and may add the error forwarding module to route them (the module is tried first, SHADE's own sending is the fallback; an error goes once). Errors that browsers wrote go only when the operator allows it. Both are off by default; the settings are in Error reporting. Admins see no difference on this screen.

For developers

The code and its tests: shade/features/errors/README.md in the shade repository.

Limitations

  • Sending errors on to a GlitchTip or Sentry is SHADE's own (the operator's DSN) or the error forwarding module, which gets each error first and sends it by its rules.
  • Site errors are only taken from the Site URL's origin, not from the other frontends listed under Settings.