access control
Tuesday, 28 February 2012 · 4 messages · last reply 29 Feb 2012
VP
Victor Petrov28 Feb 2012 22:50 #
Dear BaseX Community,
is it possible to restrict user access on a per-document (or even better, per-element) basis?
Imagine that multiple users are sharing the same database and the system needs to prevent XPath queries on the documents/elements which the current user doesn't have access to.
If not, is there any other way this functionality could be achieved using BaseX?
Thank you in advance!
Regards,
Victor
DP
Dimitar Popov29 Feb 2012 00:32 #
Hi Victor,
Quoted text · -0500 · 6 lines
Am Dienstag, den 28.02.2012, 15:50 -0500 schrieb Victor Petrov: > Dear BaseX Community, > > > is it possible to restrict user access on a per-document (or even > better, per-element) basis?
Unfortunately, neither of them is possible.
Quoted text · Victor Petrov · 5 lines
> Imagine that multiple users are sharing the same database and the > system needs to prevent XPath queries on the documents/elements which > the current user doesn't have access to. > If not, is there any other way this functionality could be achieved > using BaseX?
I don't know if it is feasible in your case, but you could try storing each document into a separate database and grant access to the necessary users.
Regards,
Dimitar
CG
Hi Victor,
as you correctly noted, user restrictions are only defined on database level.
If the number of users/groups is limited, and if the permissions of the documents don't change that frequently, we usually recommend users and customers to store documents in multiple database instances. Note that "databases" are pretty light-weight data structures in BaseX. For instance, you can access, query and update several databases with a single XQuery expression.
Hope this helps,
Christian
Quoted text · Victor Petrov · 16 lines
On Tue, Feb 28, 2012 at 9:50 PM, Victor Petrov <victor_petrov at harvard.edu> wrote: > Dear BaseX Community, > > is it possible to restrict user access on a per-document (or even better, > per-element) basis? > Imagine that multiple users are sharing the same database and the system > needs to prevent XPath queries on the documents/elements which the current > user doesn't have access to. > If not, is there any other way this functionality could be achieved using > BaseX? > > Thank you in advance! > > Regards, > Victor
VP
Victor Petrov29 Feb 2012 17:19 #
Thank you, Christian and Dimitar! I'll try to store documents in multiple databases.
Best,
Victor
On Tue, Feb 28, 2012 at 6:38 PM, Christian Grün
<christian.gruen at gmail.com>wrote:
Quoted text · Christian Grün · 1 line
> BaseX
Written for BaseX 7.1. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery