Files
e8c7307f42 Restrict unauthenticated webapp plugin manifests to pre-auth plugins (#39433)
* Add pre_auth webapp manifest flag and RestrictUnauthenticatedWebappPlugins setting

Unauthenticated GET /api/v4/plugins/webapp now only returns plugins whose
manifest sets webapp.pre_auth, with a trimmed manifest, when the new
PluginSettings.RestrictUnauthenticatedWebappPlugins setting is enabled. The
setting defaults to true for new installations and is turned off by a one-time
migration on existing installations.

Co-authored-by: Joram Wilander <joram@mattermost.com>

* Add server tests for pre-auth webapp plugin filtering

Co-authored-by: Joram Wilander <joram@mattermost.com>

* Load remaining webapp plugins after login and add admin console toggle

The login page may only receive pre-auth plugins, so performLogin now awaits a
plugin re-sync before callers navigate, and LoggedIn re-syncs as a fallback
when the plugin list was last fetched for a different session.

Co-authored-by: Joram Wilander <joram@mattermost.com>

* Add webapp tests for post-login plugin re-sync

Co-authored-by: Joram Wilander <joram@mattermost.com>

* Add Playwright E2E coverage for pre-auth webapp plugins

Co-authored-by: Joram Wilander <joram@mattermost.com>

* Add system console E2E spec for the RestrictUnauthenticatedWebappPlugins toggle

Co-authored-by: Joram Wilander <joram@mattermost.com>

* Add upgrade E2E check that existing installs keep unauthenticated webapp plugins

Co-authored-by: Joram Wilander <joram@mattermost.com>

* Fix err shadowing lint failure in TestGetWebappPluginsUnauthenticated

Co-authored-by: Joram Wilander <joram@mattermost.com>

* Only record the plugin fetch session after a successful fetch

Co-authored-by: Joram Wilander <joram@mattermost.com>

* Document RestrictUnauthenticatedWebappPlugins and webapp.pre_auth

Co-authored-by: Joram Wilander <joram@mattermost.com>

* Note that pre-auth webapp plugin filtering is available from v12.2

Co-authored-by: Joram Wilander <joram@mattermost.com>

* Reword pre_auth version note in OpenAPI schema

Co-authored-by: Joram Wilander <joram@mattermost.com>

* Revert "Reword pre_auth version note in OpenAPI schema"

This reverts commit f5660f836b.

Co-authored-by: Joram Wilander <joram@mattermost.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-03 09:28:23 -05:00
..