You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Nicolas Peltier <np...@adobe.com.INVALID> on 2017/05/16 19:18:29 UTC

Service user for sling pipes

Hey, 

I’d need for a JIRA (asynchronous execution of sling pipes) to create a service user. 
Not sure how I should bundle that. I see some stuff in the launchpad’s repoinit scripts, but obviously that’s not a place for extensions…

Any clue?

Nicolas

Re: Service user for sling pipes

Posted by Nicolas Peltier <np...@adobe.com.INVALID>.
Thanks Andreas I finally went for the service user approach [0] and will document the feature accordingly

[0] https://github.com/apache/sling/pull/229
> On 17 May 2017, at 17:28, Andreas Schaefer Sr. <sc...@me.com> wrote:
> 
> I use a Service User and packaged it up in a Content Package which deploys just fine.
> 
> The only drawback is that if you need to set permissions with it then you might end up
> with an issue where the user is created after the policies are created which leads to
> the policies not being set (no user there).
> 
> I think the best solution is to provide a package that contains the service user and
> service user mapping and ask the deploy to install it first.
> 
> To create the service user package I just created the Service User manually with
> Composum, created a package, downloaded and integrated into my project.
> 
> - Andy
> 
>> On May 17, 2017, at 12:29 AM, Nicolas Peltier <np...@adobe.com.INVALID> wrote:
>> 
>> Thanks Robert! will go without service user for now, and track a bug around it.
>> 
>>> On 17 May 2017, at 09:00, Robert Munteanu <ro...@apache.org> wrote:
>>> 
>>> Hi Nicolas,
>>> 
>>> On Tue, 2017-05-16 at 19:18 +0000, Nicolas Peltier wrote:
>>>> Hey, 
>>>> 
>>>> I’d need for a JIRA (asynchronous execution of sling pipes) to create
>>>> a service user. 
>>>> Not sure how I should bundle that. I see some stuff in the
>>>> launchpad’s repoinit scripts, but obviously that’s not a place for
>>>> extensions…
>>> 
>>> Service users, as you pointed out, are created via the repoinit
>>> provisioning model files. If you want to use a service user, just use
>>> loginService in your code and leave the service user mapping to the
>>> deployer.
>>> 
>>> The slingshot sample shows a way in which you can include a
>>> provisioning model file with a bundle, but IMO this only suitable for
>>> samples and demos, as it cuts down on flexibility.
>>> 
>>> Robert
>> 
> 


Re: Service user for sling pipes

Posted by "Andreas Schaefer Sr." <sc...@me.com>.
I use a Service User and packaged it up in a Content Package which deploys just fine.

The only drawback is that if you need to set permissions with it then you might end up
with an issue where the user is created after the policies are created which leads to
the policies not being set (no user there).

I think the best solution is to provide a package that contains the service user and
service user mapping and ask the deploy to install it first.

To create the service user package I just created the Service User manually with
Composum, created a package, downloaded and integrated into my project.

- Andy

> On May 17, 2017, at 12:29 AM, Nicolas Peltier <np...@adobe.com.INVALID> wrote:
> 
> Thanks Robert! will go without service user for now, and track a bug around it.
> 
>> On 17 May 2017, at 09:00, Robert Munteanu <ro...@apache.org> wrote:
>> 
>> Hi Nicolas,
>> 
>> On Tue, 2017-05-16 at 19:18 +0000, Nicolas Peltier wrote:
>>> Hey, 
>>> 
>>> I’d need for a JIRA (asynchronous execution of sling pipes) to create
>>> a service user. 
>>> Not sure how I should bundle that. I see some stuff in the
>>> launchpad’s repoinit scripts, but obviously that’s not a place for
>>> extensions…
>> 
>> Service users, as you pointed out, are created via the repoinit
>> provisioning model files. If you want to use a service user, just use
>> loginService in your code and leave the service user mapping to the
>> deployer.
>> 
>> The slingshot sample shows a way in which you can include a
>> provisioning model file with a bundle, but IMO this only suitable for
>> samples and demos, as it cuts down on flexibility.
>> 
>> Robert
> 


Re: Service user for sling pipes

Posted by Nicolas Peltier <np...@adobe.com.INVALID>.
Thanks Robert! will go without service user for now, and track a bug around it.

> On 17 May 2017, at 09:00, Robert Munteanu <ro...@apache.org> wrote:
> 
> Hi Nicolas,
> 
> On Tue, 2017-05-16 at 19:18 +0000, Nicolas Peltier wrote:
>> Hey, 
>> 
>> I’d need for a JIRA (asynchronous execution of sling pipes) to create
>> a service user. 
>> Not sure how I should bundle that. I see some stuff in the
>> launchpad’s repoinit scripts, but obviously that’s not a place for
>> extensions…
> 
> Service users, as you pointed out, are created via the repoinit
> provisioning model files. If you want to use a service user, just use
> loginService in your code and leave the service user mapping to the
> deployer.
> 
> The slingshot sample shows a way in which you can include a
> provisioning model file with a bundle, but IMO this only suitable for
> samples and demos, as it cuts down on flexibility.
> 
> Robert


Re: Service user for sling pipes

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

On Tue, 2017-05-16 at 19:18 +0000, Nicolas Peltier wrote:
> Hey, 
> 
> I’d need for a JIRA (asynchronous execution of sling pipes) to create
> a service user. 
> Not sure how I should bundle that. I see some stuff in the
> launchpad’s repoinit scripts, but obviously that’s not a place for
> extensions…

Service users, as you pointed out, are created via the repoinit
provisioning model files. If you want to use a service user, just use
loginService in your code and leave the service user mapping to the
deployer.

The slingshot sample shows a way in which you can include a
provisioning model file with a bundle, but IMO this only suitable for
samples and demos, as it cuts down on flexibility.

Robert