You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Lisa Davidson <ll...@redhat.com> on 2021/02/02 20:55:39 UTC

How to create an admin user

I have a need to update an existing user to be admin. For some reason, I
can't find a way to do that in either /bin/users.html/ web console on the
UI or via the REST interface here
https://sling.apache.org/documentation/bundles/managing-users-and-groups-jackrabbit-usermanager.html


Any suggestions?
-- 
Lisa Davidson, RHCE
Sr. Software Engineer
Red Hat, Inc.

Re: How to create an admin user

Posted by Lisa Davidson <ll...@redhat.com>.
Thank you for the suggestion! I'll give it a try!

On Wed, Feb 3, 2021 at 11:36 AM Daniel Klco <dk...@apache.org> wrote:

> Unless I'm missing something, this sounds like you'd to assign the user
> into an administrative group and give that administrative group the JCR
> repository permissions as well as adding the administrative group into the
> groups list for the WebConsole Security Provider:
>
> https://sling.apache.org/documentation/bundles/web-console-extensions.html#security-provider-orgapacheslingextensionswebconsolesecurityprovider
>
> Ideally, you could do this with a callback after the keycloak
> authentication using a service user.
>
> On Wed, Feb 3, 2021 at 11:15 AM Lisa Davidson <ll...@redhat.com> wrote:
>
> > Eric,
> >
> > I'm integrating with keycloak. After the user is authenticated, if user
> > does not exist, I create a new user via UserManager.
> >
> > I currently have a need to be able to grant a particular user admin
> rights
> > so that it can access
> >     Browse Content
> >     System Console
> >     System Configuration
> >
> >
> >
> >
> >
> > On Tue, Feb 2, 2021 at 5:21 PM Eric Norman <en...@apache.org> wrote:
> >
> > > Hi Lisa,
> > >
> > > Can you provide some additional clarification on what you mean by "to
> be
> > > admin"? Are you saying you want to replace the autocreated "admin" user
> > > with another existing user who then becomes the superuser for the
> > > repository?  Or maybe you meant something else?
> > >
> > > Regards,
> > > Eric
> > >
> > > On Tue, Feb 2, 2021 at 12:56 PM Lisa Davidson <ll...@redhat.com> wrote:
> > >
> > > > I have a need to update an existing user to be admin. For some
> reason,
> > I
> > > > can't find a way to do that in either /bin/users.html/ web console on
> > the
> > > > UI or via the REST interface here
> > > >
> > > >
> > >
> >
> https://sling.apache.org/documentation/bundles/managing-users-and-groups-jackrabbit-usermanager.html
> > > >
> > > >
> > > > Any suggestions?
> > > > --
> > > > Lisa Davidson, RHCE
> > > > Sr. Software Engineer
> > > > Red Hat, Inc.
> > > >
> > >
> >
> >
> > --
> > Lisa Davidson, RHCE
> > Sr. Software Engineer
> > Red Hat, Inc.
> >
>


-- 
Lisa Davidson, RHCE
Sr. Software Engineer
Red Hat, Inc.

Re: How to create an admin user

Posted by Daniel Klco <dk...@apache.org>.
Unless I'm missing something, this sounds like you'd to assign the user
into an administrative group and give that administrative group the JCR
repository permissions as well as adding the administrative group into the
groups list for the WebConsole Security Provider:
https://sling.apache.org/documentation/bundles/web-console-extensions.html#security-provider-orgapacheslingextensionswebconsolesecurityprovider

Ideally, you could do this with a callback after the keycloak
authentication using a service user.

On Wed, Feb 3, 2021 at 11:15 AM Lisa Davidson <ll...@redhat.com> wrote:

> Eric,
>
> I'm integrating with keycloak. After the user is authenticated, if user
> does not exist, I create a new user via UserManager.
>
> I currently have a need to be able to grant a particular user admin rights
> so that it can access
>     Browse Content
>     System Console
>     System Configuration
>
>
>
>
>
> On Tue, Feb 2, 2021 at 5:21 PM Eric Norman <en...@apache.org> wrote:
>
> > Hi Lisa,
> >
> > Can you provide some additional clarification on what you mean by "to be
> > admin"? Are you saying you want to replace the autocreated "admin" user
> > with another existing user who then becomes the superuser for the
> > repository?  Or maybe you meant something else?
> >
> > Regards,
> > Eric
> >
> > On Tue, Feb 2, 2021 at 12:56 PM Lisa Davidson <ll...@redhat.com> wrote:
> >
> > > I have a need to update an existing user to be admin. For some reason,
> I
> > > can't find a way to do that in either /bin/users.html/ web console on
> the
> > > UI or via the REST interface here
> > >
> > >
> >
> https://sling.apache.org/documentation/bundles/managing-users-and-groups-jackrabbit-usermanager.html
> > >
> > >
> > > Any suggestions?
> > > --
> > > Lisa Davidson, RHCE
> > > Sr. Software Engineer
> > > Red Hat, Inc.
> > >
> >
>
>
> --
> Lisa Davidson, RHCE
> Sr. Software Engineer
> Red Hat, Inc.
>

Re: How to create an admin user

Posted by Lisa Davidson <ll...@redhat.com>.
Eric,

I'm integrating with keycloak. After the user is authenticated, if user
does not exist, I create a new user via UserManager.

I currently have a need to be able to grant a particular user admin rights
so that it can access
    Browse Content
    System Console
    System Configuration





On Tue, Feb 2, 2021 at 5:21 PM Eric Norman <en...@apache.org> wrote:

> Hi Lisa,
>
> Can you provide some additional clarification on what you mean by "to be
> admin"? Are you saying you want to replace the autocreated "admin" user
> with another existing user who then becomes the superuser for the
> repository?  Or maybe you meant something else?
>
> Regards,
> Eric
>
> On Tue, Feb 2, 2021 at 12:56 PM Lisa Davidson <ll...@redhat.com> wrote:
>
> > I have a need to update an existing user to be admin. For some reason, I
> > can't find a way to do that in either /bin/users.html/ web console on the
> > UI or via the REST interface here
> >
> >
> https://sling.apache.org/documentation/bundles/managing-users-and-groups-jackrabbit-usermanager.html
> >
> >
> > Any suggestions?
> > --
> > Lisa Davidson, RHCE
> > Sr. Software Engineer
> > Red Hat, Inc.
> >
>


-- 
Lisa Davidson, RHCE
Sr. Software Engineer
Red Hat, Inc.

Re: How to create an admin user

Posted by Eric Norman <en...@apache.org>.
Hi Lisa,

Can you provide some additional clarification on what you mean by "to be
admin"? Are you saying you want to replace the autocreated "admin" user
with another existing user who then becomes the superuser for the
repository?  Or maybe you meant something else?

Regards,
Eric

On Tue, Feb 2, 2021 at 12:56 PM Lisa Davidson <ll...@redhat.com> wrote:

> I have a need to update an existing user to be admin. For some reason, I
> can't find a way to do that in either /bin/users.html/ web console on the
> UI or via the REST interface here
>
> https://sling.apache.org/documentation/bundles/managing-users-and-groups-jackrabbit-usermanager.html
>
>
> Any suggestions?
> --
> Lisa Davidson, RHCE
> Sr. Software Engineer
> Red Hat, Inc.
>

Re: How to create an admin user

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Tue, Feb 2, 2021 at 9:56 PM Lisa Davidson <ll...@redhat.com> wrote:
> ...I have a need to update an existing user to be admin...

In general I think the recommendation is to create a group that has
the necessary access rights, with that user as a member.

Using the JCR admin user more than strictly needed is not recommended.

-Bertrand