Skip to content

MLE-31877 revert xdmp-login changes - #1966

Open
jonmille wants to merge 3 commits into
developfrom
MLE-31877-Revert-xdmp-login-changes
Open

MLE-31877 revert xdmp-login changes#1966
jonmille wants to merge 3 commits into
developfrom
MLE-31877-Revert-xdmp-login-changes

Conversation

@jonmille

@jonmillejonmille commented Aug 11, 2026

Copy link
Copy Markdown

Reverting the xdmp-login changes introduced as part of: #1935

The unprotected-uri and unprotected-collections privileges are still needed so they have been added to the java-test-delete-graph and java-test-evaluator roles

The xdmp:xslt-invoke, xdmp:xslt-eval, and xdmp:value privileges are still needed so they have been added to the test-test-writer role

Jira Ticket: https://progresssoftware.atlassian.net/browse/MLE-31877
Related issue why xdmp-login is being removed: https://progresssoftware.atlassian.net/browse/MLE-30664

Adding back the unprotected-uri and unprotected- collections privilege removed as part of xdmp-login removal

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Reverts the prior introduction of the xdmp-login privilege/role in the test-app security configuration (from PR #1935), while keeping required unprotected-uri / unprotected-collections privileges by moving them onto the roles actually used by affected test users.

Changes:

  • Removes the java-test-xdmp-login role and strips xdmp-login from test-rest-writer and test user role assignments.
  • Adds unprotected-uri and unprotected-collections privileges to java-test-delete-graph and java-test-evaluator.
  • Updates several functional tests to stop granting xdmp-login when creating the test-eval role.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
test-app/src/main/ml-config/security/users/writer-no-default-permissions.jsonRemoves java-test-xdmp-login from the user’s role list.
test-app/src/main/ml-config/security/users/rest-writer.jsonRemoves java-test-xdmp-login from the user’s role list.
test-app/src/main/ml-config/security/users/rest-transform-user.jsonDeletes user that previously depended on java-test-xdmp-login.
test-app/src/main/ml-config/security/users/rest-evaluator.jsonRemoves java-test-xdmp-login from the user’s role list.
test-app/src/main/ml-config/security/users/rest-admin.jsonRemoves java-test-xdmp-login from the user’s role list.
test-app/src/main/ml-config/security/roles/test-rest-writer.jsonRemoves the xdmp-login execute privilege from the role.
test-app/src/main/ml-config/security/roles/java-test-xdmp-login.jsonDeletes the role that bundled xdmp-login and related execute privileges.
test-app/src/main/ml-config/security/roles/java-test-evaluator.jsonAdds unprotected-uri / unprotected-collections execute privileges.
test-app/src/main/ml-config/security/roles/java-test-delete-graph.jsonAdds unprotected-uri / unprotected-collections execute privileges.
marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/functionaltest/TestBiTemporal.javaStops granting xdmp-login when creating the test-eval role.
marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestJSResourceExtensions.javaStops granting xdmp-login when creating the test-eval role.
marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestBulkWriteWithTransformations.javaStops granting xdmp-login when creating the test-eval role.
marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/StringQueryHostBatcherTest.javaStops granting xdmp-login when creating the test-eval role.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Adding "xdmp:xslt-invoke", "xdmp:xslt-eval", and "xdmp:value" to test-rest-writer role to fix tests. These were removed when java-test-xdmp-login.json was deleted.
{
"privilege-name": "xdmp-login",
"action": "http://marklogic.com/xdmp/privileges/xdmp-login",
"privilege-name": "xdmp:invoke",

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 is fine for this PR, but I think it'd be good to next try a PR where this is removed from this role and see what fails. And then create an additional role - e.g. "test-invoke" - that only grants this privilege and give it a user that is only used for tests where we know this privilege is required. It should be granted for a "rest writer" who typically does not need invoke (or eval) privileges.

{
"privilege-name": "xdmp:invoke",
"action": "http://marklogic.com/xdmp/privileges/xdmp-invoke",
"privilege-name": "xdmp:xslt-invoke",

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.

Same for these privileges - I would do a follow up PR where I remove these and see what breaks.

Sign up for freeto 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

@jonmille@rjrudin