You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by connuser1 connuser1 <co...@gmail.com> on 2012/10/12 16:16:34 UTC

Where are users stored in the repository?

Hi

Are the users created as nodes within the repository. I create users using
the usermanager.createUser method. I want to know the path where they get
created by default. Is there a way to override this path and create the
user at my specified path. Perhaps the 'intermediatePath' parameter of the
createUser method is to be used for it. But I am not sure how as I find no
user nodes created at the path that I specify when creting the user..

Regards
Satya Deep

Re: Where are users stored in the repository?

Posted by Alexander Klimetschek <ak...@adobe.com>.
On 13.10.2012, at 13:49, connuser1 connuser1 <co...@gmail.com> wrote:

> Thanks Alex for providing the information!
> But when I dumped the repository structure to a file, I see the users
> created in /rep:security/rep:authorizables/rep:users I see no /home node.

Sorry, we use this here and I was under the impression that was the default configuration. Thanks Chetan for the configuration hint.

Cheers,
Alex

Re: Where are users stored in the repository?

Posted by connuser1 connuser1 <co...@gmail.com>.
Thanks Angela!

I have updated my settings per your suggestion. It seems to be working as
expected.

<SecurityManager
class="org.apache.jackrabbit.core.UserPerWorkspaceSecurityManager">
            <UserManager
class="org.apache.jackrabbit.core.security.user.UserPerWorkspaceUserManager">
                <param name="usersPath" value="/home/users"/>
                <param name="groupsPath" value="/home/groups"/>
                <param name="defaultDepth" value="1"/>
                <param name="autoExpandTree" value="true"/>
                <AuthorizableAction
class="org.apache.jackrabbit.core.security.user.action.AccessControlAction">
                  <param name="groupPrivilegeNames" value="jcr:read"/>
                  <param name="userPrivilegeNames" value="jcr:all"/>
                </AuthorizableAction>
            </UserManager>

            <!--
            workspace access:
            class: FQN of class implementing the WorkspaceAccessManager
interface
            -->
            <!-- <WorkspaceAccessManager class="..."/> -->
            <!-- <param name="config" value="${rep.home}/security.xml"/> -->
        </SecurityManager>

On Mon, Oct 22, 2012 at 1:59 PM, Angela Schreiber <an...@adobe.com> wrote:

> please don't use the configuration as specified below.
> it doesn't make sense and is a mixture between jackrabbit's
> default setup and the user-per-workspace idea that we use
> at adobe.
>
> instead you should change the config to either
> a) set SecurityManger class to UserPerWorkspaceSecurityManage**r
> b) set UserManager class to UserManagerImpl
>
> the DefaultSecurityManager expects the users to be stored
> in a dedicated extra workspace (see "workspaceName attribute
> with the security manager) and makes sure that the user
> manager is always bound to that workspace... this contradicts
> the aim of the UserPerWorkspaceUserManager.
>
> the only difference between the base class UserManagerImpl and
> it's derived variant is that the latter allows you to disable
> the 'auto-save' mode (in other other words delegating the
> responsibility of calling save to the editing session) and
> allows to retrieve the path of an authorizable. both features
> only make sense if the user manager is guaranteed to be bound
> to the editing session which is not the case with DefaultSecurityManager.
>
> kind regards
> angela
>
>
>
>
> On 10/13/12 2:38 PM, Chetan Mehrotra wrote:
>
>> You can control the location where are user are created by default
>> through UserManager config which is by default optional
>>
>>   <SecurityManager class="org.apache.jackrabbit.**
>> core.DefaultSecurityManager">
>>              <!--
>>              optional user manager configuration
>>              -->
>>              <UserManager
>> class="org.apache.jackrabbit.**core.security.user.**
>> UserPerWorkspaceUserManager">
>>                  <param name="usersPath" value="/home/users"/>
>>                  <param name="groupsPath" value="/home/groups"/>
>>                  <param name="defaultDepth" value="1"/>
>>                  <param name="autoExpandTree" value="true"/>
>>                  <AuthorizableAction
>> class="org.apache.jackrabbit.**core.security.user.action.**
>> AccessControlAction">
>>                    <param name="groupPrivilegeNames" value="jcr:read"/>
>>                    <param name="userPrivilegeNames" value="jcr:all"/>
>>                  </AuthorizableAction>
>>
>>              </UserManager>
>>
>>              <!--
>>              optional workspace access manager configuration
>>             -->
>>          </SecurityManager>
>>
>>
>> Chetan Mehrotra
>>
>

