doc-exports/docs/apig/umn/apig-faq-0003.html
Chen, Junjie 91c429e341 APIG UMN 20230331 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2023-06-01 08:59:08 +00:00

207 lines
24 KiB
HTML

<a name="apig-faq-0003"></a><a name="apig-faq-0003"></a>
<h1 class="topictitle1">Common Errors Related to IAM Authentication Information</h1>
<div id="body8662426"><p id="apig-faq-0003__en-us_topic_0000001128323062_p12801124194819">You may encounter the following errors related to IAM authentication information:</p>
<ul id="apig-faq-0003__en-us_topic_0000001128323062_ul2671816194615"><li id="apig-faq-0003__en-us_topic_0000001128323062_li66801624610"><a href="#apig-faq-0003__en-us_topic_0000001128323062_section18226134155618">Incorrect IAM authentication information: verify aksk signature fail</a></li><li id="apig-faq-0003__en-us_topic_0000001128323062_li11681516144612"><a href="#apig-faq-0003__en-us_topic_0000001128323062_section1869305817620">Incorrect IAM authentication information: AK access failed to reach the limit,forbidden</a></li><li id="apig-faq-0003__en-us_topic_0000001128323062_li106891664618"><a href="#apig-faq-0003__en-us_topic_0000001128323062_section20529131916177">Incorrect IAM authentication information: decrypt token fail</a></li><li id="apig-faq-0003__en-us_topic_0000001128323062_li1568121620464"><a href="#apig-faq-0003__en-us_topic_0000001128323062_section14399016152116">Incorrect IAM authentication information: Get secretKey failed</a></li></ul>
<div class="section" id="apig-faq-0003__en-us_topic_0000001128323062_section18226134155618"><a name="apig-faq-0003__en-us_topic_0000001128323062_section18226134155618"></a><a name="en-us_topic_0000001128323062_section18226134155618"></a><h4 class="sectiontitle">Incorrect IAM authentication information: verify aksk signature fail</h4><pre class="screen" id="apig-faq-0003__en-us_topic_0000001128323062_screen133854284335">{
"error_msg": "<strong id="apig-faq-0003__en-us_topic_0000001128323062_b33521161815">Incorrect IAM authentication information: verify aksk signature fail</strong>, ......
"error_code": "APIG.0301",
"request_id": "******"
}</pre>
</div>
<p id="apig-faq-0003__en-us_topic_0000001128323062_p16987141342"><strong id="apig-faq-0003__en-us_topic_0000001128323062_b3957276358">Possible Cause</strong></p>
<p id="apig-faq-0003__en-us_topic_0000001128323062_p3778103591713">The signature algorithm is incorrect, and the signature calculated by the client is different from that calculated by APIG.</p>
<p id="apig-faq-0003__en-us_topic_0000001128323062_p134205917613"><strong id="apig-faq-0003__en-us_topic_0000001128323062_b1257015422361">Solution</strong></p>
<ol id="apig-faq-0003__en-us_topic_0000001128323062_ol2576932173415"><li id="apig-faq-0003__en-us_topic_0000001128323062_li457620321347"><a name="apig-faq-0003__en-us_topic_0000001128323062_li457620321347"></a><a name="en-us_topic_0000001128323062_li457620321347"></a><span>Obtain the canonicalRequest calculated by APIG.</span><p><div class="p" id="apig-faq-0003__en-us_topic_0000001128323062_p198164913438">Obtain <strong id="apig-faq-0003__en-us_topic_0000001128323062_b18573164013565">request_id</strong> from the body of the error message, search for <strong id="apig-faq-0003__en-us_topic_0000001128323062_b12331810155720">error.log</strong> (you can view this file on CLS) of the shubao node based on <strong id="apig-faq-0003__en-us_topic_0000001128323062_b18759255576">request_id</strong>, and obtain <strong id="apig-faq-0003__en-us_topic_0000001128323062_b1345710195813">canonicalRequest</strong> from <strong id="apig-faq-0003__en-us_topic_0000001128323062_b953421835814">error.log</strong>.<pre class="screen" id="apig-faq-0003__en-us_topic_0000001128323062_screen15307497477">2019/01/26 11:34:27 [error] 1211#0: *76 [lua] responses.lua:170: rewrite(): 473a4370fbaf69e42f9da243eb8f8c52;app-1;Incorrect IAM authentication information: verify signature fail<strong id="apig-faq-0003__en-us_topic_0000001128323062_b941114465294">;</strong>SDK-HMAC-SHA256 Access=071fe245-9cf6-4d75-822d-c29945a1e06a, SignedHeaders=host;x-sdk-date, Signature=b2ef2cddcef89cbfe22974c988909c1a94b1ac54114c30b8fe083d34a259e0f5;<strong id="apig-faq-0003__en-us_topic_0000001128323062_b1860217512134">canonicalRequest:GET</strong>
<strong id="apig-faq-0003__en-us_topic_0000001128323062_b6603356137">/app1/</strong>
<strong id="apig-faq-0003__en-us_topic_0000001128323062_b1460455171316">host:test.com</strong>
<strong id="apig-faq-0003__en-us_topic_0000001128323062_b260613516139">x-sdk-date:20190126T033427Z</strong>
<strong id="apig-faq-0003__en-us_topic_0000001128323062_b1560785171319">host;x-sdk-date</strong>
<strong id="apig-faq-0003__en-us_topic_0000001128323062_b18609135171319">e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,</strong> client: 192.168.0.1, server: shubao, request: "GET /app1 HTTP/1.1", host: "test.com"</pre>
</div>
</p></li><li id="apig-faq-0003__en-us_topic_0000001128323062_li13153173174014"><a name="apig-faq-0003__en-us_topic_0000001128323062_li13153173174014"></a><a name="en-us_topic_0000001128323062_li13153173174014"></a><span>Obtain the canonicalRequest calculated by the client by printing logs or using debug interrupts. The following table describes the functions used to calculate the canonicalRequest in the SDKs of different languages.</span><p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="apig-faq-0003__en-us_topic_0000001128323062_table51921445145117" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Functions for calculating canonicalRequest in the SDKs of common languages</caption><thead align="left"><tr id="apig-faq-0003__en-us_topic_0000001128323062_row1119394512516"><th align="left" class="cellrowborder" valign="top" width="13.38%" id="mcps1.3.7.2.2.1.2.3.1.1"><p id="apig-faq-0003__en-us_topic_0000001128323062_p819314535111">Language</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="86.61999999999999%" id="mcps1.3.7.2.2.1.2.3.1.2"><p id="apig-faq-0003__en-us_topic_0000001128323062_p5193104585117">Function</p>
</th>
</tr>
</thead>
<tbody><tr id="apig-faq-0003__en-us_topic_0000001128323062_row519344535112"><td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.7.2.2.1.2.3.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p13866856195113">Java</p>
</td>
<td class="cellrowborder" valign="top" width="86.61999999999999%" headers="mcps1.3.7.2.2.1.2.3.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p48663567517">Sign function in com.cloud.sdk.auth.signer.DefaultSigner.class of <strong id="apig-faq-0003__en-us_topic_0000001128323062_b1640174410596">libs/java-sdk-core-*.jar</strong></p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row175414496513"><td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.7.2.2.1.2.3.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p1586612561517">C</p>
</td>
<td class="cellrowborder" valign="top" width="86.61999999999999%" headers="mcps1.3.7.2.2.1.2.3.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p086615561512">sig_sign function in <strong id="apig-faq-0003__en-us_topic_0000001128323062_b154381754125919">signer.c</strong></p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row9193114514512"><td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.7.2.2.1.2.3.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p7866155615518">C++</p>
</td>
<td class="cellrowborder" valign="top" width="86.61999999999999%" headers="mcps1.3.7.2.2.1.2.3.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p8867125613517">Signer::createSignature function in <strong id="apig-faq-0003__en-us_topic_0000001128323062_b146905812591">signer.cpp</strong>.</p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row101936452510"><td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.7.2.2.1.2.3.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p286765619513">C#</p>
</td>
<td class="cellrowborder" valign="top" width="86.61999999999999%" headers="mcps1.3.7.2.2.1.2.3.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p086735625117">Sign function in <strong id="apig-faq-0003__en-us_topic_0000001128323062_b15787185995919">signer.cs</strong></p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row71931345185119"><td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.7.2.2.1.2.3.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p3867195613519">Go</p>
</td>
<td class="cellrowborder" valign="top" width="86.61999999999999%" headers="mcps1.3.7.2.2.1.2.3.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p18867135611515">Sign function in <strong id="apig-faq-0003__en-us_topic_0000001128323062_b117441019019">signer.go</strong></p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row1194345175116"><td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.7.2.2.1.2.3.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p128674568513">JavaScript</p>
</td>
<td class="cellrowborder" valign="top" width="86.61999999999999%" headers="mcps1.3.7.2.2.1.2.3.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p14867256115112">Signer.prototype.Sign function in <strong id="apig-faq-0003__en-us_topic_0000001128323062_b2212151605">signer.js</strong></p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row20194124516517"><td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.7.2.2.1.2.3.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p12867165685117">Python</p>
</td>
<td class="cellrowborder" valign="top" width="86.61999999999999%" headers="mcps1.3.7.2.2.1.2.3.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p18867156165118">Sign function in <strong id="apig-faq-0003__en-us_topic_0000001128323062_b118978201">signer.py</strong></p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row11194154545111"><td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.7.2.2.1.2.3.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p188678561514">PHP</p>
</td>
<td class="cellrowborder" valign="top" width="86.61999999999999%" headers="mcps1.3.7.2.2.1.2.3.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p1586745616513">Sign function in <strong id="apig-faq-0003__en-us_topic_0000001128323062_b164282010705">signer.php</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="apig-faq-0003__en-us_topic_0000001128323062_p132916615615">Example: cannonicalRequest obtained at a debug interrupt</p>
<pre class="screen" id="apig-faq-0003__en-us_topic_0000001128323062_screen11585183433211">POST
/app1/
host:test.com
x-sdk-date:20190126T033950Z
host;x-sdk-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</pre>
</p></li><li id="apig-faq-0003__en-us_topic_0000001128323062_li451361464316"><span>Check whether the cannonicalRequest in <a href="#apig-faq-0003__en-us_topic_0000001128323062_li457620321347">1</a> is the same as that in <a href="#apig-faq-0003__en-us_topic_0000001128323062_li13153173174014">2</a>.</span><p><ul id="apig-faq-0003__en-us_topic_0000001128323062_ul62751576515"><li id="apig-faq-0003__en-us_topic_0000001128323062_li52751571859">Yes: Check whether the AK and SK are correct, for example, without spaces.</li><li id="apig-faq-0003__en-us_topic_0000001128323062_li7275165711516">No:<ul id="apig-faq-0003__en-us_topic_0000001128323062_ul57171297918"><li id="apig-faq-0003__en-us_topic_0000001128323062_li290202310911">Different in line 1: The request method must be the same.</li><li id="apig-faq-0003__en-us_topic_0000001128323062_li390210236912">Different in line 2: The request path must be the same.</li><li id="apig-faq-0003__en-us_topic_0000001128323062_li179023231797">Different in line 3: The request parameters must be the same.</li><li id="apig-faq-0003__en-us_topic_0000001128323062_li199022023693">Different in lines 4 to 5: The request header must be the same in each line.</li><li id="apig-faq-0003__en-us_topic_0000001128323062_li69022231393">Different in line 7: The number of request header parameters must be the same as the number of request header lines.</li><li id="apig-faq-0003__en-us_topic_0000001128323062_li1790212231096">Different in line 8: The request body must be the same.</li></ul>
</li></ul>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="apig-faq-0003__en-us_topic_0000001128323062_table1628925017515" frame="border" border="1" rules="all"><caption><b>Table 2 </b>canonicalRequest of APIG and a client</caption><thead align="left"><tr id="apig-faq-0003__en-us_topic_0000001128323062_row328612504516"><th align="left" class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.3.7.3.2.2.2.5.1.1"><p id="apig-faq-0003__en-us_topic_0000001128323062_p1696194151014">Line No.</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.97%" id="mcps1.3.7.3.2.2.2.5.1.2"><p id="apig-faq-0003__en-us_topic_0000001128323062_p82853502510">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="29.48%" id="mcps1.3.7.3.2.2.2.5.1.3"><p id="apig-faq-0003__en-us_topic_0000001128323062_p22865501052">APIG</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38.03%" id="mcps1.3.7.3.2.2.2.5.1.4"><p id="apig-faq-0003__en-us_topic_0000001128323062_p9286185017511">Client</p>
</th>
</tr>
</thead>
<tbody><tr id="apig-faq-0003__en-us_topic_0000001128323062_row728615016516"><td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.3.2.2.2.5.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p896124181020">1</p>
</td>
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.7.3.2.2.2.5.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p19286155015515">Request method</p>
</td>
<td class="cellrowborder" valign="top" width="29.48%" headers="mcps1.3.7.3.2.2.2.5.1.3 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p928665011512">GET</p>
</td>
<td class="cellrowborder" valign="top" width="38.03%" headers="mcps1.3.7.3.2.2.2.5.1.4 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p928645019517">POST</p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row828617506511"><td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.3.2.2.2.5.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p1396164131011">2</p>
</td>
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.7.3.2.2.2.5.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p1328615501955">Request path</p>
</td>
<td class="cellrowborder" valign="top" width="29.48%" headers="mcps1.3.7.3.2.2.2.5.1.3 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p1328695015513">/app1/</p>
</td>
<td class="cellrowborder" valign="top" width="38.03%" headers="mcps1.3.7.3.2.2.2.5.1.4 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p828619501151">/app1/</p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row1287175010516"><td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.3.2.2.2.5.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p1196194116109">3</p>
</td>
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.7.3.2.2.2.5.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p12286050359">Request parameters</p>
</td>
<td class="cellrowborder" valign="top" width="29.48%" headers="mcps1.3.7.3.2.2.2.5.1.3 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p2287250959">None</p>
</td>
<td class="cellrowborder" valign="top" width="38.03%" headers="mcps1.3.7.3.2.2.2.5.1.4 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p928716501655">None</p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row1028765018517"><td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.3.2.2.2.5.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p79694171020">4</p>
</td>
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.7.3.2.2.2.5.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p14287135013516">Request header</p>
</td>
<td class="cellrowborder" valign="top" width="29.48%" headers="mcps1.3.7.3.2.2.2.5.1.3 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p1428755016510">host:test.com</p>
</td>
<td class="cellrowborder" valign="top" width="38.03%" headers="mcps1.3.7.3.2.2.2.5.1.4 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p428711504514">host:test.com</p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row202885507513"><td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.3.2.2.2.5.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p1496641181015">5</p>
</td>
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.7.3.2.2.2.5.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p4287175016516">Request header</p>
</td>
<td class="cellrowborder" valign="top" width="29.48%" headers="mcps1.3.7.3.2.2.2.5.1.3 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p17287150853">x-sdk-date:20190126T033427Z</p>
</td>
<td class="cellrowborder" valign="top" width="38.03%" headers="mcps1.3.7.3.2.2.2.5.1.4 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p2287125013515">x-sdk-date:20190126T033950Z</p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row32351811120"><td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.3.2.2.2.5.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p923619819118">6</p>
</td>
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.7.3.2.2.2.5.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p923610821110">Blank line</p>
</td>
<td class="cellrowborder" valign="top" width="29.48%" headers="mcps1.3.7.3.2.2.2.5.1.3 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p152363821113">-</p>
</td>
<td class="cellrowborder" valign="top" width="38.03%" headers="mcps1.3.7.3.2.2.2.5.1.4 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p92362819115">-</p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row92882501557"><td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.3.2.2.2.5.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p139774141012">7</p>
</td>
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.7.3.2.2.2.5.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p928811501754">Request header parameters</p>
</td>
<td class="cellrowborder" valign="top" width="29.48%" headers="mcps1.3.7.3.2.2.2.5.1.3 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p112881050456">host;x-sdk-date</p>
</td>
<td class="cellrowborder" valign="top" width="38.03%" headers="mcps1.3.7.3.2.2.2.5.1.4 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p172881509511">host;x-sdk-date</p>
</td>
</tr>
<tr id="apig-faq-0003__en-us_topic_0000001128323062_row152898505511"><td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.3.2.2.2.5.1.1 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p697124113109">8</p>
</td>
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.7.3.2.2.2.5.1.2 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p1828817501759">Request body hash value</p>
</td>
<td class="cellrowborder" valign="top" width="29.48%" headers="mcps1.3.7.3.2.2.2.5.1.3 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p52884509510">e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</p>
</td>
<td class="cellrowborder" valign="top" width="38.03%" headers="mcps1.3.7.3.2.2.2.5.1.4 "><p id="apig-faq-0003__en-us_topic_0000001128323062_p132885502519">e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li></ol>
<div class="section" id="apig-faq-0003__en-us_topic_0000001128323062_section1869305817620"><a name="apig-faq-0003__en-us_topic_0000001128323062_section1869305817620"></a><a name="en-us_topic_0000001128323062_section1869305817620"></a><h4 class="sectiontitle">Incorrect IAM authentication information: AK access failed to reach the limit,forbidden</h4><pre class="screen" id="apig-faq-0003__en-us_topic_0000001128323062_screen166931558961">{
"error_msg":<strong id="apig-faq-0003__en-us_topic_0000001128323062_b1016625613820"> "</strong><strong id="apig-faq-0003__en-us_topic_0000001128323062_b126931558966">Incorrect IAM authentication information: AK access failed to reach the limit,forbidden."</strong> ......
"error_code": "APIG.0301",
"request_id": "******"
}</pre>
</div>
<p id="apig-faq-0003__en-us_topic_0000001128323062_p14740122619368"><strong id="apig-faq-0003__en-us_topic_0000001128323062_b99047104429">Possible Causes</strong></p>
<ul id="apig-faq-0003__en-us_topic_0000001128323062_ul452611103165"><li id="apig-faq-0003__en-us_topic_0000001128323062_li13526171061618">The AK/SK signature calculation is incorrect. Resolve the problem by referring to <a href="#apig-faq-0003__en-us_topic_0000001128323062_section18226134155618">Incorrect IAM authentication information: verify aksk signature fail</a>.</li><li id="apig-faq-0003__en-us_topic_0000001128323062_li1452611021615">The AK and SK do not match.</li><li id="apig-faq-0003__en-us_topic_0000001128323062_li1052611106165">AK/SK authentication fails for more than five consecutive times, and the AK/SK pair is locked for five minutes. (Authentication requests are rejected within this period).</li><li id="apig-faq-0003__en-us_topic_0000001128323062_li25261510101616">An expired token is used for token authentication.</li></ul>
<div class="section" id="apig-faq-0003__en-us_topic_0000001128323062_section20529131916177"><a name="apig-faq-0003__en-us_topic_0000001128323062_section20529131916177"></a><a name="en-us_topic_0000001128323062_section20529131916177"></a><h4 class="sectiontitle">Incorrect IAM authentication information: decrypt token fail</h4><pre class="screen" id="apig-faq-0003__en-us_topic_0000001128323062_screen1668825418177">{
"error_msg": <strong id="apig-faq-0003__en-us_topic_0000001128323062_b83371612181813">"Incorrect IAM authentication information: decrypt token fail"</strong>,
"error_code": "APIG.0301",
"request_id": "******"
}</pre>
<p id="apig-faq-0003__en-us_topic_0000001128323062_p82414520181"><strong id="apig-faq-0003__en-us_topic_0000001128323062_b7299113414915">Possible Cause</strong></p>
<p id="apig-faq-0003__en-us_topic_0000001128323062_p154263526187">The token cannot be parsed for IAM authentication of the API.</p>
<p id="apig-faq-0003__en-us_topic_0000001128323062_p412784271914"><strong id="apig-faq-0003__en-us_topic_0000001128323062_b2059362575115">Solution</strong></p>
<ul id="apig-faq-0003__en-us_topic_0000001128323062_ul117961578447"><li id="apig-faq-0003__en-us_topic_0000001128323062_li1479610572442">Check whether the token is correct.</li><li id="apig-faq-0003__en-us_topic_0000001128323062_li19796757204414">Check whether the token has been obtained in the environment where the API is called.</li></ul>
</div>
<div class="section" id="apig-faq-0003__en-us_topic_0000001128323062_section14399016152116"><a name="apig-faq-0003__en-us_topic_0000001128323062_section14399016152116"></a><a name="en-us_topic_0000001128323062_section14399016152116"></a><h4 class="sectiontitle">Incorrect IAM authentication information: Get secretKey failed</h4><pre class="screen" id="apig-faq-0003__en-us_topic_0000001128323062_screen349514401217">{
"error_msg": "<strong id="apig-faq-0003__en-us_topic_0000001128323062_b172081820152314">Incorrect IAM authentication information: Get secretKey failed</strong>,ak:******,err:ak not exist",
"error_code": "APIG.0301",
"request_id": "******"
}</pre>
<p id="apig-faq-0003__en-us_topic_0000001128323062_p143774619215"><strong id="apig-faq-0003__en-us_topic_0000001128323062_b887810432524">Possible Cause</strong></p>
<p id="apig-faq-0003__en-us_topic_0000001128323062_p5632114672111">The AK used for IAM authentication of the API does not exist.</p>
<p id="apig-faq-0003__en-us_topic_0000001128323062_p72151838142220"><strong id="apig-faq-0003__en-us_topic_0000001128323062_b5624171716539">Solution</strong></p>
<p id="apig-faq-0003__en-us_topic_0000001128323062_p543541616456">Check whether the AK is correct.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="apig-faq-auth.html">API Authentication</a></div>
</div>
</div>