Class CompositePrincipalConfiguration

java.lang.Object
org.apache.jackrabbit.oak.spi.security.CompositeConfiguration<PrincipalConfiguration>
org.apache.jackrabbit.oak.spi.security.principal.CompositePrincipalConfiguration
All Implemented Interfaces:
PrincipalConfiguration, SecurityConfiguration

public class CompositePrincipalConfiguration extends CompositeConfiguration<PrincipalConfiguration> implements PrincipalConfiguration
PrincipalConfiguration that combines different principal provider implementations that share a common principal manager implementation.
  • Constructor Details

    • CompositePrincipalConfiguration

      public CompositePrincipalConfiguration()
    • CompositePrincipalConfiguration

      public CompositePrincipalConfiguration(@NotNull @NotNull SecurityProvider securityProvider)
  • Method Details

    • getPrincipalManager

      @NotNull public @NotNull PrincipalManager getPrincipalManager(Root root, NamePathMapper namePathMapper)
      Description copied from interface: PrincipalConfiguration
      Returns an instance of PrincipalManager that can be used to query and retrieve principals such as needed for JCR access control management.
      Specified by:
      getPrincipalManager in interface PrincipalConfiguration
      Parameters:
      root - The target root.
      namePathMapper - The NamePathMapper to be used.
      Returns:
      An instance of PrincipalManager.
      See Also:
    • getPrincipalProvider

      @NotNull public @NotNull PrincipalProvider getPrincipalProvider(Root root, NamePathMapper namePathMapper)
      Description copied from interface: PrincipalConfiguration
      Returns an instance of the OAK PrincipalProvider.

      Backwards compatibility with Jackrabbit 2.x

      Configuration of Principal Providers

      In Jackrabbit 2.x the configuration of principal providers was tied to the LoginModule configuration and thus mixing authentication concerns with the principal management. Since OAK makes the PrincipalProvider a public interface of the SPI, it's configuration goes along with the configuration of the JCR level PrincipalManager. The authentication setup may have access to the principal configuration if the SecurityProvider is made available in the AuthenticationConfiguration.

      Multiple Sources for Principals

      In Jackrabbit 2.x it was possible to configure multiple principal providers. As of OAK there is only one single principal provider implementation responsible for a given configuration. If principals originate from different sources it is recommended to define a separate PrincipalConfiguration for each source.
      Specified by:
      getPrincipalProvider in interface PrincipalConfiguration
      Parameters:
      root - The target Root.
      namePathMapper - The NamePathMapper to be used.
      Returns:
      An instance of PrincipalProvider.