forked from docs/doc-exports
Reviewed-by: Belejkanic, Lukas <lukas.belejkanic@t-systems.com> Co-authored-by: Li, Qiao <qiaoli@huawei.com> Co-committed-by: Li, Qiao <qiaoli@huawei.com>
169 lines
16 KiB
HTML
169 lines
16 KiB
HTML
<a name="kms_02_0021"></a><a name="kms_02_0021"></a>
|
|
|
|
<h1 class="topictitle1">Creating a Plaintext-Free DEK</h1>
|
|
<div id="body1474684560501"><div class="section" id="kms_02_0021__en-us_topic_0112992350_s1731a14fb0144c79bf0fa90c694f34f7"><h4 class="sectiontitle">Function</h4><p id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0020091565_p23115188">This API allows you to create a plaintext-free DEK, that is, the returned result of this API includes only the ciphertext of the DEK.</p>
|
|
<div class="note" id="kms_02_0021__en-us_topic_0112992350_note1992310206441"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="kms_02_0021__en-us_topic_0112992350_p571614611294">By default, the performance threshold for creating plaintext-free DEKs is 1000 TPS per customer. To apply for higher performance, submit a service ticket.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="kms_02_0021__en-us_topic_0112992350_se70c3e5518a04f60b06032524dddfef4"><h4 class="sectiontitle">URI</h4><ul id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0020091565_ul60390938"><li id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0020091565_li6647531">URI format<p id="kms_02_0021__en-us_topic_0112992350_p138073181080"><a name="kms_02_0021__en-us_topic_0112992350_en-us_topic_0020091565_li6647531"></a><a name="en-us_topic_0112992350_en-us_topic_0020091565_li6647531"></a>POST /v1.0/{project_id}/kms/create-datakey-without-plaintext</p>
|
|
</li><li id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0020091565_li14211994">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0021__en-us_topic_0112992350_t982da1e0196d4ec1a28d1fbff2cc8191" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="kms_02_0021__en-us_topic_0112992350_r6e963322c1e740d181726d2f0e91df5a"><th align="left" class="cellrowborder" valign="top" width="22.74%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="kms_02_0021__en-us_topic_0112992350_a3b5bbe5a7f644fd3a74cecbfb3f7ed60"><strong id="kms_02_0021__en-us_topic_0112992350_b842352706184314">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21.62%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="kms_02_0021__en-us_topic_0112992350_ad98d2f62bd064b4e96ea922645197c24"><strong id="kms_02_0021__en-us_topic_0112992350_b842352706184318">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.29%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="kms_02_0021__en-us_topic_0112992350_a3becf0b3aec9468984c2efc8d5abbea5">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="38.35%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="kms_02_0021__en-us_topic_0112992350_a6bb6f1fe56a2454982832e8d56d354d8">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="kms_02_0021__en-us_topic_0112992350_r69bf37b65d3f446eab7b3f4d1b2fcec0"><td class="cellrowborder" valign="top" width="22.74%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="kms_02_0021__en-us_topic_0112992350_ae42d73592f58424ea93a11e52d2478dd">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.62%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="kms_02_0021__en-us_topic_0112992350_a56440c0f0ae34ba3b8033d1247673984">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.29%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="kms_02_0021__en-us_topic_0112992350_a1a4a71c11a4a45a58d0de2fbe009e9d9">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="38.35%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="kms_02_0021__en-us_topic_0112992350_a1314869d2dc147b38461e037d622f7b4">Project ID</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="kms_02_0021__en-us_topic_0112992350_seb7b7901701247fab30a59b76f1c7f93"><h4 class="sectiontitle">Requests</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0021__en-us_topic_0112992350_table46221022101230" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="kms_02_0021__en-us_topic_0112992350_row9315574101230"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.2.2.5.1.1"><p id="kms_02_0021__en-us_topic_0112992350_p16364058101230"><strong id="kms_02_0021__en-us_topic_0112992350_b704323491">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.3.2.2.5.1.2"><p id="kms_02_0021__en-us_topic_0112992350_p57514295101230"><strong id="kms_02_0021__en-us_topic_0112992350_b842352706184358">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.2.2.5.1.3"><p id="kms_02_0021__en-us_topic_0112992350_p50420322101230"><strong id="kms_02_0021__en-us_topic_0112992350_b842352706184352">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.2.5.1.4"><p id="kms_02_0021__en-us_topic_0112992350_p28146304101230">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="kms_02_0021__en-us_topic_0112992350_row57603225101653"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0021__en-us_topic_0112992350_p55471763113244">key_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0021__en-us_topic_0112992350_p18869429113244">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0021__en-us_topic_0112992350_p64027801113244">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0021__en-us_topic_0112992350_p6776450172517">36-byte ID of a CMK that matches the regular expression <span class="parmvalue" id="kms_02_0021__en-us_topic_0112992350_parmvalue80435593163333"><b>^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$</b></span></p>
|
|
<p id="kms_02_0021__en-us_topic_0112992350_p52028748113244">Example: 0d0466b0-e727-4d9c-b35d-f84bb474a37f</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="kms_02_0021__en-us_topic_0112992350_row53999113153132"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0021__en-us_topic_0112992350_p9591275153136">encryption_context</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0021__en-us_topic_0112992350_p47351257153136">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0021__en-us_topic_0112992350_p38695790153136">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0021__en-us_topic_0112992350_p299262517255">Key-value pairs with a maximum length of 8192 characters. This parameter is used to record resource context information, excluding sensitive information, to ensure data integrity.</p>
|
|
<p id="kms_02_0021__en-us_topic_0112992350_p87033116108">If this parameter is specified during encryption, it is also required for decryption.</p>
|
|
<p id="kms_02_0021__en-us_topic_0112992350_p10246613153136">Example: {"<strong id="kms_02_0021__en-us_topic_0112992350_b8936184531217">Key1</strong>":"<strong id="kms_02_0021__en-us_topic_0112992350_b15936845191217">Value1</strong>","<strong id="kms_02_0021__en-us_topic_0112992350_b1593624510129">Key2</strong>":"<strong id="kms_02_0021__en-us_topic_0112992350_b159369454123">Value2</strong>"}</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="kms_02_0021__en-us_topic_0112992350_row2638193101722"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0021__en-us_topic_0112992350_p42501708113254">datakey_length</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0021__en-us_topic_0112992350_p69681116403">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0021__en-us_topic_0112992350_p20086330113254">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0021__en-us_topic_0112992350_p2049671819407">Number of bits of a key. The value is <strong id="kms_02_0021__en-us_topic_0112992350_b1162913122017">512</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="kms_02_0021__en-us_topic_0112992350_row35142504101726"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0021__en-us_topic_0112992350_p269135101746">sequence</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0021__en-us_topic_0112992350_p20967256101746">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0021__en-us_topic_0112992350_p21799971101746">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0021__en-us_topic_0112992350_p2925745172531">36-byte serial number of a request message</p>
|
|
<p id="kms_02_0021__en-us_topic_0112992350_p20626198101746">Example: 919c82d4-8046-4722-9094-35c3c6524cff</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="kms_02_0021__en-us_topic_0112992350_sfadd53a5f4714e8f87811818d62d0296"><h4 class="sectiontitle">Responses</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0021__en-us_topic_0112992350_t98d238e10953421e84a073707024c329" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="kms_02_0021__en-us_topic_0112992350_r144a2c52c5054c6d9243eb2ef3875a21"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.2.5.1.1"><p id="kms_02_0021__en-us_topic_0112992350_a9156e0b03f054d4e8547e0787f88a51b"><strong id="kms_02_0021__en-us_topic_0112992350_b716496660">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.4.2.2.5.1.2"><p id="kms_02_0021__en-us_topic_0112992350_a1851157c81e14d7f82db752a5737195a"><strong id="kms_02_0021__en-us_topic_0112992350_b842352706184445">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.2.5.1.3"><p id="kms_02_0021__en-us_topic_0112992350_a39360acf5daf4c01a1ebddeff5d68a1c"><strong id="kms_02_0021__en-us_topic_0112992350_b842352706184441">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.2.2.5.1.4"><p id="kms_02_0021__en-us_topic_0112992350_a0097000016b14857972b7929bcaaa038">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="kms_02_0021__en-us_topic_0112992350_r3c4af7b36e9240d197ab56255e37b83c"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.2.5.1.1 "><p id="kms_02_0021__en-us_topic_0112992350_p43705601102713">key_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.2.5.1.2 "><p id="kms_02_0021__en-us_topic_0112992350_p63384753102713">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.2.5.1.3 "><p id="kms_02_0021__en-us_topic_0112992350_p50492797102713">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.5.1.4 "><p id="kms_02_0021__en-us_topic_0112992350_p33891398102713">CMK ID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="kms_02_0021__en-us_topic_0112992350_rf212a916c502452a8e151eba2f118272"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.2.5.1.1 "><p id="kms_02_0021__en-us_topic_0112992350_p19123943113423">cipher_text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.2.5.1.2 "><p id="kms_02_0021__en-us_topic_0112992350_p45726807113423">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.2.5.1.3 "><p id="kms_02_0021__en-us_topic_0112992350_p5535555113423">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.5.1.4 "><p id="kms_02_0021__en-us_topic_0112992350_p12883916113423">The ciphertext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="kms_02_0021__en-us_topic_0112992350_section6461153813349"><h4 class="sectiontitle">Examples</h4><p id="kms_02_0021__en-us_topic_0112992350_p81221417113719">The following example describes how to create a plaintext free DEK whose ID is <span class="parmvalue" id="kms_02_0021__en-us_topic_0112992350_parmvalue19739413241729"><b>0d0466b0-e727-4d9c-b35d-f84bb474a37f</b></span>.</p>
|
|
<ul id="kms_02_0021__en-us_topic_0112992350_ul34785388340"><li id="kms_02_0021__en-us_topic_0112992350_li1747883863419">Example request<pre class="screen" id="kms_02_0021__en-us_topic_0112992350_screen16478538113420">{
|
|
"key_id": "0d0466b0-e727-4d9c-b35d-f84bb474a37f",
|
|
"datakey_length": "512"
|
|
}</pre>
|
|
</li><li id="kms_02_0021__en-us_topic_0112992350_li154789389346">Example response<pre class="screen" id="kms_02_0021__en-us_topic_0112992350_screen7478538163410">{
|
|
"key_id": "0d0466b0-e727-4d9c-b35d-f84bb474a37f",
|
|
"cipher_text": "020098005CDC28E29EC3230AA42E8985FBABA095037D6474C64519C9B564AB28B15739C88E7E887500D1094973C2DC16353DB7ED3946C73339517AB1E983D521F9E9D700DC5D9C42F557EBF3F608E3CBBEE0BC68136EE7D2A49117E00332BAC4AE4ED805EB6068FA900C5A8019BFE2C2651BE3E130643034363662302D653732372D346439632D623335642D66383462623437346133376600000000F160727EBDB83400C21D80D713B49D3A2C37F24AE160E7BB3DAC025ADC0C45E3"
|
|
}</pre>
|
|
<p id="kms_02_0021__en-us_topic_0112992350_p1247813813419">or</p>
|
|
<pre class="screen" id="kms_02_0021__en-us_topic_0112992350_screen144781538193415">{
|
|
"error": {
|
|
"error_code": "KMS.XXXX",
|
|
"error_msg": "XXX"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="kms_02_0021__en-us_topic_0112992350_section3454223421"><h4 class="sectiontitle">Status Codes</h4><div class="p" id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_en-us_topic_0079615001_p17772351"><a href="#kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_en-us_topic_0079615001_table20596071">Table 4</a> lists the normal status code returned by the response.
|
|
<div class="tablenoborder"><a name="kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_en-us_topic_0079615001_table20596071"></a><a name="en-us_topic_0112992350_en-us_topic_0112992294_en-us_topic_0079615001_table20596071"></a><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_en-us_topic_0079615001_table20596071" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status codes</caption><thead align="left"><tr id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_en-us_topic_0079615001_row9746163"><th align="left" class="cellrowborder" valign="top" width="16.16%" id="mcps1.3.6.2.2.2.4.1.1"><p id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_p57545694203043">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="28.28%" id="mcps1.3.6.2.2.2.4.1.2"><p id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_p4531342288">Status</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="55.559999999999995%" id="mcps1.3.6.2.2.2.4.1.3"><p id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_p30689603203043">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_en-us_topic_0079615001_row48621261"><td class="cellrowborder" valign="top" width="16.16%" headers="mcps1.3.6.2.2.2.4.1.1 "><p id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_en-us_topic_0079615001_p46008046">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.28%" headers="mcps1.3.6.2.2.2.4.1.2 "><p id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_p7538425819">OK</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.6.2.2.2.4.1.3 "><p id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_p1885682315512">Request processed successfully.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="kms_02_0021__en-us_topic_0112992350_en-us_topic_0112992294_p5626181018551">Exception status code. For details, see <a href="kms_02_0301.html#kms_02_0301">Status Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="kms_02_0011.html">CMK Management</a></div>
|
|
</div>
|
|
</div>
|
|
|