doc-exports/docs/dws/umn/dws_01_01114.html
Lu, Huayi 95132e24fc DWS UMN 830.201_new version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Reviewed-by: Rechenburg, Matthias <matthias.rechenburg@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-05-27 11:54:34 +00:00

31 lines
11 KiB
HTML

<a name="EN-US_TOPIC_0000001707107473"></a><a name="EN-US_TOPIC_0000001707107473"></a>
<h1 class="topictitle1">Managing Roles</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_section15374815011"><h4 class="sectiontitle">Creating a Role</h4><ol id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_en-us_topic_0000001098976722_ol68915820275"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li1316155620562"><span>Log in to the GaussDB(DWS) console. In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b1867318471395">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001707107473__b1767444711919">Dedicated Clusters</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li197770975716"><span>In the cluster list, click the name of the target cluster. The <span class="parmname" id="EN-US_TOPIC_0000001707107473__parmname316614485198"><b>Cluster Information</b></span> page is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_en-us_topic_0000001098976722_li1227291172718"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b6612184814199">User Management</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li19216200101419"><span>Click the <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b45924018210">Roles</strong> tab and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b7860164517218">Create Role</strong>. The role creation page is displayed.</span><p><p id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_p1978219384367"><span><img id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_image713493923611" src="figure/en-us_image_0000001759419545.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li195441210175213"><span>Complete the role information, confirm the information, and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b584516127231">Next</strong>.</span><p><ul id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_ul9886216115218"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li0886216195211"><strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b1994161518238">Role Name</strong>: A username must start with a letter and can contain letters, numbers, and underscores (_). The length cannot exceed 63 characters.</li><li id="EN-US_TOPIC_0000001707107473__li4742125123715"><strong id="EN-US_TOPIC_0000001707107473__b967475013912">Expires</strong>: Set the expiration time of the role permission.</li><li id="EN-US_TOPIC_0000001707107473__li6380130133719"><strong id="EN-US_TOPIC_0000001707107473__b19851115213914">System Administrator</strong>: Whether the role has the system administrator rights.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li14886201611521"><strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b16941163573812">Create Database</strong>: Whether the role has the permission to create databases.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li7886416195218"><strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b66121641183817">Create Role</strong>: Whether the role has the permission to create users and roles.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li28866168521"><strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b637984723819">Inherit Permissions</strong>: Whether a role inherits permissions from its group. This function is enabled by default. You are advised to retain this setting.</li></ul>
</p></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li492217111503"><span>Configure the permissions of the role.</span><p><p id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_p1397713105547">Click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b44113380392">Add</strong> to add a permission configuration. Select the database object type and the corresponding objects. Then, select permissions. For details about permission definitions, see "DCL Syntax &gt; GRANT" in <em id="EN-US_TOPIC_0000001707107473__i133482030182318">SQL Syntax Reference</em>.</p>
<p id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_p86961285544"><span><img id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_image9557239161815" src="figure/en-us_image_0000001711660448.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li10948133095616"><span>After the authorization is complete, click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b1366752415445">Create</strong>. The role is created.</span></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_section7443115025318"><h4 class="sectiontitle">Modifying a Role</h4><ol id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_ol178821717722"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li8882417620"><span>Log in to the GaussDB(DWS) console. In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b11658154910110">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001707107473__b19658134981113">Dedicated Clusters</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li13882161716218"><span>In the cluster list, click the name of the target cluster. The <span class="parmname" id="EN-US_TOPIC_0000001707107473__parmname1878209061"><b>Cluster Information</b></span> page is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li98828171727"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b370310811">User Management</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li988219171120"><span>In the role list, select a user and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b1622105115814">Modify</strong>. The page for modifying role details is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li15775214135410"><span>Modify the role information, confirm the information, and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b733774216580">Next</strong>.</span><p><ul id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_ul11496351115417"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li54969514547"><strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b17467151717383">Role Name</strong>: A username must start with a letter and can contain letters, numbers, and underscores (_). The length cannot exceed 63 characters.</li><li id="EN-US_TOPIC_0000001707107473__li189835914307"><strong id="EN-US_TOPIC_0000001707107473__b2065095061116">Expires</strong>: Set the expiration time of the role permission.</li><li id="EN-US_TOPIC_0000001707107473__li1198155953013"><strong id="EN-US_TOPIC_0000001707107473__b11366552181111">System Administrator</strong>: Whether the role has the system administrator rights.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li44961651135410"><strong id="EN-US_TOPIC_0000001707107473__b1491021316">Create Database</strong>: Whether the role has the permission to create databases.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li1049615514541"><strong id="EN-US_TOPIC_0000001707107473__b139155434">Create Role</strong>: Whether the role has the permission to create users and roles.</li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li549615510547"><strong id="EN-US_TOPIC_0000001707107473__b798719913">Inherit Permissions</strong>: Whether a role inherits the permissions from its group. This function is enabled by default. You are advised to retain this setting.</li></ul>
</p></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li138827179212"><span>Add or remove permissions as required.</span><p><p id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_p1288218171214"><span><img id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_image87641156699" src="figure/en-us_image_0000001711660452.png" title="Click to enlarge" class="imgResize"></span></p>
</p></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li128839171222"><span>Confirm the permissions. Click lick <strong id="EN-US_TOPIC_0000001707107473__b6832195015252">Save</strong>.</span></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_section39211459105512"><h4 class="sectiontitle">Deleting a Role</h4><ol id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_ol147794514105"><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li107720450106"><span>Log in to the GaussDB(DWS) console. In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b141551455191118">Clusters</strong> &gt; <strong id="EN-US_TOPIC_0000001707107473__b41552055111116">Dedicated Clusters</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li13777453102"><span>In the cluster list, click the name of the target cluster. The <span class="parmname" id="EN-US_TOPIC_0000001707107473__parmname428390312"><b>Cluster Information</b></span> page is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li27714520104"><span>In the navigation pane, choose <strong id="EN-US_TOPIC_0000001707107473__b1529795354">User Management</strong>.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li1277154514108"><span>Select a role from the role list and click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b38745531311">Delete</strong>. A confirmation dialog box is displayed.</span></li><li id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_li8773457107"><span>Click <strong id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_b12721779213">OK</strong> to delete the role.</span><p><div class="note" id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_note18960102835617"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001707107473__en-us_topic_0000001662597517_p18848185510562">If the role has dependencies, such as database objects, that have not been deleted, the role will fail to be deleted.</p>
</div></div>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_01_01112.html">Database User Management</a></div>
</div>
</div>
<script language="JavaScript">
<!--
image_size('.imgResize');
var msg_imageMax = "view original image";
var msg_imageClose = "close";
//--></script>