-
Notifications
You must be signed in to change notification settings - Fork 52
MLE-28498 11.3.5 Test Fixes for Security Update #1074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "role-name": "rest-invoke-user", | ||
| "description": "Role granting xdmp:login privilege needed for REST transform invocations with different-transaction isolation", | ||
| "privilege": [ | ||
| { | ||
| "privilege-name": "xdmp-login", | ||
| "action": "http://marklogic.com/xdmp/privileges/xdmp-login", | ||
| "kind": "execute" | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,5 @@ | |
| "user-name": "rest-reader", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| "description": "rest-reader user", | ||
| "password": "x", | ||
| "role": [ | ||
| "rest-reader" | ||
| ] | ||
| } | ||
| "role": ["rest-reader", "rest-extension-user", "rest-invoke-user"] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "user-name": "rest-transform-user", | ||
|
|
||
| "role": ["rest-transform-internal", "rest-reader", "rest-invoke-user"] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| "role": [ | ||
| "rest-writer", | ||
| "rest-evaluator", | ||
| "temporal-admin" | ||
| "temporal-admin", | ||
| "rest-extension-user" | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -187,7 +187,7 @@ describe('document transform', function(){ | |
| documents.length.should.equal(1); | ||
| 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| done(); | ||
| }) | ||
| .catch(done); | ||
|
|
@@ -202,7 +202,7 @@ describe('document transform', function(){ | |
| documents.length.should.equal(1); | ||
| 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 | ||
| done(); | ||
| }) | ||
| .catch(done); | ||
|
|
@@ -221,7 +221,7 @@ describe('document transform', function(){ | |
| documents.length.should.equal(1); | ||
| 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 | ||
| done(); | ||
| }) | ||
| .catch(done); | ||
|
|
||
There was a problem hiding this comment.
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.