You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2019/05/08 14:45:00 UTC

[jira] [Comment Edited] (OAK-8306) Empty PrincipalProvider cache breaks membership collection

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

angela edited comment on OAK-8306 at 5/8/19 2:44 PM:
-----------------------------------------------------

[~stillalex], patch for the fix looks good to me. with the test-case i think I would either mention the issue or create a separate test-case 'readingFromEntyCache' or something similar, maybe triggering cache creation for a user without group membership... but that's just a matter of taste.


was (Author: anchela):
[~stillalex], patch for the fix looks good to me. with the test-case i think I would either mention the issue or create a separate test-case 'readingFromEntyCache' or something similar... but that's just a matter of taste.

> Empty PrincipalProvider cache breaks membership collection
> ----------------------------------------------------------
>
>                 Key: OAK-8306
>                 URL: https://issues.apache.org/jira/browse/OAK-8306
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, security
>            Reporter: Alex Deparvu
>            Assignee: Alex Deparvu
>            Priority: Major
>              Labels: candidate_oak_1_10
>         Attachments: OAK-8306.patch
>
>
> Regression caused by OAK-7024 [0] when I replaced {{new HashSet<Group>(1)}} with {{Collections.emptySet()}} forgetting that this is actually an immutable set.
> {noformat}
> 02.05.2019 11:50:51.663 INFO [qtp1880753633-1912] org.apache.sling.auth.core.impl.SlingAuthenticator handleLoginFailure: Unable to authenticate null: java.lang.UnsupportedOperationExcepti 
> on 
> at java.util.AbstractCollection.add(AbstractCollection.java:262) 
> at org.apache.jackrabbit.oak.security.user.UserPrincipalProvider.getGroupMembership(UserPrincipalProvider.java:267) 
> at org.apache.jackrabbit.oak.security.user.UserPrincipalProvider.getMembershipPrincipals(UserPrincipalProvider.java:124) 
> at org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule.getPrincipals(AbstractLoginModule.java:498) 
> at org.apache.jackrabbit.oak.security.authentication.token.TokenLoginModule.commit(TokenLoginModule.java:154)
> {noformat}
> [0] https://github.com/apache/jackrabbit-oak/commit/75fa2b33cc7d5447aae2ecefbf369c3b2b2c424b#diff-bca626bc7a86cf9a4435a00386f08401L322



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