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 theUserConfiguration.
-
-
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 Constructor Description UserConfigurationImpl()UserConfigurationImpl(SecurityProvider securityProvider)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CachedMembershipReadergetCachedMembershipReader(@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 theCachedMembershipReaderinterface for the principals represented by the user/groups known to this implementation.@NotNull List<ThreeWayConflictHandler>getConflictHandlers()Returns the list of conflict handlers available for this security configuration.@NotNull ContextgetContext()static UserAuthenticationFactorygetDefaultAuthenticationFactory()@NotNull Iterable<Monitor<?>>getMonitors(@NotNull StatisticsProvider statisticsProvider)@NotNull StringgetName()Returns the name of this security configuration.@NotNull ConfigurationParametersgetParameters()Returns the configuration parameters associated with this security configuration instance.@NotNull List<ProtectedItemImporter>getProtectedItemImporters()@NotNull UserManagergetUserManager(Root root, NamePathMapper namePathMapper)Create a newUserManagerinstance@Nullable PrincipalProvidergetUserPrincipalProvider(@NotNull Root root, @NotNull NamePathMapper namePathMapper)Optional method that allows a given user management implementation to provide a specific and optimized implementation of thePrincipalProviderinterface 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 WorkspaceInitializergetWorkspaceInitializer()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 Detail
-
UserConfigurationImpl
public UserConfigurationImpl()
-
UserConfigurationImpl
public UserConfigurationImpl(SecurityProvider securityProvider)
-
-
Method Detail
-
getDefaultAuthenticationFactory
public static UserAuthenticationFactory getDefaultAuthenticationFactory()
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:SecurityConfigurationReturns the name of this security configuration.- Specified by:
getNamein interfaceSecurityConfiguration- Overrides:
getNamein classSecurityConfiguration.Default- Returns:
- The name of this configuration.
-
getParameters
@NotNull public @NotNull ConfigurationParameters getParameters()
Description copied from interface:SecurityConfigurationReturns the configuration parameters associated with this security configuration instance. If no parameters are presentConfigurationParameters.EMPTYshould be returned.- Specified by:
getParametersin interfaceSecurityConfiguration- Overrides:
getParametersin classConfigurationBase- Returns:
- The configuration parameters.
-
getWorkspaceInitializer
@NotNull public @NotNull WorkspaceInitializer getWorkspaceInitializer()
Description copied from interface:SecurityConfigurationReturns a workspace initializer for this security configuration. If this configuration doesn't require any specific workspace initializationWorkspaceInitializer.DEFAULTshould be returned.- Specified by:
getWorkspaceInitializerin interfaceSecurityConfiguration- Overrides:
getWorkspaceInitializerin 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:SecurityConfigurationReturns the list of validators that need to be executed for the specified workspace name.- Specified by:
getValidatorsin interfaceSecurityConfiguration- Overrides:
getValidatorsin 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
@NotNull public @NotNull List<ThreeWayConflictHandler> getConflictHandlers()
Description copied from interface:SecurityConfigurationReturns the list of conflict handlers available for this security configuration.- Specified by:
getConflictHandlersin interfaceSecurityConfiguration- Overrides:
getConflictHandlersin classSecurityConfiguration.Default- Returns:
- A list of
ThreeWayConflictHandler.
-
getProtectedItemImporters
@NotNull public @NotNull List<ProtectedItemImporter> getProtectedItemImporters()
- Specified by:
getProtectedItemImportersin interfaceSecurityConfiguration- Overrides:
getProtectedItemImportersin classSecurityConfiguration.Default- Returns:
- The list of protected item importers defined by this configuration.
-
getContext
@NotNull public @NotNull Context getContext()
- Specified by:
getContextin interfaceSecurityConfiguration- Overrides:
getContextin classSecurityConfiguration.Default- Returns:
- The context defined by this configuration.
-
getMonitors
@NotNull public @NotNull Iterable<Monitor<?>> getMonitors(@NotNull @NotNull StatisticsProvider statisticsProvider)
- Specified by:
getMonitorsin interfaceSecurityConfiguration
-
getUserManager
@NotNull public @NotNull UserManager getUserManager(Root root, NamePathMapper namePathMapper)
Description copied from interface:UserConfigurationCreate a newUserManagerinstance- Specified by:
getUserManagerin 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:UserConfigurationOptional method that allows a given user management implementation to provide a specific and optimized implementation of thePrincipalProviderinterface for the principals represented by the user/groups known to this implementation. If this method returnsnullthe security setup will by default use a basicPrincipalProviderimplementation based on public user management API or a combination of otherPrincipalProviders as configured with the repository setup.- Specified by:
getUserPrincipalProviderin interfaceUserConfiguration- Parameters:
root- The root used to read the principal information from.namePathMapper- TheNamePathMapperto convert oak paths to JCR paths.- Returns:
- An implementation of
PrincipalProviderornullif 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:
PrincipalConfiguration
-
getCachedMembershipReader
public CachedMembershipReader getCachedMembershipReader(@NotNull @NotNull Root root, @NotNull @NotNull CachePrincipalFactory cachePrincipalFactory, @NotNull @NotNull String propName, @NotNull @NotNull String expirationPropName)
Description copied from interface:UserConfigurationOptional method that allows a given user management implementation to provide a specific and optimized implementation of theCachedMembershipReaderinterface for the principals represented by the user/groups known to this implementation. If this method returnsnullthe security setup won't, by default, use a cached membership reader.- Specified by:
getCachedMembershipReaderin 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
CachedMembershipReaderornullif the UserConfiguration implementation does not provide a cached membership reader.
-
-