|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.adf.security.store.ADStore
public class ADStore
This class implements methods that accesses Microsoft's Active Directory Server.
| Field Summary | |
|---|---|
protected ADConnectParams |
adConnectParams
|
protected java.util.Map<java.lang.String,java.lang.String> |
adParamsMap
|
protected javax.naming.directory.DirContext |
adRoleCtx
|
protected javax.naming.directory.DirContext |
adUserCtx
|
| Constructor Summary | |
|---|---|
ADStore()
|
|
| Method Summary | |
|---|---|
void |
addRole(ArcGISSecurityRole role)
Unsupported functionality as AD is read only data store. |
void |
addRolesToUser(java.lang.String userName,
java.lang.String[] roleList)
Unsupported functionality as AD is read only data store. |
void |
addUser(ArcGISSecurityUser user)
Unsupported functionality as AD is read only data store. |
void |
addUsersToRole(java.lang.String roleName,
java.lang.String[] userList)
Unsupported functionality as AD is read only data store. |
void |
close()
Close all connections to the security store. |
void |
deleteRole(java.lang.String roleName)
Unsupported functionality as AD is read only data store. |
void |
deleteRolesFromUser(java.lang.String userName,
java.lang.String[] roleList)
Unsupported functionality as AD is read only data store. |
void |
deleteUser(java.lang.String userName)
Unsupported functionality as AD is read only data store. |
void |
deleteUsersFromRole(java.lang.String roleName,
java.lang.String[] userList)
Unsupported functionality as AD is read only data store. |
protected java.lang.String |
extractUserIdFromDn(java.lang.String dn)
Returns the user-id attribute from the DN attribute of an AD entry. |
java.lang.String |
forgotUserPassword(java.lang.String userName,
java.lang.String secretQuest,
java.lang.String secretAns)
Unsupported functionality as AD is read only data store. |
java.util.List<ArcGISSecurityRole> |
getAllRoles()
Return list of roles that are present in the security store. |
protected java.util.List<ArcGISSecurityRole> |
getAllRolesAsAttributes()
Returns a list of all the roles in the AD that are maintained as attribute of user entries. |
protected java.util.List<ArcGISSecurityRole> |
getAllRolesAsEntry()
Returns a list of all the roles in the AD that are maintained as independent entries. |
java.util.List<ArcGISSecurityUser> |
getAllUsers()
Returns a list of ArcGISSecurityUser objects that represent all the users currently in the security store. |
ArcGISSecurityRole |
getRole(java.lang.String roleName)
Return a ArcGISSecurityRole object for a role identified by rolename. |
protected ArcGISSecurityRole |
getRoleAsAttribute(java.lang.String roleName)
Return a particular role from the security store when roles are maintained as attributes of individual entries in the AD |
protected ArcGISSecurityRole |
getRoleAsEntry(java.lang.String roleName)
Return a particular role from the security store when roles are maintained as individual entries in the AD |
java.util.List<ArcGISSecurityRole> |
getRolesForUser(java.lang.String userName)
Gets the list of roles associated with a user, both of which are present in an ad. |
protected java.util.List<ArcGISSecurityRole> |
getRolesForUserAsAttribute(java.lang.String userName)
Returns a list of roles for a user, when roles are maintained as attributes of individual entries. |
protected java.util.List<ArcGISSecurityRole> |
getRolesForUserAsEntry(java.lang.String userName)
Returns a list of roles for a user, when roles are maintained as individual entries |
ArcGISSecurityUser |
getUser(java.lang.String userName)
Return a ArcGISSecurityUser object for a ArcGISSecurityUser identified by username when the data store is AD. |
java.lang.String |
getUserSecretQuestion(java.lang.String userName)
Unsupported functionality as AD is read only data store. |
java.util.List<ArcGISSecurityUser> |
getUsersForRole(java.lang.String roleName)
Returns list of users that have been assigned to a particular role. |
protected java.util.List<ArcGISSecurityUser> |
getUsersForRoleAsAttribute(java.lang.String roleName)
Returns list of users that have been assigned to a particular role when roles are maintained as attribute of individual entries. |
protected java.util.List<ArcGISSecurityUser> |
getUsersForRoleAsEntry(java.lang.String roleName)
Returns list of users that have been assigned to a particular role when roles are maintained as individual entries. |
void |
init(java.util.Map<java.lang.String,java.lang.String> paramsMap)
Initialize the AD connection. |
boolean |
isReadOnly()
For the current implementation, the Active Directory is treated as a readonly data store, so this method will always return true. |
protected java.util.List<ArcGISSecurityRole> |
lookupRoleInLdap(java.lang.String roleDN)
Look up the AD for a particular role entry that is associated as with a ArcGISSecurityUser as an attribute of the ArcGISSecurityUser entry |
protected ArcGISSecurityUser |
lookupUserInLdap(java.lang.String userDN)
Look up the AD for a particular ArcGISSecurityUser entry that is associated as with a role as an attribute of the role entry |
void |
modifyRole(ArcGISSecurityRole role)
Unsupported functionality as AD is read only data store. |
void |
modifyUser(ArcGISSecurityUser user)
Unsupported functionality as AD is read only data store. |
void |
reinitialize()
Reinitialize the connection to data stores. |
boolean |
testConnection(java.util.Map<java.lang.String,java.lang.String> paramsMap)
Test the connection to the data store |
boolean |
validateUser(java.lang.String username,
java.lang.String password)
Check the user credentials with the information available in the security store. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ADConnectParams adConnectParams
protected javax.naming.directory.DirContext adUserCtx
protected javax.naming.directory.DirContext adRoleCtx
protected java.util.Map<java.lang.String,java.lang.String> adParamsMap
| Constructor Detail |
|---|
public ADStore()
| Method Detail |
|---|
public void init(java.util.Map<java.lang.String,java.lang.String> paramsMap)
throws ArcGISSecurityException
init in interface SecurityStoreparamsMap - - Map generated from a ADConnectParams object.It contains
information that the ArcGISSecurityStore uses to
connect to an AD.
ArcGISSecurityException - - if cannot connect to a AD
public void reinitialize()
throws ArcGISSecurityException
reinitialize in interface SecurityStoreArcGISSecurityException - - if connection cannot be initializedpublic boolean isReadOnly()
isReadOnly in interface SecurityStore
public boolean testConnection(java.util.Map<java.lang.String,java.lang.String> paramsMap)
throws ArcGISSecurityException
testConnection in interface SecurityStoreparamsMap - - Map generated from a ADConnectParams object.It contains
information that the ArcGISSecurityStore uses to
connect to an AD.
ArcGISSecurityException - - if there is an error while connecting
to the security data storeprotected java.lang.String extractUserIdFromDn(java.lang.String dn)
dn - - represents the DN attribute of the AD entry.
public java.util.List<ArcGISSecurityUser> getAllUsers()
throws ArcGISSecurityException
getAllUsers in interface SecurityStoreArcGISSecurityException - - if users cannot be retrieved from the security store
public java.util.List<ArcGISSecurityRole> getAllRoles()
throws ArcGISSecurityException
getAllRoles in interface SecurityStoreArcGISSecurityException - - if a role cannot be retrieved from the security store
protected java.util.List<ArcGISSecurityRole> getAllRolesAsEntry()
throws ArcGISSecurityException
ArcGISSecurityException - - if role information cannot be accessed
protected java.util.List<ArcGISSecurityRole> getAllRolesAsAttributes()
throws ArcGISSecurityException
ArcGISSecurityException - - if role information cannot be accessed
public ArcGISSecurityUser getUser(java.lang.String userName)
throws ArcGISSecurityException
getUser in interface SecurityStoreuserName - - unique name of the ArcGISSecurityUser
ArcGISSecurityException - - if ArcGISSecurityUser information cannot be retrieved from the security store
public ArcGISSecurityRole getRole(java.lang.String roleName)
throws ArcGISSecurityException
getRole in interface SecurityStoreroleName - - unique name of the role
ArcGISSecurityException - - if role information cannot be retrieved from the AD
protected ArcGISSecurityRole getRoleAsEntry(java.lang.String roleName)
throws ArcGISSecurityException
roleName - - String identifier for a role
ArcGISSecurityException - if role information cannot be accessed from the AD.
protected ArcGISSecurityRole getRoleAsAttribute(java.lang.String roleName)
throws ArcGISSecurityException
roleName - - String identifier for a role
ArcGISSecurityException - if role information cannot be accessed from the AD.
public java.util.List<ArcGISSecurityRole> getRolesForUser(java.lang.String userName)
throws ArcGISSecurityException
getRolesForUser in interface SecurityStoreuserName - - String representing the unique username
ArcGISSecurityException - - if role information cannot be retrieved
protected java.util.List<ArcGISSecurityRole> getRolesForUserAsEntry(java.lang.String userName)
throws ArcGISSecurityException
userName - - String identifier for the user whose roles are to be returned
ArcGISSecurityException - - if roles information for the user cannot be accessed.
protected java.util.List<ArcGISSecurityRole> getRolesForUserAsAttribute(java.lang.String userName)
throws ArcGISSecurityException
userName - - String identifier for the user whose roles are to be returned
ArcGISSecurityException - - if roles information for the user cannot be accessed.
protected java.util.List<ArcGISSecurityRole> lookupRoleInLdap(java.lang.String roleDN)
throws ArcGISSecurityException
roleDN - - String representing the DN of the role stored as
attribute of the ArcGISSecurityUser entry
ArcGISSecurityException - when the input parameter is null, or the API cannot
successfully communicate with the AD
protected ArcGISSecurityUser lookupUserInLdap(java.lang.String userDN)
throws ArcGISSecurityException
userDN - - String representing the DN of the ArcGISSecurityUser stored as
attribute of the role entry
ArcGISSecurityException - when the input parameter is null, or the API cannot
successfully communicate with the AD
public java.util.List<ArcGISSecurityUser> getUsersForRole(java.lang.String roleName)
throws ArcGISSecurityException
getUsersForRole in interface SecurityStoreroleName - - String identifier that represents a particular role
ArcGISSecurityException - - if user information cannot be accessed in the AD
protected java.util.List<ArcGISSecurityUser> getUsersForRoleAsEntry(java.lang.String roleName)
throws ArcGISSecurityException
roleName - - String identifier that represents a particular role
ArcGISSecurityException - - if user information cannot be accessed in the AD
protected java.util.List<ArcGISSecurityUser> getUsersForRoleAsAttribute(java.lang.String roleName)
throws ArcGISSecurityException
roleName - - String identifier that represents a particular role
ArcGISSecurityException - - if user information cannot be accessed in the AD
public boolean validateUser(java.lang.String username,
java.lang.String password)
throws ArcGISSecurityException
validateUser in interface SecurityStoreuserName - - String representing a particular useruserPassword - - String representing the user's password
ArcGISSecurityException - - if user information cannot be retrieved.public void close()
close in interface SecurityStore
public void addRole(ArcGISSecurityRole role)
throws ArcGISSecurityException
addRole in interface SecurityStorerole - - reference to the ArcGISSecurityRole object that contains the role
information.
ArcGISSecurityException - - if a new role cannot be added
public void modifyRole(ArcGISSecurityRole role)
throws ArcGISSecurityException
modifyRole in interface SecurityStorerole - - reference to the ArcGISSecurityRole object that contains the
modified role information.
ArcGISSecurityException - - if role information cannot be modified.
public void addUser(ArcGISSecurityUser user)
throws ArcGISSecurityException
addUser in interface SecurityStoreuser - - reference to ArcGISSecurityUser object that contains
user information.
ArcGISSecurityException - - if user cannot be added
public void modifyUser(ArcGISSecurityUser user)
throws ArcGISSecurityException
modifyUser in interface SecurityStoreuser - - reference to ArcGISSecurityUser object thats contains
modified user information.
ArcGISSecurityException
public void addRolesToUser(java.lang.String userName,
java.lang.String[] roleList)
throws ArcGISSecurityException
addRolesToUser in interface SecurityStoreuserName - - String representing the particular role to whom these roles
are to be assigned.roleList - - Array of strings containing the name of the roles that are
to be assigned to the user.
ArcGISSecurityException - - if roles cannot be added to the user
public void addUsersToRole(java.lang.String roleName,
java.lang.String[] userList)
throws ArcGISSecurityException
addUsersToRole in interface SecurityStoreroleName - - String representing the particular role that is to be assigned.userList - - Array of strings containing the name of the user to whom this
role is to be assigned
ArcGISSecurityException - - if this role cannot be assigned to the users.
public void deleteRole(java.lang.String roleName)
throws ArcGISSecurityException
deleteRole in interface SecurityStoreroleName - - String identifier that uniquely identifies a particular role
ArcGISSecurityException - - if a role cannot be deleted
public void deleteUser(java.lang.String userName)
throws ArcGISSecurityException
deleteUser in interface SecurityStoreuserName - - String identifier that uniquely identifies a user.
ArcGISSecurityException - - if the user cannot be deleted from the store.
public void deleteRolesFromUser(java.lang.String userName,
java.lang.String[] roleList)
throws ArcGISSecurityException
deleteRolesFromUser in interface SecurityStoreuserName - - String representing the particular user from whom the roles
are to be deleted.roleList - - Array of strings containing name of the roles that are to be
deleted from this user.
ArcGISSecurityException - - if roles cannot be deleted from the user
public void deleteUsersFromRole(java.lang.String roleName,
java.lang.String[] userList)
throws ArcGISSecurityException
deleteUsersFromRole in interface SecurityStoreroleName - - String representing the particular role thats is to be
deleted.userList - - Array of strings containing the name of the users from whom this role
is to be deleted.
ArcGISSecurityException - - if the role cannot be deleted from the list of users
public java.lang.String getUserSecretQuestion(java.lang.String userName)
throws ArcGISSecurityException
getUserSecretQuestion in interface SecurityStoreuserName - - String identifier that uniquely identifies a particular user
ArcGISSecurityException - - if user information cannot be retrieved
public java.lang.String forgotUserPassword(java.lang.String userName,
java.lang.String secretQuest,
java.lang.String secretAns)
throws ArcGISSecurityException
forgotUserPassword in interface SecurityStoreuserName - - String identifier that uniquely identifies a particular usersecretQuest - - String representing the secret question set for the usersecretAns - - String representing the answer to the secret question
ArcGISSecurityException - - if password cannot be reset
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||