Class PrincipalConfigurationImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.SecurityConfiguration.Default
-
- org.apache.jackrabbit.oak.spi.security.ConfigurationBase
-
- org.apache.jackrabbit.oak.security.principal.PrincipalConfigurationImpl
-
- All Implemented Interfaces:
PrincipalConfiguration
,SecurityConfiguration
public class PrincipalConfigurationImpl extends ConfigurationBase implements PrincipalConfiguration
Default implementation of thePrincipalConfiguration
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.spi.security.SecurityConfiguration
SecurityConfiguration.Default
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.spi.security.principal.PrincipalConfiguration
NAME
-
-
Constructor Summary
Constructors Constructor Description PrincipalConfigurationImpl()
PrincipalConfigurationImpl(SecurityProvider securityProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String
getName()
Returns the name of this security configuration.@NotNull PrincipalManager
getPrincipalManager(Root root, NamePathMapper namePathMapper)
Returns an instance ofPrincipalManager
that can be used to query and retrieve principals such as needed for JCR access control management.@NotNull PrincipalProvider
getPrincipalProvider(Root root, NamePathMapper namePathMapper)
Returns an instance of the OAKPrincipalProvider
.-
Methods inherited from class org.apache.jackrabbit.oak.spi.security.ConfigurationBase
getParameters, getRootProvider, getSecurityProvider, getTreeProvider, setParameters, setRootProvider, setSecurityProvider, setTreeProvider
-
Methods inherited from class org.apache.jackrabbit.oak.spi.security.SecurityConfiguration.Default
getCommitHooks, getConflictHandlers, getContext, getProtectedItemImporters, getRepositoryInitializer, getValidators, getWorkspaceInitializer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.oak.spi.security.SecurityConfiguration
getCommitHooks, getConflictHandlers, getContext, getMonitors, getParameters, getProtectedItemImporters, getRepositoryInitializer, getValidators, getWorkspaceInitializer
-
-
-
-
Constructor Detail
-
PrincipalConfigurationImpl
public PrincipalConfigurationImpl()
-
PrincipalConfigurationImpl
public PrincipalConfigurationImpl(SecurityProvider securityProvider)
-
-
Method Detail
-
getPrincipalManager
@NotNull public @NotNull PrincipalManager getPrincipalManager(Root root, NamePathMapper namePathMapper)
Description copied from interface:PrincipalConfiguration
Returns an instance ofPrincipalManager
that can be used to query and retrieve principals such as needed for JCR access control management.- Specified by:
getPrincipalManager
in interfacePrincipalConfiguration
- Parameters:
root
- The target root.namePathMapper
- TheNamePathMapper
to be used.- Returns:
- An instance of
PrincipalManager
. - See Also:
JackrabbitSession.getPrincipalManager()
-
getPrincipalProvider
@NotNull public @NotNull PrincipalProvider getPrincipalProvider(Root root, NamePathMapper namePathMapper)
Description copied from interface:PrincipalConfiguration
Returns 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 thePrincipalProvider
a 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 theSecurityProvider
is 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 separatePrincipalConfiguration
for each source.- Specified by:
getPrincipalProvider
in interfacePrincipalConfiguration
- Parameters:
root
- The targetRoot
.namePathMapper
- TheNamePathMapper
to be used.- Returns:
- An instance of
PrincipalProvider
.
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:SecurityConfiguration
Returns the name of this security configuration.- Specified by:
getName
in interfaceSecurityConfiguration
- Overrides:
getName
in classSecurityConfiguration.Default
- Returns:
- The name of this configuration.
-
-