|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.applsrv.aa.SecurityController
This class represents the default controller for the security objects.
Constructor Summary | |
SecurityController()
|
Method Summary | |
void |
checkRights(java.lang.String[] rightsToCheck)
Verify that all of the named rights actually exist. |
SecurityContext |
createContext(java.lang.String user)
Create a new instance of a context with the specified id. |
SecurityContext |
createContext(java.lang.String user,
int contextId)
Create a new instance of a context with the specified data. |
SecurityGroup |
createGroup(java.lang.String group)
Create a new instance of a Group with the specified name. |
SecurityLimit |
createLimit(java.lang.String userid,
java.lang.String curcode)
Creates a new instance of a limit with the specified userid and curcode. |
SecurityRight |
createRight(java.lang.String right)
Create a new instance of a Right with the specified name. |
SecurityRole |
createRole(java.lang.String role)
Create a new instance of a Role with the specified name. |
SecurityRole |
createRole(java.lang.String role,
RoleHandlerInterface roleHandler)
Create a new instance of a Role with the specified name & role interface. |
SecurityRole |
createRole(java.lang.String role,
java.lang.String roleHandler)
Create a new instance of a Role with the specified name & role interface. |
SecurityService |
createService(java.lang.String service)
Create a new instance of a Service with the specified name. |
SecurityUser |
createUser(java.lang.String user,
java.lang.String password)
Create a new instance of a user with the specified name and password. |
boolean |
deleteContext(int contextID)
Delete the specified context. |
boolean |
deleteGroup(java.lang.String group)
Delete the named group. |
boolean |
deleteRight(java.lang.String right)
Delete the named right. |
boolean |
deleteRole(java.lang.String role)
Delete the named role. |
boolean |
deleteRoles(java.lang.String[] rolesToDelete,
java.lang.String[] options)
Delete the named roles subject to the specified options. |
boolean |
deleteService(java.lang.String service)
Delete the named service. |
boolean |
deleteUser(java.lang.String user)
Delete the named user. |
boolean |
disableConfigurationPersistence()
Disable system configuration persistence and return the former persistence state. |
boolean |
disableContextPersistence()
Disable context persistence and return the former persistence state. |
boolean |
disableGroupPersistence()
Disable group persistence and return the former persistence state. |
boolean |
disableLimitPersistence()
Disable limit persistence and return the former persistence state. |
boolean[] |
disablePersistence()
Disable the persistence for all security objects and return the former persistence states. |
boolean |
disableRightPersistence()
Disable right persistence and return the former persistence state. |
boolean |
disableRolePersistence()
Disable role persistence and return the former persistence state. |
boolean |
disableServicePersistence()
Disable service persistence and return the former persistence state. |
boolean |
disableUserPersistence()
Disable user persistence and return the former persistence state. |
java.util.Enumeration |
enumerationOverContexts()
Return an enumeration over the contexts. |
java.util.Enumeration |
enumerationOverGroups()
Return an enumeration over the groups. |
java.util.Enumeration |
enumerationOverRights()
Return an enumeration over the rights. |
java.util.Enumeration |
enumerationOverRoles()
Return an enumeration over the roles. |
java.util.Enumeration |
enumerationOverServices()
Return an enumeration over the services. |
java.util.Enumeration |
enumerationOverUsers()
Return an enumeration over the users. |
Dictionary |
getConfiguration()
Return a dictionary of the current state of the system configurations. |
boolean |
getConfigurationPersistence()
Return the state of configuration persistence. |
Dictionary |
getContainerLmt(SecurityLimit aLimit)
Returns a copy of the container limit information of aLimit |
SecurityContext |
getContext(int id)
Return the context with the specified context id or null if it does not exist. |
SecurityContext |
getContext(int id,
java.lang.String user)
Return the context with the specified id. |
int[] |
getContextIds()
Return a array of the integer ids of all the contexts. |
boolean |
getContextPersistence()
Return the state of context persistence. |
Dictionary |
getContexts()
Return the dictionary of contexts. |
static SecurityController |
getController()
Return the current security controller to be used by the system. |
java.lang.String[] |
getCreatedRights()
Return the list of the names of the user created rights. |
SecurityGroup |
getGroup(java.lang.String group)
Return the group with the specified name or null if it does not exist. |
SecurityGroup |
getGroup(java.lang.String group,
boolean create)
Return the group with the specified name. |
java.lang.String[] |
getGroupIds()
Return the list of names of the groups. |
boolean |
getGroupPersistence()
Return the state of group persistence. |
Dictionary |
getGroups()
Return the dictionary of groups. |
boolean |
getPasswordAccess()
Return the password access control flag. |
java.lang.String |
getPathNameOfConfigurationDatabase()
Return the pathname of the database of system configurations. |
java.lang.String |
getPathNameOfContextDatabase()
Return the pathname of the database of contexts. |
java.lang.String |
getPathNameOfGroupDatabase()
Return the pathname of the database of groups. |
java.lang.String |
getPathNameOfLimitDatabase()
Return the pathname of the database of limits. |
java.lang.String |
getPathNameOfRightDatabase()
Return the pathname of the database of rights. |
java.lang.String |
getPathNameOfRoleDatabase()
Return the pathname of the database of roles. |
java.lang.String |
getPathNameOfServiceDatabase()
Return the pathname of the database of services. |
java.lang.String |
getPathNameOfUserDatabase()
Return the pathname of the database of users. |
boolean[] |
getPersistence()
Return the persistence enablement states for each of the security objects. |
SecurityRight |
getRight(java.lang.String right)
Return the right with the specified name or null if it does not exist. |
SecurityRight |
getRight(java.lang.String right,
boolean create)
Return the right with the specified name. |
java.lang.String[] |
getRightIds()
Return the list of names of the rights. |
boolean |
getRightPersistence()
Return the state of right persistence. |
Dictionary |
getRights()
Return the dictionary of rights. |
SecurityRole |
getRole(java.lang.String role)
Return the role with the specified name or null if it does not exist. |
SecurityRole |
getRole(java.lang.String role,
boolean create)
Return the role with the specified name. |
java.lang.String[] |
getRoleIds()
Return the list of names of the roles. |
boolean |
getRolePersistence()
Return the state of role persistence. |
Dictionary |
getRoles()
Return the dictionary of roles. |
SecurityService |
getService(java.lang.String service)
Return the service with the specified name or null if it does not exist. |
SecurityService |
getService(java.lang.String service,
boolean create)
Return the service with the specified name. |
java.lang.String[] |
getServiceIds()
Return the list of names of the services. |
boolean |
getServicePersistence()
Return the state of service persistence. |
Dictionary |
getServices()
Return the dictionary of services. |
java.lang.String[] |
getSystemRoles()
Return the names of the system-wide roles. |
Dictionary |
getTransactionLmt(SecurityLimit aLimit)
Returns a copy of the transaction limit information of aLimit |
boolean |
getUniqueLogons()
Return the unique logon control flag. |
SecurityUser |
getUser(java.lang.String user)
Return the user with the specified name or null if it does not exist. |
SecurityUser |
getUser(java.lang.String user,
java.lang.String password)
Return the user with the specified name. |
java.lang.String[] |
getUserIds()
Return the list of names of the users. |
boolean |
getUserPersistence()
Return the state of user persistence. |
Dictionary |
getUsers()
Return the dictionary of configured users. |
java.lang.String[] |
initializeRights()
Insure that all of the intrinsic rights exists and return this list. |
java.lang.String[] |
initialRights()
Return a copy of the list of initial rights for the default user. |
void |
loadConfiguration()
Load the current state of the system configuration from the database. |
void |
loadContexts()
Load the current state of the contexts from the database. |
void |
loadGroups()
Load the current state of the groups from the database. |
void |
loadLimits()
Load the current state of the LIMITS from the database. |
void |
loadRights()
Load the current state of the rights from the database. |
void |
loadRoles()
Load the current state of the roles from the database. |
void |
loadServices()
Load the current state of the services from the database. |
void |
loadUsers()
Load the current state of the users from the database. |
Array |
membership(java.lang.String user)
Return the list of groups of which user is a direct member. |
int |
numberOfGroups()
Return the number of groups that are currently defined. |
int |
numberOfRights()
Return the number of rights that are currently defined. |
int |
numberOfRoles()
Return the number of roles that are currently defined. |
int |
numberOfServices()
Return the number of services that are currently defined. |
int |
numberOfUsers()
Return the number of users that are currently defined. |
Dictionary |
readConfiguration()
Load and return the current state of the system configurations from the database. |
IntegerKeyDictionary |
readContexts()
Load and return the current state of the contexts from the database. |
Dictionary |
readGroups()
Load and return the current state of the groups from the database. |
Dictionary |
readRights()
Load and return the current state of the rights from the database. |
Dictionary |
readRoles()
Load and return the current state of the roles from the database. |
Dictionary |
readServices()
Load and return the current state of the services from the database. |
Dictionary |
readUsers()
Load and return the current state of the configured users from the database. |
void |
recreateDefaultUser()
Recreate the default user with all of its default attributes. |
void |
reset()
Reset the state of all the security objects. |
void |
resetConfiguration()
Reset the system configurations. |
void |
resetContexts()
Reset the contexts. |
void |
resetGroups()
Reset the groups. |
void |
resetLimits()
Reset the limits. |
void |
resetRights()
Reset the rights. |
void |
resetRoles()
Reset the roles. |
void |
resetServices()
Reset the services. |
void |
resetUsers()
Reset the users. |
void |
resetUsersWithoutDefaultUser()
Reset the users without the default user. |
void |
save()
Save the current state of all the security objects to the database. |
void |
save(boolean[] v)
Force a save of selected databases even if persistence is disabled. |
void |
saveConfiguration()
Save the current state of the system configurations to the database. |
void |
saveContexts()
Save the current state of the contexts to the database. |
void |
saveGroups()
Save the current state of the groups to the database. |
void |
saveRights()
Save the current state of the rights to the database. |
void |
saveRoles()
Save the current state of the roles to the database. |
void |
saveServices()
Save the current state of the services to the database. |
void |
saveUsers()
Save the current state of the configured users to the database. |
void |
setAuditFile(java.lang.String fileName)
Set the pathname of the audit file. |
void |
setConfiguration(Dictionary config)
Set the specified system configurations to the specified values. |
void |
setConfigurationDatabase(SecurityPersistence securityPersistence)
Set the persistence controller for system configurations. |
void |
setConfigurationPersistence(boolean persist)
Enable or disable system configuration persistence. |
void |
setContextDatabase(SecurityPersistence securityPersistence)
Set the persistence controller for contexts. |
void |
setContextPersistence(boolean persist)
Enable or disable context persistence. |
static void |
setController(SecurityController securityController)
Set the security controller to be used by the system. |
void |
setGroupDatabase(SecurityPersistence securityPersistence)
Set the persistence controller for groups. |
void |
setGroupPersistence(boolean persist)
Enable or disable group persistence. |
void |
setLimitDatabase(SecurityPersistence securityPersistence)
Set the persistence controller for limits. |
void |
setLimitPersistence(boolean persist)
Enable or disable limits persistence. |
void |
setPasswordAccess(boolean access)
Enable or disable password access for users. |
void |
setPersistence(boolean[] v)
Set the persistence enablement states for each of the security objects. |
void |
setRightDatabase(SecurityPersistence securityPersistence)
Set the persistence controller for rights. |
void |
setRightPersistence(boolean persist)
Enable or disable right persistence. |
void |
setRoleDatabase(SecurityPersistence securityPersistence)
Set the persistence controller for roles. |
void |
setRolePersistence(boolean persist)
Enable or disable role persistence. |
void |
setServiceDatabase(SecurityPersistence securityPersistence)
Set the persistence controller for services. |
void |
setServicePersistence(boolean persist)
Enable or disable service persistence. |
void |
setSystemRoles(java.lang.String[] roles)
Set the names of the system-wide roles. |
void |
setUniqueLogons(boolean uniqueLogons)
Enable or disable unique logons by users. |
void |
setUserDatabase(SecurityPersistence securityPersistence)
Set the persistence controller for users. |
void |
setUserPersistence(boolean persist)
Enable or disable user persistence. |
void |
shutdown()
Shutdown the security component. |
void |
verify()
Verify the integrity of all security databases. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SecurityController()
Method Detail |
public void checkRights(java.lang.String[] rightsToCheck) throws DSESecurityException
rightsToCheck
- String[] - the names of the rights to delete.public SecurityContext createContext(java.lang.String user) throws DSESecurityException
user
- String - the user id.public SecurityContext createContext(java.lang.String user, int contextId) throws DSESecurityException
user
- String - the name of this user.contextId
- int - the id of this new context.public SecurityGroup createGroup(java.lang.String group) throws DSESecurityException
service
- String - the name of the group.public SecurityLimit createLimit(java.lang.String userid, java.lang.String curcode) throws DSESecurityException
userid
- java.lang.String . The owner user of the limitcurcode
- java.lang.String .The currency code of the limitpublic SecurityRight createRight(java.lang.String right) throws DSESecurityException
right
- String - the name of the right.public SecurityRole createRole(java.lang.String role) throws DSESecurityException
role
- String - the name of the role.public SecurityRole createRole(java.lang.String role, RoleHandlerInterface roleHandler) throws DSESecurityException
role
- String - the name of the role.roleHandler
- RoleHandlerInterface - the role handler.public SecurityRole createRole(java.lang.String role, java.lang.String roleHandler) throws DSESecurityException
role
- String - the name of the role.roleHandler
- String - the name of the class of the role handler.public SecurityService createService(java.lang.String service) throws DSESecurityException
service
- String - the name of the service.public SecurityUser createUser(java.lang.String user, java.lang.String password) throws DSESecurityException
user
- String - the name of the user.password
- String - the password.public boolean deleteContext(int contextID) throws DSESecurityException
contextID
- int - the id of the context to delete.public boolean deleteGroup(java.lang.String group) throws DSESecurityException
group
- String - the name of the group to delete.public boolean deleteRight(java.lang.String right) throws DSESecurityException
right
- String - the name of the right to delete.public boolean deleteRole(java.lang.String role) throws DSESecurityException
role
- String - the name of the role to delete.public boolean deleteRoles(java.lang.String[] rolesToDelete, java.lang.String[] options) throws DSESecurityException
rolesToDelete
- String[] - the names of the roles to delete.options
- String[] - the options for this command.public boolean deleteService(java.lang.String service) throws DSESecurityException
service
- String - the name of the service to delete.public boolean deleteUser(java.lang.String user) throws DSESecurityException
user
- String - the name of the user to delete.public boolean disableConfigurationPersistence()
public boolean disableContextPersistence()
public boolean disableGroupPersistence()
public boolean disableLimitPersistence()
public boolean[] disablePersistence()
public boolean disableRightPersistence()
public boolean disableRolePersistence()
public boolean disableServicePersistence()
public boolean disableUserPersistence()
public java.util.Enumeration enumerationOverContexts()
public java.util.Enumeration enumerationOverGroups()
public java.util.Enumeration enumerationOverRights()
public java.util.Enumeration enumerationOverRoles()
public java.util.Enumeration enumerationOverServices()
public java.util.Enumeration enumerationOverUsers()
public Dictionary getConfiguration() throws DSESecurityException
public boolean getConfigurationPersistence()
public Dictionary getContainerLmt(SecurityLimit aLimit) throws DSESecurityException
aLimit
- SecurityLimit - The limit to take container information from.public SecurityContext getContext(int id)
id
- int - the context id.public SecurityContext getContext(int id, java.lang.String user) throws DSESecurityException
id
- int - the context id.user
- String - if the context does not exist then if user is specified then create it else just return null.public int[] getContextIds()
public boolean getContextPersistence()
public Dictionary getContexts()
public static SecurityController getController()
public java.lang.String[] getCreatedRights() throws DSESecurityException
public SecurityGroup getGroup(java.lang.String group)
group
- String - the name of the group.public SecurityGroup getGroup(java.lang.String group, boolean create) throws DSESecurityException
group
- String - the name of the group.create
- boolean - if the group does not exist then if true then create it else just return null.public java.lang.String[] getGroupIds()
public boolean getGroupPersistence()
public Dictionary getGroups()
public boolean getPasswordAccess()
public java.lang.String getPathNameOfConfigurationDatabase() throws DSESecurityException
public java.lang.String getPathNameOfContextDatabase() throws DSESecurityException
public java.lang.String getPathNameOfGroupDatabase() throws DSESecurityException
public java.lang.String getPathNameOfLimitDatabase() throws DSESecurityException
public java.lang.String getPathNameOfRightDatabase() throws DSESecurityException
public java.lang.String getPathNameOfRoleDatabase() throws DSESecurityException
public java.lang.String getPathNameOfServiceDatabase() throws DSESecurityException
public java.lang.String getPathNameOfUserDatabase() throws DSESecurityException
public boolean[] getPersistence()
public SecurityRight getRight(java.lang.String right)
right
- String - the name of the right.public SecurityRight getRight(java.lang.String right, boolean create) throws DSESecurityException
right
- String - the name of the right.create
- boolean - if the right does not exist then if true then create it else just return null.public java.lang.String[] getRightIds()
public boolean getRightPersistence()
public Dictionary getRights()
public SecurityRole getRole(java.lang.String role)
role
- String - the name of the role.public SecurityRole getRole(java.lang.String role, boolean create) throws DSESecurityException
role
- String - the name of the role.create
- boolean - if the role does not exist then if true then create it else just return null.public java.lang.String[] getRoleIds()
public boolean getRolePersistence()
public Dictionary getRoles()
public SecurityService getService(java.lang.String service)
service
- String - the name of the service.public SecurityService getService(java.lang.String service, boolean create) throws DSESecurityException
service
- String - the name of the service.create
- boolean - if the service does not exist then if true then create it else just return null.public java.lang.String[] getServiceIds()
public boolean getServicePersistence()
public Dictionary getServices()
public java.lang.String[] getSystemRoles()
public Dictionary getTransactionLmt(SecurityLimit aLimit) throws DSESecurityException
aLimit
- SecurityLimit - The limit to take transaction information from.public boolean getUniqueLogons()
public SecurityUser getUser(java.lang.String user)
user
- String - the name of the user.public SecurityUser getUser(java.lang.String user, java.lang.String password) throws DSESecurityException
user
- String - the name of the user.password
- String - if not null then this will be the password of the newly created user.public java.lang.String[] getUserIds()
public boolean getUserPersistence()
public Dictionary getUsers()
public java.lang.String[] initializeRights()
public java.lang.String[] initialRights()
public void loadConfiguration() throws DSESecurityException
public void loadContexts() throws DSESecurityException
public void loadGroups() throws DSESecurityException
public void loadLimits() throws DSESecurityException
public void loadRights() throws DSESecurityException
public void loadRoles() throws DSESecurityException
public void loadServices() throws DSESecurityException
public void loadUsers() throws DSESecurityException
public Array membership(java.lang.String user)
user
- String - the user id.public int numberOfGroups()
public int numberOfRights()
public int numberOfRoles()
public int numberOfServices()
public int numberOfUsers()
public Dictionary readConfiguration() throws DSESecurityException
public IntegerKeyDictionary readContexts() throws DSESecurityException
public Dictionary readGroups() throws DSESecurityException
public Dictionary readRights() throws DSESecurityException
public Dictionary readRoles() throws DSESecurityException
public Dictionary readServices() throws DSESecurityException
public Dictionary readUsers() throws DSESecurityException
public void recreateDefaultUser() throws DSESecurityException
public void reset() throws DSESecurityException
public void resetConfiguration() throws DSESecurityException
public void resetContexts() throws DSESecurityException
public void resetGroups() throws DSESecurityException
public void resetLimits() throws DSESecurityException
public void resetRights() throws DSESecurityException
public void resetRoles() throws DSESecurityException
public void resetServices() throws DSESecurityException
public void resetUsers() throws DSESecurityException
public void resetUsersWithoutDefaultUser() throws DSESecurityException
public void save() throws DSESecurityException
public void save(boolean[] v) throws DSESecurityException
list
- boolean[] - for each true - force a save of the corresponding database.public void saveConfiguration() throws DSESecurityException
public void saveContexts() throws DSESecurityException
public void saveGroups() throws DSESecurityException
public void saveRights() throws DSESecurityException
public void saveRoles() throws DSESecurityException
public void saveServices() throws DSESecurityException
public void saveUsers() throws DSESecurityException
public void setAuditFile(java.lang.String fileName) throws DSESecurityException
fileName
- String - dictionary of system configurations to be set.public void setConfiguration(Dictionary config) throws DSESecurityException
config
- Dictionary - dictionary of system configurations to be set.public void setConfigurationDatabase(SecurityPersistence securityPersistence)
securityPersistence
- SecurityPersistence - the persistence controller.public void setConfigurationPersistence(boolean persist)
persist
- boolean - true to enable persistence, false to disable it.public void setContextDatabase(SecurityPersistence securityPersistence)
securityPersistence
- SecurityPersistence - the persistence controller.public void setContextPersistence(boolean persist)
persist
- boolean - true to enable persistence, false to disable it.public static void setController(SecurityController securityController)
securityController
- SecurityController - the new security controller.public void setGroupDatabase(SecurityPersistence securityPersistence)
securityPersistence
- SecurityPersistence - the persistence controller.public void setGroupPersistence(boolean persist)
persist
- boolean - true to enable persistence, false to disable it.public void setLimitDatabase(SecurityPersistence securityPersistence)
securityPersistence
- SecurityPersistence - the persistence controller.public void setLimitPersistence(boolean persist)
persist
- boolean - true to enable persistence, false to disable it.public void setPasswordAccess(boolean access)
access
- boolean - true to enable access, false to disable it.public void setPersistence(boolean[] v)
v
- boolean[] - persistence flags for users, contexts, rights, roles, services, groups and system configuration.public void setRightDatabase(SecurityPersistence securityPersistence)
securityPersistence
- SecurityPersistence - the persistence controller.public void setRightPersistence(boolean persist)
persist
- boolean - true to enable persistence, false to disable it.public void setRoleDatabase(SecurityPersistence securityPersistence)
securityPersistence
- SecurityPersistence - the persistence controller.public void setRolePersistence(boolean persist)
persist
- boolean - true to enable persistence, false to disable it.public void setServiceDatabase(SecurityPersistence securityPersistence)
securityPersistence
- SecurityPersistence - the persistence controller.public void setServicePersistence(boolean persist)
persist
- boolean - true to enable persistence, false to disable it.public void setSystemRoles(java.lang.String[] roles) throws DSESecurityException
roles
- String[] - the names of the system-wide roles.public void setUniqueLogons(boolean uniqueLogons) throws DSESecurityException
uniqueLogons
- boolean - true to enable unique logons, false to disable it.public void setUserDatabase(SecurityPersistence securityPersistence)
securityPersistence
- SecurityPersistence - the persistence controller.public void setUserPersistence(boolean persist)
persist
- boolean - true to enable persistence, false to disable it.public void shutdown() throws DSESecurityException
public void verify() throws DSESecurityException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |