Repository navigation
Fix what the 1.4.0 release review found - #75
Merged
Merged
Conversation
A review of the changes since 1.3.0, before tagging 1.4.0, found no blocker. These are its fixes. Splitting four large classes (RbacAuthorizationController, RbacRepository, RoleEditorDialog, e2e/checks.py) waits for the next release. - The web Administrator sends a carriage return as . The server's XML parsing reads a raw one as a line feed (measured on OIE 4.7.0), so a role stored with one in its name couldn't be saved from the web. - In the Swing Administrator, a refused role or assignment change, such as removing the last admin's role, shows rbac's message. The engine's general error dialog left that message out. - Both role editors save the stored name and description when the field wasn't edited, so a line break the field can't show isn't lost. Both trim an edited field as Java's String.trim() does, so the same typing saves the same name from either. - An import refuses a new or changed description that a REST save would refuse. - UserRoles.assign throws IllegalArgumentException for a user id the engine doesn't have. - Server log lines write a backslash in a name as \\, so a backslash followed by n no longer logs like a line break. - The web Administrator retries a failed admin lookup, as Swing does. - Swing: a 403 on an import is shown once. The Orphaned Permissions dialog can't be closed during a removal. Pressing Orphaned Permissions or Export Roles twice opens one dialog. A runtime failure in the RBAC settings tab is shown. - If reading the permission labels fails at startup, rbac logs the error and starts without them. - e2e: new checks for the startup read of permission labels, for the two preference calls not yet covered, and for the UserRoles check moving every other admin off the admin role and back. On Derby, the uninstall scenario no longer reports a passing schema version check, since it can't read the embedded database. CI uploads the engine logs of passed scenarios from the folder e2e/run.py moves them to. - The release job accepts only a tag whose Build workflow passed on a push to main, and stops after 15 minutes. - Docs: the README lists getProperty under known issues and says a user delete doesn't run one at a time with role changes. The export format lists the refusals 1.4.0 added, RELEASING.md says a tag needs a passing Build on main, and the design notes give the reasons. Tested on this branch: the unit tests (shared 11, server 395, client 109, web 150), the browser suite against web client 1.3.0 and 1.1.0, and the e2e suite on OIE 4.7.0 with Derby, MySQL, PostgreSQL, Oracle and SQL Server (jTDS and Microsoft drivers), with no failures. With nine of the fixes undone at once, each one's new tests fail and no others. In the Swing Administrator on a running engine, removing the last admin's role shows rbac's message, Close stays off while Orphaned Permissions removes, and renaming a role keeps a description with a line break. Co-Authored-By: Claude <noreply@anthropic.com>
pacmano1
added a commit
that referenced
this pull request
Dec 1, 2026
rbac PR #75 fixed what the first 1.4.0 release review found. A second review, of PR #75, found no blocker and 31 small findings. This fixes 28 of them. The other three: - Import refusal messages show a backslash in a role name doubled. Left as is; docs/design-notes.md says why. - Splitting SecureAuthorizationController joins the splits of RbacAuthorizationController, RbacRepository, RoleEditorDialog and e2e/checks.py planned for the next release. - Not done: an optional probe of whether the e2e suite can read Derby's schema version over REST after an uninstall. Changes: - Assign Role over REST (POST /api/extensions/rbac/users/{id}/role/{roleId}) answers 404, with a message, for a user id the engine doesn't have, as UserRoles.assign refuses one. - Three web changes match what Swing already does: after a failed import apply, the web previews again only on a 400 or 409, so a 403 shows its error once; the Orphaned Permissions dialog can't be closed during a removal; and the role editor counts a field edited back to its first shown text as unedited. - Swing: Import Roles and the export download can't be started twice. The Orphaned Permissions dialog always clears its guards, so an exception can't leave it stuck open. - The release job's check that Build passed on main refuses an answer that isn't a number, and its message says to re-run the job once Build passes. RELEASING.md says the same. - Tests: LogNameEscapingTest matches each quoted placeholder to its argument, and SqlStatementIdCoverageTest reads the statement ids from the sources. New tests cover a failure reading the permission labels at startup, the REST 404, the import's skip of the admin role, the web's rule for previewing again, the web's edited-back field, the Swing permission-load guard, a 403 on apply and the dialog during a removal. The browser test for an unedited description with a line break now fails on the old code. - e2e: UserRoles.assign with an unknown user id, the REST 404, and a NOTE with the number of permission labels rbac read at startup. The UserRoles check stops before its channel script if another admin couldn't be moved off the admin role. - Docs: the README says a Java caller using reflection gets UserRoles' exceptions as the cause of an InvocationTargetException. Comments and test names list all three admin-only tasks: Export Roles, Import Roles and Orphaned Permissions. CLAUDE.md gains the full condition for the "(no longer exists)" row of the import preview's channel table, the REST 404, and that a user delete doesn't take the role-change lock. A new entry in docs/design-notes.md corrects what the previous one said about the web editor and line breaks, and says what has no automated test. - Small: a misplaced Javadoc, the --label-as help text and a docstring in e2e/run.py, a test name, an indent, a blank line. Tested on this branch: the unit tests (shared 11, server 398, client 110, web 151), the browser suite against web client 1.3.0 and 1.1.0 (92 tests each), and the e2e suite on OIE 4.7.0 with Derby, MySQL, PostgreSQL, Oracle and SQL Server (jTDS and Microsoft drivers), with no failures. The new UserRoles check first failed on every database: its script looked for the exception's cause, and Rhino unwraps the InvocationTargetException that Method.invoke throws. With the script fixed, I ran the fresh scenario again on all six. Controls: with eight fixes undone at once, only the new unit test of each fails. With three web fixes undone, the three new browser tests fail (the 403 on apply, the dialog during a removal, the line break). With the user-exists check wired to accept any id in both the REST call and UserRoles, the three new e2e checks of an unknown user fail. In the Swing Administrator on OIE 4.7.0, Export Roles, Import Roles and Orphaned Permissions each open again when pressed a second time, and a removal keeps Close off until the list reloads. 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.
A review of the changes since 1.3.0, before tagging 1.4.0, found no blocker. These are its fixes. Four large classes should be split (
RbacAuthorizationController,RbacRepository,RoleEditorDialog,e2e/checks.py); that waits for the next release.What users see
. The server reads a raw one as a line feed (measured on OIE 4.7.0), so a role stored with one in its name couldn't be saved from the web.String.trim()does.(Corrected after the merge: this said both editors lost a line break. The web editor never lost one in the middle of a value; see Fix nits from the 1.4.0 release review #76.)
For plugin authors
UserRoles.assignthrowsIllegalArgumentExceptionfor a user id the engine doesn't have. It used to write the assignment.Smaller fixes
\\, so a name with a backslash followed bynno longer logs like a name with a line break.main, and stops after 15 minutes.Tests and docs
UserRolescheck moves every other admin off and back. On Derby, the uninstall scenario no longer reports a passing schema version check, since it can't read the embedded database. CI uploads the engine logs of passed scenarios from the foldere2e/run.pymoves them to.getPropertyis listed under known issues. On OIE 4.7.0 any user with a role can call it, and it can return the stored SMTP password; Declare a permission on API operations that had none OpenIntegrationEngine/engine#588 declares a permission on it. The export format doc lists the refusals 1.4.0 added. RELEASING.md says a tag needs a passing Build onmain. The design notes give the reasons for each fix.Tested
Co-authored with Claude Code.