Yang, Tong 48706b7552 MRS COMP-LTS 320-lts.1 version
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2024-04-12 12:51:10 +00:00

172 lines
14 KiB
HTML

<a name="mrs_01_24141"></a><a name="mrs_01_24141"></a>
<h1 class="topictitle1">IoTDB Permissions</h1>
<div id="body0000001532471624"><p id="mrs_01_24141__p7921115518117">MRS supports users, user groups, and roles. Permissions must be assigned to roles and then roles are bound to users or user groups. Users can obtain permissions only by binding a role or joining a group that is bound with a role.</p>
<div class="note" id="mrs_01_24141__n1083e3c0434445e6b5cd57c277846d0e"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_24141__p154093368443">In security mode, you need to manage IoTDB permissions and add the created user to the <strong id="mrs_01_24141__b1985412401433">iotdbgroup</strong> user group. In normal mode, IoTDB permission management is not required.</p>
</div></div>
<div class="section" id="mrs_01_24141__sc05acac1f1354709b365dfc191d0af4b"><h4 class="sectiontitle">IoTDB Permission List</h4><p id="mrs_01_24141__p93296347512">The <strong id="mrs_01_24141__b103737168322">Name</strong> column in <a href="#mrs_01_24141__table1392557124016">Table 1</a> lists the permissions supported by open-source IoTDB. If an MRS user needs to use corresponding permissions to perform operations, grant the permissions to the user on Manager by referring to the <strong id="mrs_01_24141__b18831124133317">Required Permission</strong> column. For details, see <a href="mrs_01_24142.html">Creating an IoTDB Role</a>.</p>
<div class="tablenoborder"><a name="mrs_01_24141__table1392557124016"></a><a name="table1392557124016"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_24141__table1392557124016" frame="border" border="1" rules="all"><caption><b>Table 1 </b>IoTDB permissions</caption><thead align="left"><tr id="mrs_01_24141__row239313578402"><th align="left" class="cellrowborder" valign="top" width="25.71%" id="mcps1.3.3.3.2.5.1.1"><p id="mrs_01_24141__p14496336443">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.98%" id="mcps1.3.3.3.2.5.1.2"><p id="mrs_01_24141__p820102283917">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.200000000000001%" id="mcps1.3.3.3.2.5.1.3"><p id="mrs_01_24141__p7496735448">Required Permission</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.11%" id="mcps1.3.3.3.2.5.1.4"><p id="mrs_01_24141__p19559192983512">Example</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_24141__row1739335717401"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p5496163204416">SET_STORAGE_GROUP</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p16202202213397">Used for creating a storage group, including setting permissions for the storage group and setting or canceling its time to live (TTL).</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p12496331441">Set StorageGroup</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p14358194015378">Example 1: set storage group to root.ln;</p>
<p id="mrs_01_24141__p202166288457">Example 2: set ttl to root.ln 3600000;</p>
<p id="mrs_01_24141__p1255917298350">Example 3: unset ttl to root.ln;</p>
</td>
</tr>
<tr id="mrs_01_24141__row59921752104317"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p5496183164412">CREATE_TIMESERIES</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p18202102273917">Used for creating a time series.</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p15496113114413">Create</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p19832124111461">Example 1: Creating a time series</p>
<p id="mrs_01_24141__p11426174684612">create timeseries root.ln.wf02.status with datatype=BOOLEAN,encoding=PLAIN;</p>
<p id="mrs_01_24141__p167355483467">Example 2: Creating an aligned time series</p>
<p id="mrs_01_24141__p195591929113517">create aligned timeseries root.ln.device1(latitude FLOAT encoding=PLAIN compressor=SNAPPY, longitude FLOAT encoding=PLAIN compressor=SNAPPY);</p>
</td>
</tr>
<tr id="mrs_01_24141__row165398559434"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p549613319448">INSERT_TIMESERIES</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p14202122219392">Used for inserting data.</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p14496236442">Write</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p2065215137477">Example 1: insert into root.ln.wf02(timestamp,status) values(1,true);</p>
<p id="mrs_01_24141__p9559182993511">Example 2: insert into root.sg1.d1(time, s1, s2) aligned values(1, 1, 1);</p>
</td>
</tr>
<tr id="mrs_01_24141__row686591320578"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p1586691319571">ALTER_TIMESERIES</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p18202142214396">Used for modifying a time series, and adding attributes and tags.</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p3866161365715">Alter</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p567572614719">Example 1: alter timeseries root.turbine.d1.s1 ADD TAGS tag3=v3, tag4=v4;</p>
<p id="mrs_01_24141__p2559162919355">Example 2: ALTER timeseries root.turbine.d1.s1 UPSERT ALIAS=newAlias TAGS(tag2=newV2, tag3=v3) ATTRIBUTES(attr3=v3, attr4=v4);</p>
</td>
</tr>
<tr id="mrs_01_24141__row1255834310"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p144965317448">READ_TIMESERIES</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p102022223393">Used for querying data.</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p134968364413">Read</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p107421216184811">Example 1: show storage group;</p>
<p id="mrs_01_24141__p634502934819">Example 2: show child paths root.ln, show child nodes root.ln;</p>
<p id="mrs_01_24141__p4600183211488">Example 3: show devices;</p>
<p id="mrs_01_24141__p1032316359484">Example 4: show timeseries root.**;</p>
<p id="mrs_01_24141__p445324713488">Example 5: show all ttl;</p>
<p id="mrs_01_24141__p74301251498">Example 6: Querying data</p>
<p id="mrs_01_24141__p20411929124920">select * from root.ln.**;</p>
<p id="mrs_01_24141__p1923395575010">Example 7: Querying performance tracing</p>
<p id="mrs_01_24141__p1110245035018">tracing select * from root.**;</p>
<p id="mrs_01_24141__p275525316506">Example 8: Querying the UDF</p>
<p id="mrs_01_24141__p44214512517">select example(*) from root.sg.d1;</p>
<p id="mrs_01_24141__p137961914165113">Example 9: Querying statistics</p>
<p id="mrs_01_24141__p355913293358">count devices;</p>
</td>
</tr>
<tr id="mrs_01_24141__row8393195715406"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p1749612315442">DELETE_TIMESERIES</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p152021322153911">Used for deleting data or time series.</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p8496435445">Delete</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p9957195495114">Example 1: Deleting a time series</p>
<p id="mrs_01_24141__p16978165795115">delete timeseries root.ln.wf01.wt01.status;</p>
<p id="mrs_01_24141__p51821513523">Example 2: Deleting data</p>
<p id="mrs_01_24141__p9559829113510">delete from root.ln.wf02.wt02.status where time &lt; 10;</p>
</td>
</tr>
<tr id="mrs_01_24141__row9393135714408"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p4256202175418">DELETE_STORAGE_GROUP</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p320292263913">Used for deleting a storage group.</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p124961831444">IoTDB Admin Privilege</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p35591729203520">Example: delete storage group root.ln;</p>
</td>
</tr>
<tr id="mrs_01_24141__row53511004449"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p8616310135311">CREATE_FUNCTION</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p172021822113918">Used for registering a UDF.</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p8497103144417">IoTDB Admin Privilege</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p555992915358">Example: create function example AS 'org.apache.iotdb.udf.UDTFExample';</p>
</td>
</tr>
<tr id="mrs_01_24141__row74681553131718"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p1468953121716">DROP_FUNCTION</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p144681153121713">Used for deregistering a UDF.</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p184689530175">IoTDB Admin Privilege</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p18559172983516">Example: drop function example;</p>
</td>
</tr>
<tr id="mrs_01_24141__row96523582178"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p11652658141712">UPDATE_TEMPLATE</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p165295812177">Used for creating, deleting, and modifying metadata templates.</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p4652155819171">IoTDB Admin Privilege</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p655942920359">Example 1: create schema template t1(s1 int32);</p>
</td>
</tr>
<tr id="mrs_01_24141__row12210164220546"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p9210124214544">READ_TEMPLATE</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p4210164295411">Used for viewing all metadata templates and metadata template content.</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p162105424544">IoTDB Admin Privilege</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p073020112564">Example 1: show schema templates;</p>
<p id="mrs_01_24141__p13210124285418">Example 2: show nodes in template t1;</p>
</td>
</tr>
<tr id="mrs_01_24141__row712284435414"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p101231644145412">APPLY_TEMPLATE</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p91231344105411">Used for attaching, detaching, and activating a metadata template.</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p7123444205414">IoTDB Admin Privilege</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p1026482111569">Example 1: set schema template t1 to root.sg.d;</p>
<p id="mrs_01_24141__p3123244165412">Example 2: create timeseries of schema template on root.sg.d;</p>
</td>
</tr>
<tr id="mrs_01_24141__row5743134515543"><td class="cellrowborder" valign="top" width="25.71%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_01_24141__p17744174535417">READ_TEMPLATE_APPLICATION</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_01_24141__p47449454547">Used for viewing the path for attaching or activating the metadata template.</p>
</td>
<td class="cellrowborder" valign="top" width="13.200000000000001%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_01_24141__p207441045165414">IoTDB Admin Privilege</p>
</td>
<td class="cellrowborder" valign="top" width="43.11%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_01_24141__p187061032115610">Example 1: show paths set schema template t1;</p>
<p id="mrs_01_24141__p157441845145413">Example 2: show paths using schema template t1;</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24140.html">IoTDB Permission Management</a></div>
</div>
</div>