You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2023/05/17 06:13:00 UTC

[jira] [Updated] (SLING-11867) Empty mapping from ResourceMapper breaks authentication requirement updates

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

Carsten Ziegeler updated SLING-11867:
-------------------------------------
    Fix Version/s: Auth Core 1.6.2

> Empty mapping from ResourceMapper breaks authentication requirement updates
> ---------------------------------------------------------------------------
>
>                 Key: SLING-11867
>                 URL: https://issues.apache.org/jira/browse/SLING-11867
>             Project: Sling
>          Issue Type: Bug
>          Components: Authentication
>    Affects Versions: Auth Core 1.6.0
>            Reporter: Sagar Miglani
>            Priority: Major
>             Fix For: Auth Core 1.6.2
>
>
> When a resource has a path less url as vanity path (eg: "http://www.example.com") ResourceMapper.getAllMappings returns mappings consisting of an empty path "".
> This "" mapping can make {{AuthenticationRequirementsManager}} stop listening to further  authentication requirements [0]:
> {code:xml}
> Exception in thread "pool-14-thread-1" java.lang.IllegalArgumentException: Configuration must not be null or empty
> 	at org.apache.sling.auth.core.impl.AuthenticationRequirementHolder.fromConfig(AuthenticationRequirementHolder.java:30)
> 	at org.apache.sling.auth.core.impl.AuthenticationRequirementsManager.addService(AuthenticationRequirementsManager.java:374)
> 	at org.apache.sling.auth.core.impl.AuthenticationRequirementsManager.process(AuthenticationRequirementsManager.java:300)
> 	at org.apache.sling.auth.core.impl.AuthenticationRequirementsManager.processQueue(AuthenticationRequirementsManager.java:281)
> 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> 	at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
> In SLING-11861 and [0], it was suggested to make changes in caller's code instead of changing the behaviour of ResoucreMapper.
> [0]: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/96



--
This message was sent by Atlassian Jira
(v8.20.10#820010)