[ https://issues.apache.org/jira/browse/SLING-4461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14353004#comment-14353004 ]
Carsten Ziegeler commented on SLING-4461: ----------------------------------------- The problem I see with this is, while you specify (subServiceName="theName"), this reference might never be satisfied. However the service user lookup passes due to the fallbacks. Therefore I think we should treat either remove the fallbacks or treat subServiceName="theName") as "|((!(subServiceName=*))(subServiceName=theName))" - which is not possible with the hooks (you can only shrink the selection). Regardless of the references, this has also the problem mentioned by Marius - that you get a service user when no mapping is defined and are not updated if such a specific mapping is defined later on. > Remove fallbacks for service users resolution > --------------------------------------------- > > Key: SLING-4461 > URL: https://issues.apache.org/jira/browse/SLING-4461 > Project: Sling > Issue Type: Improvement > Components: Service User Mapper > Reporter: Marius Petria > Fix For: Service User Mapper 1.1.2 > > > ServiceUserMapperImpl has several levels of fallback for service user > resolution (fallback to bundle default, or to global default). While this > offers a lot of flexibility, it introduces non-determinism in a security > feature. If defaults are set, it can happen (especially at startup) that code > is executed using different serviceUsers, e.g. a component can execute using > the bundle default or global default until its specific subService is > available, and it can be easily imagined how this can cause subtle errors. -- This message was sent by Atlassian JIRA (v6.3.4#6332)