[ 
https://issues.apache.org/jira/browse/SLING-5135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz updated SLING-5135:
---------------------------------------
    Attachment: SLING-5135.patch

The attached {{SLING-5135.patch}} implements a whitelist based on bundle 
symbolic names - a bundle can only use SlingRepository.loginAdministrative() if 
its symbolic name is included in the list configured for the 
{{org.apache.sling.jcr.base.internal.LoginAdminWhitelistImpl}} component.

For backwards compatibility reasons the whitelist can also be disabled by 
configuration, which is not recommended and logged as a warning.

The whitelist starts empty, so configuration is required with the current Sling 
code, see sling.txt in the patch for an example.

A few Launchpad integration tests fail with this patch but before going further 
I'd like get feedback. [~asanso] could you review it? I'll also ask on our dev 
list.

> Whitelist legit usages of loginAdministrative and administrative 
> ResourceResolver
> ---------------------------------------------------------------------------------
>
>                 Key: SLING-5135
>                 URL: https://issues.apache.org/jira/browse/SLING-5135
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>            Reporter: Antonio Sanso
>            Assignee: Bertrand Delacretaz
>         Attachments: SLING-5135.patch
>
>
> {{AbstractSlingRepositoryManager}} contains a method that disable 
> loginAdministrative support
> {code}
>     /**
>      * Returns whether to disable the
>      * {@code SlingRepository.loginAdministrative} method or not.
>      *
>      * @return {@code true} if {@code SlingRepository.loginAdministrative} is
>      *         disabled.
>      */
>     public final boolean isDisableLoginAdministrative() 
> {code}
> This is a global configuration. It would be nice to have an extension of such 
> mechanism that contains a white list of (few) legit usage of 
> {{loginAdministrative}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to