Managed Object - AuthorizationManager

Property of
ServiceContent
See also
AuthorizationDescription, AuthorizationPrivilege, AuthorizationRole, ManagedEntity, Permission

Managed Object Description

This managed object provides operations to query and update roles and permissions.

Privileges are the basic individual rights required to perform operations. They are statically defined and never change for a single version of a product. Examples of privileges are "Power on a virtual machine" or "Configure a host."

Roles are aggregations of privileges, used for convenience.

Permissions are the actual access-control rules. A permission is defined on a ManagedEntity and specifies the user or group ("principal") to which the rule applies. The role specifies the privileges to apply, and the propagate flag specifies whether or not the rule applies to sub-objects of the managed entity.

A ManagedEntity may have multiple permissions, but may have only one permission per user or group. If, when logging in, a user has both a user permission and a group permission (as a group member) for the same entity, then the user-specific permission takes precedent. If there is no user-specific permission, but two or more group permissions are present, and the user is a member of the groups, then the privileges are the union of the specified roles.

Managed entities may be collected together into a "complex entity" for the purpose of applying permissions consistently. Complex entities may have a Datacenter, ComputeResource, or ClusterComputeResource as a parent, with other child managed objects as additional parts of the complex entity:

Child objects in a complex entity are forced to inherit permissions from the parent object. When query operations are used to discover permissions on child objects of complex entities, different results may be returned for the owner of the permission. In some cases, the child object of the complex entity is returned as the object that defines the permission, and in other cases, the parent from which the permission is propagated is returned as the object that defines the permission. In both cases, the information about the owner of the permission is correct, since the entities within a complex entity are considered equivalent. Permissions defined on complex entities are always applicable on the child entities, regardless of the propagation flag, but may only be defined or modified on the parent object.

Properties

Name Type Description
description PAuthorizationDescription Static, descriptive strings for system roles and privileges.
privilegeList* PAuthorizationPrivilege[] The list of system-defined privileges.
roleList* PAuthorizationRole[] The currently defined roles in the system, including static system-defined roles.
*May not be presentP Required privilege: System.View

Methods

Methods defined in this Managed Object
AddAuthorizationRole, MergePermissions, RemoveAuthorizationRole, RemoveEntityPermission, ResetEntityPermissions, RetrieveAllPermissions, RetrieveEntityPermissions, RetrieveRolePermissions, SetEntityPermissions, UpdateAuthorizationRole

AddAuthorizationRole

Adds a new role.
Required Privileges
Authorization.ModifyRoles

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the AuthorizationManager used to make the method call.
namexsd:string Name of the new role.
privIds*xsd:string[] List of privileges to assign to the role.
*Need not be set

Return Value

Type Description
xsd:intThe roleId assigned to the new role.

Faults

Type Description
AlreadyExistsThrown if a role with the given name already exists.
InvalidNameThrown if the role name is empty.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



MergePermissions

Reassigns all permissions of a role to another role.
Required Privileges
Authorization.ReassignRolePermissions

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the AuthorizationManager used to make the method call.
srcRoleIdxsd:int The ID of the source role providing the permissions which are changing.
dstRoleIdxsd:int The ID of the destination role to which the permissions are reassigned.

Return Value

Type Description
None

Faults

Type Description
AuthMinimumAdminPermissionThrown if srcRoleId is the Administrator role, meaning that applying the change would leave the system with no Administrator permission on the root node.
InvalidArgumentThrown if dstRoleId is the View or Anonymous role or if both role IDs are the same.
NotFoundThrown if either the source or destination role does not exist.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



RemoveAuthorizationRole

Removes a role.
Required Privileges
Authorization.ModifyRoles

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the AuthorizationManager used to make the method call.
roleIdxsd:int
failIfUsedxsd:boolean If true, prevents the role from being removed if any permissions are using it.

Return Value

Type Description
None

Faults

Type Description
InvalidArgumentThrown if the role is a system role, meaning it cannot be changed.
NotFoundThrown if the role does not exist.
RemoveFailedThrown if failIfUsed is true and the role has permissions.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



RemoveEntityPermission

Removes a permission rule from an entity.

This will fail with an InvalidArgument fault if called on: the direct child folders of a datacenter managed object, the root resource pool of a ComputeResource or ClusterComputeResource, or a HostSystem that is part of a ComputeResource (Stand-alone Host). These objects always have the same permissions as their parent.

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the AuthorizationManager used to make the method call.
entity PManagedObjectReference
to a ManagedEntity
Entity on which a permission is removed.
userxsd:string User or group for which the permission is defined.
isGroupxsd:boolean True, if user refers to a group name; false, for a user name.
P Required privilege: Authorization.ModifyPermissions

Return Value

Type Description
None

Faults

Type Description
AuthMinimumAdminPermissionThrown if this change would leave the system with no Administrator permission on the root node.
InvalidArgumentThrown if one of the the new role IDs is the View or Anonymous role, or the entity does not support removing permissions.
NotFoundThrown if a permission for this entity and user or group does not exist.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



ResetEntityPermissions

Update the entire set of permissions defined on an entity. Any existing permissions on the entity are removed and replaced with the provided set.

