You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2015/03/09 14:54:44 UTC
[jira] [Comment Edited] (SLING-4461) Remove fallbacks for service
users resolution
[ https://issues.apache.org/jira/browse/SLING-4461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352987#comment-14352987 ]
Felix Meschberger edited comment on SLING-4461 at 3/9/15 1:54 PM:
------------------------------------------------------------------
As commented in SLING-4312 the first fallback approach can be solved by the slightly more complicated setup as proposed by Carsten.
The global default can be implemented by registering a special kind of ServiceUserMapping marker service which is passed through by the ServiceUserMappingBundleFilter and thus matches references.
Finally: How about a new Felix DS annotation extending @Reference to simplify setting the reference target ? Such that service could just do
* @ServiceMapping(subService="theName") ==> "|((!(subServiceName=*))(subServiceName=theName))"
* @ServiceMapping() ==> "!(subServiceName=*)"
was (Author: fmeschbe):
As commented in SLING-4312 the first fallback approach can be solved by the slightly more complicated setup as proposed by Carsten.
The global default can be implemented by registering a special kind of ServiceUserMapping marker service which is passed through by the ServiceUserMappingBundleFilter and thus matches references.
Finally: How about a new Felix DS annotation extending @Reference to simplify setting the reference target ? Such that service could just do
* @ServiceMapping(subService="theName") ==> "|((!(subServiceName=*))(subServiceName=foo))"
* @ServiceMapping() ==> "!(subServiceName=*)"
> 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)