You can use the Jython or Jacl scripting languages to configure security with the wsadmin tool. The commands and parameters in the AuthorizationGroupCommands group can be used to create and manage authorization groups. The AuthorizationGroupCommands command group for the AdminTask object includes the following commands:
The addResourceToAuthorizationGroup command adds a resource instance to an existing authorization group. A resource instance cannot belong to more than one authorization group.
Target object
None
Parameters and return values
ResourceType=ResourceNamewhere ResourceType is one of the following values: Application, Server, ServerCluster, Node, NodeGroup
ResourceName is the name of the resource instance, for example, server1. The following are example uses of the resourceName parameter:
Node=node1:Server=server1This example uniquely identifies server1. node1 is required if another server1 exists on a different node.
Application=app1
Examples
Batch mode example usage:
$AdminTask addResourceToAuthorizationGroup {-authorizationGroupName groupName -resourceName Application=app1}
AdminTask.addResourceToAuthorizationGroup('[-authorizationGroupName groupName -resourceName Application=app1]')
AdminTask.addResourceToAuthorizationGroup(['-authorizationGroupName', 'groupName', '-resourceName', 'Application=app1'])
Interactive mode example usage:
$AdminTask addResourceToAuthorizationGroup {-interactive}
AdminTask.addResourceToAuthorizationGroup ('[-interactive]')
AdminTask.addResourceToAuthorizationGroup (['-interactive'])
The createAuthorizationGroup command creates a new authoirzation group. When you create a new authorization group, no members are associated with it. Also, no user to administrative role mapping for the authorization table is associated with the authorization group.
Target object
None
Parameters and return values
Examples
Batch mode example usage:
$AdminTask createAuthorizationGroup {-authorizationGroupName groupName}
AdminTask.createAuthorizationGroup('[-authorizationGroupName groupName]')
AdminTask.createAuthorizationGroup(['-authorizationGroupName', 'groupName'])
Interactive mode example usage:
$AdminTask createAuthorizationGroup -interactive
AdminTask.createAuthorizationGroup ('[-interactive]')
AdminTask.createAuthorizationGroup (['-interactive'])
The deleteAuthorizationGroup command deletes an existing authorization group. When you delete an authorization group, the authorization table that corresponds is also deleted.
Target object
None
Parameters and return values
Examples
Batch mode example usage:
$AdminTask deleteAuthorizationGroup {-authorizationGroupName groupName}
AdminTask.deleteAuthorizationGroup('[-authorizationGroupName groupName]')
AdminTask.deleteAuthorizationGroup(['-authorizationGroupName', 'groupName'])
Interactive mode example usage:
$AdminTask deleteAuthorizationGroup {-interactive}
AdminTask.deleteAuthorizationGroup ('[-interactive]')
AdminTask.deleteAuthorizationGroup (['-interactive'])
The listAuthorizationGroupslistAuthoriz ationGroups command lists the existing authorization groups.
Target object
None
Parameters and return values
Examples
Batch mode example usage:
Interactive mode example usage:
$AdminTask listAuthorizationGroups {-interactive}
AdminTask.listAuthorizationGroups ('[-interactive]')
AdminTask.listAuthorizationGroups (['-interactive'])
The listAuthorizationGroupsForGroupID command lists all of the authorization groups to which a given user group has access. This command lists the authorization groups and the granted roles for each authorization group. The group ID can be a short name or a fully qualified domain name if the LDAP user registry is being used. This command will list cell as a group if the user has cell level access.
Target object
None
Parameters and return values
Examples
Batch mode example usage:
$AdminTask listAuthorizationGroupsForGroupID {-groupid userGroupName}
AdminTask.listAuthorizationGroupsForGroupID('[-groupid userGroupName]')
AdminTask.listAuthorizationGroupsForGroupID(['-groupid', 'userGroupName'])
Interactive mode example usage:
$AdminTask listAuthorizationGroupsForGroupID {-interactive}
AdminTask.listAuthorizationGroupsForGroupID ('[-interactive]')
AdminTask.listAuthorizationGroupsForGroupID (['-interactive'])
The listAuthorizationGroupsForUserID command lists all of the authorization groups to which a given user has access. This command lists the authorization groups and the granted roles for each authorization group. The user ID and the group ID can be a short name or a fully qualified domain name if the LDAP user registry is being used. This command will list cell as a group if the user has cell level access.
Target object
None
Parameters and return values
Examples
Batch mode example usage:
$AdminTask listAuthorizationGroupsForUserID{-userid userName}
AdminTask.listAuthorizationGroupsForUserID('[-userid userName]')
AdminTask.listAuthorizationGroupsForUserID(['-userid', 'userName'])
Interactive mode example usage:
$AdminTask listAuthorizationGroupsForUserID {-interactive}
AdminTask.listAuthorizationGroupsForUserID ('[-interactive]')
AdminTask.listAuthorizationGroupsForUserID (['-interactive'])
The listAuthorizationGroupsOfResource command lists authorization groups for a given resource. If the value of the traverseContainedObjects parameter is false, only the authorization group of the resource is returned. If the value of the traverseContainedObjects parameter is true, it returns the authorization group of the resource and the authorization groups of all the parent resources in the containment tree.
Target object
None
Parameters and return values
ResourceType=ResourceNamewhere ResourceType can be any one of the following values: Application, Server, ServerCluster, Node, or NodeGroup.
ResourceName is the name of the resource instance, for example, server1. The following are examples of the resourceName parameter:
Node=node1:Server=serverThis example uniquely identifies server1. The name of the node is required if a server on a different node uses the same server name.
Application=app1
Examples
Batch mode example usage:
$AdminTask listAuthorizationGroupsOfResource {-resourceName Application=app1}
AdminTask.listAuthorizationGroupsOfResource('[-resourceName Application=app1]')
AdminTask.listAuthorizationGroupsOfResource(['-resourceName', 'Application=app1'])
Interactive mode example usage:
$AdminTask listAuthorizationGroupsOfResource {-interactive}
AdminTask.listAuthorizationGroupsOfResource ('[-interactive]')
AdminTask.listAuthorizationGroupsOfResource (['-interactive'])
The listResourcesOfAuthorizationGroup command lists all of the resources within the given authorization group.
Target object
None
Parameters and return values
Examples
Batch mode example usage:
$AdminTask listResourcesOfAuthorizationGroup {-authorizationGroupName groupName}
AdminTask.listResourcesOfAuthorizationGroup('[-authorizationGroupName groupName]')
AdminTask.listResourcesOfAuthorizationGroup(['-authorizationGroupName', 'groupName'])
Interactive mode example usage:
$AdminTask listResourcesOfAuthorizationGroup {-interactive}
AdminTask.listResourcesOfAuthorizationGroup ('[-interactive]')
AdminTask.listResourcesOfAuthorizationGroup (['-interactive'])
The listResourcesForGroupID command lists all the objects that a given group has access to. This command lists the resources and the granted roles for each resource. The resources that this command returns include the resources from the authorization groups to which the user group is granted roles and the resources that are descendants of the resources with in authorization groups to which the user group is granted access to any role. The group ID can be a short name or fully qualified domain name if a LDAP user registry is used.
Target object
None
Parameters and return values
Examples
Batch mode example usage:
$AdminTask listResourcesForGroupID {-groupid userGroupName}
AdminTask.listResourcesForGroupID('[-groupid userGroupName]')
AdminTask.listResourcesForGroupID(['-groupid', 'userGroupName'])
Interactive mode example usage:
$AdminTask listResourcesForGroupID {-interactive}
AdminTask.listResourcesForGroupID ('[-interactive]')
AdminTask.listResourcesForGroupID (['-interactive'])
The listResourcesForUserID command lists all the objects that a given user has access to. This command lists the resources and the granted roles for each resource. The resources that this command returns include the resources from the authorization groups to which the user is granted roles and the resources that are descendants of the resources with in authorization groups to which the user is granted access to any role. The user ID can be a short name or fully qualified domain name if a LDAP user registry is used.
Target object
None
Parameters and return values
Examples
Batch mode example usage:
$AdminTask listResourcesForUserID {-userid userName }
AdminTask.listResourcesForUserID('[-userid userName]')
AdminTask.listResourcesForUserID(['-userid', 'userName'])
Interactive mode example usage:
$AdminTask listResourcesForUserID {-interactive}
AdminTask.listResourcesForUserID ('[-interactive]')
AdminTask.listResourcesForUserID (['-interactive'])
Example output:
{deployer=[], operator=[], administrator=[cells/IBM-LP1 6L31HVE8Cell07/clusters/C1| cluster.xml, cells/IBM-LP16L 31HVE8Cell07/nodes/IBM-LP16L 31HVE8Node05/servers/cm1|ser ver.xml], monitor=[], confi gurator=[]}
The mapGroupsToAdminRole command maps group IDs to one or more administrative roles in an authorization group. The name of the authorization group that you provide determines which authorization table will be used. If you do not specify an authorization group name, the mapping is done to the cell level authorization table. The group ID can be a short name or a fully qualified domain name if the LDAP user registry is used.
Target object
None
Parameters and return values
Examples
Batch mode example usage:
$AdminTask mapGroupsToAdminRole {-authorizationGroupName groupName - roleName administrator -groupids group1}
AdminTask.mapGroupsToAdminRole('[-authorizationGroupName groupName -roleName administrator -groupids group1]')
AdminTask.mapGroupsToAdminRole(['-authorizationGroupName', 'groupName', '-roleName', 'administrator', '-groupids', 'group1'])
Interactive mode example usage:
$AdminTask mapGroupsToAdminRole {-interactive}
AdminTask.mapGroupsToAdminRole ('[-interactive]')
AdminTask.mapGroupsToAdminRole (['-interactive'])
The mapUsersToAdminRole command maps user IDs to one or more administrative roles in the authorization group. The name of the authorization group that you provide determines the authorization table. If you do not specify the name of the authorization group, the mapping is done to the cell level authorization table. The user ID can be a short name or fully qualified domain name in case LDAP user registry is used.
Target object
None
Parameters and return values
Examples
Batch mode example usage:
$AdminTask mapUsersToAdminRole {-authorizationGroupName groupName - roleName administrator -userids user1}
AdminTask.mapUsersToAdminRole('[-authorizationGroupName groupName -roleName administrator -userids user1]')
AdminTask.mapUsersToAdminRole(['-authorizationGroupName', 'groupName', '-roleName', 'administrator', '-userids', 'user1'])
Interactive mode example usage:
$AdminTask mapUsersToAdminRole {-interactive}
AdminTask.mapUsersToAdminRole ('[-interactive]')
AdminTask.mapUsersToAdminRole (['-interactive'])
The removeGroupsFromAdminRole command removes previously mapped group IDs from administrative roles in the authorization group. The name of the authorization group that you provide determines which authorization table is involved. If you do not specify an authorization group name, the group IDs are removed from the cell level authorization table. The group ID can be a short name or fully qualified domain name if a LDAP user registry is used.
Target object
None
Parameters and return values
Examples
Batch mode example usage:
$AdminTask removeGroupsFromAdminRole {-authorizationGroupName groupName - roleName administrator -groupids group1}
AdminTask.removeGroupsFromAdminRole('[-authorizationGroupName groupName -roleName administrator -groupids group1]')
AdminTask.removeGroupsFromAdminRole(['-authorizationGroupName', 'groupName', '-roleName', 'administrator', '-groupids', 'group1'])
Interactive mode example usage:
$AdminTask removeGroupsFromAdminRole {-interactive}
AdminTask.removeGroupsFromAdminRole ('[-interactive]')
AdminTask.removeGroupsFromAdminRole (['-interactive'])
The removeResourceFromAuthorizationGroup command removes resources from an existing authorization group. If you do not specify the authorization group, it will be determined and the resource will be removed from that authorization group.
Target object
None
Parameters and return values
ResourceType=ResourceNamewhere the ResourceType can be any of the following: Application, Server, ServerCluster, Node, or NodeGroup.
The ResourceName is the name of the resource instance, for example, server1. The following are examples of the resourceName parameter:
Node=node1:Server=server1This example uniquely identifies server1. node1 is required if the name of the server exists on multiple nodes.
Application=app1
Examples
Batch mode example usage:
$AdminTask removeResourceFromAuthorizationGroup {-authorizationGroupName groupName -resourceName Application=app1}
AdminTask.removeResourceFromAuthorizationGroup('[-authorizationGroupName groupName -resourceName Application=app1]')
AdminTask.removeResourceFromAuthorizationGroup(['-authorizationGroupName', 'groupName', '-resourceName', 'Application=app1'])
Interactive mode example usage:
$AdminTask removeResourceFromAuthorizationGroup {-interactive}
AdminTask.removeResourceFromAuthorizationGroup ('[-interactive]')
AdminTask.removeResourceFromAuthorizationGroup (['-interactive'])
The removeUsersFromAdminRole command removes previously mapped user IDs from administrative roles in the authorization group. The name of the authorization group that you provide determines which authorization table is involved. If you do not specify an authorization group name, the user ID from the cell level authorization table will be used. The user ID can be a short name or a fully qualified domain name if a LDAP user registry is used.
Target object
None
Parameters and return values
Examples
Batch mode example usage:
$AdminTask removeUsersFromAdminRole {-authorizationGroupName groupName - roleName administrator -userids user1}
AdminTask.removeUsersFromAdminRole('[-authorizationGroupName groupName -roleName administrator -userids user1]')
AdminTask.removeUsersFromAdminRole(['-authorizationGroupName', 'groupName', '-roleName', 'administrator', '-userids', 'user1'])
Interactive mode example usage:
$AdminTask removeUsersFromAdminRole {-interactive}
AdminTask.removeUsersFromAdminRole ('[-interactive]')
AdminTask.removeUsersFromAdminRole (['-interactive'])