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 |
|---|---|---|
|
|
UUID of the composite role |
UUID |
|
|
Role definition of the child role |
The element contains the following elements:
|
SubRoles
|
Element |
Description |
Possible values |
|---|---|---|
|
|
Role definition of the child role |
The element contains the following elements:
|
|
|
Role |
The element contains the following elements:
|
|
|
UUID of the role |
Any string |
|
|
Name of the role |
Any string |
|
|
Description of the role |
Any string |
|
|
Specification of whether the role is a composite role |
|
|
|
Name of the Realm |
Any string |
|
|
Personalized, configurable attributes |
The element contains the following elements:
|
Attributes
|
Element |
Description |
|
|---|---|---|
|
|
Personalized, configurable attributes |
The element contains the following elements:
|
|
|
Personalized, configurable attribute |
The element contains the following elements:
|
|
|
Attribute name |
Any string |
|
|
Attribute values |
The element contains the following elements:
|
|
|
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>