public class DefaultSecurityManager extends Object implements JackrabbitSecurityManager
PrincipalProviders
AccessControlProviders
WorkspaceAccessManager
UserManager
| Modifier and Type | Field and Description |
|---|---|
protected String |
adminId
The user id of the administrator.
|
protected String |
anonymousId
The user id of the anonymous user.
|
| Constructor and Description |
|---|
DefaultSecurityManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInitialized()
Throws
IllegalStateException if this manager hasn't been
initialized. |
void |
close()
Disposes this security manager instance and cleans all internal caches.
|
protected PrincipalProvider |
createDefaultPrincipalProvider(Properties[] moduleConfig)
Creates the default principal provider used to create the
PrincipalProviderRegistry. |
protected WorkspaceAccessManager |
createDefaultWorkspaceAccessManager() |
protected org.apache.jackrabbit.api.security.principal.PrincipalManager |
createPrincipalManager(SessionImpl session) |
protected UserManagerImpl |
createUserManager(SessionImpl session)
Creates a
UserManagerImpl for the given session. |
void |
dispose(String workspaceName)
Disposes those parts of this security manager that are related to the
workspace indicated by the given
workspaceName. |
AccessManager |
getAccessManager(Session session,
AMContext amContext)
Retrieve the
AccessManager for the given session. |
AuthContext |
getAuthContext(Credentials creds,
Subject subject,
String workspaceName)
Creates an AuthContext for the given
Credentials and
Subject. |
protected AuthContextProvider |
getAuthContextProvider() |
protected SecurityManagerConfig |
getConfig() |
protected MembershipCache |
getMembershipCache(SessionImpl session) |
org.apache.jackrabbit.api.security.principal.PrincipalManager |
getPrincipalManager(Session session)
Retrieve the principal manager for the given
session. |
protected PrincipalProviderRegistry |
getPrincipalProviderRegistry() |
protected Repository |
getRepository() |
protected Session |
getSystemSession() |
protected org.apache.jackrabbit.api.security.user.UserManager |
getSystemUserManager(String workspaceName) |
String |
getUserID(Subject subject,
String workspaceName)
Retrieve the id to be displayed upon
Session.getUserID() for
the specified subject. |
org.apache.jackrabbit.api.security.user.UserManager |
getUserManager(Session session)
Returns the user manager for the specified
session. |
void |
init(Repository repository,
Session systemSession) |
protected String adminId
SecurityConstants.ADMIN_ID).protected String anonymousId
SecurityConstants.ANONYMOUS_ID).public void init(Repository repository, Session systemSession) throws RepositoryException
init in interface JackrabbitSecurityManagerRepositoryExceptionJackrabbitSecurityManager.init(Repository, Session)public void dispose(String workspaceName)
JackrabbitSecurityManagerworkspaceName.dispose in interface JackrabbitSecurityManagerworkspaceName - Name of the workspace that is being disposed.JackrabbitSecurityManager.dispose(String)public void close()
JackrabbitSecurityManagerclose in interface JackrabbitSecurityManagerJackrabbitSecurityManager.close()public AccessManager getAccessManager(Session session, AMContext amContext) throws RepositoryException
JackrabbitSecurityManagerAccessManager for the given session.getAccessManager in interface JackrabbitSecurityManagerAccessManager for the specified session.RepositoryExceptionJackrabbitSecurityManager.getAccessManager(Session,AMContext)public org.apache.jackrabbit.api.security.principal.PrincipalManager getPrincipalManager(Session session) throws RepositoryException
JackrabbitSecurityManagersession.getPrincipalManager in interface JackrabbitSecurityManagersession.UnsupportedRepositoryOperationException - If principal management
is not supported.RepositoryException - if an error occursJackrabbitSecurityManager.getPrincipalManager(Session)public org.apache.jackrabbit.api.security.user.UserManager getUserManager(Session session) throws RepositoryException
JackrabbitSecurityManagersession.getUserManager in interface JackrabbitSecurityManagersession.UnsupportedRepositoryOperationException - If user management is
not supported.RepositoryExceptionJackrabbitSecurityManager.getUserManager(Session)public String getUserID(Subject subject, String workspaceName) throws RepositoryException
JackrabbitSecurityManagerSession.getUserID() for
the specified subject.getUserID in interface JackrabbitSecurityManagerSession.getUserID().RepositoryExceptionJackrabbitSecurityManager.getUserID(javax.security.auth.Subject, String)public AuthContext getAuthContext(Credentials creds, Subject subject, String workspaceName) throws RepositoryException
Credentials and
Subject. The workspace name is ignored and users are
stored and retrieved from a specific (separate) workspace.getAuthContext in interface JackrabbitSecurityManagerworkspaceName - The name of the workspace to login.AuthContext for the given Credentials, SubjectRepositoryException - in other exceptional repository statesprotected SecurityManagerConfig getConfig()
SecurityManagerConfig configured for the
repository this manager has been created for.protected org.apache.jackrabbit.api.security.user.UserManager getSystemUserManager(String workspaceName) throws RepositoryException
workspaceName - The name of the target workspace.RepositoryException - If an error occurs.protected MembershipCache getMembershipCache(SessionImpl session) throws RepositoryException
session - The session for which to retrieve the membership cache.RepositoryException - If an error occurs.protected UserManagerImpl createUserManager(SessionImpl session) throws RepositoryException
UserManagerImpl for the given session. May be overridden
to return a custom implementation.session - sessionRepositoryException - if an error occursprotected org.apache.jackrabbit.api.security.principal.PrincipalManager createPrincipalManager(SessionImpl session) throws RepositoryException
session - The session used to create the principal manager.RepositoryException - If an error occurs.protected WorkspaceAccessManager createDefaultWorkspaceAccessManager()
protected PrincipalProvider createDefaultPrincipalProvider(Properties[] moduleConfig) throws RepositoryException
PrincipalProviderRegistry.DefaultPrincipalProvider.RepositoryException - If an error occurs.protected PrincipalProviderRegistry getPrincipalProviderRegistry()
protected AuthContextProvider getAuthContextProvider()
protected void checkInitialized()
IllegalStateException if this manager hasn't been
initialized.protected Session getSystemSession()
protected Repository getRepository()
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.