From fe71312e7202c419c7813494ad583b0ebfc27728 Mon Sep 17 00:00:00 2001 From: "David M. Johnson" Date: Mon, 23 Nov 2026 12:22:51 -0500 Subject: [PATCH 1/3] Trust the Admins of an aggregated front-page weblog in the security model With site.frontpage.weblog.aggregated=true, the front-page weblog's templates get the site-wide $site model, which reads across weblogs and users by design. The model now says so, treats that weblog's Admins as trusted for what its templates can read, and adds matching entries to the settings table, the out-of-scope list and the operator checklist. --- CHANGES.md | 4 ++++ docs/security-model.md | 35 ++++++++++++++++++++++++++++++----- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 384886855..a4d49ef06 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -177,6 +177,10 @@ ### Behaviour changes worth reading before upgrading +- **The security model trusts the Admins of an aggregated front-page + weblog.** With `site.frontpage.weblog.aggregated=true`, that weblog's + templates can read the whole site through `$site`, so give Admin on it + only to people you trust as global admins (`docs/security-model.md`). - **Weblog templates have render limits.** A page stops rendering, with a logged error, once it writes more than `rendering.maxOutputChars` (10 MB), inserts a longer string, or runs longer than `rendering.maxRenderSeconds` diff --git a/docs/security-model.md b/docs/security-model.md index accbb118b..651a74a43 100644 --- a/docs/security-model.md +++ b/docs/security-model.md @@ -35,15 +35,17 @@ necessarily trust each other. The whole model follows from one rule: Only two parties are trusted: the **global admin**, who runs the site, and the **operator**, who runs the server. Everyone else is a possible attacker. That -includes the admin of a weblog. +includes the admin of a weblog. The one exception is the +[aggregated front-page weblog](#the-aggregated-front-page-weblog), whose Admins +a global admin chooses to trust. ## Principles Every change to Roller must keep these rules: 1. Rights in one weblog give nothing in another weblog or on the server. -2. Weblog admins are untrusted. Only global admins and the operator are - trusted. +2. Weblog admins are untrusted. Only global admins, the operator and the + Admins of the aggregated front-page weblog are trusted. 3. Every object named in a request is checked against the weblog the action runs on. 4. Content that users write never runs as script for other users. @@ -132,7 +134,7 @@ do everything a Limited member can. | **Registered user** (global `editor`) | Log in; edit own profile; comment; create weblogs, when the site allows it | Act in a weblog where they hold no role | No | | **Limited** (`edit_draft`) | Create and edit draft entries in that weblog | Publish; manage comments, categories or media; act in other weblogs | No | | **Author** (`post`) | Everything Limited can do; publish entries; manage comments and categories; manage media, when uploads are on | Change weblog settings, members, bookmarks or design | No | -| **Admin** (`admin`) | Everything Author can do; weblog settings, members, bookmarks (including OPML import), maintenance; theme and templates, when custom themes are on | Touch other weblogs; read server files; run Java code; read other users' private data; run script in other users' browsers | **No** | +| **Admin** (`admin`) | Everything Author can do; weblog settings, members, bookmarks (including OPML import), maintenance; theme and templates, when custom themes are on | Touch other weblogs; read server files; run Java code; read other users' private data; run script in other users' browsers | **No**, except on the [aggregated front page](#the-aggregated-front-page-weblog) | | **Global admin** (global `admin`) | Everything in every weblog; users; site settings; Planet feeds | Get shell or file access on the host | Yes | | **Network attacker** | Read or change traffic when the site runs over plain HTTP | Anything, once the site runs over HTTPS | No | | **Operator** | Owns the container, JVM, database, configuration files and logs | — | Yes, out of scope | @@ -146,6 +148,22 @@ trusted, every registered user would be trusted. Roller's defaults reflect this. `weblogAdminsUntrusted=true` turns on HTML sanitizing, and templates run in a sandbox built for untrusted authors. +### The aggregated front-page weblog + +A global admin can make one weblog the site's front page +(`site.frontpage.weblog.handle`) and let it show the whole site +(`site.frontpage.weblog.aggregated=true`). That weblog's templates then get the +`$site` model, which reads across every weblog and user by design. With custom +themes on, its Admins can therefore read and show any weblog's content and any +user's details. + +So the Admins of the aggregated front-page weblog are trusted, like global +admins, for what that weblog's templates can read. They are still untrusted for +everything else, and Principle 1 still holds for every other weblog. Give Admin +on that weblog only to people you would trust as global admins. Without +aggregation, the front-page weblog is an ordinary weblog and its Admins are +untrusted. + A request forged cross-site that makes a logged-in user's browser act is an attack by an anonymous visitor, not by that user. @@ -285,6 +303,7 @@ A bug in an optional feature is a vulnerability when the feature is enabled. | --- | --- | | `weblogAdminsUntrusted` | `true` (default) sanitizes HTML from weblog members. Set `false` only when every weblog admin is trusted, such as on a solo blog. | | `themes.customtheme.allowed` | Lets weblog Admins edit templates. Templates stay in the sandbox, but can use a lot of CPU and memory (see Not vulnerabilities). | +| `site.frontpage.weblog.aggregated` | Gives the front-page weblog's templates the site-wide `$site` model, so its Admins become trusted (see [The aggregated front-page weblog](#the-aggregated-front-page-weblog)). | | `uploads.enabled` | Lets members upload media files. | | `webservices.enableXmlRpc`, `webservices.enableAtomPub` | Turn on the remote publishing APIs. They use the same weblog roles as the UI. | | `users.registration.enabled` | Lets anyone create an account. | @@ -322,7 +341,11 @@ Roller does not protect against: size, time and loop length, but does not promise to stop every expensive template. A global admin who turns custom themes on trusts weblog Admins not to abuse the server's resources. Templates still cannot run Java code, - read files outside their theme, or reach other weblogs. + read files outside their theme, or reach other weblogs, except through the + aggregated front page's `$site` model. +- **What the aggregated front-page weblog's templates show.** Its Admins are + trusted to read across the site (see + [The aggregated front-page weblog](#the-aggregated-front-page-weblog)). - **Partial writes** when a multi-step operation fails. That is a bug, not a vulnerability. @@ -334,6 +357,8 @@ Roller does not protect against: - Enable custom themes, uploads, XML-RPC and AtomPub only when you need them. Enable custom themes only for weblog Admins you trust with the server's resources. +- If the front page aggregates the site, give Admin on the front-page weblog + only to people you trust as global admins. - Restrict access to the server log. It holds the setup token during installation and upgrades. - Keep the database, data directories and `roller-custom.properties` private. From 2f66811e618440267d730d295172eccbffc655ed Mon Sep 17 00:00:00 2001 From: "David M. Johnson" Date: Mon, 23 Nov 2026 23:47:33 -0500 Subject: [PATCH 2/3] Narrow the front-page weblog trust in the security model Scope the exception in the one rule and Principles 1 and 2 to what the aggregated front-page weblog's templates can read, name $planet with $site, state the custom-themes condition, and say that only a global admin assigns that weblog's Admins. --- CHANGES.md | 8 +++++--- docs/security-model.md | 45 +++++++++++++++++++++++++----------------- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a4d49ef06..72762db59 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -178,9 +178,11 @@ ### Behaviour changes worth reading before upgrading - **The security model trusts the Admins of an aggregated front-page - weblog.** With `site.frontpage.weblog.aggregated=true`, that weblog's - templates can read the whole site through `$site`, so give Admin on it - only to people you trust as global admins (`docs/security-model.md`). + weblog.** With `site.frontpage.weblog.aggregated=true` and custom themes + on, that weblog's templates can read the whole site through `$site` and + `$planet`, so its Admins are trusted for what those templates read. Only a + global admin can assign them; review them before turning aggregation on + (`docs/security-model.md`). - **Weblog templates have render limits.** A page stops rendering, with a logged error, once it writes more than `rendering.maxOutputChars` (10 MB), inserts a longer string, or runs longer than `rendering.maxRenderSeconds` diff --git a/docs/security-model.md b/docs/security-model.md index 651a74a43..51dc6bba4 100644 --- a/docs/security-model.md +++ b/docs/security-model.md @@ -33,19 +33,25 @@ necessarily trust each other. The whole model follows from one rule: > **What you may do in one weblog gives you nothing in another weblog, and > nothing on the server.** -Only two parties are trusted: the **global admin**, who runs the site, and the +Two parties are trusted: the **global admin**, who runs the site, and the **operator**, who runs the server. Everyone else is a possible attacker. That -includes the admin of a weblog. The one exception is the -[aggregated front-page weblog](#the-aggregated-front-page-weblog), whose Admins -a global admin chooses to trust. +includes the admin of a weblog. There is one narrow exception to the rule and +to this list: when a global admin turns on an +[aggregated front-page weblog](#the-aggregated-front-page-weblog) with custom +themes, that weblog's templates read across the site, and the Admins the global +admin assigns to it are trusted for what those templates read. ## Principles Every change to Roller must keep these rules: -1. Rights in one weblog give nothing in another weblog or on the server. -2. Weblog admins are untrusted. Only global admins, the operator and the - Admins of the aggregated front-page weblog are trusted. +1. Rights in one weblog give nothing in another weblog or on the server. The + only exception is what the templates of the aggregated front-page weblog + can read. +2. Weblog admins are untrusted. Only global admins and the operator are + trusted. When aggregation and custom themes are on, the Admins of the + aggregated front-page weblog are also trusted, but only for what that + weblog's templates can read. 3. Every object named in a request is checked against the weblog the action runs on. 4. Content that users write never runs as script for other users. @@ -153,16 +159,18 @@ sanitizing, and templates run in a sandbox built for untrusted authors. A global admin can make one weblog the site's front page (`site.frontpage.weblog.handle`) and let it show the whole site (`site.frontpage.weblog.aggregated=true`). That weblog's templates then get the -`$site` model, which reads across every weblog and user by design. With custom -themes on, its Admins can therefore read and show any weblog's content and any -user's details. +`$site` and `$planet` models, which read across every weblog and user by +design. With custom themes on, its Admins can therefore read and show what +those models expose about every weblog and user. Templates only get published +entries, and no user email addresses. So the Admins of the aggregated front-page weblog are trusted, like global admins, for what that weblog's templates can read. They are still untrusted for -everything else, and Principle 1 still holds for every other weblog. Give Admin -on that weblog only to people you would trust as global admins. Without -aggregation, the front-page weblog is an ordinary weblog and its Admins are -untrusted. +everything else, and Principle 1 still holds for every other weblog. Only a +global admin can grant, change or remove Admin on that weblog while aggregation +is on, so the global admin chooses every one of them. Without aggregation, or +without custom themes, the front-page weblog is an ordinary weblog and its +Admins are untrusted. A request forged cross-site that makes a logged-in user's browser act is an attack by an anonymous visitor, not by that user. @@ -303,7 +311,7 @@ A bug in an optional feature is a vulnerability when the feature is enabled. | --- | --- | | `weblogAdminsUntrusted` | `true` (default) sanitizes HTML from weblog members. Set `false` only when every weblog admin is trusted, such as on a solo blog. | | `themes.customtheme.allowed` | Lets weblog Admins edit templates. Templates stay in the sandbox, but can use a lot of CPU and memory (see Not vulnerabilities). | -| `site.frontpage.weblog.aggregated` | Gives the front-page weblog's templates the site-wide `$site` model, so its Admins become trusted (see [The aggregated front-page weblog](#the-aggregated-front-page-weblog)). | +| `site.frontpage.weblog.aggregated` | Gives the front-page weblog's templates the site-wide `$site` and `$planet` models. With custom themes on, its Admins, whom only a global admin assigns, become trusted for what those templates read (see [The aggregated front-page weblog](#the-aggregated-front-page-weblog)). | | `uploads.enabled` | Lets members upload media files. | | `webservices.enableXmlRpc`, `webservices.enableAtomPub` | Turn on the remote publishing APIs. They use the same weblog roles as the UI. | | `users.registration.enabled` | Lets anyone create an account. | @@ -342,7 +350,7 @@ Roller does not protect against: template. A global admin who turns custom themes on trusts weblog Admins not to abuse the server's resources. Templates still cannot run Java code, read files outside their theme, or reach other weblogs, except through the - aggregated front page's `$site` model. + aggregated front page's `$site` and `$planet` models. - **What the aggregated front-page weblog's templates show.** Its Admins are trusted to read across the site (see [The aggregated front-page weblog](#the-aggregated-front-page-weblog)). @@ -357,8 +365,9 @@ Roller does not protect against: - Enable custom themes, uploads, XML-RPC and AtomPub only when you need them. Enable custom themes only for weblog Admins you trust with the server's resources. -- If the front page aggregates the site, give Admin on the front-page weblog - only to people you trust as global admins. +- If the front page aggregates the site and custom themes are on, give Admin + on the front-page weblog only to people you trust as global admins. Review + that weblog's Admins and pending invitations before you turn aggregation on. - Restrict access to the server log. It holds the setup token during installation and upgrades. - Keep the database, data directories and `roller-custom.properties` private. From e782b6fb26e8e9af42be32b0da44ee8500921a0c Mon Sep 17 00:00:00 2001 From: "David M. Johnson" Date: Mon, 23 Nov 2026 23:47:44 -0500 Subject: [PATCH 3/3] Don't claim more than the template models enforce --- docs/security-model.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/security-model.md b/docs/security-model.md index 51dc6bba4..a92650778 100644 --- a/docs/security-model.md +++ b/docs/security-model.md @@ -161,8 +161,8 @@ A global admin can make one weblog the site's front page (`site.frontpage.weblog.aggregated=true`). That weblog's templates then get the `$site` and `$planet` models, which read across every weblog and user by design. With custom themes on, its Admins can therefore read and show what -those models expose about every weblog and user. Templates only get published -entries, and no user email addresses. +those models expose about every weblog and user. Entries looked up by anchor +are published ones only. So the Admins of the aggregated front-page weblog are trusted, like global admins, for what that weblog's templates can read. They are still untrusted for