Class UserConfigurationImpl
java.lang.Object
org.apache.jackrabbit.oak.spi.security.SecurityConfiguration.Default
org.apache.jackrabbit.oak.spi.security.ConfigurationBase
org.apache.jackrabbit.oak.security.user.UserConfigurationImpl
- All Implemented Interfaces:
SecurityConfiguration
,UserConfiguration
public class UserConfigurationImpl
extends ConfigurationBase
implements UserConfiguration, SecurityConfiguration
Default implementation of the
UserConfiguration
.-
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.user.UserConfiguration
NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCachedMembershipReader
(@NotNull Root root, @NotNull CachePrincipalFactory cachePrincipalFactory, @NotNull String propName, @NotNull String expirationPropName) Optional method that allows a given user management implementation to provide a specific and optimized implementation of theCachedMembershipReader
interface for the principals represented by the user/groups known to this implementation.@NotNull List<ThreeWayConflictHandler>
Returns the list of conflict handlers available for this security configuration.@NotNull Context
static UserAuthenticationFactory
getMonitors
(@NotNull StatisticsProvider statisticsProvider) @NotNull String
getName()
Returns the name of this security configuration.@NotNull ConfigurationParameters
Returns the configuration parameters associated with this security configuration instance.@NotNull List<ProtectedItemImporter>
@NotNull UserManager
getUserManager
(Root root, NamePathMapper namePathMapper) Create a newUserManager
instance@Nullable PrincipalProvider
getUserPrincipalProvider
(@NotNull Root root, @NotNull NamePathMapper namePathMapper) Optional method that allows a given user management implementation to provide a specific and optimized implementation of thePrincipalProvider
interface for the principals represented by the user/groups known to this implementation.@NotNull List<? extends ValidatorProvider>
getValidators
(@NotNull String workspaceName, @NotNull Set<Principal> principals, @NotNull MoveTracker moveTracker) Returns the list of validators that need to be executed for the specified workspace name.@NotNull WorkspaceInitializer
Returns a workspace initializer for this security configuration.Methods inherited from class org.apache.jackrabbit.oak.spi.security.ConfigurationBase
getRootProvider, getSecurityProvider, getTreeProvider, setParameters, setRootProvider, setSecurityProvider, setTreeProvider
Methods inherited from class org.apache.jackrabbit.oak.spi.security.SecurityConfiguration.Default
getCommitHooks, getRepositoryInitializer
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, getRepositoryInitializer
Methods inherited from interface org.apache.jackrabbit.oak.spi.security.user.UserConfiguration
getCachedMembershipReader
-
Constructor Details
-
UserConfigurationImpl
public UserConfigurationImpl() -
UserConfigurationImpl
-
-
Method Details
-
getDefaultAuthenticationFactory
-
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.
-
getParameters
Description copied from interface:SecurityConfiguration
Returns the configuration parameters associated with this security configuration instance. If no parameters are presentConfigurationParameters.EMPTY
should be returned.- Specified by:
getParameters
in interfaceSecurityConfiguration
- Overrides:
getParameters
in classConfigurationBase
- Returns:
- The configuration parameters.
-
getWorkspaceInitializer
Description copied from interface:SecurityConfiguration
Returns a workspace initializer for this security configuration. If this configuration doesn't require any specific workspace initializationWorkspaceInitializer.DEFAULT
should be returned.- Specified by:
getWorkspaceInitializer
in interfaceSecurityConfiguration
- Overrides:
getWorkspaceInitializer
in classSecurityConfiguration.Default
- Returns:
- An instance of
WorkspaceInitializer
.
-
getValidators
@NotNull public @NotNull List<? extends ValidatorProvider> getValidators(@NotNull @NotNull String workspaceName, @NotNull @NotNull Set<Principal> principals, @NotNull @NotNull MoveTracker moveTracker) Description copied from interface:SecurityConfiguration
Returns the list of validators that need to be executed for the specified workspace name.- Specified by:
getValidators
in interfaceSecurityConfiguration
- Overrides:
getValidators
in classSecurityConfiguration.Default
- Parameters:
workspaceName
- The name of the workspace.principals
- The set of principals associated with the subject that is committing modifications.moveTracker
- The move tracker associated with the commit.- Returns:
- A list of validators.
-
getConflictHandlers
Description copied from interface:SecurityConfiguration
Returns the list of conflict handlers available for this security configuration.- Specified by:
getConflictHandlers
in interfaceSecurityConfiguration
- Overrides:
getConflictHandlers
in classSecurityConfiguration.Default
- Returns:
- A list of
ThreeWayConflictHandler
.
-
getProtectedItemImporters
- Specified by:
getProtectedItemImporters
in interfaceSecurityConfiguration
- Overrides:
getProtectedItemImporters
in classSecurityConfiguration.Default
- Returns:
- The list of protected item importers defined by this configuration.
-
getContext
- Specified by:
getContext
in interfaceSecurityConfiguration
- Overrides:
getContext
in classSecurityConfiguration.Default
- Returns:
- The context defined by this configuration.
-
getMonitors
@NotNull public @NotNull Iterable<Monitor<?>> getMonitors(@NotNull @NotNull StatisticsProvider statisticsProvider) - Specified by:
getMonitors
in interfaceSecurityConfiguration
-
getUserManager
Description copied from interface:UserConfiguration
Create a newUserManager
instance- Specified by:
getUserManager
in interfaceUserConfiguration
- Parameters:
root
- The root associated with the user manager.namePathMapper
- A name path mapper used for conversion of jcr/oak names/paths.- Returns:
- a new instance of
UserManager
-
getUserPrincipalProvider
@Nullable public @Nullable PrincipalProvider getUserPrincipalProvider(@NotNull @NotNull Root root, @NotNull @NotNull NamePathMapper namePathMapper) Description copied from interface:UserConfiguration
Optional method that allows a given user management implementation to provide a specific and optimized implementation of thePrincipalProvider
interface for the principals represented by the user/groups known to this implementation. If this method returnsnull
the security setup will by default use a basicPrincipalProvider
implementation based on public user management API or a combination of otherPrincipalProvider
s as configured with the repository setup.- Specified by:
getUserPrincipalProvider
in interfaceUserConfiguration
- Parameters:
root
- The root used to read the principal information from.namePathMapper
- TheNamePathMapper
to convert oak paths to JCR paths.- Returns:
- An implementation of
PrincipalProvider
ornull
if principal discovery is provided by other means of if the default principal provider implementation should be used that acts on public user management API. - See Also:
-
getCachedMembershipReader
public CachedMembershipReader getCachedMembershipReader(@NotNull @NotNull Root root, @NotNull @NotNull CachePrincipalFactory cachePrincipalFactory, @NotNull @NotNull String propName, @NotNull @NotNull String expirationPropName) Description copied from interface:UserConfiguration
Optional method that allows a given user management implementation to provide a specific and optimized implementation of theCachedMembershipReader
interface for the principals represented by the user/groups known to this implementation. If this method returnsnull
the security setup won't, by default, use a cached membership reader.- Specified by:
getCachedMembershipReader
in interfaceUserConfiguration
- Parameters:
root
- The root used to read the principal information from.cachePrincipalFactory
- The factory to create the principal from the cache.propName
- The name of the property that contains the cache.expirationPropName
- The name of the property that contains cache expiration time.- Returns:
- An implementation of
CachedMembershipReader
ornull
if the UserConfiguration implementation does not provide a cached membership reader.
-