You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/02 06:24:23 UTC

[GitHub] [apisix] caixiaomao opened a new pull request #4969: doc:update hmac-auth.md

caixiaomao opened a new pull request #4969:
URL: https://github.com/apache/apisix/pull/4969


   增加 hmac-auth 插件拼装签名串的注意事项
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] caixiaomao commented on a change in pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
caixiaomao commented on a change in pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#discussion_r700912980



##########
File path: docs/zh/latest/plugins/hmac-auth.md
##########
@@ -155,7 +155,7 @@ x-custom-a:test
 "
 ```
 
-注意:最后一个请求头也需要 + `\n`。
+注意:最后一个请求头也需要 + `\n`。如果 signing_string 中的某一项不存在,也需要使用一个空字符串代替。

Review comment:
       Ok, I'll modify it




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
spacewander commented on pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#issuecomment-912322865


   Ouch, it disappears again 😂 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#issuecomment-912164592


   > is it ok now
   
   got


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] caixiaomao commented on pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
caixiaomao commented on pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#issuecomment-913275830


   Modify the syntax


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] caixiaomao commented on pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
caixiaomao commented on pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#issuecomment-912404851


   > Ouch, it disappears again 😂
   
   The pull bot I used automatically merged the main repository code. I uninstalled it and it should be fine now. I'm very sorry。😂


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander merged pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #4969:
URL: https://github.com/apache/apisix/pull/4969


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] caixiaomao edited a comment on pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
caixiaomao edited a comment on pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#issuecomment-912153136


   > ![image](https://user-images.githubusercontent.com/30819887/131846351-5a031508-7015-4d2b-af4b-c75dc1ec14a5.png)
   > it's strange, I can't see the file
   
   @tzssangglass sorry, forgot to push,is it ok now? 😂


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#discussion_r700850124



##########
File path: docs/zh/latest/plugins/hmac-auth.md
##########
@@ -155,7 +155,7 @@ x-custom-a:test
 "
 ```
 
-注意:最后一个请求头也需要 + `\n`。
+注意:最后一个请求头也需要 + `\n`。如果 signing_string 中的某一项不存在,也需要使用一个空字符串代替。

Review comment:
       Can you append the note to https://github.com/apache/apisix/blob/a1f2a425d4fcdd99b97197039d967b196ec87178/docs/zh/latest/plugins/hmac-auth.md#L98?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] caixiaomao edited a comment on pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
caixiaomao edited a comment on pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#issuecomment-912404851


   > Ouch, it disappears again 😂
   
   The pull bot I used automatically merged the main repository code. I uninstalled it and it should be fine now. I'm very sorry。😂 @spacewander 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#discussion_r702503388



##########
File path: docs/en/latest/plugins/hmac-auth.md
##########
@@ -101,7 +101,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13
 
 ### generate signature:
 
-The calculation formula of the signature is `signature = HMAC-SHAx-HEX(secret_key, signing_string)`. From the formula, it can be seen that in order to obtain the signature, two parameters, `SECRET_KEY` and `signing_STRING`, are required. Where secret_key is configured by the corresponding consumer, the calculation formula of `signing_STRING` is `signing_string = signing_string = HTTP Method + \n + HTTP URI + \n + canonical_query_string + \n + access_key + \n + Date + \n + signed_headers_string`.
+The calculation formula of the signature is `signature = HMAC-SHAx-HEX(secret_key, signing_string)`. From the formula, it can be seen that in order to obtain the signature, two parameters, `SECRET_KEY` and `signing_STRING`, are required. Where secret_key is configured by the corresponding consumer, the calculation formula of `signing_string` is `signing_string = HTTP Method + \n + HTTP URI + \n + canonical_query_string + \n + access_key + \n + Date + \n + signed_headers_string`.If one of the items in signing_string does not exist, you also need to use an empty string instead.

Review comment:
       ```suggestion
   The calculation formula of the signature is `signature = HMAC-SHAx-HEX(secret_key, signing_string)`. From the formula, it can be seen that in order to obtain the signature, two parameters, `SECRET_KEY` and `signing_STRING`, are required. Where secret_key is configured by the corresponding consumer, the calculation formula of `signing_string` is `signing_string = HTTP Method + \n + HTTP URI + \n + canonical_query_string + \n + access_key + \n + Date + \n + signed_headers_string`. If one of the items in signing_string does not exist, you also need to use an empty string instead.
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] caixiaomao commented on pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
caixiaomao commented on pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#issuecomment-912153136


   > ![image](https://user-images.githubusercontent.com/30819887/131846351-5a031508-7015-4d2b-af4b-c75dc1ec14a5.png)
   > it's strange, I can't see the file
   
   sorry, forgot to push,is it ok now? 😂


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#issuecomment-911643461


   ![image](https://user-images.githubusercontent.com/30819887/131846351-5a031508-7015-4d2b-af4b-c75dc1ec14a5.png)
   it's strange, I can't see the file


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] caixiaomao commented on pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
caixiaomao commented on pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#issuecomment-911467858


   @spacewander 已经修改了 😃 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#discussion_r701538892



##########
File path: docs/zh/latest/plugins/hmac-auth.md
##########
@@ -95,7 +95,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13
 
 ### 签名生成公式
 
-签名的计算公式为 `signature = HMAC-SHAx-HEX(secret_key, signing_string)`,从公式可以看出,想要获得签名需要得到 `secret_key` 和 `signing_string` 两个参数。其中 `secret_key` 为对应 consumer 所配置的, `signing_string` 的计算公式为 `signing_string = HTTP Method + \n + HTTP URI + \n + canonical_query_string + \n + access_key + \n + Date + \n + signed_headers_string`。
+签名的计算公式为 `signature = HMAC-SHAx-HEX(secret_key, signing_string)`,从公式可以看出,想要获得签名需要得到 `secret_key` 和 `signing_string` 两个参数。其中 `secret_key` 为对应 consumer 所配置的, `signing_string` 的计算公式为 `signing_string = HTTP Method + \n + HTTP URI + \n + canonical_query_string + \n + access_key + \n + Date + \n + signed_headers_string`。如果 signing_string 中的某一项不存在,也需要使用一个空字符串代替。

Review comment:
       Let's sync it to the English version




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] caixiaomao commented on pull request #4969: docs: update hmac-auth.md

Posted by GitBox <gi...@apache.org>.
caixiaomao commented on pull request #4969:
URL: https://github.com/apache/apisix/pull/4969#issuecomment-913258562


   Correct an error and add English notes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org