Helen
Helen

Reputation: 171

how to create readonly user for webdav connection to marklogic

I'm using marklogic 9.0-8 on windows 10. In marklogic, I need to setup webdav so operator can see all the documents. But I only want to give webdav readonly permission, this is to avoid accidents.

step1: I created a role called "readonly", (not compartment), give this role the following permission:

a. execute privileges: any-uri, rest-reader, role-exists, role-get-description, role-get-external-names
b. uri-previleges:  view-uri
c. role name (capability):   readonly (read)

step 2: I then created a user called "test-user", assign role "readonly" to this user

step 3: using DMSDK async, I load documents into marklogic, with metadata permission : role "readonly". here I didn't specify the capability for role at loading data time, so I assume it takes the default permission assigned to role "readonly"

step 4: now I setup webdav app server called webdav-appserver. for this server, the default user is "test-user"; root is "/". database points to my db, port 10001. others are default.

step5. now on windows, I create webdav to connection to database, using "http:localhost:10001". it will ask for userid and password. when I provide user "test-user" and password, it will complains "windows cannot access http://localhost:10001/". but if I connect using "admin" user, then I can connect.

question 1: I expect that I can use user "test-user" for webdav to connect to marklogic, and once connected, on windows, even operator can see the documents, the documents are readonly, oeprators cannot modify or delete. but the problem is I cannot connect using "test-user".

question 2 regarding this: if I connect the webdav using admin user, the webdav can connect, I can see documents from windows system. but when I open the pdf file from webdav, it will ask me for userid/password. after I provide "test-user" and password, then I can see pdf files. it will ask userid and password everytime. But for xml files it doesn't ask userid/password.

My expectation is: once I connected to marklogic using webdav with my "test-user", I should be able to see pdf files, I should not be asked to provide userid/password each time.

Can anyone help me on this?

Thanks, Helen

Upvotes: 0

Views: 455

Answers (1)

wst
wst

Reputation: 11771

This is very likely a Windows Explorer WebDAV problem, not a MarkLogic problem. Test on another WebDAV client.

And in Windows Explorer, when connecting to the root of a WebDAV server, you have to replace the root / with /DavWWWRoot/. This may or may not be related to your issue.

Finally, read the documentation on URI privileges. If you intend to create a read-only user, then do not give them any URI privileges, which permits creating documents at the URI path specified by the privilege.

Upvotes: 0

Related Questions