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 |
org.apache.jackrabbit.api.security.principal.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. |
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 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 JackrabbitSecurityManager
RepositoryException
JackrabbitSecurityManager.init(Repository, Session)
public void dispose(String workspaceName)
JackrabbitSecurityManager
workspaceName
.dispose
in interface JackrabbitSecurityManager
workspaceName
- Name of the workspace that is being disposed.JackrabbitSecurityManager.dispose(String)
public void close()
JackrabbitSecurityManager
close
in interface JackrabbitSecurityManager
JackrabbitSecurityManager.close()
public AccessManager getAccessManager(Session session, AMContext amContext) throws RepositoryException
JackrabbitSecurityManager
AccessManager
for the given session
.getAccessManager
in interface JackrabbitSecurityManager
AccessManager
for the specified session
.RepositoryException
JackrabbitSecurityManager.getAccessManager(Session,AMContext)
public org.apache.jackrabbit.api.security.principal.PrincipalManager getPrincipalManager(Session session) throws RepositoryException
JackrabbitSecurityManager
session
.getPrincipalManager
in interface JackrabbitSecurityManager
session
.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
JackrabbitSecurityManager
session
.getUserManager
in interface JackrabbitSecurityManager
session
.UnsupportedRepositoryOperationException
- If user management is
not supported.RepositoryException
JackrabbitSecurityManager.getUserManager(Session)
public String getUserID(Subject subject, String workspaceName) throws RepositoryException
JackrabbitSecurityManager
Session.getUserID()
for
the specified subject.getUserID
in interface JackrabbitSecurityManager
Session.getUserID()
.RepositoryException
JackrabbitSecurityManager.getUserID(javax.security.auth.Subject, String)
public AuthContext getAuthContext(Credentials creds, Subject subject, String workspaceName) throws RepositoryException
Credentials
and
Subject
.getAuthContext
in interface JackrabbitSecurityManager
workspaceName
- The name of the workspace to login.AuthContext
for the given Credentials, SubjectRepositoryException
- in other exceptional repository statesCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.