Skip to content

Fix what the 1.4.0 release review found - #75

Merged
pacmano1 merged 1 commit into
mainfrom
idc-1.4.0-fixes
Dec 1, 2026
Merged

pacmano1 merged 1 commit into
mainfrom
idc-1.4.0-fixes

Conversation

@pacmano1

@pacmano1 pacmano1 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

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 web Administrator sends a carriage return in a name, permission or description as 
. 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.
  • Both role editors save a name or description the user didn't edit as stored. In the Swing editor a text field can't show a line break, so saving what the field showed renamed such a role, even when only its permissions changed. In the web editor an unedited value keeps its leading and trailing spaces and line breaks. Both editors now trim an edited field the same way, as Java's 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.)
  • In the Swing Administrator, when the server refuses a role or assignment change, such as removing the last admin's role, the error dialog shows rbac's message. The engine's general error dialog left that message out.
  • An import refuses a role it would create, or a description it would change, when the description contains a character that saving the role refuses.

For plugin authors

  • UserRoles.assign throws IllegalArgumentException for a user id the engine doesn't have. It used to write the assignment.
  • The docs no longer say a user delete runs one at a time with role changes. The engine deletes the user itself, after rbac's last-admin check allows it.

Smaller fixes

  • Server log lines write a backslash in a name as \\, so a name with a backslash followed by n no longer logs like a name with a line break.
  • The web Administrator retries a failed admin lookup at most once every 15 seconds, as Swing does. A failed lookup at sign-in used to hide the admin-only tasks until the page was reloaded.
  • 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 to the user.
  • If reading the permission labels fails at startup, rbac logs the error and starts without them.
  • The release job accepts only a tag whose Build workflow passed on a push to main, and stops after 15 minutes.

Tests and docs

  • e2e: new checks that rbac read the extensions' permission labels at startup, for the two user preference calls not yet covered (writing all preferences at once, and acknowledging the login notification), and that the UserRoles check 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 folder e2e/run.py moves them to.
  • README: getProperty is 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 on main. The design notes give the reasons for each fix.

Tested

  • Unit tests: shared 11, server 395, client 109, web 150.
  • Browser suite against web client 1.3.0 and 1.1.0: all 90 tests pass against each. The five Orphaned Permissions tests were rerun after fixing one of them.
  • e2e suite on OIE 4.7.0 with Derby, MySQL, PostgreSQL, Oracle and SQL Server (jTDS and Microsoft drivers): no failures, between 381 and 397 checks per database.
  • Controls: with nine of the fixes undone at once, each one's new tests fail and no others. With the roles panel's reload taken out, the new browser check fails.
  • Swing Administrator on a running OIE 4.7.0: removing the last admin's role shows rbac's message; Close stays off while Orphaned Permissions removes; renaming a role keeps a description with a line break (read back over REST).

Co-authored with Claude Code.

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
pacmano1 merged commit 664e524 into main Dec 1, 2026
20 checks passed
@pacmano1
pacmano1 deleted the idc-1.4.0-fixes branch December 1, 2026 15:45
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>
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