You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Daniel Klco <dk...@apache.org> on 2018/01/09 01:19:22 UTC

Service User OSGi Console

Hey Devs,

I've noticed a lot of friction with the adoption of Service Users and I
wonder if it might help to make a tool to make it easier to create / update
service users.

I put together an OSGi Console which makes it pretty darn easy to create
service users, lists the available service users and allows you to see a
Filter and example usage of each mapped service user.

Right now, I've forked the Apache Sling Service User Mapper bundle and you
can see a working example here:

https://github.com/klcodanr/sling-org-apache-sling-serviceusermapper

So a couple questions:


   - Does this sound like something we want to include?
   - Should it go in the Launchpad or be an addon?
   - Does including this in the ServiceUserMapper bundle make sense?

The reason I ask is to make the user and assign permissions, I need to use
the JCR and Jackrabbit APIs, which make this Resource Provider specific. I
could see a rationale for making this a separate bundle / project, but I'm
not convinced that's necessary.

Thanks for any feedback,
Dan

Re: Service User OSGi Console

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Tue, Jan 9, 2018 at 10:58 AM, Carsten Ziegeler <cz...@apache.org> wrote:
> ...We removed the dependencies from
> that bundle and should not reintroduce them...

Ah good, I forgot about that - agreed.

-Bertrand

Re: Service User OSGi Console

Posted by Carsten Ziegeler <cz...@apache.org>.
Please put it into another bundle - the serviceusermapper is independent
from JCR/Oak and should stay like this. We removed the dependencies from
that bundle and should not reintroduce them

Thanks

Carsten


Bertrand Delacretaz wrote
> Hi Dan,
> 
> An OSGi console panel for service users sounds great!
> 
> I'd put it in Launchpad.
> 
> On Tue, Jan 9, 2018 at 2:19 AM, Daniel Klco <dk...@apache.org> wrote:
> ...
>>    - Does including this in the ServiceUserMapper bundle make sense?
> ...
> 
> I think so - although it means making that bundle dependent on JCR
> stuff, I think the service users concept is Oak-specific anyway.
> 
> -Bertrand
> 
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: Service User OSGi Console

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

An OSGi console panel for service users sounds great!

I'd put it in Launchpad.

On Tue, Jan 9, 2018 at 2:19 AM, Daniel Klco <dk...@apache.org> wrote:
...
>    - Does including this in the ServiceUserMapper bundle make sense?
...

I think so - although it means making that bundle dependent on JCR
stuff, I think the service users concept is Oak-specific anyway.

-Bertrand

Re: Service User OSGi Console

Posted by Robert Munteanu <ro...@apache.org>.
On Tue, 2018-01-09 at 22:00 -0800, Daniel Klco wrote:
> Makes sense and I was kind of suspecting this would be the case. To
> enable
> the ServiceUser Console to work in a separate bundle though, I do
> need to
> make the Mapping class public and expose the getActiveMappings method
> on
> the ServiceUserMapper interface as shown below:
> 
> https://github.com/apache/sling-org-apache-sling-serviceusermapper/co
> mpare/master...klcodanr:master
> 
> Does that pose any issues? If not I'll go ahead and start on getting
> Service User Mapper 1.4.0 and adding the Service User Console bundle.
> I'm
> assuming this is okay from a naming perspective:
> 
>  - Git Repo Name: sling-org-apache-sling-serviceuser-console
>  - artifactId: org.apache.sling.serviceuser.console
>  - name: Apache Sling Service User Console


That looks mostly ok to me. I would name it 'webconsole' though instead
of 'console', to make it 100% clear.

Other than that, I don't think you need the profile addition in the
pom.xml, it should be inherited from the parent pom.

Thanks,

Robert

Re: Service User OSGi Console

