deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.tools.security
Class DRMAccess

java.lang.Object
  extended by org.deegree.tools.security.DRMAccess

public class DRMAccess
extends java.lang.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 (Fr, 19 Jun 2009) $
Author:
Andreas Poth, last edited by: $Author: apoth $

Constructor Summary
DRMAccess()
           
 
Method Summary
 Group addGroup(java.lang.String name, java.lang.String title)
           
 Role addRole(java.lang.String name)
           
 void addSecuredObject(java.lang.String type, java.lang.String name, java.lang.String title)
           
 void addUser(java.lang.String name, java.lang.String password, java.lang.String firstName, java.lang.String lastName, java.lang.String email)
           
 void assignRights(java.lang.String[] filter, java.lang.String secObj, java.lang.String soType, java.lang.String role, java.lang.String[] rights)
           
 void clean()
           
 void GetUsers()
           
 void hasRight(java.lang.String user, java.lang.String password, java.lang.String securedObject, java.lang.String type, java.lang.String right)
           
 User login(java.lang.String name, java.lang.String password)
           
static void main(java.lang.String[] args)
           
 void printRights(java.lang.String userName, java.lang.String secObjectType)
           
 void removeGroup(java.lang.String name)
           
 void removeRights(java.lang.String secObj, java.lang.String soType, java.lang.String role, java.lang.String[] rights)
           
 void removeRole(java.lang.String name)
           
 void removeSecuredObject(java.lang.String type, java.lang.String name)
           
 void removeUser(java.lang.String name)
           
 void setGroupMemberships(java.lang.String userName, java.lang.String group)
           
 void setRoleAssociation(java.lang.String role, java.lang.String group)
           
protected  void setUp(java.lang.String driver, java.lang.String logon, java.lang.String user, java.lang.String password)
           
 void setUserRoleAssociation(java.lang.String role, java.lang.String user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DRMAccess

public DRMAccess()
          throws java.io.IOException
Throws:
java.io.IOException
Method Detail

setUp

protected void setUp(java.lang.String driver,
                     java.lang.String logon,
                     java.lang.String user,
                     java.lang.String password)
              throws java.lang.Exception
Parameters:
driver -
logon -
user -
password -
Throws:
java.lang.Exception

GetUsers

public void GetUsers()

addUser

public void addUser(java.lang.String name,
                    java.lang.String password,
                    java.lang.String firstName,
                    java.lang.String lastName,
                    java.lang.String email)
Parameters:
name -
password -
firstName -
lastName -
email -

removeUser

public void removeUser(java.lang.String name)
Parameters:
name -

login

public User login(java.lang.String name,
                  java.lang.String password)
Parameters:
name -
password -
Returns:
the user

addGroup

public Group addGroup(java.lang.String name,
                      java.lang.String title)
Parameters:
name -
title -
Returns:
the group

removeGroup

public void removeGroup(java.lang.String name)
Parameters:
name -

addRole

public Role addRole(java.lang.String name)
Parameters:
name -
Returns:
the role

removeRole

public void removeRole(java.lang.String name)
Parameters:
name -

setGroupMemberships

public void setGroupMemberships(java.lang.String userName,
                                java.lang.String group)
Parameters:
userName -
group -

setRoleAssociation

public void setRoleAssociation(java.lang.String role,
                               java.lang.String group)
Parameters:
role -
group -

setUserRoleAssociation

public void setUserRoleAssociation(java.lang.String role,
                                   java.lang.String user)
Parameters:
role -
user -

addSecuredObject

public void addSecuredObject(java.lang.String type,
                             java.lang.String name,
                             java.lang.String title)
Parameters:
type -
name -
title -

removeSecuredObject

public void removeSecuredObject(java.lang.String type,
                                java.lang.String name)
Parameters:
type -
name -

assignRights

public void assignRights(java.lang.String[] filter,
                         java.lang.String secObj,
                         java.lang.String soType,
                         java.lang.String role,
                         java.lang.String[] rights)
Parameters:
filter -
secObj -
soType -
role -
rights -

removeRights

public void removeRights(java.lang.String secObj,
                         java.lang.String soType,
                         java.lang.String role,
                         java.lang.String[] rights)
Parameters:
secObj -
soType -
role -
rights -

clean

public void clean()

hasRight

public void hasRight(java.lang.String user,
                     java.lang.String password,
                     java.lang.String securedObject,
                     java.lang.String type,
                     java.lang.String right)
Parameters:
user -
password -
securedObject -
type -
right -

printRights

public void printRights(java.lang.String userName,
                        java.lang.String secObjectType)
Parameters:
userName -
secObjectType -

main

public static void main(java.lang.String[] args)
Parameters:
args -

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org