Skip to content

/extensions/{name}/properties reads and replaces any configuration category, and logs the values #585

Open

Description

@pacmano1

GET and PUT /api/extensions/{extensionName}/properties hand extensionName straight to ConfigurationController as a CONFIGURATION category (DefaultExtensionController.getPluginProperties / setPluginProperties). Nothing checks that a plugin with that name is installed, so the endpoint reads and writes any category: the engine's own core, another plugin's data, or a name nobody uses.

Measured on 4.7.0, Derby:

  1. As admin, GET /api/extensions/core/properties returns the engine's core category (server.queuebuffersize, smtp.auth, stats.enabled and so on).
  2. As admin, PUT /api/extensions/made-up-name/properties creates a category of that name. No plugin has it.
  3. A PUT replaces the whole category unless mergeProperties=true is passed. Wrote a=1, b=2, then d=4 without the flag: only d=4 was left. An empty body empties the category. One script call with the wrong name or a missing flag wipes a plugin's settings, or the engine's core ones (not tried on core).
  4. The audit event for each PUT records every value written, in clear text: properties = {a=1, b=2}. That includes a refused request. Any secret written this way ends up in the event log.

The only check is checkUserAuthorizedForExtension(extensionName), so who gets in is up to the authorization plugin:

  1. Without one, every user can do all of the above.
  2. With RBAC 1.2.0, any role can, because RBAC allows operations no plugin claims. Measured: a user whose role had no permissions replaced another plugin's stored data this way.
  3. RBAC 1.3.0 added its own guard that refuses non-admins for names that aren't installed plugins. Measured: 403 for a Viewer on core and on that plugin's data.

Each authorization plugin shouldn't have to patch this. Suggested:

  1. Accept only the names of installed plugins (getPluginMetaData), for both GET and PUT.
  2. Admin-only unless the plugin declares a permission for its own name.
  3. Make replacing explicit. Changing the default would break callers that rely on it, so maybe a separate replace flag or endpoint, and never empty a category on an empty body.
  4. Audit the keys, not the values.

Co-authored with Claude Code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions