org.globus.cas.impl.service
Class CasAdminPortImpl

java.lang.Object
  extended byorg.globus.cas.impl.service.CasAdminPortImpl

public class CasAdminPortImpl
extends java.lang.Object

Implementation of CAS Adminstrator interface


Field Summary
private static I18n i18n
           
(package private) static Log logger
           
 
Constructor Summary
CasAdminPortImpl()
           
 
Method Summary
 void addTrustAnchor(AddTrustAnchor addTrustAnchor)
          Method to add trust anchor on this CAS Server
 void addUser(AddUser addUser)
          Method to add user on this CAS Server
private  void checkUserGroupExists(java.lang.String userGpName, java.lang.String baseErr)
           
 void createGroup(CreateGroup createGroup)
          Method to create new user, object or serviceAction group
 void createObject(CreateObject createObj)
          Method to add an object
 void createObjectNamespace(CreateObjectNamespace createObjNS)
          Method to add namespace
 void createServiceType(CreateServiceType createServiceType)
          Method to create service type
 void deleteGroup(DeleteGroup deleteGroup)
          Method to remove a user, object or serviceAction group
 void deleteObject(DeleteObject deleteObj)
          Method to remove an object
 void deleteObjectNamespace(java.lang.String nickname)
          Method to remove namespace
 void deleteServiceType(java.lang.String serviceTypeName)
          Method to delete service type
 PolicyResponse grant(PolicyDetails policyDetails)
          Method to grant permissions
 void manageObjectGroups(ManageObjectGroups manageObjGps)
          Method to add or remove an object from object group
 void manageServiceAction(ManageServiceAction manageServiceAction)
          Method to add or remove service type/action mapping
 void manageServiceActionGroups(ManageServiceActionGroups managerGp)
          Method to add or remove serviceAction group entry
 void manageUserGroups(ManageUserGroups manageUserGps)
          Method to add or remove a user from user group
 void removeTrustAnchor(java.lang.String nickname)
          Method to remove trust anchor on this CAS Server
 void removeUser(java.lang.String nickname)
          Method to remove user on this CAS Server
 void revoke(PolicyDetails policyDetails)
          Method to revoke permissions
 void revokeForId(java.lang.String policyId)
          Method to revoke permissions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static Log logger

i18n

private static I18n i18n
Constructor Detail

CasAdminPortImpl

public CasAdminPortImpl()
Method Detail

addUser

public void addUser(AddUser addUser)
             throws CasFault,
                    NoPermissionFault
Method to add user on this CAS Server

To enroll user cas/enroll_User permission is needed.

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

addTrustAnchor

public void addTrustAnchor(AddTrustAnchor addTrustAnchor)
                    throws CasFault,
                           NoPermissionFault
Method to add trust anchor on this CAS Server

To enroll trust anchor cas/enroll_TrustAnchor permission is needed.

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

removeUser

public void removeUser(java.lang.String nickname)
                throws CasFault,
                       NoPermissionFault
Method to remove user on this CAS Server

This operation is permitted only if cas/unenroll permission on nickname has been granted

Parameters:
nickname - user nickname
Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

removeTrustAnchor

public void removeTrustAnchor(java.lang.String nickname)
                       throws CasFault,
                              NoPermissionFault
Method to remove trust anchor on this CAS Server

This operation is permitted only if cas/unenroll permission on nickname has been granted

Parameters:
nickname - trust anchor nickname
Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

createGroup

public void createGroup(CreateGroup createGroup)
                 throws CasFault,
                        NoPermissionFault
Method to create new user, object or serviceAction group

This operation is permitted only if the requestor has cas/create_user_group or cas/create_object_group or create_serviceAction_group on casServer

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

deleteGroup

public void deleteGroup(DeleteGroup deleteGroup)
                 throws CasFault,
                        NoPermissionFault
Method to remove a user, object or serviceAction group

This operation is permitted only if the requestor has cas/delete_user_group or cas/delete_object_group or delete_serviceAction_group on casServer

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

createObjectNamespace

public void createObjectNamespace(CreateObjectNamespace createObjNS)
                           throws CasFault,
                                  NoPermissionFault
Method to add namespace

This operation is permitted only if the requestor has cas/enroll_namespace permissions on casServer

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

deleteObjectNamespace

public void deleteObjectNamespace(java.lang.String nickname)
                           throws CasFault,
                                  NoPermissionFault
Method to remove namespace

This method is permitted only if the requestor has cas/unenroll_user permission on the namespace nickname

Parameters:
nickname - namespace nickname
Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

createObject

public void createObject(CreateObject createObj)
                  throws CasFault,
                         NoPermissionFault
Method to add an object

This operation is permitted only if the requestor has cas/enroll_object permissions on casServer

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

deleteObject

public void deleteObject(DeleteObject deleteObj)
                  throws CasFault,
                         NoPermissionFault
Method to remove an object

This operation is permitted only if the requestor has cas/unenroll permissions on objectId

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

manageObjectGroups

public void manageObjectGroups(ManageObjectGroups manageObjGps)
                        throws CasFault,
                               NoPermissionFault
Method to add or remove an object from object group

Add operation is permitted only if requestor has cas/create_group_entry permission on the groupName
Remove operation is permitted only if requestor has cas/delete_group_entry permission on the groupName

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

manageUserGroups

public void manageUserGroups(ManageUserGroups manageUserGps)
                      throws CasFault,
                             NoPermissionFault
Method to add or remove a user from user group

Add operation is permitted only if reuqestor has cas/create_group_entry permission on the groupName
Remove operation is permitted only if requestor has cas/delete_group_entry permission on the groupName

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

createServiceType

public void createServiceType(CreateServiceType createServiceType)
                       throws CasFault,
                              NoPermissionFault
Method to create service type

This operation is permitted only if the requestor has cas/create_serviceType permissions on the casServer.

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

deleteServiceType

public void deleteServiceType(java.lang.String serviceTypeName)
                       throws CasFault,
                              NoPermissionFault
Method to delete service type

This operation is permitted only if the requestor has cas/unenroll permissions on the serviceTypeName

Parameters:
serviceTypeName - name of service type
Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

manageServiceAction

public void manageServiceAction(ManageServiceAction manageServiceAction)
                         throws CasFault,
                                NoPermissionFault
Method to add or remove service type/action mapping

Add operation is permitted only if requestor has cas/create_group_entry permission on the serviceTypeName
Remove operation is permitted only if requestor has cas/delete_group_entry permission on the serviceTypeName

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

manageServiceActionGroups

public void manageServiceActionGroups(ManageServiceActionGroups managerGp)
                               throws CasFault,
                                      NoPermissionFault
Method to add or remove serviceAction group entry

Add operation is permitted only if requestor has cas/create_group_entry permission on the groupName
Remove operation is permitted only if requestor has cas/delete_group_entry permission on the groupName

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

grant

public PolicyResponse grant(PolicyDetails policyDetails)
                     throws CasFault,
                            NoPermissionFault
Method to grant permissions

Returns:
CasObject that represents the policy
Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

revoke

public void revoke(PolicyDetails policyDetails)
            throws CasFault,
                   NoPermissionFault
Method to revoke permissions

Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

revokeForId

public void revokeForId(java.lang.String policyId)
                 throws CasFault,
                        NoPermissionFault
Method to revoke permissions

Parameters:
policyId - policyId that needs to be revoked
Throws:
NoPermissionFault - if the client does not have permission to perform this operation.
CasFault - if any other error occurs.

checkUserGroupExists

private void checkUserGroupExists(java.lang.String userGpName,
                                  java.lang.String baseErr)
                           throws CasFault
Throws:
CasFault