If a permission is specified multiple times for the same user or group, the last permission specified takes effect.

The operation is transactional per permission and could partially fail. The updates are performed in the order of the permission array argument. The first failed update will abort the operation and throw the appropriate exception. When the operation aborts, any permissions that have not yet been removed are left in their original state.

After updates are applied, original permissions that are not in the new set are removed. A failure to remove a permission, such as a violation of the minimum admininstrator permission rule, will abort the operation and could leave remaining original permissions still effective on the entity.

This will fail with an InvalidArgument fault if called on: the direct child folders of a datacenter managed object, the root resource pool of a ComputeResource or ClusterComputeResource, or a HostSystem that is part of a ComputeResource (Stand-alone Host). These objects always have the same permissions as their parent.

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the AuthorizationManager used to make the method call.
entity PManagedObjectReference
to a ManagedEntity
The entity on which permissions are updated.
permission*Permission[] The list of Permission objects that define the new rules for access to the entity and potentially entities below it. If the list is empty, all permissions on the entity are removed.
*Need not be set P Required privilege: Authorization.ModifyPermissions

Return Value

Type Description
None

Faults

Type Description
AuthMinimumAdminPermissionThrown if this change would leave the system with no Administrator permission on the root node, or it would grant further permission to a user or group who already has Administrator permission on the root node.
InvalidArgumentThrown if one of the the new role IDs is the View or Anonymous role, or the entity does not support assigning permissions.
ManagedObjectNotFoundThrown if the given entity does not exist.
NotFoundThrown if a permission for this entity and user or group does not exist.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
UserNotFoundThrown if one of the given users or groups does not exist.

Show WSDL type definition



RetrieveAllPermissions

Finds all permissions defined in the system. The result is restricted to the managed entities visible to the user making the call.
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the AuthorizationManager used to make the method call.

Return Value

Type Description
Permission[]

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



RetrieveEntityPermissions

Gets permissions defined on or effective on a managed entity. This returns the actual permission objects defined in the system for all users and groups relative to the managed entity. The inherited flag specifies whether or not to include permissions defined by the parents of this entity that propagate to this entity.

For complex entities, the entity reported as defining the permission may be either the parent or a child entity belonging to the complex entity.

The purpose of this method is to discover permissions for administration purposes, not to determine the current permissions. The current user's permissions are found on the effectiveRole property of the user's ManagedEntity.

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the AuthorizationManager used to make the method call.
entity PManagedObjectReference
to a ManagedEntity
inheritedxsd:boolean Whether or not to include propagating permissions defined by parent entities.
P Required privilege: System.Read

Return Value

Type Description
Permission[]

Faults

Type Description
ManagedObjectNotFoundThrown if the entity does not exist.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



RetrieveRolePermissions

Finds all the permissions that use a particular role. The result is restricted to managed entities that are visible to the user making the call.
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the AuthorizationManager used to make the method call.
roleIdxsd:int

Return Value

Type Description
Permission[]

Faults

Type Description
NotFoundThrown if the role does not exist.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



SetEntityPermissions

Defines one or more permission rules on an entity or updates rules if already present for the given user or group on the entity.

If a permission is specified multiple times for the same user or group, then the last permission specified takes effect.

The operation is applied transactionally per permission and is applied to the entity following the order of the elements in the permission array argument. This means that if a failure occurs, the method terminates at that point in the permission array with an exception, leaving at least one and as many as all permissions unapplied.

This will fail with an InvalidArgument fault if called on: the direct child folders of a datacenter managed object, the root resource pool of a ComputeResource or ClusterComputeResource, or a HostSystem that is part of a ComputeResource (Stand-alone Host). These objects always have the same permissions as their parent.

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the AuthorizationManager used to make the method call.
entity PManagedObjectReference
to a ManagedEntity
The entity on which to set permissions.
permission*Permission[] An array of specifications for permissions on the entity.
*Need not be set P Required privilege: Authorization.ModifyPermissions

Return Value

Type Description
None

Faults

Type Description
AuthMinimumAdminPermissionThrown if this change would leave the system with no Administrator permission on the root node, or it would grant further permission to a user or group who already has Administrator permission on the root node.
InvalidArgumentThrown if one of the the new role IDs is the View or Anonymous role, or the entity does not support assigning permissions.
ManagedObjectNotFoundThrown if the given entity does not exist.
NotFoundThrown if a permission's roleId is not valid.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
UserNotFoundThrown if a given user or group does not exist.

Show WSDL type definition



UpdateAuthorizationRole

Updates a role's name and privileges.
Required Privileges
Authorization.ModifyRoles

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the AuthorizationManager used to make the method call.
roleIdxsd:int The ID of the role that is updated.
newNamexsd:string The new name for the role.
privIds*xsd:string[] The new set of privileges to assign to the role.
*Need not be set

Return Value

Type Description
None

Faults

Type Description
AlreadyExistsThrown if another role with the given name already exists.
InvalidArgumentThrown if the role is a system role, meaning it cannot be changed.
InvalidNameThrown if the new role name is empty.
NotFoundThrown if the role does not exist.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition