Runway 1.0.0

This commit is contained in:
Runway committed 2026-10-21 11:34:34 -06:00
commit dcf819146b
1372 files changed
+188168

No files matched your search

File diff suppressed because it is too large. Load diff
+633
View File
@@ -0,0 +1,633 @@
# Configuration and data stability commitment
This document states what Runway promises about everything **outside** the Java API that an installation,
a backup, a plugin package or a monitoring system depends on: the `runway.*` configuration keys, the files
Runway keeps on disk, the backup archive, the plugin descriptor (`plugin.yml`), and the HTTP paths, metric
names and logger names other systems are built against. It is the counterpart of
[SPI-STABILITY.md](SPI-STABILITY.md), which covers the binary extension API.
> **Status.** These rules bind from **`1.0.0`**: this document governs, and every change to a covered
> surface is called out in the CHANGELOG ([`../CHANGELOG.md`](../CHANGELOG.md)).
## Why this exists
An operator upgrading from `1.2` to `1.5` should not have to re-read every configuration key, re-test every
backup, or rebuild a Prometheus dashboard. A plugin author should know which `plugin.yml` keys an older kernel
will understand. That needs two things: a written promise per surface, and something **on disk** that says
which version of a format a file is in, so that a later Runway can tell an old file from a new one and an
older Runway can refuse a file it cannot read instead of quietly damaging it. Two markers carry that version:
`external/layout.yml` for the data folder, and `formatVersion` in a backup's `manifest.yml`.
## What "compatible" means — the common rules
Within one **major** line (`1.x`):
1. **Nothing covered is removed or changes meaning.** A configuration key keeps its meaning, its type and its
default **unit**; a file keeps its location and the meaning of its fields; a metric keeps its name and tags.
2. **Additions are free.** New keys, new optional fields, new files, new metrics and new paths may appear in any
minor release. Each has a default that reproduces the previous behaviour.
3. **Renames and removals take a deprecation cycle.** The old name keeps working for the rest of the major line,
a startup `WARN` names the replacement, the configuration metadata marks it deprecated, and the changelog
lists it under *Deprecated*. It is removed only in the next major.
4. **Defaults may be tuned** (a larger cap, a shorter cache lifetime) when the change does not alter what a
correctly configured installation does; the changelog says so. A default that changes behaviour an operator
relies on is treated like a rename.
5. **A breaking change is a new major** (`2.0`), called out in the changelog with upgrade steps.
## 1. The `runway.*` configuration namespace
**Covered:** every key below, whether set in `external/application.yml`, as an environment variable (Spring's
relaxed binding: `RUNWAY_STORAGE_EXTERNAL` sets `runway.storage.external`), or on the command line.
**Where the list comes from.** The kernel builds `META-INF/spring-configuration-metadata.json` from its 18
`@ConfigurationProperties` classes and from
`runway-app/src/main/resources/META-INF/additional-spring-configuration-metadata.json`, which describes the
keys read through `@Value` or straight from the environment (the demo installer, two size caps, the plugin
root and the node name). An IDE uses the same file for completion and type checks. A test
(`ConfigurationMetadataTest`) fails the build if a key named in the shipped `application.yml`, or one of the
`@Value`/environment keys, is missing from the metadata. Meanings are in [ADMINISTRATION.md](ADMINISTRATION.md)
§8 and the section of the manual that owns each feature; the table below is the inventory.
"Default" is the value the kernel uses when the key is absent. Where the shipped classpath `application.yml`
sets a different value, both are shown.
**`runway.app-activity.*`** — the application-realm activity log
| Key | Type | Default |
|---|---|---|
| `enabled` | boolean | `true` |
| `retention-days` | int | `90` |
**`runway.backups.*`**
| Key | Type | Default |
|---|---|---|
| `max-entry-bytes` | long (bytes) | `268435456` (256 MiB) |
| `offsite-dir` | string (path) | _(blank — off)_ |
| `retention.max-age-days` | int | `0` (no age limit) |
| `retention.max-count` | int | `30` |
| `schedule.cron` | string (6-field Spring cron) | `0 30 2 * * *` |
| `schedule.enabled` | boolean | `false` |
**`runway.bandwidth.*`**
| Key | Type | Default |
|---|---|---|
| `enabled` | boolean | `true` |
| `quota.default-monthly-bytes` | long (bytes) | `0` (no cap) |
| `quota.per-site` | map: site id → long (bytes) | empty |
| `retention-days` | int | `90` |
| `snapshot-seconds` | int | `60` |
**`runway.cluster.*`** — see *Not covered* below: clustering is opt-in and outside the 1.0 promise.
| Key | Type | Default |
|---|---|---|
| `enabled` | boolean | `false` |
| `cluster-name` | string | `runway` |
| `topology` | enum `embedded` \| `client-server` | `embedded` |
| `session-ttl` | duration | `30m` |
| `sessions-map-name` | string | `runway.sessions` |
| `events-topic-name` | string | `runway.events` |
| `embedded.discovery` | string `tcp-ip` \| `multicast` | `tcp-ip` |
| `embedded.members` | list of string | empty |
| `embedded.port` | int | `5701` |
| `embedded.port-auto-increment` | boolean | `true` |
| `client.addresses` | list of string | empty |
| `client.smart-routing` | boolean | `true` |
**`runway.compression.*`**
| Key | Type | Default |
|---|---|---|
| `enabled` | boolean | `true` |
| `max-buffer-bytes` | long (bytes) | `4194304` (4 MiB) |
| `mime-types` | list of string (replaces the default list) | `text/html`, `text/xml`, `text/plain`, `text/css`, `text/javascript`, `application/javascript`, `application/json`, `application/xml`, `image/svg+xml` |
| `gzip.enabled` | boolean | `true` |
| `gzip.min-size` | int (bytes) | `1024` |
| `brotli.enabled` | boolean | `true` |
| `brotli.min-size` | int (bytes) | `1024` |
| `brotli.quality` | int `0..11` | `5` |
**`runway.console.*`** — where the operator console answers (host only, read at startup; ADMINISTRATION §8.6)
| Key | Type | Default |
|---|---|---|
| `hosts` | list of host names (case and port ignored) | empty: the default site's host names and host names that serve no site |
**`runway.csp.*`**
| Key | Type | Default |
|---|---|---|
| `mode` | enum `report` \| `enforce` \| `off` | `report` |
| `default-src` | string | `'self'` |
| `script-src` | string | `'self'` |
| `style-src` | string | `'self' 'unsafe-inline'` |
| `img-src` | string | `'self' data:` |
| `font-src` | string | `'self'` |
| `connect-src` | string | `'self'` |
| `base-uri` | string | `'self'` |
| `form-action` | string | `'self'` |
| `frame-ancestors` | string | `'self'` |
| `report-uri` | string | `/__csp-report` |
| `upgrade-insecure-requests` | boolean | `false` |
| `strict-dynamic` | boolean | `true` — `'strict-dynamic'` on the nonced kernel surfaces (console, login, recovery, wizard) |
| `public-strict-dynamic` | boolean | `true` — public tenant pages get a nonce derived from the page's ETag plus `'strict-dynamic'`, stamped only on the scripts the `script-src` + `extra-hosts` + plugin-host allowlist would have run (never an inline script unless `script-src` has `'unsafe-inline'`); takes effect only while `strict-dynamic` is on and `mode` is not `off` |
| `extra-hosts` | list of string | empty |
The secret that keys public-page nonces is a file, not a key: `external/csp-nonce.key` (§2).
**`runway.demo.*`** — unattended demo install (read via `@Value`)
| Key | Type | Default |
|---|---|---|
| `first-run.id` | string | _(blank — nothing installed)_ |
| `first-run.host` | string | _(blank — the demo's own host)_ |
| `first-run.master-username` | string | `demo` |
| `first-run.master-password` | string (secret) | _(blank)_ |
**`runway.endpoints.*`** (read via `@Value`)
| Key | Type | Default |
|---|---|---|
| `max-body-bytes` | long (bytes) | `10485760` (10 MiB) |
| `max-form-bytes` | long (bytes) | `262144` (256 KiB) |
`max-form-bytes` is the platform's **pre-authentication body budget**: the most body a caller who is **not signed
in** can make the server read, on any path. It bounds the form (or multipart) body of a plugin route, which the
kernel reads before authentication and the CSRF check (so the check and the route both see it); it also bounds
**any** body a caller who is not signed in sends — to the sign-in, setup and password-recovery forms of both realms,
to any console path, to the CSP report endpoint, to a `PUT`/`PATCH`/`DELETE` form, and to a plugin route of any
method and type. Above it the request is answered `413`; a declared `Content-Length` above it is refused without
reading. The effective value is the smaller of the two keys. `max-body-bytes` bounds the body a **signed-in** caller
sends to a plugin route (JSON, uploads, raw text), read after security; a signed-in console form keeps the
container's limit.
Raise `max-form-bytes` only for a plugin whose anonymous forms or uploads really carry more than 256 KiB. (A
multipart upload to a kernel path is the exception: it is parsed to temporary files before security under
`spring.servlet.multipart.max-request-size`.)
**`runway.health.*`** — the per-site `/__health` probe
| Key | Type | Default |
|---|---|---|
| `enabled` | boolean | `true` |
| `token` | string (secret) | _(blank — detail off)_ |
| `content-check` | boolean | `true` |
| `content-check-ttl-seconds` | int | `10` |
**`runway.http-cache.*`**
| Key | Type | Default |
|---|---|---|
| `public-pages` | string (`Cache-Control` value) | `public, max-age=300, stale-while-revalidate=60` |
| `assets` | string | `public, max-age=86400` |
| `immutable-assets` | string | `public, max-age=31536000, immutable` |
| `immutable-extensions` | set of string | `woff2, woff, ttf, otf, eot` |
There is no `no-store` key: the editor preview and error responses are always `no-store`. A file that sets it
starts normally; the key is ignored.
**`runway.i18n.*`**
| Key | Type | Default |
|---|---|---|
| `cache-seconds` | int | `5` |
**`runway.logs.*`** — per-site log capture
| Key | Type | Default |
|---|---|---|
| `enabled` | boolean | `true` |
| `access-log-user-agent` | boolean | `false` |
| `max-retention-days` | int | `90` |
| `queue-capacity` | int | `8192` |
**`runway.metrics.*`**
| Key | Type | Default |
|---|---|---|
| `scrape-token` | string (secret) | _(unset — off; a blank console field keeps a stored token)_ |
**`runway.node.*`** (read from the environment)
| Key | Type | Default |
|---|---|---|
| `name` | string | _(blank — the OS host name)_ |
**`runway.operator.*`**
| Key | Type | Default |
|---|---|---|
| `ui-languages` | list of BCP-47 codes | `[en, es]` |
| `default-language` | string | `en` |
**`runway.plugins.*`**
| Key | Type | Default |
|---|---|---|
| `root` | path (read from the environment before startup) | _(blank — `<external>/plugins`)_; the loader and the console's install/uninstall/enable/disable resolve it by one shared rule, so both always use the same folder |
| `max-entry-bytes` | long (bytes, `@Value`) | `134217728` (128 MiB) |
| `site-files.max-write-bytes` | long (bytes, `@Value`) | `16777216` (16 MiB): the largest single write (and whole-file read) a plugin makes in its per-site subtree through `PluginSiteFiles` |
**`runway.protect.*`** — the kernel's edge-rejection logging
| Key | Type | Default |
|---|---|---|
| `log-rejections` | boolean | `true` |
| `log-rejection-window-seconds` | int | `60` |
**`runway.proxy.*`**
| Key | Type | Default |
|---|---|---|
| `forwarded-headers` | boolean | `true` |
| `trusted-cidrs` | list of CIDR | empty (trust nothing); the shipped `application.yml` sets `127.0.0.1/32`, `::1/128` |
**`runway.reload.*`** — `/__reload/**`
| Key | Type | Default |
|---|---|---|
| `enabled` | boolean | `true` |
| `token` | string (secret) | _(blank — the endpoint is absent)_ |
**`runway.security.*`**
| Key | Type | Default |
|---|---|---|
| `app-master-id` | string | _(blank — WIZARD mode)_; written by the first-run wizard |
| `password-strength` | enum `standard` \| `high` | `standard` |
| `max-concurrent-hashes` | int | `8` |
| `acquire-timeout-millis` | long (ms) | `2000` |
| `secret-key` | string (secret) | _(blank)_; set by the installer as `RUNWAY_SECURITY_SECRET_KEY` |
**`runway.storage.*`**
| Key | Type | Default |
|---|---|---|
| `external` | path | `external` (relative to the working directory, which the launcher sets to the release dir) |
| `sites` | path | `<external>/sites` |
| `backups` | path | `backups` (relative to the working directory) |
`runway.storage.stats` (never read) and `runway.storage.logs` (display-only; the kernel writes nothing there) are
not keys, so they never enter the promise. A configuration that sets one starts normally and logs one startup
`WARN` naming the key; the metadata marks both as removed (deprecation level `error`).
**`runway.tls.*`**
| Key | Type | Default |
|---|---|---|
| `enabled` | boolean | `false` |
| `keystore` | string (path) | _(blank)_ |
| `keystore-password` | string (secret) | _(blank)_ |
| `keystore-type` | string | `PKCS12` |
| `key-alias` | string | `runway` |
| `watch-keystore` | boolean | `true` |
| `sni-host-check` | boolean | `true` |
| `redirect-http.enabled` | boolean | `false` |
| `redirect-http.port` | int | `80` |
| `redirect-http.status` | int `301` \| `302` \| `307` \| `308` (any other value stops startup while the redirect is on) | `301` |
| `redirect-http.acme-challenges-dir` | string (path) | `./external/acme-challenges` |
**Plugin keys: `runway.plugin.<id>.*`.** Each plugin owns the prefix `runway.plugin.<its id>.`; its app-level
settings are stored as `external/plugin-settings/<id>.yml` and bound by the plugin's own properties class. The
kernel promises the **prefix and the file**; the keys under it are the plugin's contract with its operators and
follow that plugin's own versioning. The bundled essential plugin documents its keys in
[ADMINISTRATION.md](ADMINISTRATION.md) §12 (`runway.plugin.protection.*`: `rate-limit.*`, `allowlist` and
`remember-device.*` on its settings form; `login.*` including `login.captcha.*`, which only seed a fresh
install's Login protection panel), and its jar carries its own
`META-INF/spring-configuration-metadata.json` for them (`ProtectionConfigurationMetadataTest` fails its build if
the file is not generated).
**Framework keys** (`server.*`, `spring.*`, `management.*`) belong to Spring Boot and are not covered here.
The ones Runway pins on purpose are listed, with the reason for each, in [ADMINISTRATION.md](ADMINISTRATION.md)
§8; a change to a pinned value is a changelog entry.
## 2. The data folder: `external/` and `sites/<id>/`
**Covered:** the location and meaning of every file below. Its *contents* are covered as far as its owner's
format goes: YAML stores keep their field names and meanings, properties files keep their keys, and templates
are the site's own content.
### The layout marker — `external/layout.yml`
```yaml
# Runway data-layout marker. Written by Runway on first start; do not edit or delete it.
# ...
version: 1
```
Owner: `mx.quest.runway.storage.DataLayout`, checked by `DataLayoutInitializer` at the very start of every
boot — before the plugin loader reads `external/`, before any store, seeder or plugin bean exists.
| What is on disk | What Runway does |
|---|---|
| no `layout.yml` | Writes `version: 1`. Every folder that predates the marker is layout 1 by definition. On a first, WIZARD-mode start against a folder that does not exist yet, nothing is written (nothing to protect); the first start that has a folder writes it. |
| `version` ≤ what the build supports | Starts normally; the file is not rewritten. |
| `version` > what the build supports | **Refuses to start** ("APPLICATION FAILED TO START", naming the file and both versions). An older Runway must never write into a layout it does not understand. |
| unreadable, not a mapping, no `version`, not a whole number, or below 1 | **Refuses to start** rather than guess. |
A failure to *write* an absent marker (for example a read-only folder) is logged as a warning and retried on
the next start; it never stops a start that worked before the marker existed.
**What a layout bump means.** The layout version changes only when a release changes the folder in a way an
older release would misread or damage: moving or renaming a file, changing what a field means, or adding data
an older release would silently drop when it rewrites a store. That release migrates the folder forward on its
first start, then writes the new version. The consequence for operators is the downgrade rule: **after a
layout bump, the previous release refuses to start against the migrated folder.** To roll back past a layout
bump, restore the copy of `external/` taken before the upgrade. Adding an optional field, file or folder is
*not* a layout bump.
### How a YAML store tolerates change
Every kernel store reads through `mx.quest.runway.storage.Yaml`, whose mapper has
`FAIL_ON_UNKNOWN_PROPERTIES` and `FAIL_ON_NULL_FOR_PRIMITIVES` disabled; each record's compact constructor
supplies the default for an absent field. So:
- a **newer** file read by an **older** build loads (unknown keys are ignored); an **older** file read by a
newer build loads (absent fields take defaults that reproduce the old behaviour);
- **but an older build does not preserve keys it does not know when it rewrites a record.** That is exactly why
a field whose loss would matter needs a layout bump, and why the layout marker refuses a downgrade instead of
relying on tolerance.
### `external/` — platform state (never in a tenant backup)
| Path | Owner | Holds |
|---|---|---|
| `application.yml` | operator; the first-run wizard (`WizardService`) merges the superadmin pin into it | The operator's configuration override (loaded by `spring.config.import`). Keep it mode `600`. |
| `layout.yml` | `DataLayout` | The layout marker above. |
| `platform.yml` | `PlatformSettingsStore` | Platform settings edited on **Settings → Platform settings**: the default site, platform mail (SMTP), node name, compression and password-strength overrides; and under `settings:` the kernel settings edited on **Settings → Server settings** and the policy cards (full property name → value; `ENC(...)` for a token), loaded at startup below `external/application.yml` (`KernelSettingsInitializer`), declared in the jar's `kernel-settings.yml`. Also `siteQuotas:` (each site's own bandwidth cap in bytes, set on **Sites**, read live), `siteStorageCeilings:` (each site's own storage limit for its files in bytes, set on **Sites**, read live), `embedHosts:` (the hosts approved on **Settings → Embed hosts**: `id`, `label`, `source`, `directives`, read live) and `logLevels:` (logger name → level, set on **Activity → Logs → Log levels**; applied at once on save and again at every start; a `logging.level.*` set in `application.yml` wins over it). |
| `app-users.yml` | `AppUserStore` | Application-realm accounts (Argon2id hashes). |
| `site-users.yml` | `TenantMasterStore` | Tenant superadmins, each assigned to one or more sites (application-managed, so kept outside every site folder). |
| `app-roles.yml` | `RoleStore` | Application-realm custom roles. Validated at startup; an invalid file stops the start. |
| `app-grants.yml` | `GrantStore` | Application-realm permission grants. |
| `recovery-tokens.yml` | `RecoveryTokenStore` | Hashed, expiring password-recovery tokens (both realms). |
| `blocklist.yml` | `StorageLayout.blocklistFile()`; written by the protection plugin's `IpBlocklist` | Manual IP/CIDR blocks. |
| `activity/` | `AppActivityLog` | Application-realm activity day-files (`activity-<yyyy-mm-dd>.log`), one line per operator action in the audit journal format below. Pruned after `runway.app-activity.retention-days`. |
| `csp-nonce.key` | `PublicPageNonce` | The secret that keys public-page CSP nonces (below). |
| `plugins/<id>/` | operator / console install (`PluginAdminService`); read by `PluginLoader` | One folder per installed plugin: `plugin.yml`, jars, `static/`, `i18n/`. When `runway.plugins.root` is set, these folders live there instead — for the loader and the console alike. |
| `plugin-settings/<id>.yml` | `PluginSettingsService` | A plugin's app-level settings (`runway.plugin.<id>.*`), loaded as a property source above `application.yml` and below environment variables and command-line arguments. Only a file named for an installed plugin is loaded, and only its keys under `runway.plugin.<id>.`; any other key in the file is ignored, with a warning naming it. A save from the console rewrites the file with the keys the plugin declares, so an undeclared key is dropped. Another file in the folder (the protection plugin's `protection-app.yml`) is that plugin's own data, never configuration. |
| `plugin-quarantine/<id>.yml` | `PluginQuarantine` | The marker of a plugin that broke the platform's startup: its version, a checksum of its jars, the reason and the time. While it matches the installed plugin, the plugin stays Blocked; **Retry** on the Plugins screen removes it, and a different version or different jars make it stale, and it is deleted (ADMINISTRATION.md §11). |
| `plugin-manifests/<id>.sha256` | the installer (`scripts/install.sh`) | What the installer shipped for a bundled plugin, so an upgrade can tell an operator's edit from a stale copy. |
| `seed/site-templates/<id>/` | `SeedTemplateStore` | The site-template catalog new sites are born from (`template.yml` plus the seed files). |
| `seed/site/` | `SeedTemplateStore` (legacy) | The pre-catalog seed folder; migrated into `seed/site-templates/default` on first run. |
| `i18n/operator-messages[_xx].properties` | `OperatorMessageSource` | Optional operator re-translation of the console, above the bundled messages. |
| `tls/` | the installer | A copied PKCS12 keystore when Runway terminates TLS itself. |
| `acme-challenges/` | operator / ACME client (`runway.tls.redirect-http.acme-challenges-dir`) | Files served at `/.well-known/acme-challenge/`. |
| `sites/` | `StorageLayout.sites()` (`runway.storage.sites`) | One folder per site (below). `sites/.restore-work/` is restore scratch space, never a site. |
### The audit journal line format — `activity/*.log` and `sites/<id>/logs/audit-*.log`
Both journals (the application activity log and each site's audit log) share one format, owned by
`mx.quest.runway.log.AuditJournal`. It is **covered**: a monitoring or SIEM pipeline may parse it.
- **Files.** One UTF-8 file per **server-local** calendar day: `activity-<yyyy-MM-dd>.log` and
`audit-<yyyy-MM-dd>.log`. Lines are only ever appended.
- **Line.** Four tab-separated fields, ending in `\n`:
```
<time> TAB <actor> TAB <action> TAB <detail>
2026-10-17T08:10:03.123-06:00 admin appuser.deleted alice (id 6f1c…)
```
`actor` is the operator's username (or a system marker); `action` is a stable dotted key
(`appuser.created`, `master.suspended`, `user.password-reset`, …); `detail` is free text (the target's name, an IP
for a login). CR, LF, tab and NUL inside a field are written as a space, so a crafted value can never forge a
line or a field.
- **Time.** ISO-8601 local date-time with milliseconds **and its UTC offset** (`Z` at UTC), in the server's time
zone: `yyyy-MM-dd'T'HH:mm:ss.SSSXXX`. The offset makes every entry's instant unambiguous across a DST change or
a server time-zone move.
- **Offset-less lines.** Runway writes only the form above. The reader also accepts lines that carry
`yyyy-MM-dd HH:mm:ss` with no offset and places them in the server's **current** zone (the console shows such
times without an offset). A reader parsing these files should accept both, as Runway does.
- **Tolerance.** A line with fewer than four fields reads its missing trailing fields as empty; a line whose time
matches neither form is skipped, never an error.
The per-site **access** log (`access-*.log`) is not part of this promise: it keeps its offset-less timestamp and
its field layout may change (see *Not covered*).
### The public-page CSP nonce secret — `external/csp-nonce.key`
Public tenant pages carry a CSP nonce derived from the page version:
`base64url(HMAC-SHA256(secret, "runway-csp-nonce/v1|" + ETag))`, so every `200` and `304` of one content version
carries the same nonce and shared caches keep working. The secret is this file.
- **Created** on the first page that needs it (only while `runway.csp.public-strict-dynamic` is in effect): 32
random bytes, written owner-only (`0600`) and published atomically, so two nodes sharing the folder never
overwrite each other's key. A file shorter than 32 bytes is refused.
- **Read once** per process and held in memory.
- **Rotation:** delete the file and restart. Every nonce changes, and because a fingerprint of the secret (never
the secret) is folded into each page ETag, **every page ETag changes once** too, so no browser or CDN can pair
an old body (old nonce) with a new header. Caches simply revalidate.
- **Clustering:** give every node the same file, as with other shared secrets; otherwise each node has its own
ETags (still correct, fewer cross-node `304`s).
- **If it cannot be created or read**, the feature turns itself off for that process (logged once at `ERROR`):
public pages keep the host-allowlist policy and their ETags say so. Never a `500`.
- It is platform state under `external/`, so it never travels in a site backup.
The nonce values and the ETag values themselves remain opaque (see *Not covered*); the file's name, location,
permissions and the rotation procedure are covered.
### `sites/<id>/` — one self-contained site (travels whole in its backup)
| Path | Owner | Holds |
|---|---|---|
| `site.yml` | `SiteStore` | The site record: id, name, hosts, locales, base URL, status, and the optional `editorial:` level (`advisory` \| `enforced` \| `reviewed`; absent or unrecognised reads as `advisory`). |
| `users.yml` | `SiteUserStore` | The site's own accounts (not the tenant superadmin). |
| `roles.yml` | `RoleStore` | The site's custom roles. An invalid file quarantines that site's console, not the platform. |
| `permissions.yml` | `GrantStore` | The site's permission grants. |
| `templates/` | `PageStore`, `PageWriteService` | Pages (`<slug>.html` + decoupled `<slug>.th.xml` + `<slug>.meta.yml`) and `_master.html`. |
| `templates/.pending/<slug>/` | `PendingRevisionStore` | Pending editorial work for one page: `review.yml` (state `submitted` \| `returned`, who/when, the approver's note) and, for a change to a published page, `revision.meta.yml` + `revision.html` + optional `revision.th.xml`. Never routed or listed; carried by backups and transfer copies. |
| `i18n/messages[_xx].properties` | `SiteMessagesStore` | The site's messages; the default locale is the unsuffixed file. |
| `static/` | site manager (served by `SiteStaticController`) | The site's public assets at `/static/**`. |
| `static/doc/` | `DocumentService` | Uploaded documents. |
| `doc-state.yml` | `DocumentService` | The documents a site manager has disabled (withheld from the public without deleting them). |
| `icons/` | `SiteIconService` | `favicon.svg`, `favicon.ico`, `apple-touch-icon.png`, `icon-192.png`, `icon-512.png`. |
| `manifest.yml` | `SiteManifestService` | The web app manifest's fields (served as `/manifest.webmanifest`). |
| `seo.yml` | `SeoConfigService` | Site-wide SEO settings. |
| `csp.yml` | `SiteCspService` | `hosts:` the ids of the operator's approved embed hosts this site switched on (**Site config → Embedded content**). Only ids still approved count. |
| `contact.yml` | `SiteContactService` | The site's contact details. |
| `params.yml` | `SiteParamsService` | Template parameters: a flat key → value map exposed to every render as `${params.key}`. |
| `log.yml` | `SiteLogConfigService` | The site's own log-retention preference. |
| `logs/` | `SiteLogService` | `access-<date>.log` and `audit-<date>.log` day-files; the audit files use the audit journal format (§2, above). |
| `stats/bandwidth.csv` | `BandwidthService` | Hourly served-bytes buckets. |
| `plugins/<plugin>.yml` | `SitePluginConfigService` | A plugin's per-site settings. |
| `plugins/<plugin>/` | the plugin | Plugin-generated per-site data (for example a content source's items). |
| `widget-instances.yml` | `WidgetInstanceConfigService` | Per-instance settings of placed content widgets. |
### Outside `external/`
| Path | Key | Holds |
|---|---|---|
| `backups/<siteId>/backup-<yyyyMMdd-HHmmss-SSS>.zip` | `runway.storage.backups` | Stored backups (below). |
| `logs/runway.out` | (the launcher) | The service's stdout/stderr when run detached. |
## 3. The backup archive
**Covered:** the archive's structure and `manifest.yml`, and the restore promise.
```
manifest.yml what the archive is
site/<path inside sites/<id>/> the whole site folder (symlinks are never followed)
plugin-data/<key>/<entry> each BackupParticipant's out-of-folder data
```
`manifest.yml` (`mx.quest.runway.backup.BackupManifest`):
| Field | Meaning |
|---|---|
| `formatVersion` | The archive **format** version. Currently `1`. **Absent = `1`**. |
| `siteId` | The site the archive was taken from (informational; a restore targets the chosen site). |
| `spiVersion` | The SPI version of the writer — **diagnostic only**; restore never branches on it. |
| `createdAt` | ISO-8601 instant. |
| `participants` | The `BackupParticipant` keys whose data is under `plugin-data/`. |
| `purpose` | `RESTORE` (complete) or `TRANSFER` (accounts, secrets and hostnames removed). Absent = `RESTORE`. |
| `omitted` | What a `TRANSFER` copy left out as plugin personal data: each declared `siteData.personal` path (`plugins/<pluginId>/<path>`; a folder ends in `/`) and `plugins/<id>/` for each plugin that was not loaded. Empty for a complete backup. **Absent = empty** (an additive key, so `formatVersion` stays `1`). |
**Reading rules.** Readers do not depend on entry order (Runway writes `manifest.yml` first, and checks its
`formatVersion` the moment it reads it). Unknown manifest keys are ignored. Unknown top-level entries are
drained and ignored. A participant named in the manifest but not installed is tolerated: its data stays
unrestored. An archive without `manifest.yml` or without `site/site.yml` is not a Runway backup.
**The format gate.** Restore — on the site console, on the app console, and when creating a new site from a
backup — accepts any `formatVersion` up to the one the build supports and **refuses a higher one**, before
anything is swapped in: the operator sees "This backup was made by a newer version of Runway (backup format N;
this version restores up to format M)" and the live site is untouched. A value below 1 is not a valid backup.
**The cross-version promise.** An archive written by any `1.x` restores on the same or any later `1.x`.
`formatVersion` rises only for a change an older reader would misread (a new mandatory entry, a moved tree);
adding a manifest key or an optional entry is not a format change. Restoring an archive from a *later* `1.x`
on an earlier one works whenever the format number allows it, but is not part of the promise: the later
release may have written site files the earlier one does not use.
## 4. The plugin descriptor (`plugin.yml`)
**Covered:** every key below. The kernel reads the descriptor without loading plugin code
(`mx.quest.runway.plugin.PluginDescriptor`), with `FAIL_ON_UNKNOWN_PROPERTIES` off, so a descriptor written for
a newer kernel loads on an older one and the other way round. Within `1.x` a key keeps its meaning; new keys
are optional. A plugin that needs a newer kernel says so with `requiresSpi`, and an older kernel then blocks
it with a clear reason instead of loading it to fail later.
| Key | Type | Meaning |
|---|---|---|
| `id` | string | Stable id = install-folder name (must be a safe id). **Required.** |
| `name` | string | Display name. |
| `version` | `MAJOR.MINOR.PATCH` | The plugin's version. **Required**, strictly parsed. |
| `mainClass` | string | The `@Configuration` class; absent = a code-less library provider. |
| `enabled` | boolean | `false` excludes the plugin. Absent = enabled. |
| `essential` | boolean | Honoured only for plugins on the kernel's security-floor allowlist. |
| `requires` | list | Hard dependencies: `id`, `id >= v` or `id == v`. |
| `conflicts` | list of id | Rival plugins this one steps aside for. |
| `requiresSpi` | `>=X.Y.Z` | Minimum kernel SPI level. Malformed = the plugin is blocked, never silently ignored. |
| `permissions` | list | Declared permissions: `id`, `realm` (`tenant` \| `application`), `label`, `defaultRoles`. |
| `settings` | list of setting | App-level settings schema. |
| `siteSettings` | list of setting | Per-site settings schema. |
| `widgetSettings` | map: widget key → list of setting | Per-instance settings of a content widget. |
| `settingGroups` | list | Titled form sections: `id`, `label`, `help`, `helpAnchor`. |
| `helpUrl` | string | The plugin's help page (path or absolute URL). |
| `menu` | list | Console menu entries: `realm`, `region`, `order`, `label`, `path`, `permission`, `icon`. |
| `dashboardCards` | list | Dashboard cards: `realm`, `order`, `fragment`, `permission`. |
| `siteData` | map | `personal`: paths under `sites/<id>/plugins/<pluginId>/` holding personal data (a trailing `/` names a folder). A transfer copy leaves them out. A malformed path (absolute, a backslash, an empty, `.` or `..` segment) blocks the plugin. Absent = nothing declared. |
A **setting** (`PluginSettingDef`) has `key`, `type` (`string` \| `text` \| `secret` \| `int` \| `decimal` \|
`boolean` \| `enum` \| `list`), `default`, `label` and `range`, plus the presentation keys `help`, `group`,
`advanced`, `showWhen`, `helpAnchor`, `inheritsFrom` and `requiresPlatform`, and — on a `secret` only —
`secretBoundTo`: a list of keys in the same schema the secret belongs with (where it is sent). When a save
changes one of them and the secret field is left blank, the stored secret is **removed** rather than kept, and
the form says it must be entered again. Absent = empty = a blank secret is always kept.
**Tolerance rules.** Structural keys (`id`, `version`, `requires`, `requiresSpi`, `permissions`, `menu`, `siteData`) are
validated, and a violation blocks the plugin with an operator-readable reason on the **Plugins** screen; the
platform still starts. Presentation keys (`settingGroups`, `help`, `group`, `advanced`, `showWhen`,
`helpAnchor`, `inheritsFrom`, `requiresPlatform`, `helpUrl`) **degrade** instead: a group id nobody declared, an empty
list item, a `showWhen` naming a missing or non-boolean key, or an `inheritsFrom` that cannot be resolved
renders the form without that refinement, never a failure. An
older kernel ignores them entirely, so a plugin can adopt them without raising `requiresSpi`. `secretBoundTo`
is read just as leniently — a list, one key, or a comma-separated string; a malformed value (a map, a number)
reads as empty, and a key the schema does not declare never matches — so it never blocks a plugin; at worst a
binding is missing and the old "blank keeps the secret" applies.
## 5. HTTP paths, metrics and logger names
### Public paths a client may depend on
| Path | Realm / host | Contract |
|---|---|---|
| `GET /actuator/health` (+ `/liveness`, `/readiness`) | any | Public `UP`/`DOWN`; details only to an authenticated operator. |
| `GET /actuator/prometheus` | any | Prometheus scrape; app superadmin/admin session or `runway.metrics.scrape-token` bearer. |
| `GET /__health` | a site's host | Per-site probe: `{"status":"up\|degraded\|down","time":…}`; detail with `runway.health.token`. |
| `POST /__reload/site/<id>`, `POST /__reload/sites` | loopback only | Re-read a site (or all) without a restart; `runway.reload.token` bearer. |
| `POST /__csp-report` | any | CSP violation reports (the default `runway.csp.report-uri`). |
| `/login`, `/logout`, `/forgot-password`, `/reset` | a site's host | Site sign-in and password recovery. |
| `/app/login`, `/app/logout`, `/app/forgot-password`, `/app/reset` | the platform host | Application-realm sign-in and recovery. |
| `/static/**`, `/static/doc/**` | a site's host | The site's assets and documents. |
| `/favicon.svg`, `/favicon.ico`, `/apple-touch-icon.png`, `/icon-192.png`, `/icon-512.png`, `/manifest.webmanifest` | a site's host | Site icons and web app manifest. |
| `/__plugin/<id>/static/**` | any | A plugin's static files (the path shape; the files are the plugin's). |
**Reserved namespace.** Tenant content can never claim a path under `/__`, `/actuator`, `/app/`, or the exact
routes `/error`, `/login`, `/logout`, `/forgot-password`, `/reset` (`mx.quest.runway.web.ReservedPaths`). New
kernel paths are added only inside that reserved space, so a 1.x upgrade never shadows a site's page.
### Metric names and tags
Consumed by the bundled `monitoring/` dashboard and alert rules. Names (Micrometer form → Prometheus form) and
tag keys are covered; tag *values* listed are covered too.
| Meter | Prometheus | Tags |
|---|---|---|
| `runway.sites` | `runway_sites` | — |
| `runway.sites.suspended` | `runway_sites_suspended` | — |
| `runway.sites.maintenance` | `runway_sites_maintenance` | — |
| `runway.plugins.loaded` | `runway_plugins_loaded` | — |
| `runway.logs.dropped` | `runway_logs_dropped` | — |
| `runway.storage.free.bytes` | `runway_storage_free_bytes` | — |
| `runway.storage.total.bytes` | `runway_storage_total_bytes` | — |
| `runway.http.server.requests` (timer) | `runway_http_server_requests_seconds_*` | `site`; `outcome` = `informational` \| `success` \| `redirection` \| `client_error` \| `server_error` |
| `runway.edge.rejections` (counter) | `runway_edge_rejections_total` | `status` (HTTP code); `reason` |
The JVM, Jetty and route-level (`http_server_requests_seconds_*`) metrics are Spring Boot / Micrometer's and
are not covered here.
### Logger names
| Logger | Carries |
|---|---|
| `runway.access` | One line per served public request, platform-wide (route it to its own file or log stack). |
| `runway.protect` | Edge rejections (rate limits, blocks), de-duplicated per client and reason. |
The **names** are covered, so a logging configuration that routes them keeps working. The wording of a line is
not (see below).
## 6. Explicitly NOT covered
- **Operator console URLs and screens** under `/__app/**` and `/__admin/**`, the first-run `/setup`, the
console's vendor assets under `/__assets/**`, and `/__ui-lang`. They are a user interface, not an API, and
may move in any release.
- **The markup of internal templates** (console pages, login, error pages, the bundled seed templates as
shipped). A site's own templates are its content and are covered as files; what Runway ships as a starting
point is not.
- **Log line wording** of every logger and log file, including `runway.access`, `runway.protect` and the
per-site access log, except the audit journal format listed in §2. Within that format, the set of `action`
keys may grow; an existing key keeps its meaning.
- **ETag values and CSP nonces**: opaque; their derivation may change in any release (a change only makes
caches revalidate once).
- **Clustering**: the `runway.cluster.*` keys, the Hazelcast map and topic names (`runway.sessions`,
`runway.events`), and the wire format between nodes. Clustering is opt-in and outside the 1.0 scope; it
joins this promise when it leaves opt-in.
- **Framework keys and metrics** (`server.*`, `spring.*`, `management.*`, JVM/Jetty meters): Spring Boot's.
- **The Java classes** named here as owners. They identify who reads and writes a file; they are not API.
The binary API is `runway-spi`, covered by [SPI-STABILITY.md](SPI-STABILITY.md).
## For maintainers: changing a covered surface
- **A new configuration key**: give it a default that keeps today's behaviour; it appears in the metadata
automatically (properties class) or must be added to `additional-spring-configuration-metadata.json`
(`@Value` / environment), or `ConfigurationMetadataTest` fails.
- **A renamed key**: keep binding the old one, log a startup `WARN` naming the new one, mark the old one
deprecated in the metadata, list it under *Deprecated* in the changelog.
- **A new optional field in a store**: default it in the record's compact constructor so older files read
unchanged; check that an older build dropping it on rewrite does no harm — if it would, that is a layout bump.
- **A layout bump**: raise `DataLayout.SUPPORTED_VERSION`, write the forward migration that runs before
anything else touches the folder, rewrite the marker after it, document the downgrade consequence in the
upgrade notes.
- **A backup format bump**: raise `BackupManifest.SUPPORTED_FORMAT_VERSION`, keep reading every older format,
and say in the changelog which release first writes the new one.
+127
View File
@@ -0,0 +1,127 @@
# Runway — Glossary
> **Audience:** everyone.
> **What this is:** the shared vocabulary used across Runway's documentation, defined once
> here so the other documents can use the terms without redefining them.
> **Doc status — growing.** The core terms below are stable and defined now; entries are added
> and sharpened as the platform is built.
---
**Kernel** — Runway's core: a multi-tenant web server and plugin host. It provides the
essential machinery (HTTP serving, the request pipeline, multi-tenancy, the rendering engine,
the security framework, the plugin host, first-run setup) and ships **no domain features** of
its own.
**Plugin** — an installable folder that adds a feature to the platform. It carries its own
code and presentation assets and plugs into the kernel through declared extension points. See
[PLUGIN-DEVELOPMENT.md](PLUGIN-DEVELOPMENT.md).
**SPI (Service Provider Interface)** — the thin, dependency-free set of interfaces and
immutable data records that plugins (and the kernel's own built-in features) implement. It is
released **binary API**: it evolves only by adding, so older extensions keep working.
**Capability-driven** — the kernel decides what to do by inspecting the **capabilities a
component declares** (data), never by checking which specific component it is. A new component
lights up across the platform without any change to the kernel.
**Realm** — an isolated identity domain with its own users, login, and access rules. Runway
has two: the **application realm** (operators who run the platform) and the **tenant realm**
(users who manage an individual site). They never cross.
**Application administrator / superadmin** — an operator in the application realm who runs the
platform itself. The application superadmin is the protected top account that always exists
and cannot be removed, disabled, or demoted.
**Site (tenancy)** — one independently hosted website with its own data, presentation, users,
and configuration, fully isolated from every other site and from the platform's own
configuration.
**Site manager / site-superadmin** — a tenant-realm user who manages a site. The
site-superadmin is the protected top account of a site.
**Master account** — the protected top account of a realm or a site (the application
superadmin; a site-superadmin). It is immutable from inside its own realm and sits above the
normal permission checks.
**Wildcard admin** — a built-in full-access role within a realm. Holding it passes any access
check except operations reserved to the master.
**Permission** — a named, grantable capability declared by the kernel or a plugin (tagged with
its realm). Permissions are assigned to roles and/or directly to users; they are never created
by end users.
**Role** — a named bundle of permissions. Roles are arranged in a per-site/per-realm
**hierarchy**, and access is **additive** — a user gets the union of their roles (and
everything beneath them) plus any direct grants. There are no deny/negative grants.
**`mayAccess`** — the single, central, fail-closed access check every guarded action routes
through: master → wildcard admin (except master-only operations) → an explicit permission →
otherwise denied. An unknown permission is denied.
**Page-as-entry** — the rendering model for public sites: a page is a **complete, normal HTML
document** that is itself the render root; the platform pulls the site's chrome and live data
into it when serving. See [SITE-MANAGER-GUIDE.md](SITE-MANAGER-GUIDE.md).
**Master-as-shell** — the rendering model for the kernel-owned operator UI: a single shell
template owns the page frame and each screen's content is wrapped into it.
**Master (template)** — a site's shared layout/chrome that pages pull their header, footer,
and other shared regions from. (Distinct from a *master account*.)
**Seam** — a named region in a master that a page (or the platform) fills or replaces — for
example the header, footer, or content slot.
**Decoupled-logic templating** — the rule that **no template language appears in any HTML
file**; the dynamic-binding logic lives in a separate paired file, keeping authored HTML 100%
browser-renderable.
**Content widget** — a plugin-provided piece of page content placed via a simple `data-widget`
anchor in the markup; the platform replaces the anchor at render time.
**Head injection** — the platform adding technical `<head>` markup (e.g. SEO/GEO tags) to every
response at the response edge, without requiring any code in a site's templates.
**Filter band** — one of the fixed, ordered phases the request pipeline runs in. A plugin can
place a filter **within** a band but can never reorder the bands or get ahead of core
protection.
**Surface posture** — the per-surface declaration of whether it should be indexed, listed in
the sitemap, and cached, with safe defaults until a surface opts in. See
[PLUGIN-DEVELOPMENT.md](PLUGIN-DEVELOPMENT.md).
**Essential plugin** — a plugin on the kernel's internal security-floor allowlist. If one is
missing or broken, sites serve a maintenance page while the application realm stays reachable
to fix it. A feature plugin cannot promote itself to essential.
**External folder** — the editable directory tree outside the application jar holding
configuration, templates, static assets, translations, sites, plugins, and logs. See
[ADMINISTRATION.md](ADMINISTRATION.md).
**Editorial level** — a site's setting for how strictly publishing is governed, chosen on Site config:
**Advisory** (the default — quality findings are shown, nothing is blocked), **Enforced** (an error-level
quality finding refuses a publish) or **Reviewed** (enforced, and publishing needs a user with *Approve
pages*; everyone else submits for review). See [SITE-MANAGER-GUIDE.md](SITE-MANAGER-GUIDE.md) §10.
**Pending revision** — on a *Reviewed* site, an edit to a page that is already live, saved by someone who
cannot publish. It is kept beside the page until an approver approves it (it replaces the live page) or sends
it back; until then visitors, search and the sitemap see only the live page.
**Site insights** — a site's own report of its most-visited pages and the addresses that most often answered
"not found" (404), counted from its access log; paths and counts only, never a visitor's address.
**Audit journal** — the record of who did what: the application realm's activity log and each site's audit
log. Lines carry the time with its UTC offset, the actor and the action, never a password or a setting's
value. See [ADMINISTRATION.md](ADMINISTRATION.md) §14.
**Transfer copy** — a download of a site for handing it to someone else: the site's content and presentation
without its users, secrets or hosts. Distinct from a **backup**, which is complete so that it can restore the
site exactly. See [ADMINISTRATION.md](ADMINISTRATION.md) §13.
**Layout marker** — `external/layout.yml`, the file that records which version of the data-folder layout is in
use. A Runway build that finds a newer layout than it understands refuses to start rather than write into it.
See [CONFIGURATION-AND-DATA-STABILITY.md](CONFIGURATION-AND-DATA-STABILITY.md).
**Format version** — the `formatVersion` a backup archive records in its `manifest.yml`. Restore accepts the
same or an older format and refuses a newer one, before touching the live site.
+160
View File
@@ -0,0 +1,160 @@
# Known limitations — the state of the code now
> **What this is:** an honest, current list of what Runway does **not** do, or does only partially, in the
> code as it stands (release `1.0.0`; the exact version is in the [CHANGELOG](../CHANGELOG.md)). The plugin
> contract is frozen at SPI `1.0.0` and enforced at load time ([SPI-STABILITY.md](SPI-STABILITY.md));
> configuration, the data folder and backups are governed by
> [CONFIGURATION-AND-DATA-STABILITY.md](CONFIGURATION-AND-DATA-STABILITY.md), which binds from `1.0.0`. The data
> folder and backup archives carry the version markers that promise is built on (`external/layout.yml`, a
> backup's `formatVersion`). Read the CHANGELOG's upgrade notes and take a backup before upgrading.
This file is part of the release and is kept truthful: an item leaves the list in the same change that
closes it. Items marked **after 1.0** are decided: they are not part of the `1.0.0` scope.
## Platform
- **Clustering is single-writer.** Multi-node works and is opt-in (`runway.cluster.enabled=true`): HTTP
sessions live in a Hazelcast `IMap` and cache-invalidation events are relayed over a Hazelcast topic, so
instances behind a load balancer share sessions and evict in step. The default is **off** (no Hazelcast
member, the container's own `HttpSession`). Not built (**after 1.0**): **read-only edge/replica nodes**
and a **distributed write lock**. The filesystem/YAML stores serialize writes per site within one JVM only,
so two nodes writing the same site are last-writer-wins at file granularity: keep authoring on one node.
- **Clearing the template cache acts on one node.** *Platform settings → Clear template cache* empties the
cache of the node that answered the request. On a cluster, a site **reload** evicts that site's templates
on every node (its change event is relayed); a cluster-wide clear-all needs a relay message type that does
not exist yet (**after 1.0**).
- **Each node needs the same public-page nonce key.** `external/csp-nonce.key` is created per node; copy it
to every node so a `304` from one node matches a page cached from another (Administration §8.4). With
different keys each node has its own ETags: correct, just fewer `304`s.
- **Linux-only installer.** The self-extracting `.bin` targets Linux with systemd. A Windows installer is
**after 1.0**.
- **Backups go to folders, not to object storage.** Per-site backups, retention, the opt-in schedule and the
best-effort **off-host mirror folder** (`runway.backups.offsite-dir`) ship. Pushing backups to S3/GCS
directly is **after 1.0**, as a plugin; until then point the mirror at a mounted share or sync it with a
sidecar.
## Security
- **The public-page CSP is no stronger than the host allowlist against injected markup — and no weaker.**
Public pages carry a nonce derived from the page version plus `'strict-dynamic'`, and the response edge
stamps that nonce only on the scripts the `'self'` + host-allowlist policy would have run (same-origin or
allowlisted `src`; never an inline script). An injected inline script or foreign-host script therefore stays
blocked in `enforce` mode, but an injected `<script src>` pointing at the site itself or at an allowlisted
host runs — as it did under the allowlist policy — and, through `'strict-dynamic'`, may load further scripts
from any host. Template escaping is the defence against injection itself. What the nonce closes is the
host-allowlist bypass for parser-inserted scripts, and it blocks scripts written at runtime
(`document.write`).
- **Some responses keep the host-allowlist policy.** Responses without a page version (error pages, plugin
endpoints, the maintenance page), a page larger than the 8 MiB rewrite buffer, and a page whose markup
already contains its own nonce (copied in through an input the page version does not fold — e.g. into an
`<iframe srcdoc>`) or a foreign preload hint the edge cannot remove (below) carry `'self'` plus the host
allowlist, without a nonce.
- **Inline-SVG scripts do not run under `enforce`.** The stamp needs a `src` attribute and an empty element:
an SVG `<script href>` names its file in `href` (which an HTML `<script>` ignores, running its text), and an
SVG `<script src>` runs its text, so neither can be stamped safely without building the document tree. Load
the code with a normal `<script src>` in the page. For the same reason a `<script src>` placed inside an SVG
`<title>` or `<style>` is left unstamped: the edge reads those as text (as HTML does), while inside `<svg>` the
browser does not — under `enforce` such a script is blocked rather than guessed at.
- **Preload hints to a host outside the policy are removed from public pages.** Under `'strict-dynamic'` a browser
fetches a `<link rel="modulepreload">` or `<link rel="prefetch">` from any host (measured in Chrome 155), so the
edge removes such a link — and a `preload` with a script-class `as` — unless its URL is on the site's origin or a
host the policy names. A hint written inside an SVG `<title>`/`<style>` (or another element the edge reads as
text), or inside an `<iframe srcdoc>`, cannot be removed safely; that response then falls back to the
host-allowlist policy without a nonce and with `no-store` (the fetch is blocked; the page loses shared caching
until the hint is gone). A page that merely *shows* such a tag written literally — unescaped inside a
`<textarea>`, or in an inline script's string — falls back the same way, because the edge builds no document
tree and cannot tell which element the browser will make of it; a sample escaped as text (`&lt;link …&gt;`, what
a code block normally holds) is not affected. The same fallback covers markup the edge cannot read with certainty
the way the browser will: after an inline `<svg>`, `<math>`, `<select>` or `<template>`, a
raw-text element (`<style>`, `<title>`, `<script>` …) or `<![CDATA[` whose two possible readings disagree, a
`<noscript>` that reads differently with scripting on and off, or a `<base>` there. Well-formed pages never reach
it; the edge follows every tokenizer state that does not depend on the document tree (bogus comments, DOCTYPE,
end-tag attributes, the script escape states), checked against Chrome 155 on a corpus of crafted pages.
- **`preconnect`, `dns-prefetch` and `prerender` hints reach any host, under any policy.** CSP has no directive for
the first two, and Chrome's prerender (NoState prefetch) contacted a foreign host under the host-allowlist policy
too (measured in Chrome 155). Injected markup can therefore make a visitor's browser open a connection to (never
run code from) a host of its choosing; this is unchanged by the public nonce, and template escaping is the
defence.
- **A site's own scripts can act as that site's signed-in console users.** A site's public pages and its console
(`/__admin`) share one origin, and CSP cannot separate two documents on one origin: a script on a public page can
call the console with the session of a site user signed in in the same browser. And whoever can put a `.js` file
on a site (*Configure site*, or template editing) can run any script on its public pages, because under
`'strict-dynamic'` a same-origin script may load others from any host. The operator console is kept off site host
names for this reason (Administration §8.6); separating a site's console onto a host name of its own is a design
for after 1.0.
- **CSP is report-only out of the box.** `runway.csp.mode: enforce` is the operator's switch after reviewing
the violation log (Administration §8.4).
## Console and content
- **Accessibility: structural baseline only.** Every console screen has accessible names, `lang`,
landmarks, a skip link, `aria-current` on the active kernel menu entry and table header scopes, and a test
keeps them there. Not done yet: a **colour-contrast audit**, **live regions** for status messages that
appear without a page load, and `aria-current` on **plugin-contributed menu entries** (the kernel's own
entries carry it; a plugin's entry is marked active by nothing). The password show/hide toggle stays out
of the tab order on purpose (its name and state are exposed).
- **The page editor's live preview follows the code, not the metadata.** Unsaved edits in *Page HTML* and
*Decoupled logic* render as you type; unsaved title, path or master changes show only after **Save**, and
the popped-out preview window always shows the saved page. If a live render fails (no answer within 15
seconds), the panel returns to the saved page and stops following edits until the editor is reloaded.
- **A site's storage limit covers its uploads, not every file it has.** The limit on Sites (off by default)
counts and gates what is under the site's `static/` folder: the Static files and Documents uploads. Pages,
fragments, pending revisions and messages (each save bounded by the 16 MiB form limit, not in number), plugin
files (`sites/<id>/plugins/`, 16 MiB per write) and the site's own logs and statistics are neither counted nor
refused, and nothing bounds the **number** of files, so many tiny files can exhaust a filesystem's inodes before
its bytes. On a server whose sites are not all yours, also put the data folder on its own filesystem or mount.
The check holds a lock on one node only: on a cluster, two nodes uploading to one site at the same moment can
both pass it (authoring belongs on one node anyway, see *Clustering*).
- **No per-site bandwidth chart for the operator.** `/__app/bandwidth` lists every site's totals; the
per-site chart is on the site's own console only.
- **Site insights count crawlers.** The tenant **Insights** screen (top 404s, most-visited pages) reads the
per-site access log, which records no user agent, so a crawler's requests count like a visitor's (the
screen says so). A busy site's tallies can be approximate: each keeps at most 5,000 distinct paths and a
scan stops after two million lines, and the screen flags both.
- **Audit export is capped.** The journal viewers' CSV download carries at most 10,000 rows per request
(a capped download carries `X-Runway-Audit-Incomplete: true`); narrow the date range for more.
- **Six path advisories are not quality checks.** The page editor's checks on page paths stay in the editor
rather than in the `PageQualityCheck` set, because the checks' view of a page does not carry the raw
per-language paths; they are advisory and never block publishing on an *Enforced* or *Reviewed* site.
## Plugins
- **Only the essential protection plugin ships in the installer.** It is seeded into
`external/plugins/protection/` on a fresh install and refreshed on every upgrade (it is lockstep with the
kernel; the previous jar and descriptor are kept as `*.bak`, edited templates/i18n are backed up). Every
other plugin (such as search and search-lucene) is a deliberate operator install; there is no plugin
marketplace or auto-update path.
- **Plugins built for the pre-1.0 plugin contract do not load.** The plugin contract is frozen at SPI `1.0.0`
([SPI-STABILITY.md](SPI-STABILITY.md)). A plugin with a `mainClass` that declares no `requiresSpi` floor of at
least `0.4.0` — or any plugin that links Runway's internal classes — shows **Blocked** on **Plugins** with the
reason; the platform runs without it until you install the plugin's release made for Runway 1.0
(Administration §11).
- **A plugin cannot add servlet filters, security chains or CSP hosts.** These are outside the 1.0 contract (they
reach every request); only the essential protection plugin uses them. A plugin whose script loads from or frames
a third-party host needs the operator to add it to `runway.csp.extra-hosts`.
- **A multipart body reaches a plugin route raw.** A plugin route receives a `multipart/form-data` body as bytes
and parses it itself, and takes its CSRF token in the `X-CSRF-TOKEN` header (no first-party plugin accepts
uploads).
- **Billboard and News plugins are not built** (**after 1.0**, as plugin releases).
- **No published plugin serves `/sitemap.xml`, `/robots.txt`, `/llms.txt` or schema.org structured data.** The
kernel provides the seams (`EndpointContributor`, `HeadContributor`) and the Site-manager guide (§10) describes
what such a plugin provides, but none of the published plugins (demo, search, search-lucene, lucene-provider)
does; without one a site serves no `/robots.txt` at all (crawlers read that as everything allowed) and no sitemap.
- **The search plugin's rate limit is a courtesy limiter, not a defence.** It keys on the client address after
the kernel's trusted-proxy gate; the kernel's own edge guard is the abuse floor.
- **A search index rebuilds by rendering every page once per language.** A page is indexed as rendered in
each language it exists in (bundle strings included), so the first query after a change renders the site's
pages to rebuild the index — slower than later queries on a
large multilingual site. A change no event announces (a template edited on disk) reaches the index after the
search plugin's freshness window or the search settings' **Rebuild index** button.
## By design — not limitations
- **No database.** The kernel is filesystem/YAML-backed on purpose; there is no SQL layer to
configure. A deployment that genuinely needs one adds it as a **datasource-provider plugin** (the
first-run wizard therefore provisions the app superadmin + first site, never a DB).
- **Central seed changes do not back-propagate to existing tenants.** Each tenant owns its copy of the
seeded master/templates after creation (the self-containment law); improving the seed affects only
*new* tenants. This is the deliberate price of complete tenant isolation and portable backups.
- **No public draft-preview link.** A draft is previewed inside the console only; there is
no shareable URL that shows unpublished content to someone without a console account.
+1002
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+34
View File
@@ -0,0 +1,34 @@
# Runway Documentation
This is Runway's **delivered documentation** — the self-contained set that ships with the
product. Together with the source code, it is everything you need to install, operate,
manage, use, and extend Runway through its plugin system. Each document explains what it
needs directly.
## Find your document
| Document | For | Covers |
|---|---|---|
| [`../README.md`](../README.md) | Anyone | What Runway is, and **quick install + first access** |
| [PLUGIN-DEVELOPMENT.md](PLUGIN-DEVELOPMENT.md) | Plugin authors | Writing a Runway plugin: descriptor, contribution seams, settings, permissions, packaging |
| [SPI-STABILITY.md](SPI-STABILITY.md) | Plugin authors, maintainers | What the extension API (`runway-spi`) promises the code compiled against it, and the rules by which it may evolve from `1.0.0` |
| [ADMINISTRATION.md](ADMINISTRATION.md) | **Application administrators** | Install, configure, run; install/manage plugins; create and manage sites and application users; protection, backups, monitoring, upgrades |
| [SITE-MANAGER-GUIDE.md](SITE-MANAGER-GUIDE.md) | **Site managers & limited users (e.g. designers)** | Configure a site and its plugins; create users; roles & permissions; create/edit pages; the page-authoring contract for designers |
| [OPERATIONS.md](OPERATIONS.md) | Operators | Day-2 operations: health checks, troubleshooting, tuning, backup/restore, incident recovery |
| [GLOSSARY.md](GLOSSARY.md) | Everyone | The shared vocabulary used across these documents |
| [SETTINGS-REFERENCE.md](SETTINGS-REFERENCE.md) | Operators | Every setting: what it does, its values and default, and where it is set — which console screen, or the server only and why (generated) |
| [CONFIGURATION-AND-DATA-STABILITY.md](CONFIGURATION-AND-DATA-STABILITY.md) | Operators, plugin authors, monitoring | What stays compatible from `1.0.0` outside the Java API: every `runway.*` key, the data folder file by file, the backup format, `plugin.yml`, public paths, metric and logger names — and what is **not** covered |
| [KNOWN-LIMITATIONS.md](KNOWN-LIMITATIONS.md) | Everyone | What the code does **not** do yet (or does partially), and what is decided to come after `1.0.0` — read before evaluating a release |
The repository root also carries [`../CHANGELOG.md`](../CHANGELOG.md), and
[`../monitoring/README.md`](../monitoring/README.md) describes the bundled Prometheus and Grafana
assets: exposing `/actuator/prometheus` with a scrape token, the alert rules, the dashboard, and
the metrics they use.
## Document conventions
- **Self-contained.** Each document explains Runway directly. Cross-links point only within
this delivered set.
- **Status.** Runway is built kernel-first, and each change ships with its documentation. Every section
covering a built feature is written; the delivered set no longer carries `_Pending_` placeholders.
[KNOWN-LIMITATIONS.md](KNOWN-LIMITATIONS.md) is the honest, current list of what Runway does not yet do.
+278
View File
@@ -0,0 +1,278 @@
# Settings reference
<!-- GENERATED by scripts/dev/gen-settings-reference.py — do not edit; edit its sources and run it again. -->
Every setting the Runway kernel and its essential protection plugin read: what it does, the values it takes, and where you set it. Per-site settings are made on the site console's screens (SITE-MANAGER-GUIDE.md); optional plugins document their own settings.
## How settings are layered
- **The console** keeps what you set on its screens in `external/platform.yml` (platform) and in each site's folder (that site). Only values that differ from the default are stored. A blank field restores the default; a blank token field keeps the stored token.
- **The server** can set any key in `external/application.yml`, an environment variable (`RUNWAY_CSP_MODE` for `runway.csp.mode`) or a command-line argument. **A value set there wins**, and the console shows that field disabled with where it is set, and what removing it there would do. To move a key to the console in one restart, click **Use the file's value** on its row first (it copies the value the server runs with), then remove the line and restart: nothing changes (ADMINISTRATION.md §8).
Two exceptions. *Password strength* (`runway.security.password-strength`): the value chosen on Platform settings wins over every server source, and the field is never locked. *The protection plugin's settings* (section 2): `external/plugin-settings/protection.yml`, which its settings screen writes, wins over `external/application.yml`, and the form shows no lock; an environment variable or a command-line argument still wins over both.
- **When a change applies:** the settings in section 1 apply after the next restart (the form says which are pending). Settings on the other screens in section 2 say when they apply.
- **Kept out of the console on purpose:** the settings in section 3, each with the reason.
## 1. Console settings: Server settings and the policy cards
### Settings → Server settings
Screen: `/__app/config/server` (platform administrators). Applies after a restart.
#### Content-Security-Policy
The browser security policy every page is sent with. It limits where scripts, styles, images and frames may come from. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Mode | `runway.csp.mode` | report sends the policy as report-only (violations are logged, nothing is blocked); enforce blocks what the policy does not allow; off sends no policy. | one of `report`, `enforce`, `off`; default `report` |
| Use strict-dynamic (master switch) | `runway.csp.strict-dynamic` | A script the page loaded with its nonce may load further scripts. On: console pages use it, and public pages too while the switch below is on. Off rolls every page, console and public, back to the host lists below. | `true` or `false`; default `true` |
| Use strict-dynamic on public pages | `runway.csp.public-strict-dynamic` | Public pages get a nonce and strict-dynamic too. Needs the switch above. | `true` or `false`; default `true` |
| Extra allowed hosts (all sites) | `runway.csp.extra-hosts` | Every site's pages may load from these hosts, e.g. https://www.youtube.com. They are added to scripts, styles, images, fonts, connections and frames. For a host only one site needs, use Settings → Embed hosts instead. | comma-separated list; default empty |
| Upgrade insecure requests | `runway.csp.upgrade-insecure-requests` | The browser fetches http:// resources over https:// instead. | `true` or `false`; default `false` |
| Report URI *(Advanced)* | `runway.csp.report-uri` | Where browsers send violation reports. The default is Runway's own collector, which writes them to the log. A blank field restores this default; to send no reports at all, set runway.csp.report-uri: "" in external/application.yml. | text; default `/__csp-report` |
| default-src *(Advanced)* | `runway.csp.default-src` | The source list for anything without its own directive. A blank field restores 'self'; to leave the directive out, set the key to "" in external/application.yml. | text; default `'self'` |
| script-src *(Advanced)* | `runway.csp.script-src` | Script sources. The page's nonce (and strict-dynamic, when on) is always added. | text; default `'self'` |
| style-src *(Advanced)* | `runway.csp.style-src` | Style sources. | text; default `'self' 'unsafe-inline'` |
| img-src *(Advanced)* | `runway.csp.img-src` | Image sources. | text; default `'self' data:` |
| font-src *(Advanced)* | `runway.csp.font-src` | Font sources. | text; default `'self'` |
| connect-src *(Advanced)* | `runway.csp.connect-src` | Where scripts may connect (fetch, XHR, WebSocket). | text; default `'self'` |
| base-uri *(Advanced)* | `runway.csp.base-uri` | Allowed values of a page's <base> element. | text; default `'self'` |
| form-action *(Advanced)* | `runway.csp.form-action` | Where forms may submit. | text; default `'self'` |
| frame-ancestors *(Advanced)* | `runway.csp.frame-ancestors` | Which sites may show these pages in a frame. 'none' forbids all. | text; default `'self'` |
#### Request limits
How large a request may be. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Largest request before sign-in (bytes) | `runway.endpoints.max-form-bytes` | The most a visitor who is not signed in may send in one request, on any path. Default 262144 (256 KiB). | whole number from 1024 to 104857600; default `262144` |
| Largest request to a plugin (bytes) | `runway.endpoints.max-body-bytes` | The most a signed-in user may send to a plugin's route. Default 10485760 (10 MiB). | whole number from 1024 to 1073741824; default `10485760` |
| Largest uploaded file | `spring.servlet.multipart.max-file-size` | For uploads such as a backup to restore. A size like 256MB or 1GB. Default 256MB. | text; default `256MB` |
| Largest upload request | `spring.servlet.multipart.max-request-size` | All the files of one upload together. A size like 256MB. Default 256MB. | text; default `256MB` |
#### Site storage
How much each site may keep in its static files and documents. A site's own limit, set on Sites, wins over this default. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Storage per site (bytes) | `runway.static-files.default-max-bytes` | The most a site's static files and documents may take on disk. An upload that would go over it is refused; nothing already stored is deleted or hidden, and a site over it can still delete. 0: no limit. Default 0. | whole number from 0 to 9223372036854775807; default `0` |
#### HTTP caching
The Cache-Control header pages and files are sent with. A page's own cache setting in the page editor wins over these. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Public pages | `runway.http-cache.public-pages` | Default: browsers and caches keep a page 5 minutes and may serve it 1 more minute while refreshing. | text; default `public, max-age=300, stale-while-revalidate=60` |
| Site files | `runway.http-cache.assets` | Files under a site's /static/ (except the immutable kinds below). Default: one day. | text; default `public, max-age=86400` |
| Plugin files | `runway.http-cache.plugin-assets` | Files plugins serve under /__plugin/ (their styles and scripts). Default: one hour, then checked against the file's content. | text; default `public, max-age=3600` |
| Immutable file types | `runway.http-cache.immutable-extensions` | Extensions served as never changing (fonts by default). Give such files a new name when they change. | comma-separated list; default `woff2,woff,ttf,otf,eot` |
| Immutable files *(Advanced)* | `runway.http-cache.immutable-assets` | The header for the types above. Default: one year, immutable. | text; default `public, max-age=31536000, immutable` |
#### Response compression (tuning)
Fine-tuning for the compression switches above. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Smallest body to gzip (bytes) | `runway.compression.gzip.min-size` | Default 1024. | whole number from 0 to 10485760; default `1024` |
| Smallest body to Brotli-encode (bytes) | `runway.compression.brotli.min-size` | Default 1024. | whole number from 0 to 10485760; default `1024` |
| Brotli quality | `runway.compression.brotli.quality` | 0 is fastest, 11 smallest; 4 to 6 suit compressing on the fly. Default 5. | whole number from 0 to 11; default `5` |
| Largest body to compress (bytes) *(Advanced)* | `runway.compression.max-buffer-bytes` | Larger responses are sent uncompressed. Default 4194304 (4 MiB). | whole number from 65536 to 268435456; default `4194304` |
| Compressed content types *(Advanced)* | `runway.compression.mime-types` | The whole list: what you enter replaces it. | comma-separated list; default `text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml,image/svg+xml` |
#### Monitoring
The health probe each site answers at /__health, the metrics endpoint, and the site reload endpoint. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Answer the health probe (/__health) | `runway.health.enabled` | Off: /__health is not served. | `true` or `false`; default `true` |
| Check the site's content too | `runway.health.content-check` | The probe also checks that the home page and the master template are there. | `true` or `false`; default `true` |
| Content check result kept for (seconds) *(Advanced)* | `runway.health.content-check-ttl-seconds` | Default 10. | whole number from 1 to 3600; default `10` |
| Health detail token | `runway.health.token` | A probe that sends it as a Bearer token gets the detailed body. Never set: only the public answer. A blank field keeps the stored token; type a new one to replace it. | secret (stored encrypted, never shown); default empty |
| Metrics scrape token | `runway.metrics.scrape-token` | Lets a monitoring system read /actuator/prometheus with this Bearer token. Never set: only signed-in operators can. A blank field keeps the stored token; type a new one to replace it. | secret (stored encrypted, never shown); default empty |
| Site reload endpoint | `runway.reload.enabled` | Lets a deployment script make a site re-read its files. Inactive until the token is set. | `true` or `false`; default `true` |
| Reload token | `runway.reload.token` | The Bearer token the reload endpoint requires. A blank field keeps the stored token; type a new one to replace it. | secret (stored encrypted, never shown); default empty |
#### Site logs
The access and audit log each site keeps (its Logs and Insights screens). Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Keep site logs | `runway.logs.enabled` | Off: no site records new access or audit lines; the Logs screen keeps the lines already written, Insights shows nothing. | `true` or `false`; default `true` |
| Longest a site may keep its logs (days) | `runway.logs.max-retention-days` | Each site chooses its own retention up to this. Default 90. | whole number from 1 to 3650; default `90` |
| Record the browser (User-Agent) | `runway.logs.access-log-user-agent` | Adds the User-Agent to each access line. | `true` or `false`; default `false` |
| Log queue size (lines) *(Advanced)* | `runway.logs.queue-capacity` | Lines waiting to be written; beyond it lines are dropped and counted. Default 8192. | whole number from 16 to 1048576; default `8192` |
#### Console languages
The languages this console's language switcher offers. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Languages offered | `runway.operator.ui-languages` | Language codes in display order. Each needs a console translation: en and es ship, others go in external/i18n/. | comma-separated list; default `en,es` |
| Default language | `runway.operator.default-language` | Used when the browser asks for none of the languages offered. | text; default `en` |
#### Sessions
How long a signed-in console session lasts without activity. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Idle session timeout | `server.servlet.session.timeout` | A duration such as 30m, 2h or 1d. Default 30m. | text; default `30m` |
#### Reverse proxy
Whether to trust X-Forwarded-* headers, and from which addresses. Only from your own proxy: otherwise visitors could fake their address. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Read X-Forwarded-* headers | `runway.proxy.forwarded-headers` | From the trusted addresses below only. | `true` or `false`; default `true` |
| Trusted proxy addresses | `runway.proxy.trusted-cidrs` | The exact address of your reverse proxy, e.g. 10.0.0.5/32. A /0 (0.0.0.0/0, ::/0), or ranges that add up to every address (0.0.0.0/1 with 128.0.0.0/1), would trust every client to fake its address, so it is refused. | comma-separated list; default `127.0.0.1/32,::1/128` |
#### Capacity
Threads and concurrency limits. The defaults suit most servers; raise them only for measured load. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Most request threads | `server.jetty.threads.max` | Default 200. | whole number from 8 to 10000; default `200` |
| Fewest request threads *(Advanced)* | `server.jetty.threads.min` | Default 8; never above the most. | whole number from 1 to 1000; default `8` |
| Message file re-check (seconds) *(Advanced)* | `runway.i18n.cache-seconds` | How often a site's message files are checked for changes made outside the console (Messages screen saves apply at once). 0: on every use. Default 5. | whole number from 0 to 3600; default `5` |
| Scheduler threads *(Advanced)* | `spring.task.scheduling.pool.size` | Threads for backups and plugin jobs. Default 4. | whole number from 1 to 64; default `4` |
| Password checks at once *(Advanced)* | `runway.security.max-concurrent-hashes` | Each takes about 19 MiB (32 MiB with the High profile). Beyond it, sign-ins wait. Default 8. | whole number from 1 to 256; default `8` |
| Longest wait for a password check (ms) *(Advanced)* | `runway.security.acquire-timeout-millis` | Then the sign-in answers "busy". Default 2000. | whole number from 100 to 60000; default `2000` |
#### Protection logging
What the request protection writes to the log when it refuses a request. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Log refused requests | `runway.protect.log-rejections` | One line per refused request (403 or 429). The count in the metrics is kept either way. | `true` or `false`; default `true` |
| Repeat lines suppressed for (seconds) | `runway.protect.log-rejection-window-seconds` | For the same address and reason; the next line says how many were suppressed. Default 60. | whole number from 1 to 86400; default `60` |
### Backups → Settings (backup policy)
Screen: `/__app/config/backups` (platform administrators). Applies after a restart.
#### Backup policy
Automatic backups of every site, and how many stored backups are kept. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Back up every site automatically | `runway.backups.schedule.enabled` | On the schedule below. | `true` or `false`; default `false` |
| Schedule | `runway.backups.schedule.cron` | Six fields: second minute hour day month weekday. Default 0 30 2 * * * (02:30 every day). | text; default `0 30 2 * * *` |
| Stored backups kept per site | `runway.backups.retention.max-count` | The newest this many are kept; 0 keeps all. Default 30. | whole number from 0 to 100000; default `30` |
| Delete stored backups older than (days) | `runway.backups.retention.max-age-days` | 0: no age limit. Default 0. | whole number from 0 to 36500; default `0` |
| Largest file inside a backup to restore (bytes) *(Advanced)* | `runway.backups.max-entry-bytes` | A guard against archives that expand without limit. Default 268435456 (256 MiB). | whole number from 1048576 to 17179869184; default `268435456` |
### Bandwidth → Settings (metering and quota)
Screen: `/__app/config/bandwidth` (platform administrators). Applies after a restart.
#### Metering and quota
Per-site traffic counting, its history, and the monthly cap. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Count each site's traffic | `runway.bandwidth.enabled` | Off: nothing new is counted and no cap is enforced; the Bandwidth screens keep the history already recorded. | `true` or `false`; default `true` |
| Monthly cap per site (bytes) | `runway.bandwidth.quota.default-monthly-bytes` | Outbound bytes in the last 30 days; above it the site's public pages answer 503 (its console keeps working). 0: no cap. A site's own cap is set on Sites. | whole number from 0 to 9223372036854775807; default `0` |
| Keep traffic history (days) | `runway.bandwidth.retention-days` | Default 90. | whole number from 1 to 3650; default `90` |
| Counting interval (seconds) *(Advanced)* | `runway.bandwidth.snapshot-seconds` | Also how often the cap is checked. Default 60. | whole number from 1 to 3600; default `60` |
### Activity → Logs → Settings (activity log retention)
Screen: `/__app/config/activity` (platform administrators). Applies after a restart.
#### Activity log
How long the console's activity log is kept. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Keep the activity log (days) | `runway.app-activity.retention-days` | Default 90. Switching the log off is set on the server only, so it cannot be done by the people it records. | whole number from 1 to 3650; default `90` |
### Plugins → Settings (plugin limits)
Screen: `/__app/config/plugins` (platform administrators). Applies after a restart.
#### Plugin limits
Size limits for installing plugins and for the files plugins keep per site. Applies after a restart.
| Setting | Key | What it does | Values |
|---|---|---|---|
| Largest file inside a plugin to install (bytes) | `runway.plugins.max-entry-bytes` | Default 134217728 (128 MiB). | whole number from 1048576 to 4294967296; default `134217728` |
| Largest file a plugin keeps per site (bytes) | `runway.plugins.site-files.max-write-bytes` | Default 16777216 (16 MiB). | whole number from 1024 to 1073741824; default `16777216` |
## 2. Settings edited on other console screens
| Key | Where |
|---|---|
| `runway.compression.enabled` | Settings → Platform settings, Response compression (applies at once) |
| `runway.compression.brotli.enabled` | Settings → Platform settings, Response compression (applies at once) |
| `runway.compression.gzip.enabled` | Settings → Platform settings, Response compression (applies at once) |
| `runway.node.name` | Settings → Platform settings, Node name (the console's value wins over this key) |
| `runway.security.password-strength` | Settings → Platform settings, Password strength (applies to new passwords after a restart; the console's value wins over this key) |
| `runway.bandwidth.quota.per-site` | Sites → Edit, Monthly bandwidth cap, per site (applies at once) |
Log levels (`logging.level.<logger>`) are set on **Activity → Logs → Log levels** (`/__app/logs/levels`): they apply at once and are kept in `platform.yml`; a level set in `application.yml` wins and shows locked.
The essential protection plugin's settings are on **Plugins → Essential Protection → Settings** (`/__app/plugins/protection/settings`). They are stored in `external/plugin-settings/protection.yml` and bound as `runway.plugin.protection.<key>`; they apply after a restart. Its login protection (honeypot, lockout, CAPTCHA) is the panel below that form and applies at once; each site has its own on `/__admin/protection`.
#### Rate limit
| Setting | Key | What it does | Values |
|---|---|---|---|
| Rate-limit burst capacity | `runway.plugin.protection.rate-limit.capacity` | How many requests one address may make back to back before it is slowed down. Default 120. | whole number from 1 to 100000; default `120` |
| Rate-limit refill per second | `runway.plugin.protection.rate-limit.refill-per-second` | How many requests per second an address gets back after a burst. Default 2; 0.5 means one every two seconds. Must be above 0. | number from 0.01 to 10000; default `2` |
#### Auto-block
| Setting | Key | What it does | Values |
|---|---|---|---|
| Auto-block repeat offenders | `runway.plugin.protection.rate-limit.auto-block.enabled` | Off: an address over the limit only gets 429s and is never blocked. | `true` or `false`; default `true` |
| Auto-block after this many rate-limit breaches | `runway.plugin.protection.rate-limit.auto-block.breach-threshold` | How many 429s within the window before the address is blocked. Default 60. | whole number from 1 to 100000; default `60` |
| Counted within (seconds) | `runway.plugin.protection.rate-limit.auto-block.window-seconds` | The period the 429s are counted over. Default 60 seconds. | whole number from 1 to 86400; default `60` |
| Auto-block duration (seconds) | `runway.plugin.protection.rate-limit.auto-block.block-seconds` | How long an auto-block lasts; the visitor gets 429 with the remaining time in Retry-After. Default 900 (15 minutes). | whole number from 1 to 604800; default `900` |
#### Exemptions
| Setting | Key | What it does | Values |
|---|---|---|---|
| Never rate-limit or auto-block these IPs/CIDRs (your own audits, probes, load tests) | `runway.plugin.protection.allowlist` | One IP or CIDR per line, e.g. 203.0.113.7 or 198.51.100.0/24. For your own audits, probes and load tests. Loopback is not exempt unless listed: behind a same-host proxy every visitor arrives from loopback. | comma-separated list; default empty |
#### Remember this device
| Setting | Key | What it does | Values |
|---|---|---|---|
| Allow "remember this device" (skip the login captcha on trusted devices) | `runway.plugin.protection.remember-device.enabled` | Off: the login CAPTCHA is shown on every login. | `true` or `false`; default `true` |
| Remember a device for (days) | `runway.plugin.protection.remember-device.days` | How long a device is remembered, 1 to 365. Default 30. | whole number from 1 to 365; default `30` |
## 3. Server-only settings, and why
Set these in `external/application.yml` (or the environment). They stay out of the console because the console cannot change them safely, or cannot exist until they are known.
| Keys | Why not in the console |
|---|---|
| `runway.app-activity.enabled` | It switches off the operator activity log. If the console could turn it off, an operator could silence the record of their own actions. |
| `runway.backups.offsite-dir` | A folder on the server that receives full site archives (user records, encrypted plugin secrets). Set from a browser it could point into a web-served folder or another site's folder; choosing and mounting the share is the server administrator's job. Shown read-only on Backups. |
| `runway.cluster.enabled`<br>`runway.cluster.cluster-name`<br>`runway.cluster.topology`<br>`runway.cluster.session-ttl`<br>`runway.cluster.sessions-map-name`<br>`runway.cluster.events-topic-name`<br>`runway.cluster.embedded.discovery`<br>`runway.cluster.embedded.members`<br>`runway.cluster.embedded.port`<br>`runway.cluster.embedded.port-auto-increment`<br>`runway.cluster.client.addresses`<br>`runway.cluster.client.smart-routing` | Read before the application is built (the cluster member and the shared session store are created at startup), and every node must hold the same value; one node's console cannot change the others. |
| `runway.console.hosts` | The host names the operator console answers on. A wrong value would lock every operator out of the console, so the console cannot be the place to change it: the file on the server is the way back in. Read at startup; each node of a cluster reads its own. |
| `runway.demo.first-run.id`<br>`runway.demo.first-run.host`<br>`runway.demo.first-run.master-username`<br>`runway.demo.first-run.master-password` | Used once, on the first start of an unattended evaluation box, before any operator exists to sign in. The console equivalent is Sites → Install a demo site. |
| `runway.plugins.root` | Read before the application starts: the plugin loader finds the plugins there before the console exists, and the folder decides what code the server runs. |
| `runway.security.app-master-id` | The trust anchor that pins the undeletable application superadmin, read before the application starts; set by the setup wizard and never edited by hand. |
| `runway.security.secret-key` | The key that encrypts every other stored secret. Typing it into a browser would put it on the wire, and changing it would make every stored secret unreadable; the installer keeps it in a root-only file. |
| `runway.storage.external`<br>`runway.storage.sites` | Read before the application starts: the data folder holds application.yml, platform.yml and every site, so the console cannot live anywhere until it is known. |
| `runway.storage.backups` | Read before the application starts, like the data folder, and it receives full site archives (the same reason as runway.backups.offsite-dir). |
| `runway.storage.stats`<br>`runway.storage.logs` | Retired before 1.0 and has no effect; a value set in application.yml is reported once at startup. |
| `runway.tls.enabled`<br>`runway.tls.keystore`<br>`runway.tls.keystore-password`<br>`runway.tls.keystore-type`<br>`runway.tls.key-alias`<br>`runway.tls.sni-host-check`<br>`runway.tls.watch-keystore`<br>`runway.tls.redirect-http.enabled`<br>`runway.tls.redirect-http.port`<br>`runway.tls.redirect-http.status`<br>`runway.tls.redirect-http.acme-challenges-dir` | Read before the server starts serving: the HTTPS and redirect listeners are built from it at startup, and a wrong value set from the console could make the console itself unreachable. The certificate files and their password belong to the server. |
Spring Boot keys Runway pins in its shipped `application.yml` (for example `server.forward-headers-strategy`, `spring.web.resources.add-mappings`, `spring.security.filter.order`) are part of how the platform works, not preferences: do not change them. ADMINISTRATION.md §8 lists them.
File diff suppressed because it is too large. Load diff
+244
View File
@@ -0,0 +1,244 @@
# SPI stability commitment
This document states what Runway's extension API (`runway-spi`) guarantees to the code that compiles against
it — plugins and any first-party extension — and the rules by which it may evolve. It is the promise a plugin
author relies on when they build against a released `runway-spi` and expect their jar to keep loading on a
later Runway.
> **Status: in force from SPI `1.0.0` (Runway `1.0.0`).** The surface below — 56 types in three packages — is
> **frozen**: from here it changes only additively, within the `1.x` line, by the rules in this document. It includes
> the service tier (SPI `0.4.0`–`0.6.0`) through which a plugin reaches the host instead of importing host-internal
> classes. From `1.0.0` the kernel **enforces** the contract at load time: a plugin built for the pre-1.0 contract,
> one that links a kernel class, and one that breaks the Spring-context rules are each **blocked** with a reason on
> the plugins screen (see "How the kernel enforces it" below).
## What the SPI is
`runway-spi` is a **dependency-free** module: the extension interfaces (`mx.quest.runway.spi`), the immutable
boundary model they exchange (`mx.quest.runway.spi.model`) and the host services a plugin receives by injection
(`mx.quest.runway.spi.service`). It depends on **nothing** in the host — a plugin compiles against this thin, stable
artifact (and `runway-spi-testkit` for its tests), never against `runway-app`. `RunwaySpi.VERSION` is the contract
version an extension was built against — a compile-time constant, so the compiler copies it into the plugin;
`RunwaySpi.runtimeVersion()` reports the version of the kernel actually running.
**The 1.0 contract is the SPI alone.** Everything a plugin needs from the host — its settings, its per-site files,
the site's content and URLs, change events, the current request's site, permission checks, messages, starter pages,
console screens — is in the tables below. A plugin that needs something else has found a gap in the SPI; it is
added (additively) in a 1.x MINOR, never reached around.
## The surface (SPI `1.0.0`)
"Since" is the SPI version that introduced the type; every type is part of the `1.0.0` contract regardless.
### Extension axes — interfaces a plugin implements, collected by type
| Type | Since | Lifecycle method | Purpose |
|---|---|---|---|
| `HeadContributor` | 0.1 | `render(HeadContext) → String`, `headInputs(path)` | edge `<head>` markup injected on every page |
| `ContentWidget` | 0.1 | `render(WidgetView) → RenderFragment` | body content at a `data-widget` anchor |
| `PageQualityCheck` | 0.1 | `inspect(PageView) → List<Finding>` | content/SEO checks — advisory by default; an `ERROR` gates publishing on a site set to Enforced/Reviewed |
| `EndpointContributor` | 0.1 | `routes()`, `handle(RouteRequest) → RouteResponse` | servlet-free HTTP routes on the tenant realm |
| `ContentSource` | 0.3.0 | `enumerate` / `resolve` / `body` / `indexableText` | routable plugin content (virtual pages) fed to routing, the catalog, sitemap/llms.txt and search |
| `BackupParticipant` | 0.1 | `export` / `importInto` | per-site data kept **outside** the site folder (no first-party plugin has any; the plugin's own subtree already travels in the backup) |
| `CaptchaService` | 0.2.1 | `widget` / `verify` | the configured CAPTCHA (implemented by the essential plugin, consumed by any plugin with a public form) |
| `SiteLoginProtectionControl` | 0.2.1 | per-site login-protection toggles | implemented by the essential plugin |
`FilterBand` (enum, 0.1) remains in the SPI as an **identity** only: it names the request-pipeline band of a filter
contribution, a host-coupled seam that is not part of the 1.0 contract (see "What is NOT part of this contract").
### Service tier — interfaces the kernel implements, received by ordinary Spring injection
| Type | Since | Scope | What it gives a plugin |
|---|---|---|---|
| `service.PluginSettings` (+ `model.SettingsView`) | 0.4.0 | plugin-scoped | its per-site settings, defaults applied, and its declared secrets decrypted (app-level settings bind through `@ConfigurationProperties("runway.plugin.<id>")`, not this service) |
| `model.PluginInfo` | 0.4.0 | plugin-scoped | its own id, version and install facts |
| `service.PluginLifecycle` | 0.4.0 | callback | `started(PluginInfo)` / `stopping()`, in load order and reverse |
| `service.PluginSiteFiles` (+ `model.FileEntry`) | 0.5.0 | plugin-scoped | its own per-site subtree `sites/<id>/plugins/<pluginId>/`: atomic text writes, capped reads, listing, deletes; confined against crafted paths **and** symbolic links |
| `service.Sites` | 0.5.0 | kernel singleton | a site's `SiteView` by id, off-request |
| `service.RequestContext` | 0.5.0 | kernel singleton | the tenancy the current request is bound to; empty on the application realm and off a request |
| `service.AccessCheck` | 0.5.0 | kernel singleton (bean `authz`) | `may(permissionKey)` for the current principal, fail-closed |
| `service.Messages` | 0.5.0 | kernel singleton | public text by an explicit site id; console text in the operator's UI language |
| `service.SitePages` (+ `model.StarterPage`, `model.InstallResult`) | 0.5.0 | kernel singleton | install a starter page through the site's editorial level |
| `service.ContentCatalogView` (+ `model.CatalogEntry`, `model.LocalizedUrl`) | 0.6.0 | kernel singleton | the site's published content surface with the URLs the host computed (the same addresses the `<head>`, the sitemap and llms.txt use) |
| `service.ContentChanges` | 0.6.0 | plugin-scoped | announce that its own content changed (evicts routing, listings, sitemap and search on every node; notifies listeners) |
| `service.SiteEventListener` (+ `model.SiteLifecycleEvent`, `model.SettingsChange`, `model.CatalogChange`) | 0.6.0 | callback | site lifecycle, its **own** settings saves, every change that may reshape the content surface — phased, after the kernel's caches, outside every host lock, with the item's URLs before and after |
| `service.ConsoleScreen` | 0.6.0 | annotation | a plugin `@Controller` that renders inside the console shell, with no host class |
A plugin-scoped service is bound to the plugin **whose own jar the injecting class came from**, never to an id the
plugin passes, so a plugin can only reach its own data. Rules every service keeps: no method returns `null`; an unsafe
site id (or slug, or path) throws `IllegalArgumentException` before any I/O; every service is thread-safe; off a request
thread the request-bound services answer empty, `false` or the fallback and never throw. A plugin consumes these
interfaces; it does not implement them — an alternative host or a `runway-spi-testkit` fake does, which is why the
additive rules below apply to them unchanged.
### Boundary model — immutable records the host builds (and plugin tests construct)
`Alternate`, `Capabilities`, `CaptchaWidget`, `ContentBody`, `ContentRef`, `Finding`, `HeadContext`, `IconHints`,
`PageMeta`, `PageView`, `Provenance`, `RenderFragment`, `Route`, `RouteRequest`, `RouteResponse`, `SeoTags`, `SiteRef`,
`SiteView`, `SurfacePosture`, `WidgetView` (0.1–0.3); `SettingsView`, `PluginInfo` (0.4.0); `FileEntry`,
`StarterPage`, `InstallResult` (0.5.0); `CatalogEntry`, `LocalizedUrl`, `SiteLifecycleEvent`, `SettingsChange`,
`CatalogChange` (0.6.0). Two interfaces: `BackupReader`, `BackupWriter`. Enums: `Realm`, `Severity`, and the nested
`InstallResult.Outcome`, `CatalogChange.Cause`, `SiteLifecycleEvent.Kind`, `SiteEventListener.Phase`.
### What `1.0.0` itself changed
`1.0.0` freezes the surface; it adds one component and fixes one behaviour:
- **`HeadContext.origin()`** — the trusted origin (`scheme://host[:port]`) a page is served under: the site's base
URL, else, for a host-less site such as the platform's catch-all default, the request's origin as the trusted-proxy
gate left it. A head contributor builds absolute URLs (JSON-LD `@id`s) with it; before, a host-less site's
structured data was relative. The 0.6.0 constructor is kept (`origin` is `""` there).
- **`CatalogEntry.xDefaultPath` / `pathFor`** never name an address the item is not served at: when the site does
not serve an item's primary locale, x-default is the item's first **available** locale (it used to be the site
default, an unprefixed path the item may not exist at — which llms.txt then linked).
## The compatibility rules (in force from `1.0.0`)
The SPI is **binary API**. A plugin compiled against a released `runway-spi` keeps loading on any later version of
the same MAJOR line. That is upheld by evolving **additively only**:
1. **Interfaces evolve by adding `default` methods.** Never add an abstract method (it breaks every existing
implementation), never remove, rename, reorder or re-type an existing method.
2. **Records evolve by adding components with an older-arity constructor kept.** A record gains a field only
alongside a retained constructor (or static factory) of the previous arity, so code built against the old shape
still constructs it. Never reorder, re-type, or remove an existing component. (`HeadContext` keeps four
constructors for exactly this reason.) **Record deconstruction patterns are not source-stable across MINOR
versions** (a pattern names every component, so a new component breaks it at compile time); use the accessors.
3. **Enums may gain constants in a MINOR release.** A `switch` over an SPI enum needs a `default` branch.
4. **Optional behaviour is an opt-in capability, not a fat base.** Where only some implementations participate in a
concern, it is a separate interface or a `Capabilities` flag the host branches on — never a new abstract method.
The host is **capability-driven**: it branches on declared data, never on a concrete type or `instanceof` over a
known catalog.
5. **`key()` values are the forward-compatible contract with stored data.** A stable string `key()` — not the class
name — is persisted with tenant data, so an implementation class is free to move or rename. A duplicate key never
silently shadows: between two kernel contributions it fails startup; when a plugin is involved, the plugin's
contribution is refused — the later plugin's in load order between two plugins — logged with both sides and shown
on the plugins screen, while the plugin's other contributions load.
6. **`RunwaySpi.VERSION` bumps on each additive evolution** (MINOR for a new type, member or component; PATCH for a
documented behaviour fix). A pure Javadoc clarification that does not change the contract's meaning is not a bump.
The version is plain `MAJOR.MINOR.PATCH`; the evolution log on `RunwaySpi.VERSION` is what an author reads to pick
a floor.
7. **A MAJOR line is a hard boundary.** A breaking change lands only in a MAJOR (`2.0.0`), called out in the
changelog. The kernel's MAJOR line also pins the MAJOR lines of the **platform libraries** it provides at runtime
(Spring Framework, Spring Boot, Spring Security, Thymeleaf, Jackson, the Jakarta EE APIs), which a plugin compiles
against `provided`.
8. **The values of the SPI's string constants are frozen, not just their names.** A `static final String`
initialised with a literal is a compile-time constant: the compiler copies the *value* into the plugin's bytecode,
so a plugin built against `1.0.0` keeps using the `1.0.0` value whatever a later kernel declares. Each one names
something the kernel must keep providing under that exact string for the whole `1.x` line:
`ConsoleScreen.LAYOUT_VIEW` (`"operator/op-layout"` — the console layout template),
`ConsoleScreen.CONTENT_TEMPLATE` (`"contentTemplate"`) and `ConsoleScreen.PAGE_TITLE_KEY` (`"pageTitleKey"`)
(model attributes that layout reads), `AccessCheck.BEAN_NAME` (`"authz"` — the bean name in security
expressions), `ContentCatalogView.PAGES_SOURCE` (`"pages"` — the kernel's own content-source key), and
`ContentSource.CAP_INDEXABLE_TEXT` / `CAP_ARBITRARY_PATHS` (`"content.indexable-text"`,
`"content.arbitrary-paths"` — capability flags the host branches on). Renaming the template, the attribute, the
bean or the key in a `1.x` would break every plugin that uses it, silently and at run time. (`RunwaySpi.VERSION`
is inlined too, on purpose — it records what the plugin was built against.) A new constant follows the same rule
from the release that adds it.
## How the kernel enforces it (from `1.0.0`)
Every rule here **blocks** the plugin — it is not wired, the reason is logged and printed in its row on the
**Plugins** screen, plugins that `requires:` it are blocked in cascade, and the platform starts with everything else.
None of them is a boot failure.
| Rule | Refused | Reason shown |
|---|---|---|
| **Mandatory floor** | a plugin with a `mainClass` that declares no `requiresSpi`, or a floor below `0.4.0` (library-only plugins are exempt) | "was built for the pre-1.0 plugin contract …" |
| **Floor** | a floor above the running SPI | "needs Runway SPI X or later …" |
| **MAJOR ceiling** | `kernel MAJOR > max(floor MAJOR, 1)` — a floor of `0.4.0`–`0.6.0` counts as 1.x (the service tier those versions introduced *is* the 1.0 contract); a 1.x floor is refused by a 2.x kernel | "was built for Runway SPI 1.x …" |
| **Host linkage** | a class in the plugin's own jars that references a kernel class outside `mx.quest.runway.spi` (read from the constant pool, without loading the class), or a plugin class living under `mx.quest.runway` | "uses Runway's internal classes …", naming them |
| **Missing SPI types** | an SPI type the running kernel does not have (a missing or wrong floor) | "needs SPI types this Runway does not have …" |
| **Spring-context rules** (before wiring) | a `@Bean` name not starting with the plugin id in lowerCamelCase; a `SecurityFilterChain`, servlet `Filter`, `FilterRegistrationBean`, `BeanPostProcessor` or `BeanFactoryPostProcessor`; a `@Controller` mapping outside `/__admin/<id>` and `/__app/<id>`; an unrestricted `@ControllerAdvice` | "breaks the plugin rules for Runway's shared Spring context …" |
| **Spring-context rules** (after wiring) | the same, found on a component-scanned bean the first check cannot see | the plugin is **quarantined**: the boot ends with the relaunch code (`42`) and the next boot blocks it with that reason |
| **Wiring failure** | a plugin bean that breaks the context refresh | quarantined the same way |
| **Essential dependency** | a `requires:` on the essential plugin | "requires the essential plugin …" |
A plugin's calls that fail at run time are contained instead (next section). The kernel also refuses individual
**contributions** without blocking the plugin: a colliding key, a route that is not exact or not on the tenant realm.
## The purity & isolation guarantees
Every model type is **immutable and host-built**, with collection/array components defensively copied and
null-normalized in the compact constructor — so a view handed to an implementation cannot be mutated by it or by
whoever built it. An extension-axis implementation is therefore a **pure function of its inputs**: it never sees
drafts, other versions, other tenants or other requests, and returns plain values. That keeps it trivially
unit-testable (no Spring, no I/O — `runway-spi-testkit` fakes the services), keeps tenant isolation outside the
extension, and lets the host evolve storage without touching an implementation.
- **`PageQualityCheck.inspect` must return non-null.** An empty list means "nothing to report".
- **`RouteRequest` / `RouteResponse` carry a `byte[] body`**, so their record-generated `equals`/`hashCode` compare it
by reference; do not rely on record equality for such instances. `body()` returns a fresh copy.
- **A `ContentSource` reads only its own per-tenant subtree and settings**, returns only published content with safe
paths, and keeps `enumerate()` metadata-only (it runs on anonymous requests — the sitemap). The kernel re-checks the
first two fail-closed.
## Failure containment (the host's side of the contract)
Every call the host makes into plugin code on a request, dispatch or scheduler path is contained: a
`RuntimeException` or `LinkageError` from `HeadContributor.render`/`headInputs`, `ContentWidget.render`,
`PageQualityCheck.inspect`, `EndpointContributor.handle`, a `ContentSource` method, `PluginLifecycle`,
`SiteEventListener`, `BackupParticipant.importInto` or a plugin's **`@Scheduled` method** (from `1.0.0`) is caught and
replaced — an empty head fragment or widget (that page is then served `Cache-Control: no-store` without validators),
one `WARNING` finding `check.failed` (which never blocks a publish), an endpoint `500` with `no-store`, a skipped
callback or scheduled run (the next run happens on schedule). A `null` where the axis forbids it counts as a failure.
Any other `Error` propagates. `BackupParticipant.export` is deliberately not contained: its failure fails the backup.
The first failure per plugin, axis and key is logged with its stack, then at most once a minute with a count; each is
counted in `runway.plugin.contribution.failures{plugin,axis,key}` and shown on the plugins screen. There is no circuit
breaker: a throwing contributor costs a stack unwind, not a timeout.
## What is NOT part of this contract
- **Kernel classes** (`mx.quest.runway.*` outside `.spi`): storage, sites, pages, the catalog, the host's Spring
events, the console model, the security seams. A plugin that links one is blocked.
- **Servlet filters and Spring Security chains** (`FilterContribution`, `SecurityFilterChain`): servlet- and
Spring-shaped, and able to reach every request; a non-essential plugin may not contribute them. A separate
`runway-spi-servlet` module may be added in a 1.x if a real consumer appears.
- **The kernel's events** (`PageChangedEvent`, `ContentChangedEvent`, `SiteChangedEvent`,
`SitePluginConfigChangedEvent`): internal and cluster-relayed. Plugins observe changes through `SiteEventListener`
and announce them through `ContentChanges`.
- **The URL scheme** (locale prefixes, localized slugs): plugins receive computed URLs, never the rule.
### The essential-plugin exception
A plugin on the kernel's security-floor allowlist — today only **`protection`** — is **part of the kernel
distribution**: built in the Runway reactor, released in the same tag, versioned on the kernel's line (`1.0.0`),
and declaring `requiresSpi: ">=1.0.0"`. It is exempt from the linkage scan and the Spring-context rules, because it
implements the security floor itself (`EdgeGuard`, `LoginAttemptGate`, `LoginFormGuard`, `TrustedDeviceIssuer` and
their collaborators). It still uses the service tier wherever one exists (`@ConsoleScreen`, `RequestContext`). No
plugin may `requires:` it — consumers use `CaptchaService`. If it is installed but does not load — for any reason,
including the floor rules — the platform **fails closed** (tenant pages answer `503`) rather than run without its
security floor. It is not an example to copy.
### The descriptor promise
`plugin.yml` is parsed by the host without loading plugin code, with unknown keys ignored in both directions, so a
descriptor written for a newer kernel loads on an older one and the other way round. Within `1.x` a key keeps its
meaning and new keys are optional — except that, from `1.0.0`, a plugin with a `mainClass` **must** declare
`requiresSpi` (see the mandatory floor above). The keys, their tolerance rules, the configuration namespace, the
on-disk data layout, the backup format, metric names and public paths are covered by the companion commitment
[CONFIGURATION-AND-DATA-STABILITY.md](CONFIGURATION-AND-DATA-STABILITY.md).
## For extension authors
- Depend on `runway-spi` (`provided`) and `runway-spi-testkit` (`test`) — never on `runway-app`. Declare
`requiresSpi` with the lowest version whose additions you use (the evolution log on `RunwaySpi.VERSION`).
- **Where the jars come from.** No Maven repository serves them: every kernel release on
the releases page (<https://g.quest.mx/quest/runway/releases>) attaches `runway-spi-<ver>.jar`, `runway-spi-testkit-<ver>.jar`,
their sources jars and their (standalone) poms, all listed in the release's `SHA256SUMS`. Verify them, install
each with `mvn install:install-file -Dfile=<jar> -DpomFile=<pom> -Dsources=<sources jar>`, then depend on
`mx.quest:runway-spi:<ver>`. The exact commands are in [PLUGIN-DEVELOPMENT.md](PLUGIN-DEVELOPMENT.md) §3,
*Getting the jars*.
- **Artifact version ≠ SPI level.** The Maven version of `runway-spi` is the **kernel release** it came from
(`1.0.0`); the contract level it carries is `RunwaySpi.VERSION` (`1.0.0`). Several kernel releases carry one
SPI level, and a later `1.x` artifact may still be SPI `1.0.0`. This commitment, `requiresSpi:` and the loader all
speak in SPI levels; only your pom names the artifact version.
- **Build against a released kernel version, never a `-SNAPSHOT`.** Your plugin's bytes depend on the SPI jar it
compiled against (your jar embeds your pom, and `javac` inlines `RunwaySpi.VERSION`), so only an immutable,
published kernel version lets a plugin release be rebuilt byte for byte. A plugin version is never republished
from a tree whose kernel pin has moved: a new pin is a new plugin release.
- Read the contract in [PLUGIN-DEVELOPMENT.md](PLUGIN-DEVELOPMENT.md); the plugin-authoring guide
([`plugins/docs/PLUGIN-AUTHORING-GUIDE.md`](../plugins/docs/PLUGIN-AUTHORING-GUIDE.md)) is the code-grounded companion.
- Build against a version and expect additive-only change within the MAJOR line. A MAJOR bump (`1.x → 2.0`) is the
only place a breaking SPI change may land, and the loader will then refuse a plugin built for `1.x` with a reason
rather than let it fail at run time.