Closed mstellwa closed 7 years ago
That is most likely because the <http-server>
set up uses a default-user equal to ${app-name}-user.
You could add this line to build.properties
:
default-user=${app-name}-user-A
You could also reference that value in ml-config.xml
instead of repeating it:
<user-name>${default-user}</user-name>
Actually I have two users, ${app-name}-user-A and ${app-name}-user-B added to the ml-config.xml, not using the default-user.
But the REST server being set up in ml-config.xml
does reference that default-user, which defaults to ${app-name}-user, which user you are no longer creating, leading to the error.
Did not see that and did not think of it since I am using digestbasic as authentication. It did not occur that the default user was used in that case.
I think that some documentation around changing the defaults would help a lot. There is a lot of dependencies that maybe is not that clear.
I agree that this is a bit confusing, and I'm a little surprised that there isn't an app-user setting. It would be nice to have an app-user setting, which the default-user references by default.
Though once you start changing ml-config.xml, it will be hard to anticipate all the ways that XML could be modified that would be inconsistent.
For documentation on changing defaults, there is this video: https://www.youtube.com/watch?v=KCspJ-BP4T0
This is more a Roxy issue, but i agree config could be better. Server config should use default-user prop, and that prop should default to nobody if not using applevel auth..
Not sure we can do a lot within slush about this. Best is to just leave that app-name user, and add extra users..
I think this was fixed at some point in Roxy, so should no longer be an issue..
It was fixed as part of this PR in Roxy: https://github.com/marklogic-community/roxy/pull/785
For example if I change the user in ml-config.xml to ${app-name}-user-A I get the following: mats-mac:simple-test mstellwa$ ./ml local bootstrap Bootstrapping your project into MarkLogic 8 on localhost... ERROR: note: restart required SEC-USERDNE: xdmp:user("simple-test-user") -- User does not exist: user-name = simple-test-user See MarkLogic Server error log for more details. ERROR: ... Bootstrap FAILED ERROR: exit ERROR: ["deploy/lib/ml.rb:170:in'"]
exit'", "deploy/lib/ml.rb:170:in