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 StringHIDDEN_NESTED_CUGSThe name of the hidden property that stores information about nested CUG policy nodes.static StringHIDDEN_TOP_CUG_CNTThe name of the hidden property that stores information about the number of CUG roots located close to the root node.static StringMIX_REP_CUG_MIXINThe name of the mixin type that defines the CUG policy node.static StringNT_REP_CUG_POLICYThe primary node type name of the CUG policy node.static StringPARAM_CUG_ENABLEDName of the configuration option that specifies if CUG content must be respected for permission evaluation.static StringPARAM_CUG_SUPPORTED_PATHSName of the configuration option that specifies the subtrees that allow to define closed user groups.static StringREP_CUG_POLICYThe name of the CUG policy node.static StringREP_PRINCIPAL_NAMESThe 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 voidactivate(Map<String,Object> properties)voidbindExclude(CugExclude exclude)voidbindMountInfoProvider(MountInfoProvider mountInfoProvider)@NotNull AccessControlManagergetAccessControlManager(@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 ContextgetContext()@NotNull StringgetName()Returns the name of this security configuration.@NotNull PermissionProvidergetPermissionProvider(@NotNull Root root, @NotNull String workspaceName, @NotNull Set<Principal> principals)@NotNull List<ProtectedItemImporter>getProtectedItemImporters()@NotNull RepositoryInitializergetRepositoryInitializer()Returns a repository initializer for this security configuration.@NotNull RestrictionProvidergetRestrictionProvider()@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 voidmodified(Map<String,Object> properties)voidsetParameters(@NotNull ConfigurationParameters config)voidunbindExclude(CugExclude exclude)voidunbindMountInfoProvider(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:
getAccessControlManagerin interfaceAuthorizationConfiguration
-
getRestrictionProvider
@NotNull public @NotNull RestrictionProvider getRestrictionProvider()
- Specified by:
getRestrictionProviderin interfaceAuthorizationConfiguration
-
getPermissionProvider
@NotNull public @NotNull PermissionProvider getPermissionProvider(@NotNull @NotNull Root root, @NotNull @NotNull String workspaceName, @NotNull @NotNull Set<Principal> principals)
- Specified by:
getPermissionProviderin interfaceAuthorizationConfiguration
-
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.
-
getRepositoryInitializer
@NotNull public @NotNull RepositoryInitializer getRepositoryInitializer()
Description copied from interface:SecurityConfigurationReturns a repository initializer for this security configuration. If this configuration doesn't require any specific repository initializationRepositoryInitializer.DEFAULTshould be returned.- Specified by:
getRepositoryInitializerin interfaceSecurityConfiguration- Overrides:
getRepositoryInitializerin classSecurityConfiguration.Default- Returns:
- An instance of
RepositoryInitializer.
-
getCommitHooks
@NotNull public @NotNull List<? extends CommitHook> getCommitHooks(@NotNull @NotNull String workspaceName)
Description copied from interface:SecurityConfigurationReturns the list of commit hooks that need to be executed for the specified workspace name.- Specified by:
getCommitHooksin interfaceSecurityConfiguration- Overrides:
getCommitHooksin 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: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.
-
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.
-
setParameters
public void setParameters(@NotNull @NotNull ConfigurationParameters config)- Overrides:
setParametersin 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)
-
-