|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.common.rolemap.SimpleFileWithEncryptedPasswordsRoleMapper
A component that maps user security credentials to database user names and passwords. The mappings are provided in an encrypted role map file.
Mappings are maintained for one or more databases.
The file is assumed to conform to the OGSA-DAI schema
OGSA-DAI/schema/ogsadai/xsd/rolemap/encrypted_role_map.xsd
.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
|
private static DAILogger |
LOG
|
(package private) java.util.Map |
mDBHash
|
private static boolean |
VALIDATE
|
private static java.lang.String |
WILDCARD
|
Constructor Summary | |
SimpleFileWithEncryptedPasswordsRoleMapper()
|
Method Summary | |
private void |
addDatabaseRoles(java.lang.String databaseName,
org.w3c.dom.NodeList userList)
Adds a set of mappings from user security credentials to user names and passwords for a database. |
Role |
map(java.lang.String credentials,
java.lang.String database)
Maps the given credentials and database onto a role which can be used to access the database. |
void |
setConfiguration(java.lang.String filename)
Read a set of mappings, for one or more databases, from user security credentials to user names and passwords. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static DAILogger LOG
private static final java.lang.String WILDCARD
private static boolean VALIDATE
java.util.Map mDBHash
Constructor Detail |
public SimpleFileWithEncryptedPasswordsRoleMapper()
Method Detail |
public void setConfiguration(java.lang.String filename) throws RoleMapConfigurationException
setConfiguration
in interface RoleMapper
filename
- Encrypted role map file location.
RoleMapConfigurationException
- if there are problems in
configuring the role maps.RoleMapper.setConfiguration(String)
private void addDatabaseRoles(java.lang.String databaseName, org.w3c.dom.NodeList userList)
databaseName
- Name of database to which these mappings correspond.userList
- Node from the role map file for the database and which is
parsed to get the mappings.public Role map(java.lang.String credentials, java.lang.String database) throws RoleMapAuthorizationException, RoleMapCannotAuthorizeException
RoleMapper
map
in interface RoleMapper
credentials
- User credentials.database
- URI of database to get role for.
RoleMapCannotAuthorizeException
- if a problem arises
during the authorization.
RoleMapAuthorizationException
- if the user is not
authorized to access the database.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |