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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.spi.security.SecurityConfiguration
SecurityConfiguration.Default -
Field Summary
Fields inherited from class org.apache.jackrabbit.oak.spi.security.CompositeConfiguration
PARAM_RANKINGFields inherited from interface org.apache.jackrabbit.oak.spi.security.principal.PrincipalConfiguration
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull org.apache.jackrabbit.api.security.principal.PrincipalManagergetPrincipalManager(org.apache.jackrabbit.oak.api.Root root, org.apache.jackrabbit.oak.namepath.NamePathMapper namePathMapper) Returns an instance ofPrincipalManagerthat can be used to query and retrieve principals such as needed for JCR access control management.@NotNull PrincipalProvidergetPrincipalProvider(org.apache.jackrabbit.oak.api.Root root, org.apache.jackrabbit.oak.namepath.NamePathMapper namePathMapper) Returns an instance of the OAKPrincipalProvider.Methods inherited from class org.apache.jackrabbit.oak.spi.security.CompositeConfiguration
addConfiguration, addConfiguration, getCommitHooks, getConfigurations, getConflictHandlers, getContext, getDefaultConfig, getMonitors, getName, getParameters, getProtectedItemImporters, getRepositoryInitializer, getRootProvider, getSecurityProvider, getTreeProvider, getValidators, getWorkspaceInitializer, removeConfiguration, setDefaultConfig, setRootProvider, setSecurityProvider, setTreeProviderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jackrabbit.oak.spi.security.SecurityConfiguration
getCommitHooks, getConflictHandlers, getContext, getMonitors, getName, getParameters, getProtectedItemImporters, getRepositoryInitializer, getValidators, getWorkspaceInitializer
-
Constructor Details
-
CompositePrincipalConfiguration
public CompositePrincipalConfiguration() -
CompositePrincipalConfiguration
-
-
Method Details
-
getPrincipalManager
@NotNull public @NotNull org.apache.jackrabbit.api.security.principal.PrincipalManager getPrincipalManager(org.apache.jackrabbit.oak.api.Root root, org.apache.jackrabbit.oak.namepath.NamePathMapper namePathMapper) Description copied from interface:PrincipalConfigurationReturns an instance ofPrincipalManagerthat can be used to query and retrieve principals such as needed for JCR access control management.- Specified by:
getPrincipalManagerin interfacePrincipalConfiguration- Parameters:
root- The target root.namePathMapper- TheNamePathMapperto be used.- Returns:
- An instance of
PrincipalManager. - See Also:
-
JackrabbitSession.getPrincipalManager()
-
getPrincipalProvider
@NotNull public @NotNull PrincipalProvider getPrincipalProvider(org.apache.jackrabbit.oak.api.Root root, org.apache.jackrabbit.oak.namepath.NamePathMapper namePathMapper) Description copied from interface:PrincipalConfigurationReturns an instance of the OAKPrincipalProvider.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 thePrincipalProvidera public interface of the SPI, it's configuration goes along with the configuration of the JCR levelPrincipalManager. The authentication setup may have access to the principal configuration if theSecurityProvideris made available in theAuthenticationConfiguration.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 separatePrincipalConfigurationfor each source.- Specified by:
getPrincipalProviderin interfacePrincipalConfiguration- Parameters:
root- The targetRoot.namePathMapper- TheNamePathMapperto be used.- Returns:
- An instance of
PrincipalProvider.
-