User login
Monday, 12 January 2015 · 6 messages · last reply 13 Jan 2015
AB
Andy Bunce12 Jan 2015 18:09 #
Hi,
Just investigating user handling, I am using the latest snapsnap.
I start basexhttp with -U guest -P guest
and/or I set org.basex.user and org.basex.password in web.xml
Sometimes I have created a user ( guest with password guest) and permission none via dba. Sometimes I have deleted the guest user.
In all cases I appear to be able to run restxq queries and in those queries read from databases.
Am I misunderstanding something here?
/Andy
CG
Christian Grün12 Jan 2015 18:37 #
Hi Andy,
With BaseX 8.0, no authentication is required anymore when using RESTXQ, because all code to be executed is defined server-side. This continues to be different with REST and WebDAV.
Hope this helps?
Christian
Quoted text · Andy Bunce · 23 lines
On Mon, Jan 12, 2015 at 6:09 PM, Andy Bunce <bunce.andy at gmail.com> wrote: > Hi, > Just investigating user handling, I am using the latest snapsnap. > > I start basexhttp with -U guest -P guest > and/or I set org.basex.user and org.basex.password in web.xml > > Sometimes I have created a user ( guest with password guest) and permission > none via dba. Sometimes I have deleted the guest user. > > In all cases I appear to be able to run restxq queries and in those queries > read from databases. > > Am I misunderstanding something here? > > /Andy > > > > > > >
AB
Andy Bunce12 Jan 2015 18:44 #
So does this mean all restxq code always runs as admin and can do anything?
Quoted text · Christian Grün · 37 lines
On 12 Jan 2015 17:37, "Christian Grün" <christian.gruen at gmail.com> wrote: > Hi Andy, > > With BaseX 8.0, no authentication is required anymore when using > RESTXQ, because all code to be executed is defined server-side. This > continues to be different with REST and WebDAV. > > Hope this helps? > Christian > > > On Mon, Jan 12, 2015 at 6:09 PM, Andy Bunce <bunce.andy at gmail.com> wrote: > > Hi, > > Just investigating user handling, I am using the latest snapsnap. > > > > I start basexhttp with -U guest -P guest > > and/or I set org.basex.user and org.basex.password in web.xml > > > > Sometimes I have created a user ( guest with password guest) and > permission > > none via dba. Sometimes I have deleted the guest user. > > > > In all cases I appear to be able to run restxq queries and in those > queries > > read from databases. > > > > Am I misunderstanding something here? > > > > /Andy > > > > > > > > > > > > > > >
CG
Christian Grün12 Jan 2015 18:48 #
Exactly. In our own RESTXQ applications, we haven't experienced any case in which the restriction was useful so far. But I guess, this is different in (some of) your applications?
We could think about reverting this change, and specifying admin/admin as default in web.xml for the RESTXQ service instead. Do you think that would make sense?
Christian
Quoted text · Andy Bunce · 40 lines
On Mon, Jan 12, 2015 at 6:44 PM, Andy Bunce <bunce.andy at gmail.com> wrote: > So does this mean all restxq code always runs as admin and can do anything? > > On 12 Jan 2015 17:37, "Christian Grün" <christian.gruen at gmail.com> wrote: >> >> Hi Andy, >> >> With BaseX 8.0, no authentication is required anymore when using >> RESTXQ, because all code to be executed is defined server-side. This >> continues to be different with REST and WebDAV. >> >> Hope this helps? >> Christian >> >> >> On Mon, Jan 12, 2015 at 6:09 PM, Andy Bunce <bunce.andy at gmail.com> wrote: >> > Hi, >> > Just investigating user handling, I am using the latest snapsnap. >> > >> > I start basexhttp with -U guest -P guest >> > and/or I set org.basex.user and org.basex.password in web.xml >> > >> > Sometimes I have created a user ( guest with password guest) and >> > permission >> > none via dba. Sometimes I have deleted the guest user. >> > >> > In all cases I appear to be able to run restxq queries and in those >> > queries >> > read from databases. >> > >> > Am I misunderstanding something here? >> > >> > /Andy >> > >> > >> > >> > >> > >> > >> >
AB
Andy Bunce13 Jan 2015 12:13 #
The change is not a problem for me, but I am not a security expert ;-) However if it stays then I guess it means the -U and -P options to basexhttp are being silently ignored.
I think something like the existdb approach would be more what I would expect.
The ability to config a default http user with reduced permissions, and then a way to change the user associated with the session
e.g. session:set-current-user
http://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/session&location=java:org.exist.xquery.functions.session.SessionModule&details=true
/Andy
Quoted text · Christian Grün · 57 lines
On 12 January 2015 at 17:48, Christian Grün <christian.gruen at gmail.com> wrote: > Exactly. In our own RESTXQ applications, we haven't experienced any > case in which the restriction was useful so far. But I guess, this is > different in (some of) your applications? > > We could think about reverting this change, and specifying admin/admin > as default in web.xml for the RESTXQ service instead. Do you think > that would make sense? > > Christian > > > On Mon, Jan 12, 2015 at 6:44 PM, Andy Bunce <bunce.andy at gmail.com> wrote: > > So does this mean all restxq code always runs as admin and can do > anything? > > > > On 12 Jan 2015 17:37, "Christian Grün" <christian.gruen at gmail.com> > wrote: > >> > >> Hi Andy, > >> > >> With BaseX 8.0, no authentication is required anymore when using > >> RESTXQ, because all code to be executed is defined server-side. This > >> continues to be different with REST and WebDAV. > >> > >> Hope this helps? > >> Christian > >> > >> > >> On Mon, Jan 12, 2015 at 6:09 PM, Andy Bunce <bunce.andy at gmail.com> > wrote: > >> > Hi, > >> > Just investigating user handling, I am using the latest snapsnap. > >> > > >> > I start basexhttp with -U guest -P guest > >> > and/or I set org.basex.user and org.basex.password in web.xml > >> > > >> > Sometimes I have created a user ( guest with password guest) and > >> > permission > >> > none via dba. Sometimes I have deleted the guest user. > >> > > >> > In all cases I appear to be able to run restxq queries and in those > >> > queries > >> > read from databases. > >> > > >> > Am I misunderstanding something here? > >> > > >> > /Andy > >> > > >> > > >> > > >> > > >> > > >> > > >> > >
CG
Christian Grün13 Jan 2015 22:54 #
Hi Andy,
Quoted text · Andy Bunce · 6 lines
> I think something like the existdb approach would be more what I would > expect. > The ability to config a default http user with reduced permissions, and then > a way to change the user associated with the session > e.g. session:set-current-user > http://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/session&location=java:org.exist.xquery.functions.session.SessionModule&details=true
Currently, database users and sessions are treated separatedly, but I would really like to bring them closer together. Thanks for the link.
Christian
Written for BaseX 7.9. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery