Skip to content

MLE-28498 11.3.5 Test Fixes for Security Update#1074

Open
jonmille wants to merge 4 commits intodevelopfrom
MLE-28498-11-3-5-regression-analysis
Open

MLE-28498 11.3.5 Test Fixes for Security Update#1074
jonmille wants to merge 4 commits intodevelopfrom
MLE-28498-11-3-5-regression-analysis

Conversation

@jonmille
Copy link
Copy Markdown

@jonmille jonmille commented May 7, 2026

This PR primarily contains privilege, role, and permission test fixes as a result of the MLS 11.3.5 security fixes. Thes fixes were also applied to 12.0.2 and 12.1.0.

Jira Story: https://progresssoftware.atlassian.net/browse/MLE-28498

jonmille added 4 commits May 4, 2026 17:55
This contains permission fixes for testing as a result of the 11.3.5 changes.
Updated transforms tests to expect rest-transform-user as a result of 11.3.5 changes from ML-28684.
Copilot fix for flakey dmsdk tests
Copilot AI review requested due to automatic review settings May 7, 2026 13:55
@jonmille
Copy link
Copy Markdown
Author

jonmille commented May 7, 2026

Latest run with a configured branch in Jenkins skipping pull request tests to run regressions: https://ml-clt-jenkins.progress.com/blue/organizations/jenkins/devexp%2FNode-Client%2FNode-client-api/detail/MLE-28498-11-3-5-regression-analysis/3/pipeline. fromDocs issues are still being addressed

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the test suite and test-app security configuration to align with MarkLogic Server 11.3.5 security changes (privileges/roles/permissions), particularly around REST transform execution and data movement tests.

Changes:

  • Update transform-related tests to expect transforms to run as rest-transform-user and adjust async error handling.
  • Fix readAll test completion timing to avoid calling done() before streamToArray finishes.
  • Update test-app security users/roles to include new/required roles and privileges (e.g., rest-invoke-user, added privileges on rest-evaluator).

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test-complete/nodejs-transform-javascript.js Updates transform user expectation and switches to promise .catch(done) handling in two tests.
test-complete/nodejs-dmsdk-readall-1.js Fixes premature done() calls and adds early returns after done(err).
test-basic/documents-transform.js Updates JavaScript transform tests to expect rest-transform-user.
test-app/src/main/ml-config/security/users/rest-writer.json Adds rest-extension-user role to rest-writer.
test-app/src/main/ml-config/security/users/rest-transform-user.json Introduces a dedicated transform execution user for tests.
test-app/src/main/ml-config/security/users/rest-temporal-writer.json Adds rest-extension-user role and normalizes role array formatting.
test-app/src/main/ml-config/security/users/rest-reader.json Adds rest-extension-user and rest-invoke-user roles.
test-app/src/main/ml-config/security/users/rest-admin.json Adds additional roles (rest-evaluator, rest-extension-user, sparql-update-user).
test-app/src/main/ml-config/security/roles/rest-invoke-user.json Adds a new role granting xdmp-login to support transform invocation behavior changes.
test-app/src/main/ml-config/security/roles/rest-evaluator.json Expands inherited roles and grants additional execute privileges required post-security update.

@@ -0,0 +1,4 @@
{
"user-name": "rest-transform-user",
Comment on lines 131 to 135
result(function (response) {
//console.log(JSON.stringify(response, null, 4));
response[0].content.should.have.property('timestamp');
response[0].content.userName.should.equal('rest-reader');
response[0].content.userName.should.equal('rest-transform-user'); // MLE-28684: transforms now run as rest-transform-user
done();
@@ -0,0 +1,11 @@
{
"role-name": "rest-invoke-user",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This role name is surprising - I would assume that it grants invoke privileges. I would rename it to "login-role" or something self-documenting like that. You could then have multiple roles that require the login privilege inherit this role.

@@ -2,7 +2,5 @@
"user-name": "rest-reader",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be useful to rename this - probably in a separate PR - given that it now refers to 3 things - a user, and then OOTB role and privilege. It's already confusing enough that there are OOTB roles and privileges that are both named rest-reader and rest-writer.

documents[0].content.should.have.property('timestamp');
documents[0].content.should.have.property('userName');
documents[0].content.userName.should.eql('rest-writer');
documents[0].content.userName.should.eql('rest-transform-user'); // MLE-28684: transforms now run as rest-transform-user
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally frown on this sort of comment - an assertion message would be far more useful. I think the main thing someone would be wondering is - hmm, why is this user expected? What is special about this user? A good assertion message would state "As of such and such markLogic version, a user now needs (fill in the blank) privilege in order to do such and such". The Jira ticket ID can be in version history too, it doesn't need to be in a comment or assertion message.

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.

3 participants