Review main Merged

96224[FEATURE] Improve configuration of public backend routes

Benni Mack CR +2 V +2 Hard +898 −60 updated 10/02/26, 08:38

Commit message

Whether a backend route is reachable without a backend user was
defined twice: a hardcoded list of paths in the
BackendUserAuthenticator middleware and the route option "access",
which only controlled the request token. Both had drifted apart,
for example for the route "ajax_login_refresh", which needs no user
but was still checked for a token that the disabled form protection
accepts for any value.

The route option "access" is now the single source of truth. It is
backed by the new enum RouteAccess and accepts "anonymous" (no user,
no token), "authenticated" (default) and
"authenticated-without-token". Unknown values fail closed. The
hardcoded list is removed and the core routes are adjusted
accordingly.

The former value "public", which only omitted the request token, is
deprecated and migrated to "authenticated-without-token" when a
route is registered, so third-party routes keep their behaviour.

Additionally, the new middleware FetchMetadataGuard denies
state-changing requests to non-anonymous routes, which the browser
marks as cross-origin via "Sec-Fetch-Site" or "Origin". It can be
disabled via the feature "security.backend.enforceFetchMetadata".

The command "debug:backend:routes" lists access and token
requirement and can be filtered by access. A functional test pins
the set of anonymously reachable core routes.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Josua Vogel +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Josua Vogel +1
    • core-ci +1 CI

Issues 1

Files 24

Show 4 more files

Review log 79

  1. Benni Mack uploaded patch set 1 09/30/26, 15:24

  2. core-ci voted on patch set 1 V +1 09/30/26, 15:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109658

  3. Benni Mack uploaded patch set 2 V +1 09/30/26, 21:10

  4. Benni Mack marked it ready for review 09/30/26, 21:20

  5. core-ci voted on patch set 2 V +1 09/30/26, 21:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109712

  6. Josua Vogel voted on patch set 2 CR +1 V +1 10/02/26, 08:21

  7. Georg Ringer voted on patch set 2 CR +1 V +1 10/02/26, 08:25

  8. Benni Mack voted on patch set 2 CR +2 V +2 10/02/26, 08:38

  9. Benni Mack merged patch set 3 10/02/26, 08:38