Add Composite to Role
The Add Composite to Role operation adds a child role to a composite role. Once a user is assigned the composite role, all child roles in the composite role are automatically assigned to the user.
Input XML
<?xml version="1.0" encoding="UTF-8"?>
<ParentRole>
<ParentId></ParentId>
<SubRoles>
<SubRole>
<Id></Id>
<Name></Name>
<Composite></Composite>
<ContainerId></ContainerId>
<Attributes>
<Attribute>
<Name></Name>
<Values>
<Value></Value>
</Values>
</Attribute>
</Attributes>
</SubRole>
</SubRoles>
</ParentRole>
ParentRole
| Element | Description | Possible values |
|---|---|---|
ParentId | UUID of the composite role | UUID |
SubRoles | Role definition of the child role | The element contains the following elements:
|
SubRoles
| Element | Description | Possible values |
|---|---|---|
SubRoles | Role definition of the child role | The element contains the following elements:
|
SubRole | Role | The element contains the following elements:
|
Id | UUID of the role | Any string |
Name | Name of the role | Any string |
Description | Description of the role | Any string |
Composite | Specification of whether the role is a composite role |
|
ContainerId | Name of the Realm | Any string |
Attributes | Personalized, configurable attributes | The element contains the following elements:
|
Attributes
| Element | Description | |
|---|---|---|
Attributes | Personalized, configurable attributes | The element contains the following elements:
|
Attribute | Personalized, configurable attribute | The element contains the following elements:
|
Name | Attribute name | Any string |
Values | Attribute values | The element contains the following elements:
|
Value | Attribute value | Any string |
XSD
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="ParentRole">
<xs:complexType>
<xs:sequence>
<xs:element ref="ParentId"/>
<xs:element ref="SubRoles"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ParentId" type="xs:string"/>
<xs:element name="SubRoles">
<xs:complexType>
<xs:sequence>
<xs:element ref="SubRole"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SubRole">
<xs:complexType>
<xs:sequence>
<xs:element ref="Id"/>
<xs:element ref="Name"/>
<xs:element ref="Attributes"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Id" type="xs:string"/>
<xs:element name="Attributes">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="Attribute"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Attribute">
<xs:complexType>
<xs:sequence>
<xs:element ref="Name"/>
<xs:element maxOccurs="unbounded" ref="Values"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Values">
<xs:complexType>
<xs:sequence>
<xs:element ref="Value"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Value" type="xs:string"/>
<xs:element name="Name" type="xs:string"/>
</xs:schema>
Example
Input
<?xml version="1.0" encoding="UTF-8"?>
<ParentRole>
<ParentId>3915229f-7544-4701-b1dc-6092861d9101</ParentId>
<SubRoles>
<SubRole>
<Id>4915229f-7544-4701-b1dc-6092861d9102</Id>
<Name>x4_admin_access_1</Name>
<Attributes>
<Attribute>
<Name>Team</Name>
<Values>
<Value>Red</Value>
</Values>
<Values>
<Value>Blue</Value>
</Values>
</Attribute>
</Attributes>
</SubRole>
<SubRole>
<Id>5915229f-7544-4701-b1dc-6092861d9103</Id>
<Name>x4_admin_access_2</Name>
<Attributes>
<Attribute>
<Name>Team</Name>
<Values>
<Value>Pink</Value>
</Values>
<Values>
<Value>Green</Value>
</Values>
</Attribute>
</Attributes>
</SubRole>
</SubRoles>
</ParentRole>