Class CugConfiguration
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.SecurityConfiguration.Default
-
- org.apache.jackrabbit.oak.spi.security.ConfigurationBase
-
- org.apache.jackrabbit.oak.spi.security.authorization.cug.impl.CugConfiguration
-
- All Implemented Interfaces:
AuthorizationConfiguration
,SecurityConfiguration
public class CugConfiguration extends ConfigurationBase implements AuthorizationConfiguration
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.spi.security.SecurityConfiguration
SecurityConfiguration.Default
-
-
Field Summary
Fields Modifier and Type Field Description static String
HIDDEN_NESTED_CUGS
The name of the hidden property that stores information about nested CUG policy nodes.static String
HIDDEN_TOP_CUG_CNT
The name of the hidden property that stores information about the number of CUG roots located close to the root node.static String
MIX_REP_CUG_MIXIN
The name of the mixin type that defines the CUG policy node.static String
NT_REP_CUG_POLICY
The primary node type name of the CUG policy node.static String
PARAM_CUG_ENABLED
Name of the configuration option that specifies if CUG content must be respected for permission evaluation.static String
PARAM_CUG_SUPPORTED_PATHS
Name of the configuration option that specifies the subtrees that allow to define closed user groups.static String
REP_CUG_POLICY
The name of the CUG policy node.static String
REP_PRINCIPAL_NAMES
The name of the property that stores the principal names that are allowed to access the restricted area defined by the CUG (closed user group).-
Fields inherited from interface org.apache.jackrabbit.oak.spi.security.authorization.AuthorizationConfiguration
NAME
-
-
Constructor Summary
Constructors Constructor Description CugConfiguration()
CugConfiguration(@NotNull SecurityProvider securityProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate(Map<String,Object> properties)
void
bindExclude(CugExclude exclude)
void
bindMountInfoProvider(MountInfoProvider mountInfoProvider)
@NotNull AccessControlManager
getAccessControlManager(@NotNull Root root, @NotNull NamePathMapper namePathMapper)
@NotNull List<? extends CommitHook>
getCommitHooks(@NotNull String workspaceName)
Returns the list of commit hooks that need to be executed for the specified workspace name.@NotNull Context
getContext()
@NotNull String
getName()
Returns the name of this security configuration.@NotNull PermissionProvider
getPermissionProvider(@NotNull Root root, @NotNull String workspaceName, @NotNull Set<Principal> principals)
@NotNull List<ProtectedItemImporter>
getProtectedItemImporters()
@NotNull RepositoryInitializer
getRepositoryInitializer()
Returns a repository initializer for this security configuration.@NotNull RestrictionProvider
getRestrictionProvider()
@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.protected void
modified(Map<String,Object> properties)
void
setParameters(@NotNull ConfigurationParameters config)
void
unbindExclude(CugExclude exclude)
void
unbindMountInfoProvider(MountInfoProvider mountInfoProvider)
-
Methods inherited from class org.apache.jackrabbit.oak.spi.security.ConfigurationBase
getParameters, getRootProvider, getSecurityProvider, getTreeProvider, setRootProvider, setSecurityProvider, setTreeProvider
-
Methods inherited from class org.apache.jackrabbit.oak.spi.security.SecurityConfiguration.Default
getConflictHandlers, 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
getConflictHandlers, getMonitors, getParameters, getWorkspaceInitializer
-
-
-
-
Field Detail
-
MIX_REP_CUG_MIXIN
public static final String MIX_REP_CUG_MIXIN
The name of the mixin type that defines the CUG policy node.- See Also:
- Constant Field Values
-
NT_REP_CUG_POLICY
public static final String NT_REP_CUG_POLICY
The primary node type name of the CUG policy node.- See Also:
- Constant Field Values
-
REP_CUG_POLICY
public static final String REP_CUG_POLICY
The name of the CUG policy node.- See Also:
- Constant Field Values
-
HIDDEN_NESTED_CUGS
public static final String HIDDEN_NESTED_CUGS
The name of the hidden property that stores information about nested CUG policy nodes.- See Also:
- Constant Field Values
-
HIDDEN_TOP_CUG_CNT
public static final String HIDDEN_TOP_CUG_CNT
The name of the hidden property that stores information about the number of CUG roots located close to the root node.- See Also:
- Constant Field Values
-
REP_PRINCIPAL_NAMES
public static final String REP_PRINCIPAL_NAMES
The name of the property that stores the principal names that are allowed to access the restricted area defined by the CUG (closed user group).- See Also:
- Constant Field Values
-
PARAM_CUG_SUPPORTED_PATHS
public static final String PARAM_CUG_SUPPORTED_PATHS
Name of the configuration option that specifies the subtrees that allow to define closed user groups.- Value Type: String
- Default: -
- Multiple: true
- See Also:
- Constant Field Values
-
PARAM_CUG_ENABLED
public static final String PARAM_CUG_ENABLED
Name of the configuration option that specifies if CUG content must be respected for permission evaluation.- Value Type: boolean
- Default: false
- Multiple: false
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CugConfiguration
public CugConfiguration()
-
CugConfiguration
public CugConfiguration(@NotNull @NotNull SecurityProvider securityProvider)
-
-
Method Detail
-
getAccessControlManager
@NotNull public @NotNull AccessControlManager getAccessControlManager(@NotNull @NotNull Root root, @NotNull @NotNull NamePathMapper namePathMapper)
- Specified by:
getAccessControlManager
in interfaceAuthorizationConfiguration
-
getRestrictionProvider
@NotNull public @NotNull RestrictionProvider getRestrictionProvider()
- Specified by:
getRestrictionProvider
in interfaceAuthorizationConfiguration
-
getPermissionProvider
@NotNull public @NotNull PermissionProvider getPermissionProvider(@NotNull @NotNull Root root, @NotNull @NotNull String workspaceName, @NotNull @NotNull Set<Principal> principals)
- Specified by:
getPermissionProvider
in interfaceAuthorizationConfiguration
-
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.
-
getRepositoryInitializer
@NotNull public @NotNull RepositoryInitializer getRepositoryInitializer()
Description copied from interface:SecurityConfiguration
Returns a repository initializer for this security configuration. If this configuration doesn't require any specific repository initializationRepositoryInitializer.DEFAULT
should be returned.- Specified by:
getRepositoryInitializer
in interfaceSecurityConfiguration
- Overrides:
getRepositoryInitializer
in classSecurityConfiguration.Default
- Returns:
- An instance of
RepositoryInitializer
.
-
getCommitHooks
@NotNull public @NotNull List<? extends CommitHook> getCommitHooks(@NotNull @NotNull String workspaceName)
Description copied from interface:SecurityConfiguration
Returns the list of commit hooks that need to be executed for the specified workspace name.- Specified by:
getCommitHooks
in interfaceSecurityConfiguration
- Overrides:
getCommitHooks
in classSecurityConfiguration.Default
- Parameters:
workspaceName
- The name of the workspace.- Returns:
- A list of commit hooks.
-
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.
-
getProtectedItemImporters
@NotNull public @NotNull List<ProtectedItemImporter> getProtectedItemImporters()
- Specified by:
getProtectedItemImporters
in interfaceSecurityConfiguration
- Overrides:
getProtectedItemImporters
in classSecurityConfiguration.Default
- Returns:
- The list of protected item importers defined by this configuration.
-
getContext
@NotNull public @NotNull Context getContext()
- Specified by:
getContext
in interfaceSecurityConfiguration
- Overrides:
getContext
in classSecurityConfiguration.Default
- Returns:
- The context defined by this configuration.
-
setParameters
public void setParameters(@NotNull @NotNull ConfigurationParameters config)
- Overrides:
setParameters
in classConfigurationBase
-
bindMountInfoProvider
public void bindMountInfoProvider(MountInfoProvider mountInfoProvider)
-
unbindMountInfoProvider
public void unbindMountInfoProvider(MountInfoProvider mountInfoProvider)
-
bindExclude
public void bindExclude(CugExclude exclude)
-
unbindExclude
public void unbindExclude(CugExclude exclude)
-
-