public class SimpleSecurityManager extends Object implements JackrabbitSecurityManager
SimpleSecurityManager: simple implementation ignoring both
configuration entries for 'principalProvider' and for 'workspaceAccessManager'.
The AccessManager is initialized using
AccessManager.init(org.apache.jackrabbit.core.security.AMContext).| Constructor and Description |
|---|
SimpleSecurityManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Disposes this security manager instance and cleans all internal caches.
|
void |
dispose(String workspaceName)
Disposes those parts of this security manager that are related to the
workspace indicated by the given
workspaceName. |
protected AccessControlProvider |
getAccessControlProvider(Session systemSession,
String workspaceName)
Always returns
null. |
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.This includes selection of applicatoin specific LoginModules and initalization with credentials and Session to System-Workspace |
PrincipalManager |
getPrincipalManager(Session session)
Retrieve the principal manager for the given
session. |
String |
getUserID(Subject subject,
String workspaceName)
Retrieve the id to be displayed upon
Session.getUserID() for
the specified subject. |
UserManager |
getUserManager(Session session)
Returns the user manager for the specified
session. |
void |
init(Repository repository,
Session systemSession) |
protected AccessControlProvider getAccessControlProvider(Session systemSession, String workspaceName)
null. AccessControlProvider configuration
is ignored with this security manager. Subclasses may overwrite this
lazy behavior that originates from the SimpleAccessManager.systemSession - The system session used to init the security manager.workspaceName - The name of the workspace for which the provider
should be retrieved.null.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 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 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.getAuthContext in interface JackrabbitSecurityManagerworkspaceName - The name of the workspace to login.AuthContext for the given Credentials, SubjectRepositoryException - in other exceptional repository statesCopyright © 2004–2022 The Apache Software Foundation. All rights reserved.