Re: Service user for sling pipes

2017-05-17 Thread Nicolas Peltier
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.  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  
>> 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  wrote:
>>> 
>>> Hi Nicolas,
>>> 
>>> On Tue, 2017-05-16 at 19:18 +, 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

2017-05-17 Thread Andreas Schaefer Sr.
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  
> 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  wrote:
>> 
>> Hi Nicolas,
>> 
>> On Tue, 2017-05-16 at 19:18 +, 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

2017-05-17 Thread Nicolas Peltier
Thanks Robert! will go without service user for now, and track a bug around it.

> On 17 May 2017, at 09:00, Robert Munteanu  wrote:
> 
> Hi Nicolas,
> 
> On Tue, 2017-05-16 at 19:18 +, 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