forked from docs/doc-exports
Reviewed-by: Liudmila Denisova <ldenisov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: chenjunjie <chenjunjie@huawei.com> Co-committed-by: chenjunjie <chenjunjie@huawei.com>
112 lines
15 KiB
HTML
112 lines
15 KiB
HTML
<a name="CreateUserAndGrantPolicy"></a><a name="CreateUserAndGrantPolicy"></a>
|
|
|
|
<h1 class="topictitle1">Creating an IAM User and Granting DMS for Kafka Permissions</h1>
|
|
<div id="body8662426"><p id="CreateUserAndGrantPolicy__p47111042131913">This section describes how to use <a href="https://docs.otc.t-systems.com/en-us/usermanual/iam/iam_01_0026.html" target="_blank" rel="noopener noreferrer">Identity and Access Management (IAM)</a> for fine-grained permissions control for your Distributed Message Service (DMS) for Kafka resources. With IAM, you can:</p>
|
|
<ul id="CreateUserAndGrantPolicy__ul1848820457453"><li id="CreateUserAndGrantPolicy__li348974516454">Create IAM users for personnel based on your enterprise's organizational structure. Each IAM user has their own identity credentials for accessing DMS for Kafka resources.</li><li id="CreateUserAndGrantPolicy__li11681126173515">Grant users only the permissions required to perform a given task based on their job responsibilities.</li><li id="CreateUserAndGrantPolicy__li12185165313915">Entrust another account or cloud service to perform efficient O&M on your DMS for Kafka resources.</li></ul>
|
|
<p id="CreateUserAndGrantPolicy__p14662743155318">If your account meets your permissions requirements, you can skip this section.</p>
|
|
<p id="CreateUserAndGrantPolicy__en-us_topic_0170877287_p1837410111319">This section describes the procedure for granting user permissions. <a href="#CreateUserAndGrantPolicy__fig207161552102018">Figure 1</a> shows the process flow.</p>
|
|
<div class="section" id="CreateUserAndGrantPolicy__en-us_topic_0170877287_section17723185741610"><h4 class="sectiontitle">Prerequisites</h4><p id="CreateUserAndGrantPolicy__p13133173441917">Learn about the permissions (see <a href="ProductDescPrivilegeManagement.html">System-defined roles and policies supported by DMS for Kafka</a>) supported by DMS for Kafka and choose policies according to your requirements. For the permissions of other services, see <a href="https://docs.otc.t-systems.com/en-us/permissions/index.html" target="_blank" rel="noopener noreferrer">Permissions</a>.</p>
|
|
<p id="CreateUserAndGrantPolicy__p494310114145"><strong id="CreateUserAndGrantPolicy__b6984114710442">DMS for Kafka permissions policies are based on DMS. Therefore, when assigning permissions for user groups, select DMS permissions policies.</strong></p>
|
|
</div>
|
|
<div class="section" id="CreateUserAndGrantPolicy__en-us_topic_0170877287_section1189416161520"><h4 class="sectiontitle">Process Flow</h4><div class="fignone" id="CreateUserAndGrantPolicy__fig207161552102018"><a name="CreateUserAndGrantPolicy__fig207161552102018"></a><a name="fig207161552102018"></a><span class="figcap"><b>Figure 1 </b>Process for granting DMS for Kafka permissions</span><br><span><img class="eddx" id="CreateUserAndGrantPolicy__image171695211205" src="en-us_image_0000001284017553.png"></span></div>
|
|
<p id="CreateUserAndGrantPolicy__en-us_topic_0170877287_p19791446201511"></p>
|
|
<ol id="CreateUserAndGrantPolicy__en-us_topic_0170877287_ol10176191312813"><li id="CreateUserAndGrantPolicy__en-us_topic_0170877287_li10176121316284"><p id="CreateUserAndGrantPolicy__en-us_topic_0170877287_p41762137286"><a name="CreateUserAndGrantPolicy__en-us_topic_0170877287_li10176121316284"></a><a name="en-us_topic_0170877287_li10176121316284"></a>For the following example, <a href="https://docs.otc.t-systems.com/en-us/usermanual/iam/iam_01_0030.html" target="_blank" rel="noopener noreferrer">create a user group on the IAM console</a> and assign the <strong id="CreateUserAndGrantPolicy__b1738073343112">DMS ReadOnlyAccess</strong> to the group.</p>
|
|
</li><li id="CreateUserAndGrantPolicy__en-us_topic_0170877287_li181761413162818"><p id="CreateUserAndGrantPolicy__en-us_topic_0170877287_p16177613182816"><a name="CreateUserAndGrantPolicy__en-us_topic_0170877287_li181761413162818"></a><a name="en-us_topic_0170877287_li181761413162818"></a><a href="https://docs.otc.t-systems.com/en-us/usermanual/iam/iam_01_0031.html" target="_blank" rel="noopener noreferrer">Create an IAM user and add it to the created user group</a>.</p>
|
|
</li><li id="CreateUserAndGrantPolicy__en-us_topic_0170877287_li1177513202816"><a href="https://docs.otc.t-systems.com/en-us/usermanual/iam/iam_01_0032.html" target="_blank" rel="noopener noreferrer">Log in as the IAM user</a> and verify permissions.<p id="CreateUserAndGrantPolicy__en-us_topic_0170877287_p1317741312289">In the authorized region, perform the following operations:</p>
|
|
<ul id="CreateUserAndGrantPolicy__ul94341340896"><li id="CreateUserAndGrantPolicy__en-us_topic_0000001489537442_li205729227246">Choose <strong id="CreateUserAndGrantPolicy__b1858910519411">Service List</strong> > <strong id="CreateUserAndGrantPolicy__b391702982210">Distributed Message Service</strong>. Then click <strong id="CreateUserAndGrantPolicy__b11369753161817">Create Instance</strong> on the console of DMS for Kafka. If a message appears indicating that you cannot perform the operation, the <strong id="CreateUserAndGrantPolicy__b575975610140">DMS ReadOnlyAccess</strong> policy is in effect.</li><li id="CreateUserAndGrantPolicy__en-us_topic_0000001489537442_li1857212212418">Choose <strong id="CreateUserAndGrantPolicy__b11309981431">Service List</strong> > <strong id="CreateUserAndGrantPolicy__b13091810434">Elastic Volume Service</strong>. If a message appears indicating that you have insufficient permissions, the <strong id="CreateUserAndGrantPolicy__b1099919118614">DMS ReadOnlyAccess</strong> policy is in effect.</li><li id="CreateUserAndGrantPolicy__li888103121617">Choose <strong id="CreateUserAndGrantPolicy__b175372181515">Service List</strong> > <strong id="CreateUserAndGrantPolicy__b84211481256">Distributed Message Service</strong>. If the Kafka instance list can be displayed, the <strong id="CreateUserAndGrantPolicy__b81426553269">DMS ReadOnlyAccess</strong> policy is in effect.</li></ul>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="CreateUserAndGrantPolicy__en-us_topic_0170877288_section7529733164812"><h4 class="sectiontitle">Example Custom Policies</h4><p id="CreateUserAndGrantPolicy__p1595734521412">You can create custom policies to supplement the system-defined policies of DMS for Kafka. For details about actions supported in custom policies, see <a href="https://docs.otc.t-systems.com/en-us/api/dms/api-grant-policy.html" target="_blank" rel="noopener noreferrer">Permissions Policies and Supported Actions</a></p>
|
|
<p id="CreateUserAndGrantPolicy__p1419391112413">To create a custom policy, choose either visual editor or JSON.</p>
|
|
<ul id="CreateUserAndGrantPolicy__ul181934111948"><li id="CreateUserAndGrantPolicy__li819351117414">Visual editor: Select cloud services, actions, resources, and request conditions. This does not require knowledge of policy syntax.</li><li id="CreateUserAndGrantPolicy__li019313113419">JSON: Create a JSON policy or edit an existing one.</li></ul>
|
|
<p id="CreateUserAndGrantPolicy__p1162512437110">For details, see <a href="https://docs.otc.t-systems.com/en-us/usermanual/iam/iam_01_0016.html" target="_blank" rel="noopener noreferrer">Creating a Custom Policy</a>. The following lists examples of common DMS for Kafka custom policies.</p>
|
|
<ul id="CreateUserAndGrantPolicy__en-us_topic_0170877288_ul2504185715494"><li id="CreateUserAndGrantPolicy__en-us_topic_0170877288_li5504357164912">Example 1: Grant permission to delete and restart instances.<pre class="screen" id="CreateUserAndGrantPolicy__en-us_topic_0170877288_screen48273211535">{
|
|
"Version": "1.1",
|
|
"Statement": [
|
|
{
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"dms:instance:modifyStatus",
|
|
"dms:instance:delete"
|
|
]
|
|
}
|
|
]
|
|
}</pre>
|
|
</li><li id="CreateUserAndGrantPolicy__en-us_topic_0170877288_li3652938178">Example 2: Grant permission to deny instance deletion.<p id="CreateUserAndGrantPolicy__en-us_topic_0170877288_p1094717944917"><a name="CreateUserAndGrantPolicy__en-us_topic_0170877288_li3652938178"></a><a name="en-us_topic_0170877288_li3652938178"></a>A policy with only "Deny" permissions must be used together with other policies. If the permissions granted to an IAM user contain both "Allow" and "Deny", the "Deny" permissions take precedence over the "Allow" permissions.</p>
|
|
<p id="CreateUserAndGrantPolicy__en-us_topic_0170877288_p1917695484210">For example, if you want to assign all of the permissions of the <strong id="CreateUserAndGrantPolicy__b0263133062520">DMS FullAccess</strong> policy to a user, except for deleting instances, you can create a custom policy to deny only instance deletion. When you apply both the <strong id="CreateUserAndGrantPolicy__b83689016276">DMS FullAccess</strong> policy and the custom policy denying instance deletion, since "Deny" always takes precedence over "Allow", the "Deny" will be applied for that one conflicting permission. The user will then be able to perform all operations on instances except deleting instances. The following is an example of a deny policy:</p>
|
|
<pre class="screen" id="CreateUserAndGrantPolicy__en-us_topic_0170877288_screen1013241718347">{
|
|
"Version": "1.1",
|
|
"Statement": [
|
|
{
|
|
"Effect": "Deny",
|
|
"Action": [
|
|
"dms:instance:delete"
|
|
]
|
|
}
|
|
]
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="CreateUserAndGrantPolicy__section176221851135613"><h4 class="sectiontitle">DMS for Kafka Resources</h4><p id="CreateUserAndGrantPolicy__p109982119315">A resource is an object that exists within a service. DMS for Kafka resources include <strong id="CreateUserAndGrantPolicy__b92184130481">kafka</strong>. To select these resources, specify their paths.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateUserAndGrantPolicy__table320524712314" frame="border" border="1" rules="all"><caption><b>Table 1 </b>DMS for Kafka resources and their paths</caption><thead align="left"><tr id="CreateUserAndGrantPolicy__row202065472313"><th align="left" class="cellrowborder" valign="top" width="21.98%" id="mcps1.3.8.3.2.4.1.1"><p id="CreateUserAndGrantPolicy__p520612472319">Resource</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.02%" id="mcps1.3.8.3.2.4.1.2"><p id="CreateUserAndGrantPolicy__p31782580148">Resource Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.00000000000001%" id="mcps1.3.8.3.2.4.1.3"><p id="CreateUserAndGrantPolicy__p36725337357">Path</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateUserAndGrantPolicy__row19207174717312"><td class="cellrowborder" valign="top" width="21.98%" headers="mcps1.3.8.3.2.4.1.1 "><p id="CreateUserAndGrantPolicy__p620715478316">kafka</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.02%" headers="mcps1.3.8.3.2.4.1.2 "><p id="CreateUserAndGrantPolicy__p22076471935">Instance</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.00000000000001%" headers="mcps1.3.8.3.2.4.1.3 "><p id="CreateUserAndGrantPolicy__p111053053316">[Format]</p>
|
|
<p id="CreateUserAndGrantPolicy__p1467215336351">DMS:*:*: kafka:<em id="CreateUserAndGrantPolicy__i55835514297">instance ID</em></p>
|
|
<p id="CreateUserAndGrantPolicy__p511236173313">[Notes]</p>
|
|
<p id="CreateUserAndGrantPolicy__p17929720113311">For instance resources, IAM automatically generates the prefix (<strong id="CreateUserAndGrantPolicy__b14800111173410">DMS:*:*:kafka:</strong>) of the resource path.</p>
|
|
<p id="CreateUserAndGrantPolicy__p14929182017334">For the path of a specific resource, add the <em id="CreateUserAndGrantPolicy__i1801985411114225">instance ID</em> to the end. You can also use an asterisk <strong id="CreateUserAndGrantPolicy__b247674967114225">*</strong> to indicate any resource. For example:</p>
|
|
<p id="CreateUserAndGrantPolicy__p29299201339"><strong id="CreateUserAndGrantPolicy__b9631940194820">DMS:*:*:kafka:*</strong> indicates any Kafka instance.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="CreateUserAndGrantPolicy__section7994847195910"><h4 class="sectiontitle">DMS for Kafka Request Conditions</h4><p id="CreateUserAndGrantPolicy__p19457494172">Request conditions are useful in determining when a custom policy is in effect. A request condition consists of condition keys and operators. Condition keys are either global or service-level and are used in the Condition element of a policy statement. <a href="https://docs.otc.t-systems.com/en-us/usermanual/iam/iam_01_0017.html" target="_blank" rel="noopener noreferrer">Global condition keys</a> (starting with <strong id="CreateUserAndGrantPolicy__b1345511838114225">g:</strong>) are available for operations of all services, while service-specific condition keys (starting with a service name such as <strong id="CreateUserAndGrantPolicy__b67053547491">dms:</strong>) are available only for operations of specific services. An operator must be used together with a condition key to form a complete condition statement.</p>
|
|
<p id="CreateUserAndGrantPolicy__p42211785329">DMS for Kafka has a group of predefined condition keys that can be used in IAM. For example, to define an "Allow" permission, use the condition dms:ssl to filter instances by SASL configurations. The following table lists the DMS for Kafka predefined condition keys.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateUserAndGrantPolicy__table428418261813" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Predefined condition keys of DMS for Kafka</caption><thead align="left"><tr id="CreateUserAndGrantPolicy__row172841126183"><th align="left" class="cellrowborder" valign="top" width="32.93%" id="mcps1.3.9.4.2.4.1.1"><p id="CreateUserAndGrantPolicy__p5284152613818">Condition Key</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="35.120000000000005%" id="mcps1.3.9.4.2.4.1.2"><p id="CreateUserAndGrantPolicy__p42640395290">Operator</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="31.95%" id="mcps1.3.9.4.2.4.1.3"><p id="CreateUserAndGrantPolicy__p9284626589">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateUserAndGrantPolicy__row1084016358288"><td class="cellrowborder" valign="top" width="32.93%" headers="mcps1.3.9.4.2.4.1.1 "><p id="CreateUserAndGrantPolicy__p9840153512282">dms:publicIP</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="35.120000000000005%" headers="mcps1.3.9.4.2.4.1.2 "><p id="CreateUserAndGrantPolicy__p78406354283">Bool</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="31.95%" headers="mcps1.3.9.4.2.4.1.3 "><p id="CreateUserAndGrantPolicy__p684093518289">Whether public access is enabled</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateUserAndGrantPolicy__row8142125014290"><td class="cellrowborder" valign="top" width="32.93%" headers="mcps1.3.9.4.2.4.1.1 "><p id="CreateUserAndGrantPolicy__p2142850152917">dms:ssl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="35.120000000000005%" headers="mcps1.3.9.4.2.4.1.2 "><p id="CreateUserAndGrantPolicy__p337142193016">Bool</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="31.95%" headers="mcps1.3.9.4.2.4.1.3 "><p id="CreateUserAndGrantPolicy__p1114205016293">Whether SSL is enabled</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="UserPrivilegeManagement.html">Permissions Management</a></div>
|
|
</div>
|
|
</div>
|
|
|