Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-8306

Empty PrincipalProvider cache breaks membership collection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.10.3, 1.14.0
    • core, security
    • None

    Description

      Regression caused by OAK-7024 [0] when I replaced new HashSet<Group>(1) with Collections.emptySet() forgetting that this is actually an immutable set.

      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)
      

      [0] https://github.com/apache/jackrabbit-oak/commit/75fa2b33cc7d5447aae2ecefbf369c3b2b2c424b#diff-bca626bc7a86cf9a4435a00386f08401L322

      Attachments

        1. OAK-8306.patch
          3 kB
          Alex Deparvu

        Issue Links

          Activity

            People

              stillalex Alex Deparvu
              stillalex Alex Deparvu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: