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

Robert Munteanu commented on OAK-7203:
--------------------------------------

Thinking about this a bit more, I think the current setup is correct. We should 
not allow a 'default' service to be registered or default values to be used 
when it's possible that the value will change. The components must only use the 
'right' MountInfoProvider from the beginning, otherwise we open the door to 
inconsistent behaviour.

The only thing that is sub-optimal here is that the {{oak-store-composite}} 
bundle is now required. I don't think that's a huge issue, but we can work 
around it moving the {{MountInfoProviderService}} class from 
{{oak-store-composite}} to {{oak-core}}, so that the {{MountInfoProvider}} 
service can be registered with an empty config without adding an extra bundle.

> Make MountInfoProvider service in AuthorizationConfigurationImpl optional
> -------------------------------------------------------------------------
>
>                 Key: OAK-7203
>                 URL: https://issues.apache.org/jira/browse/OAK-7203
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: authorization-cug, core
>    Affects Versions: 1.8.1
>            Reporter: Oliver Lietz
>            Priority: Major
>         Attachments: OAK-7203.patch
>
>
> While testing Sling with Oak 1.8 I've observed that 
> AuthorizationConfigurationImpl gets not activated due to missingĀ 
> MountInfoProvider service:
> {noformat}
>     @Reference
>     private MountInfoProvider mountInfoProvider = 
> Mounts.defaultMountInfoProvider();
> {noformat}
> {noformat}
> org.apache.jackrabbit.oak.security.authorization.AuthorizationConfigurationImpl
> Bundle        org.apache.jackrabbit.oak-core (63)
> Implementation Class  
> org.apache.jackrabbit.oak.security.authorization.AuthorizationConfigurationImpl
> Default State enabled
> Activation    delayed
> Configuration Policy  optional
> Service Type  singleton
> Services      
> org.apache.jackrabbit.oak.spi.security.authorization.AuthorizationConfiguration
> org.apache.jackrabbit.oak.spi.security.SecurityConfiguration
> PID   
> org.apache.jackrabbit.oak.security.authorization.AuthorizationConfigurationImpl
> Reference mountInfoProvider   Unsatisfied
> Service Name: org.apache.jackrabbit.oak.spi.mount.MountInfoProvider
> Cardinality: 1..1
> Policy: static
> Policy Option: reluctant
> No Services bound
> Properties    component.id = 35
> component.name = 
> org.apache.jackrabbit.oak.security.authorization.AuthorizationConfigurationImpl
> configurationRanking = 100
> importBehavior = abort
> oak.security.name = 
> org.apache.jackrabbit.oak.security.authorization.AuthorizationConfigurationImpl
> readPaths = [/jcr:system/rep:namespaces, /jcr:system/jcr:nodeTypes, 
> /jcr:system/rep:privileges]
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to