Skip to content

Read the permission labels on extensions' registered servlet interfaces - #63

Merged
pacmano1 merged 1 commit into
mainfrom
read-engine-operation-labels
Nov 19, 2026
Merged

pacmano1 merged 1 commit into
mainfrom
read-engine-operation-labels

Conversation

@pacmano1

Copy link
Copy Markdown
Contributor

rbac now enforces the permission an extension declares on an operation of the servlet interface it registers with the engine, such as a built-in connector's test call. Until now only the core API's permissions and the ones plugins register through getExtensionPermissions reached rbac, because the engine's OperationUtil only looks at the core API package. RegisteredOperationLabels reads each enabled extension's SERVLET_INTERFACE registrations when the controller is built, keyed by the runtime name <PLUGIN_POINT>#<operation>. rbac keeps no list of operations of its own. The reasons for the choices that look odd in the code are in docs/design-notes.md, 2026-11-17.

Behaviour that changes: a plugin that labels an operation without registering it now has that label enforced where rbac used to allow the call. None of the plugins checked is affected. On OIE 4.7.0 the engine's connector operations declare no permission, and its eleven labels, on the bundled plugins (Dashboard Connector Status, Data Pruner, Global Maps, Server Log), repeat what those plugins already register. Diridium's plugins and the store plugins checked from their released zips (Web Support, Community Store, JavaScript Debugger, TLS Manager, Message Inspector, Claude Assistant, Email Reader) each have no PLUGIN_POINT, label nothing, or register every labelled operation with the same permission. On an engine that declares permissions on its connector operations (OpenIntegrationEngine/engine#588), a role without the declared permission is refused those calls ("Missing permission: manageChannels" for the connector tests, for example). A label naming a permission no role can be granted is ignored with a warning, so it can't lock out everyone but admins.

Also: README "What RBAC enforces", CLAUDE.md, and the two comments on the Administrator settings tab. They said the preference calls are limited to the user's own id on the server; measured on 4.7.0, the engine asks the authorization controller about a user's own preferences too, so the tab relies on those calls declaring no permission.

Verified on the branch tip

  • mvn -B clean package: 428 Java tests (shared 10, server 319, client 99; 414 before) and 136 web unit tests, 0 failures. Zip sha256 c954713c699bab25409e3e512d028ee22378ba23ee43b4485a3df24d11182a92.
  • e2e on the OIE 4.7.0 release tarball, Derby, every scenario (fresh install, upgrades from 1.1.2, 1.1.3, 1.1.4 and 1.2.0, uninstall): 321 passed, 0 failed. The new checks find no labels there, as expected.
  • e2e on a build of Declare a permission on API operations that had none OpenIntegrationEngine/engine#588 at its head c4ec1c26a, which declares permissions on the connector operations and getProperty, Derby, every scenario: 321 passed, 0 failed. A role without Manage Channels is refused the Document Writer test and one with it runs it; getProperty is refused without View Server Settings.
  • Not run locally: the other five databases and Java 21; CI runs them.

Co-authored with Claude Code.

rbac takes each core operation's permission from the engine through
OperationUtil, which only looks at the core API package. An extension's
servlet operations, the built-in connectors' test and lookup calls among them,
arrive as "<PLUGIN_POINT>#<operation>", so a permission the engine declares on
them never reached rbac. Plugins can register permissions through
getExtensionPermissions, but that path is for permissions a plugin defines,
and no connector uses it.

RegisteredOperationLabels reads the servlet interfaces each enabled extension
registers with the engine (apiProvider entries of type SERVLET_INTERFACE, the
list the engine's web server serves) when the controller is built: each
interface's PLUGIN_POINT and each @MirthOperation permission, keyed
PLUGIN_POINT#operation. rbac keeps no list of operations of its own. The
controller looks up a registered extension permission first, then a label,
then the core map. A label is enforced only when a role can be granted its
permission (core, or registered by an extension); otherwise the operation
stays as before, allowed with a warning.

On OIE 4.7.0 its connector operations declare no permission, and its eleven
labels, on the bundled plugins, repeat what those plugins already register.
A plugin that labels an operation without registering it now has that label
enforced where rbac used to allow the call. Diridium's plugins and the store
plugins checked (Web Support, Community Store, JavaScript Debugger, TLS
Manager, Message Inspector, Claude Assistant, Email Reader) are not affected:
each has no PLUGIN_POINT, labels nothing, or registers every labelled
operation with the same permission. On an engine that declares permissions on
its connector operations (OpenIntegrationEngine/engine#588), rbac enforces
them with no further change.

Also: README "What RBAC enforces" (its getTables example was a connector
operation the old lookup never covered), CLAUDE.md, a design-notes entry for
the choices that look odd in the code, and the two comments on the
Administrator settings tab, which said the preference calls are limited to the
user's own id on the server. Measured on 4.7.0, the engine asks the
authorization controller about a user's own preferences too, so the tab relies
on those calls declaring no permission. The e2e suite gains
labelled_operations, which passes on an engine with or without these labels
and fails on a mix.

Co-Authored-By: Claude <[email protected]>
@pacmano1
pacmano1 merged commit bb2f2fc into main Nov 19, 2026
20 checks passed
@pacmano1
pacmano1 deleted the read-engine-operation-labels branch November 19, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant