Repository navigation
Conversation
19 API operations declared no permission in @MirthOperation, so an authorization controller had nothing to check for them. Each now declares an existing permission: - manageChannels: the connector test operations (Document Writer, File Reader and Writer, HTTP, TCP, SMTP and Web Service senders), the Web Service WSDL operations, Database getTables, and JMS template save and delete - viewChannels: JMS getTemplates and getTemplate - viewServerSettings: getProperty - editServerSettings: setUpdateSettings JMS deleteTemplate was declared with the operation name saveTemplate, and its API summary described a save. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Finnegan's Owner <44065187+pacmano1@users.noreply.github.com>
MirthOperationPermissionTest walks every @MirthOperation in the core API, connector and bundled plugin servlet interfaces and fails when one declares no permission and is not on the test's list of operations that need none, each listed with its reason. It also fails on a list entry that matches no operation without a permission or more than one overloaded method, and when the scan finds too few operations to mean anything. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Finnegan's Owner <44065187+pacmano1@users.noreply.github.com>
pacmano1
requested review from
a team,
gibson9583,
jonbartels,
kayyagari,
kpalang,
mgaffigan,
ssrowe and
tonygermano
November 17, 2026 21:22
mgaffigan
approved these changes
Nov 18, 2026
mgaffigan
left a comment
Contributor
There was a problem hiding this comment.
Love the scanner for future operations.
pacmano1
added a commit
to diridium-com/role-based-access-control
that referenced
this pull request
Nov 19, 2026
…es (#63) 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 <noreply@anthropic.com>
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.
19 API operations declared no permission in
@MirthOperation, so an authorization controller had nothing to check for them. Each now declares an existing permission:getTables, JMS template save and deletemanageChannelsgetTemplates,getTemplateviewChannelsgetPropertyviewServerSettingssetUpdateSettingseditServerSettingsAlso:
deleteTemplatewas declared with the operation namesaveTemplate, and its API summary described a save.MirthOperationPermissionTestwalks every@MirthOperationin the core API, connectors and bundled plugins. It fails when one declares no permission and isn't on the test's list of operations that need none (each listed with its reason), and when a list entry matches no such operation or more than one overloaded method.Left out on purpose
These still declare no permission and are on the test's list:
auditAccessedPHIMessage,auditQueriedPHIMessage,auditExportMessages,auditExportMessagesSuccess). The client calls them to record that a user viewed, searched or exported messages. Whether that auditing belongs on the server is its own question.setUserNotificationAcknowledged. Every user reads and writes their own preferences through them, so a permission there is a separate change.How to verify
./gradlew :server:test --tests com.mirth.connect.client.core.api.MirthOperationPermissionTest: on main it fails and lists the 19; on this branch it passes.Tested
./gradlew clean build: 918 tests, 0 failures.Co-authored with Claude Code.