public class FileSecurityManager extends Object implements SecurityManager
SecurityManager responsible for authenticating requests against users stored
in a file, and creating a FileDirectoryManager for managing the directory.| Modifier and Type | Field and Description |
|---|---|
static String |
ADMIN
The default (first-time) directory manager user
|
SECURITY_MANAGER_CLASS_PROPERTY_KEY| Constructor and Description |
|---|
FileSecurityManager() |
| Modifier and Type | Method and Description |
|---|---|
Authentication |
authenticate(UserDetails userDetails)
Attempts to authenticate the passed user represented by
UserDetails, returning a
fully populated UserDetails object (including granted authorities) if
successful. |
void |
close()
Closes any excess resource kept by the security manager; e.g.
|
DirectoryManager |
createDirectoryManager(UserDetails userDetails)
Attempts to authenticate the passed user represented by
UserDetails, granting access
only for users that are allowed to manage the directory. |
void |
init(Properties properties)
Initializes this security manager instance with implementation specific properties, and any
resource creation/access needed.
|
public static final String ADMIN
public Authentication authenticate(UserDetails userDetails) throws AuthenticationException
SecurityManagerUserDetails, returning a
fully populated UserDetails object (including granted authorities) if
successful.authenticate in interface SecurityManageruserDetails - the user request objectAuthenticationException - if authentication failspublic DirectoryManager createDirectoryManager(UserDetails userDetails) throws AuthenticationException, AccessDeniedException
SecurityManagerUserDetails, granting access
only for users that are allowed to manage the directory. Creates a directory manager for managing of users and roles, granting access only for users that are allowed to manage, but may be restrictive (to read-only) based on their privileges.
If the directory is to be
managed by an external tool, implementors may wish to throw DirectoryAccessDeniedException to deny access to the API (e.g. from UI).
createDirectoryManager in interface SecurityManageruserDetails - the user request objectAuthenticationException - if authentication fails for the specified userAccessDeniedException - if not granted sufficient access required to manage
role detailsDirectoryAccessDeniedException - if the directory should not be managed by API.public void close()
SecurityManagerclose in interface SecurityManagerpublic void init(Properties properties) throws SecurityException
SecurityManagerinit in interface SecurityManagerproperties - properties to use configure this instance.SecurityExceptionCopyright © GigaSpaces.