Posted by Daniel Klco <dk...@apache.org>.
Makes sense and I was kind of suspecting this would be the case. To enable
the ServiceUser Console to work in a separate bundle though, I do need to
make the Mapping class public and expose the getActiveMappings method on
the ServiceUserMapper interface as shown below:

https://github.com/apache/sling-org-apache-sling-serviceusermapper/compare/master...klcodanr:master

Does that pose any issues? If not I'll go ahead and start on getting
Service User Mapper 1.4.0 and adding the Service User Console bundle. I'm
assuming this is okay from a naming perspective:

 - Git Repo Name: sling-org-apache-sling-serviceuser-console
 - artifactId: org.apache.sling.serviceuser.console
 - name: Apache Sling Service User Console

Thanks,
Dan

On Tue, Jan 9, 2018 at 2:42 AM, Robert Munteanu <ro...@apache.org> wrote:

> Hi Dan,
>
> On Mon, 2018-01-08 at 17:19 -0800, Daniel Klco wrote:
> > Hey Devs,
> >
> > I've noticed a lot of friction with the adoption of Service Users and
> > I
> > wonder if it might help to make a tool to make it easier to create /
> > update
> > service users.
> >
> > I put together an OSGi Console which makes it pretty darn easy to
> > create
> > service users, lists the available service users and allows you to
> > see a
> > Filter and example usage of each mapped service user.
> >
> > Right now, I've forked the Apache Sling Service User Mapper bundle
> > and you
> > can see a working example here:
> >
> > https://github.com/klcodanr/sling-org-apache-sling-serviceusermapper
>
> Have not tried it, but it sounds useful indeed.
>
> >
> > So a couple questions:
> >
> >
> >    - Does this sound like something we want to include?
> >    - Should it go in the Launchpad or be an addon?
> >    - Does including this in the ServiceUserMapper bundle make sense?
>
> At the moment the serviceusermapper has some carefully chosen
> dependencies, presumably to make it available as early as possible.
>
> Import-Package: org.apache.felix.inventory; resolution:=optional;
> version="[1.0, 2)", org.apache.sling.serviceusermapping; version="[1.3,
> 1.4)", org.osgi.framework; version="[1.4, 2)",
> org.osgi.framework.hooks.service; version="[1.1, 2)", org.slf4j;
> version="[1.7, 2)"
>
> I think that allowing it to start early is a major advantage, so making
> the dependency a separate bundle would be useful.
>
> Thanks,
>
> Robert
>

Re: Service User OSGi Console

Posted by Robert Munteanu <ro...@apache.org>.
Hi Dan,

On Mon, 2018-01-08 at 17:19 -0800, Daniel Klco wrote:
> Hey Devs,
> 
> I've noticed a lot of friction with the adoption of Service Users and
> I
> wonder if it might help to make a tool to make it easier to create /
> update
> service users.
> 
> I put together an OSGi Console which makes it pretty darn easy to
> create
> service users, lists the available service users and allows you to
> see a
> Filter and example usage of each mapped service user.
> 
> Right now, I've forked the Apache Sling Service User Mapper bundle
> and you
> can see a working example here:
> 
> https://github.com/klcodanr/sling-org-apache-sling-serviceusermapper

Have not tried it, but it sounds useful indeed.

> 
> So a couple questions:
> 
> 
>    - Does this sound like something we want to include?
>    - Should it go in the Launchpad or be an addon?
>    - Does including this in the ServiceUserMapper bundle make sense?

At the moment the serviceusermapper has some carefully chosen
dependencies, presumably to make it available as early as possible.

Import-Package: org.apache.felix.inventory; resolution:=optional;
version="[1.0, 2)", org.apache.sling.serviceusermapping; version="[1.3,
1.4)", org.osgi.framework; version="[1.4, 2)",
org.osgi.framework.hooks.service; version="[1.1, 2)", org.slf4j;
version="[1.7, 2)"

I think that allowing it to start early is a major advantage, so making
the dependency a separate bundle would be useful.

Thanks,

Robert