[ 
https://issues.apache.org/jira/browse/SLING-6772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15961713#comment-15961713
 ] 

Julian Sedding edited comment on SLING-6772 at 4/8/17 7:20 AM:
---------------------------------------------------------------

bq. This default mapping is for all bundles in the system which are not just 
Sling bundles.

Would this work with subsystems, where the same bundle (i.e. same bsn) could be 
deployed in different subsystems?

Regarding prefixes, I think {{serviceuser--}} would be fine. I'd also be fine 
without a prefix, though.

Edit: maybe it's worthwhile to also look at the grammar for bundle symbolic 
names.

{noformat}
Bundle-SymbolicName ::= symbolic-name ( ';' parameter ) *
symbolic-name       ::= token ( '.' token )*
token               ::= ( alphanum | '_' | '-' )+
alphanum            ::= [a..zA..Z0..9]
parameter           ::= directive | attribute
directive           ::= extended ':=' argument
attribute           ::= extended '=' argument
argument            ::= extended  | quoted-string
extended            ::= ( alphanum | '_' | '-' | '.' )+
quoted-string       ::= '"' ( ~["\#x0D#x0A#x00] | '\"' | '\\' )* '"'
{noformat}

While the quoted-string gets a bit involved, we could just split off the 
optional {{(';' parameter)*}} and focus on the {{symbolic-name}} for deriving a 
user-name.

So {{@}} or {{+}} to join the symbolic name and sub-service-name would 
definitely avoid clashes, while {{-}}, {{_}} or {{.}} all seem problematic 
(even if doubled).




was (Author: jsedding):
bq. This default mapping is for all bundles in the system which are not just 
Sling bundles.

Would this work with subsystems, where the same bundle (i.e. same bsn) could be 
deployed in different subsystems?

Regarding prefixes, I think {{serviceuser--}} would be fine. I'd also be fine 
without a prefix, though.

> Provide default mapping for service users
> -----------------------------------------
>
>                 Key: SLING-6772
>                 URL: https://issues.apache.org/jira/browse/SLING-6772
>             Project: Sling
>          Issue Type: Improvement
>          Components: Service User Mapper
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: Service User Mapper 1.3.0
>
>         Attachments: SLING-6772.karaf.patch, SLING-6772.repoinit.patch
>
>
> As discussed in [1] we should aim at making Sling configurationless again. 
> One part which currently always needs configurations is the service user 
> mapper. We should add a default mapping, from a bundle symblic name and sub 
> service to 
> {noformat}
> "serviceuser@" + {bundle.symblicName} + [":" + sub service]
> {noformat}
> [1] 
> https://lists.apache.org/thread.html/6f90d751ddd20d7041475ba5d5fc89beda1906048ff91cc2f564e63e@%3Cdev.sling.apache.org%3E



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to