Repository navigation
Read the permission labels on extensions' registered servlet interfaces - #63
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
getExtensionPermissionsreached rbac, because the engine'sOperationUtilonly looks at the core API package.RegisteredOperationLabelsreads each enabled extension'sSERVLET_INTERFACEregistrations 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 indocs/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 sha256c954713c699bab25409e3e512d028ee22378ba23ee43b4485a3df24d11182a92.c4ec1c26a, which declares permissions on the connector operations andgetProperty, Derby, every scenario: 321 passed, 0 failed. A role without Manage Channels is refused the Document Writer test and one with it runs it;getPropertyis refused without View Server Settings.Co-authored with Claude Code.