WebDav issues and auth clarification
Wednesday, 28 October 2015 · 3 messages · last reply 30 Oct 2015
RR
Régis Robineau28 Oct 2015 17:46 #
Hi all,
I'm a beginner in BaseX and I'd need some clarification about the setup and configuration, especially about authentication process.
The context is:
- Debian 8 Jessie, with Basex 8.3 manually installed (i.e. not from APT). I'm using Apache in front of Tomcat to access web apps (through mod_proxy and mod_proxy_ajp):
ProxyPass /BaseX83 ajp://localhost:8009/BaseX83
ProxyPassReverse /BaseX83 ajp://localhost:8009/BaseX83
- Webapp (
WEBPATH): "/var/lib/tomcat7/webapps/BaseX83"
- Data (DBPATH) : "/var/data/basex" (owned by tomcat7 user)
- Client/server binaries (BaseX83): "/opt/basex/bin/"
- conf file: "/opt/basex/.basex"
Here are the main variables in my ".basex" file:
DBPATH = /var/data/basex
REPOPATH = /var/lib/tomcat7/webapps/BaseX83/repo
HOST = localhost
PORT = 1984
SERVERPORT = 1984
PROXYPORT = 80
WEBPATH = /var/lib/tomcat7/webapps/BaseX83
HTTPLOCAL = false
STOPPORT = 8985
AUTHMETHOD = Basic
And in my "WEB-INF/web.xml" I've set:
- the value of "org.basex.dbpath" to reflect my local path (i.e. "/var/data/basex")
- a new "org.basex.password" for the "org.basex.user" (admin)
I have access to dba and REST service but I encounter various issues regarding authentication and WebDAV:
1/ I can't connect to WebDav service using the Finder (on Mac OS X 10.8.5) when "org.basex.authmethod" is set to "Digest". WebDav only works with the "Basic" auth method
2/ When the WebDav folder is mounted in the Finder, I can't copy files into it (permissions issues?). I've both tested as admin and as a test user with read/write permissions to the database... An empty file is created (zero byte, no content).
But on the other hand, I'm able to access the REST interface with the same users (admin and test).
I've created the test user like so:$ ./basexserver
// in a second tab:
$ ./basexclient -wQuoted text · 5 lines
> CREATE DB testdb > CREATE USER test password > GRANT READ ON testdb TO test > GRANT WRITE ON testdb TO test > SHOW USERS ON testdb
3/ The "org.basex.password" in WEB-INF/web.xml has no effect. The only way to define a password for admin is to use the console (ALTER
PASSWORD admin password).
Moreover the "service-specific credentials" for WebDav has no effect either. It just don't work. You can only connect to WebDav with the user credentials you defined in basex console (hence listed in users.xml). So what is the purpose of the "org.basex." settings?
Does anybody ever faced the same issues with WebDav?
Should I downgrade to 7.9 ?
Thanks for your help.
RegisCG
Christian Grün29 Oct 2015 11:52 #
Hi Régis,
Welcome to the list.
Quoted text · Régis Robineau · 1 line
> Here are the main variables in my ".basex" file:
Please note that the .basex configuration file will be ignored in the web application context (I have slightly revised our documentation, because I am not sure if this had explicitly been mentioned so far [1]).
Quoted text · Régis Robineau · 3 lines
> 1/ I can't connect to WebDav service using the Finder (on Mac OS X 10.8.5) > when "org.basex.authmethod" is set to "Digest". WebDav only works with the > "Basic" auth method
I must confess I haven’t tried Finder by myself (but I see it officially supports Digest Authentication). Does it work if you set "org.basex.authmethod" to "Digest" in the web.xml file?
Quoted text · Régis Robineau · 2 lines
> 2/ When the WebDav folder is mounted in the Finder, I can't copy files into > it (permissions issues?).
In our team, we have tested the clients listed in our documentation [2], including some others (Cadaver, Total Commander). I see that WebDAV was tested with Mac and Finder, but this was quite a while ago, so I would be glad to hear more about experiences from other Mac users.
Quoted text · Régis Robineau · 2 lines
> GRANT READ ON testdb TO test > GRANT WRITE ON testdb TO test
A little note: READ permissions are already covered by WRITE [3].
Quoted text · Régis Robineau · 1 line
> 3/ The "org.basex.password" in WEB-INF/web.xml has no effect.
It should. I just ran the commands you listed, and I edited the web.xml file:
<context-param>
<param-name>org.basex.user</param-name>
<param-value>test</param-value>
</context-param>
<context-param>
<param-name>org.basex.password</param-name>
<param-value>password</param-value>
</context-param>Next, I started basexhttp, and when using REST, no password will be requested, because the "test" user is applied as default.
Hope this helps,
Christian
[1] http://docs.basex.org/wiki/Configuration#Configuration_Files [2] http://docs.basex.org/wiki/Webdav
[3] http://docs.basex.org/wiki/User_Management
RR
Régis Robineau30 Oct 2015 16:31 #
Thanks for your help.
I can confirm WebDAV does not work in the Finder with "org.basex.authmethod" set to "Digest" in web.xml.
Best,
Regis
2015-10-29 11:52 GMT+01:00 Christian Grün <christian.gruen at gmail.com>:
Quoted text · Christian Grün · 60 lines
> Hi Régis, > > Welcome to the list. > > > Here are the main variables in my ".basex" file: > > Please note that the .basex configuration file will be ignored in the > web application context (I have slightly revised our documentation, > because I am not sure if this had explicitly been mentioned so far > [1]). > > > 1/ I can't connect to WebDav service using the Finder (on Mac OS X > 10.8.5) > > when "org.basex.authmethod" is set to "Digest". WebDav only works with > the > > "Basic" auth method > > I must confess I haven’t tried Finder by myself (but I see it > officially supports Digest Authentication). Does it work if you set > "org.basex.authmethod" to "Digest" in the web.xml file? > > > 2/ When the WebDav folder is mounted in the Finder, I can't copy files > into > > it (permissions issues?). > > In our team, we have tested the clients listed in our documentation > [2], including some others (Cadaver, Total Commander). I see that > WebDAV was tested with Mac and Finder, but this was quite a while ago, > so I would be glad to hear more about experiences from other Mac > users. > > > GRANT READ ON testdb TO test > > GRANT WRITE ON testdb TO test > > A little note: READ permissions are already covered by WRITE [3]. > > > 3/ The "org.basex.password" in WEB-INF/web.xml has no effect. > > It should. I just ran the commands you listed, and I edited the web.xml > file: > > <context-param> > <param-name>org.basex.user</param-name> > <param-value>test</param-value> > </context-param> > <context-param> > <param-name>org.basex.password</param-name> > <param-value>password</param-value> > </context-param> > > Next, I started basexhttp, and when using REST, no password will be > requested, because the "test" user is applied as default. > > Hope this helps, > Christian > > [1] http://docs.basex.org/wiki/Configuration#Configuration_Files > [2] http://docs.basex.org/wiki/Webdav > [3] http://docs.basex.org/wiki/User_Management >
Written for BaseX 8.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery