org.deegree.tools.security
Class DRMAccess
java.lang.Object
org.deegree.tools.security.DRMAccess
public class DRMAccess
- extends Object
tool class to handle deegree sercurity administration using commandline calls:
general definitions:
-driver JDBC driver (e.g. sun.jdbc.odbc.JdbcOdbcDriver for ODBC databases)
-logon jdbc:odbc:security logon to database (e.g. ODBC name)
-user user name (optional)
-password users password (optional)
possible actions:
-action (addUser, addGroup, addRole, addUserToGroup, assignRoleWithGroup, addSecuredObject, assignRights, clean)
defines the action be performed. possible actions are listed inn brackets.
action = addUser -> adds a user to the right management
-name users login name
-password users password
-firstName the first name of the user
-lastName the last name of the user
-emal email address of the user
action = removeUser -> removes a user to the right management
-name users login name
action = addGroup -> adds a group to the right management system
-name name of the group
-title title of the group
action = removeGroup -> removes a group to the right management
-name groups login name
action = addRole -> adds a role to the right management system
-name name of the role
action = addUserToGroup -> adds a user to a named group
-userName name of the user
-groupName name of the group
action = addUserToGroup -> assignes a group with a role
-groupName name of the group
-roleName name of the role
action = addSecuredObject -> adds a new secured object to the right management system
-soType type of the secured object (e.g. Layer, FeatureType, Coverage ...)
-soName name of the secured object
-soTitle title of the secured object
action = removeSecuredObject -> removes a new secured object from the right management system
-soType type of the secured object (e.g. Layer, FeatureType, Coverage ...)
-soName name of the secured object
action = assignRights -> assigns rights on a named secured object to a role
-constraints comma seperated list of absolut pathes to filter encoding files
-rights comma seperated list of rights to assign. the number of rights must be equest to the number constraints
-soName name of the secured object
-soType type of the secured object
-role name of the role the rights shall be given to
action = removeRights removes rights on a named secured object to a role
-rights comma seperated list of rights to remove.
-soName name of the secured object
-soType type of the secured object
-role name of the role the rights shall be given to
action = clean -> cleans the complete right management system database by deleting all entries!
- Version:
- $Revision: 18197 $, $Revision: 18197 $, $Date: 2009-06-19 13:32:15 +0200 (Fri, 19 Jun 2009) $
- Author:
- Andreas Poth, last edited by: $Author: apoth $
Method Summary |
Group |
addGroup(String name,
String title)
|
Role |
addRole(String name)
|
void |
addSecuredObject(String type,
String name,
String title)
|
void |
addUser(String name,
String password,
String firstName,
String lastName,
String email)
|
void |
assignRights(String[] filter,
String secObj,
String soType,
String role,
String[] rights)
|
void |
clean()
|
void |
GetUsers()
|
void |
hasRight(String user,
String password,
String securedObject,
String type,
String right)
|
User |
login(String name,
String password)
|
static void |
main(String[] args)
|
void |
printRights(String userName,
String secObjectType)
|
void |
removeGroup(String name)
|
void |
removeRights(String secObj,
String soType,
String role,
String[] rights)
|
void |
removeRole(String name)
|
void |
removeSecuredObject(String type,
String name)
|
void |
removeUser(String name)
|
void |
setGroupMemberships(String userName,
String group)
|
void |
setRoleAssociation(String role,
String group)
|
protected void |
setUp(String driver,
String logon,
String user,
String password)
|
void |
setUserRoleAssociation(String role,
String user)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DRMAccess
public DRMAccess()
throws IOException
- Throws:
IOException
setUp
protected void setUp(String driver,
String logon,
String user,
String password)
throws Exception
- Parameters:
driver
- logon
- user
- password
-
- Throws:
Exception
GetUsers
public void GetUsers()
addUser
public void addUser(String name,
String password,
String firstName,
String lastName,
String email)
- Parameters:
name
- password
- firstName
- lastName
- email
-
removeUser
public void removeUser(String name)
- Parameters:
name
-
login
public User login(String name,
String password)
- Parameters:
name
- password
-
- Returns:
- the user
addGroup
public Group addGroup(String name,
String title)
- Parameters:
name
- title
-
- Returns:
- the group
removeGroup
public void removeGroup(String name)
- Parameters:
name
-
addRole
public Role addRole(String name)
- Parameters:
name
-
- Returns:
- the role
removeRole
public void removeRole(String name)
- Parameters:
name
-
setGroupMemberships
public void setGroupMemberships(String userName,
String group)
- Parameters:
userName
- group
-
setRoleAssociation
public void setRoleAssociation(String role,
String group)
- Parameters:
role
- group
-
setUserRoleAssociation
public void setUserRoleAssociation(String role,
String user)
- Parameters:
role
- user
-
addSecuredObject
public void addSecuredObject(String type,
String name,
String title)
- Parameters:
type
- name
- title
-
removeSecuredObject
public void removeSecuredObject(String type,
String name)
- Parameters:
type
- name
-
assignRights
public void assignRights(String[] filter,
String secObj,
String soType,
String role,
String[] rights)
- Parameters:
filter
- secObj
- soType
- role
- rights
-
removeRights
public void removeRights(String secObj,
String soType,
String role,
String[] rights)
- Parameters:
secObj
- soType
- role
- rights
-
clean
public void clean()
hasRight
public void hasRight(String user,
String password,
String securedObject,
String type,
String right)
- Parameters:
user
- password
- securedObject
- type
- right
-
printRights
public void printRights(String userName,
String secObjectType)
- Parameters:
userName
- secObjectType
-
main
public static void main(String[] args)
- Parameters:
args
-
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org