Re: Where are users stored in the repository?

Posted by Angela Schreiber <an...@adobe.com>.
please don't use the configuration as specified below.
it doesn't make sense and is a mixture between jackrabbit's
default setup and the user-per-workspace idea that we use
at adobe.

instead you should change the config to either
a) set SecurityManger class to UserPerWorkspaceSecurityManager
b) set UserManager class to UserManagerImpl

the DefaultSecurityManager expects the users to be stored
in a dedicated extra workspace (see "workspaceName attribute
with the security manager) and makes sure that the user
manager is always bound to that workspace... this contradicts
the aim of the UserPerWorkspaceUserManager.

the only difference between the base class UserManagerImpl and
it's derived variant is that the latter allows you to disable
the 'auto-save' mode (in other other words delegating the
responsibility of calling save to the editing session) and
allows to retrieve the path of an authorizable. both features
only make sense if the user manager is guaranteed to be bound
to the editing session which is not the case with DefaultSecurityManager.

kind regards
angela



On 10/13/12 2:38 PM, Chetan Mehrotra wrote:
> You can control the location where are user are created by default
> through UserManager config which is by default optional
>
>   <SecurityManager class="org.apache.jackrabbit.core.DefaultSecurityManager">
>              <!--
>              optional user manager configuration
>              -->
>              <UserManager
> class="org.apache.jackrabbit.core.security.user.UserPerWorkspaceUserManager">
>                  <param name="usersPath" value="/home/users"/>
>                  <param name="groupsPath" value="/home/groups"/>
>                  <param name="defaultDepth" value="1"/>
>                  <param name="autoExpandTree" value="true"/>
>                  <AuthorizableAction
> class="org.apache.jackrabbit.core.security.user.action.AccessControlAction">
>                    <param name="groupPrivilegeNames" value="jcr:read"/>
>                    <param name="userPrivilegeNames" value="jcr:all"/>
>                  </AuthorizableAction>
>
>              </UserManager>
>
>              <!--
>              optional workspace access manager configuration
>             -->
>          </SecurityManager>
>
>
> Chetan Mehrotra

Re: Where are users stored in the repository?

Posted by connuser1 connuser1 <co...@gmail.com>.
I guess I was missing something earlier. Users are actually getting created
in /home/users folder.

On Fri, Oct 19, 2012 at 12:08 PM, connuser1 connuser1
<co...@gmail.com>wrote:

> Thanks Chetan for providing the information! But even after adding this
> setting, I do not see any /home folder with users and groups inside it. I
> also tried creating these folders myself but still no users got added to it
> on calling userManager.createUser(uid, pwd)
>
>
> On Sat, Oct 13, 2012 at 6:08 PM, Chetan Mehrotra <
> chetan.mehrotra@gmail.com> wrote:
>
>> You can control the location where are user are created by default
>> through UserManager config which is by default optional
>>
>>  <SecurityManager
>> class="org.apache.jackrabbit.core.DefaultSecurityManager">
>>             <!--
>>             optional user manager configuration
>>             -->
>>             <UserManager
>>
>> class="org.apache.jackrabbit.core.security.user.UserPerWorkspaceUserManager">
>>                 <param name="usersPath" value="/home/users"/>
>>                 <param name="groupsPath" value="/home/groups"/>
>>                 <param name="defaultDepth" value="1"/>
>>                 <param name="autoExpandTree" value="true"/>
>>                 <AuthorizableAction
>>
>> class="org.apache.jackrabbit.core.security.user.action.AccessControlAction">
>>                   <param name="groupPrivilegeNames" value="jcr:read"/>
>>                   <param name="userPrivilegeNames" value="jcr:all"/>
>>                 </AuthorizableAction>
>>
>>             </UserManager>
>>
>>             <!--
>>             optional workspace access manager configuration
>>            -->
>>         </SecurityManager>
>>
>>
>> Chetan Mehrotra
>>
>
>

Re: Where are users stored in the repository?

Posted by connuser1 connuser1 <co...@gmail.com>.
Thanks Chetan for providing the information! But even after adding this
setting, I do not see any /home folder with users and groups inside it. I
also tried creating these folders myself but still no users got added to it
on calling userManager.createUser(uid, pwd)


On Sat, Oct 13, 2012 at 6:08 PM, Chetan Mehrotra
<ch...@gmail.com>wrote:

> You can control the location where are user are created by default
> through UserManager config which is by default optional
>
>  <SecurityManager
> class="org.apache.jackrabbit.core.DefaultSecurityManager">
>             <!--
>             optional user manager configuration
>             -->
>             <UserManager
>
> class="org.apache.jackrabbit.core.security.user.UserPerWorkspaceUserManager">
>                 <param name="usersPath" value="/home/users"/>
>                 <param name="groupsPath" value="/home/groups"/>
>                 <param name="defaultDepth" value="1"/>
>                 <param name="autoExpandTree" value="true"/>
>                 <AuthorizableAction
>
> class="org.apache.jackrabbit.core.security.user.action.AccessControlAction">
>                   <param name="groupPrivilegeNames" value="jcr:read"/>
>                   <param name="userPrivilegeNames" value="jcr:all"/>
>                 </AuthorizableAction>
>
>             </UserManager>
>
>             <!--
>             optional workspace access manager configuration
>            -->
>         </SecurityManager>
>
>
> Chetan Mehrotra
>

Re: Where are users stored in the repository?

Posted by Chetan Mehrotra <ch...@gmail.com>.
You can control the location where are user are created by default
through UserManager config which is by default optional

 <SecurityManager class="org.apache.jackrabbit.core.DefaultSecurityManager">
            <!--
            optional user manager configuration
            -->
            <UserManager
class="org.apache.jackrabbit.core.security.user.UserPerWorkspaceUserManager">
                <param name="usersPath" value="/home/users"/>
                <param name="groupsPath" value="/home/groups"/>
                <param name="defaultDepth" value="1"/>
                <param name="autoExpandTree" value="true"/>
                <AuthorizableAction
class="org.apache.jackrabbit.core.security.user.action.AccessControlAction">
                  <param name="groupPrivilegeNames" value="jcr:read"/>
                  <param name="userPrivilegeNames" value="jcr:all"/>
                </AuthorizableAction>

            </UserManager>

            <!--
            optional workspace access manager configuration
           -->
        </SecurityManager>


Chetan Mehrotra

Re: Where are users stored in the repository?

Posted by connuser1 connuser1 <co...@gmail.com>.
Thanks Alex for providing the information!
But when I dumped the repository structure to a file, I see the users
created in /rep:security/rep:authorizables/rep:users I see no /home node.


On Fri, Oct 12, 2012 at 8:16 PM, Alexander Klimetschek
<ak...@adobe.com>wrote:

> On 12.10.2012, at 16:16, connuser1 connuser1 <co...@gmail.com> wrote:
>
> > Are the users created as nodes within the repository. I create users
> using
> > the usermanager.createUser method. I want to know the path where they get
> > created by default.
>
> /home/users/*
> /home/groups/*
>
> Cheers,
> Alex
>

Re: Where are users stored in the repository?

Posted by Alexander Klimetschek <ak...@adobe.com>.
On 12.10.2012, at 16:16, connuser1 connuser1 <co...@gmail.com> wrote:

> Are the users created as nodes within the repository. I create users using
> the usermanager.createUser method. I want to know the path where they get
> created by default.

/home/users/*
/home/groups/*

Cheers,
Alex