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 2020/11/24 03:29:37 UTC

[GitHub] [apisix] Firstsawyou opened a new pull request #2830: feat: the request parameter participating in the signature can be the parameter name

Firstsawyou opened a new pull request #2830:
URL: https://github.com/apache/apisix/pull/2830


   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   close #2823
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [x] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [x] Is this PR backward compatible?
   


----------------------------------------------------------------
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.

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



[GitHub] [apisix] Firstsawyou commented on a change in pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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



##########
File path: t/plugin/hmac-auth.t
##########
@@ -1633,3 +1633,125 @@ GET /t
 passed
 --- no_error_log
 [error]
+
+
+
+=== TEST 42: verify: ok, the request parameter is missing `=<value>`.
+--- config
+location /t {
+    content_by_lua_block {
+        local ngx_time   = ngx.time
+        local ngx_http_time = ngx.http_time
+        local core = require("apisix.core")
+        local t = require("lib.test_admin")
+        local hmac = require("resty.hmac")
+        local ngx_encode_base64 = ngx.encode_base64
+
+        local secret_key = "my-secret-key6"
+        local timestamp = ngx_time()
+        local gmt = ngx_http_time(timestamp)
+        local access_key = "my-access-key6"
+        local custom_header_a = "asld$%dfasf"
+        local custom_header_b = "23879fmsldfk"
+
+        local signing_string = {
+            "GET",
+            "/hello",
+            "age=&name=jack",
+            access_key,
+            gmt,
+            "x-custom-header-a:" .. custom_header_a,
+            "x-custom-header-b:" .. custom_header_b
+        }
+        signing_string = core.table.concat(signing_string, "\n") .. "\n"
+        core.log.info("signing_string:", signing_string)
+
+        local signature = hmac:new(secret_key, hmac.ALGOS.SHA256):final(signing_string)
+        core.log.info("signature:", ngx_encode_base64(signature))
+        local headers = {}
+        headers["X-HMAC-SIGNATURE"] = ngx_encode_base64(signature)
+        headers["X-HMAC-ALGORITHM"] = "hmac-sha256"
+        headers["Date"] = gmt
+        headers["X-HMAC-ACCESS-KEY"] = access_key
+        headers["X-HMAC-SIGNED-HEADERS"] = "x-custom-header-a;x-custom-header-b"
+        headers["x-custom-header-a"] = custom_header_a
+        headers["x-custom-header-b"] = custom_header_b
+
+        local code, body = t.test('/hello?name=jack&age',
+            ngx.HTTP_GET,
+            "",
+            nil,
+            headers
+        )
+
+        ngx.status = code
+        ngx.say(body)
+    }
+}
+--- request
+GET /t
+--- response_body
+passed
+--- no_error_log
+[error]
+
+
+
+=== TEST 43: verify: ok, the value of the request parameter is true.

Review comment:
       Yes, this test is to cover requests whose request parameter value is `true`. The situation you mentioned has been covered in the previous test case(`TEST 42`). ^ _ ^




----------------------------------------------------------------
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.

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



[GitHub] [apisix] tokers commented on a change in pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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



##########
File path: t/plugin/hmac-auth.t
##########
@@ -1633,3 +1633,125 @@ GET /t
 passed
 --- no_error_log
 [error]
+
+
+
+=== TEST 42: verify: ok, the request parameter is missing `=<value>`.
+--- config
+location /t {
+    content_by_lua_block {
+        local ngx_time   = ngx.time
+        local ngx_http_time = ngx.http_time
+        local core = require("apisix.core")
+        local t = require("lib.test_admin")
+        local hmac = require("resty.hmac")
+        local ngx_encode_base64 = ngx.encode_base64
+
+        local secret_key = "my-secret-key6"
+        local timestamp = ngx_time()
+        local gmt = ngx_http_time(timestamp)
+        local access_key = "my-access-key6"
+        local custom_header_a = "asld$%dfasf"
+        local custom_header_b = "23879fmsldfk"
+
+        local signing_string = {
+            "GET",
+            "/hello",
+            "age=&name=jack",
+            access_key,
+            gmt,
+            "x-custom-header-a:" .. custom_header_a,
+            "x-custom-header-b:" .. custom_header_b
+        }
+        signing_string = core.table.concat(signing_string, "\n") .. "\n"
+        core.log.info("signing_string:", signing_string)

Review comment:
       OK.




----------------------------------------------------------------
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.

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



[GitHub] [apisix] Firstsawyou commented on a change in pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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



##########
File path: apisix/plugins/hmac-auth.lua
##########
@@ -224,6 +224,13 @@ local function generate_signature(ctx, secret_key, params)
 
         for _, key in pairs(keys) do
             local param = args[key]
+            -- when args without `=<value>`, value is treated as true.
+            -- In order to be compatible with args lacking `=<value>`,
+            -- we need to replace true with an empty string.
+            if type(param) == "boolean" then
+                param = ""

Review comment:
       I tested it, and the following is my test result:
   
   node.js: curl "http://localhost:8080/args?name=jack&age"
   
   ```
   node.js, args name:jack
   node.js, args age:
   ```
   
   python: curl "http://localhost:8080/args?name=jack&age"
   
   ```
   ParseResult(scheme='http', netloc='127.0.0.1:8080', path='/args', params='', query='name=jack&age', fragment='')
   {'age': [''], 'name': ['jack']}
   ```
   
   golang: curl  "http://localhost:8080/args?name=jack&age"
   
   ```
   map[age:[] name:[jack]]
   args value:  jack 
   ```




----------------------------------------------------------------
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.

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



[GitHub] [apisix] tokers commented on a change in pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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



##########
File path: t/plugin/hmac-auth.t
##########
@@ -1633,3 +1633,125 @@ GET /t
 passed
 --- no_error_log
 [error]
+
+
+
+=== TEST 42: verify: ok, the request parameter is missing `=<value>`.
+--- config
+location /t {
+    content_by_lua_block {
+        local ngx_time   = ngx.time
+        local ngx_http_time = ngx.http_time
+        local core = require("apisix.core")
+        local t = require("lib.test_admin")
+        local hmac = require("resty.hmac")
+        local ngx_encode_base64 = ngx.encode_base64
+
+        local secret_key = "my-secret-key6"
+        local timestamp = ngx_time()
+        local gmt = ngx_http_time(timestamp)
+        local access_key = "my-access-key6"
+        local custom_header_a = "asld$%dfasf"
+        local custom_header_b = "23879fmsldfk"
+
+        local signing_string = {
+            "GET",
+            "/hello",
+            "age=&name=jack",
+            access_key,
+            gmt,
+            "x-custom-header-a:" .. custom_header_a,
+            "x-custom-header-b:" .. custom_header_b
+        }
+        signing_string = core.table.concat(signing_string, "\n") .. "\n"
+        core.log.info("signing_string:", signing_string)
+
+        local signature = hmac:new(secret_key, hmac.ALGOS.SHA256):final(signing_string)
+        core.log.info("signature:", ngx_encode_base64(signature))
+        local headers = {}
+        headers["X-HMAC-SIGNATURE"] = ngx_encode_base64(signature)
+        headers["X-HMAC-ALGORITHM"] = "hmac-sha256"
+        headers["Date"] = gmt
+        headers["X-HMAC-ACCESS-KEY"] = access_key
+        headers["X-HMAC-SIGNED-HEADERS"] = "x-custom-header-a;x-custom-header-b"
+        headers["x-custom-header-a"] = custom_header_a
+        headers["x-custom-header-b"] = custom_header_b
+
+        local code, body = t.test('/hello?name=jack&age',
+            ngx.HTTP_GET,
+            "",
+            nil,
+            headers
+        )
+
+        ngx.status = code
+        ngx.say(body)
+    }
+}
+--- request
+GET /t
+--- response_body
+passed
+--- no_error_log
+[error]
+
+
+
+=== TEST 43: verify: ok, the value of the request parameter is true.

Review comment:
       OK, i see.




----------------------------------------------------------------
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.

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



[GitHub] [apisix] membphis commented on a change in pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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



##########
File path: apisix/plugins/hmac-auth.lua
##########
@@ -224,6 +224,13 @@ local function generate_signature(ctx, secret_key, params)
 
         for _, key in pairs(keys) do
             local param = args[key]
+            -- when args without `=<value>`, value is treated as true.
+            -- In order to be compatible with args lacking `=<value>`,
+            -- we need to replace true with an empty string.
+            if param == true then

Review comment:
       `type(param) == "boolean"` is better




----------------------------------------------------------------
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.

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



[GitHub] [apisix] tokers commented on a change in pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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



##########
File path: apisix/plugins/hmac-auth.lua
##########
@@ -224,6 +224,13 @@ local function generate_signature(ctx, secret_key, params)
 
         for _, key in pairs(keys) do
             local param = args[key]
+            -- when args without `=<value>`, value is treated as true.
+            -- In order to be compatible with args lacking `=<value>`,
+            -- we need to replace true with an empty string.
+            if type(param) == "boolean" then
+                param = ""

Review comment:
       Have you investigated implementations in other languages like `node.js`, `golang`, `python`?




----------------------------------------------------------------
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.

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



[GitHub] [apisix] Firstsawyou commented on a change in pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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



##########
File path: t/plugin/hmac-auth.t
##########
@@ -1633,3 +1633,125 @@ GET /t
 passed
 --- no_error_log
 [error]
+
+
+
+=== TEST 42: verify: ok, the request parameter is missing `=<value>`.
+--- config
+location /t {
+    content_by_lua_block {
+        local ngx_time   = ngx.time

Review comment:
       Good catch.




----------------------------------------------------------------
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.

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



[GitHub] [apisix] spacewander merged pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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


   


----------------------------------------------------------------
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.

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



[GitHub] [apisix] tokers commented on a change in pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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



##########
File path: t/plugin/hmac-auth.t
##########
@@ -1633,3 +1633,125 @@ GET /t
 passed
 --- no_error_log
 [error]
+
+
+
+=== TEST 42: verify: ok, the request parameter is missing `=<value>`.
+--- config
+location /t {
+    content_by_lua_block {
+        local ngx_time   = ngx.time

Review comment:
       Style: too many spaces before `=`.

##########
File path: t/plugin/hmac-auth.t
##########
@@ -1633,3 +1633,125 @@ GET /t
 passed
 --- no_error_log
 [error]
+
+
+
+=== TEST 42: verify: ok, the request parameter is missing `=<value>`.
+--- config
+location /t {
+    content_by_lua_block {
+        local ngx_time   = ngx.time
+        local ngx_http_time = ngx.http_time
+        local core = require("apisix.core")
+        local t = require("lib.test_admin")
+        local hmac = require("resty.hmac")
+        local ngx_encode_base64 = ngx.encode_base64
+
+        local secret_key = "my-secret-key6"
+        local timestamp = ngx_time()
+        local gmt = ngx_http_time(timestamp)
+        local access_key = "my-access-key6"
+        local custom_header_a = "asld$%dfasf"
+        local custom_header_b = "23879fmsldfk"
+
+        local signing_string = {
+            "GET",
+            "/hello",
+            "age=&name=jack",
+            access_key,
+            gmt,
+            "x-custom-header-a:" .. custom_header_a,
+            "x-custom-header-b:" .. custom_header_b
+        }
+        signing_string = core.table.concat(signing_string, "\n") .. "\n"
+        core.log.info("signing_string:", signing_string)
+
+        local signature = hmac:new(secret_key, hmac.ALGOS.SHA256):final(signing_string)
+        core.log.info("signature:", ngx_encode_base64(signature))
+        local headers = {}
+        headers["X-HMAC-SIGNATURE"] = ngx_encode_base64(signature)
+        headers["X-HMAC-ALGORITHM"] = "hmac-sha256"
+        headers["Date"] = gmt
+        headers["X-HMAC-ACCESS-KEY"] = access_key
+        headers["X-HMAC-SIGNED-HEADERS"] = "x-custom-header-a;x-custom-header-b"
+        headers["x-custom-header-a"] = custom_header_a
+        headers["x-custom-header-b"] = custom_header_b
+
+        local code, body = t.test('/hello?name=jack&age',
+            ngx.HTTP_GET,
+            "",
+            nil,
+            headers
+        )
+
+        ngx.status = code
+        ngx.say(body)
+    }
+}
+--- request
+GET /t
+--- response_body
+passed
+--- no_error_log
+[error]
+
+
+
+=== TEST 43: verify: ok, the value of the request parameter is true.
+--- config
+location /t {
+    content_by_lua_block {
+        local ngx_time   = ngx.time

Review comment:
       Ditto, too many spaces before `=`.

##########
File path: t/plugin/hmac-auth.t
##########
@@ -1633,3 +1633,125 @@ GET /t
 passed
 --- no_error_log
 [error]
+
+
+
+=== TEST 42: verify: ok, the request parameter is missing `=<value>`.
+--- config
+location /t {
+    content_by_lua_block {
+        local ngx_time   = ngx.time
+        local ngx_http_time = ngx.http_time
+        local core = require("apisix.core")
+        local t = require("lib.test_admin")
+        local hmac = require("resty.hmac")
+        local ngx_encode_base64 = ngx.encode_base64
+
+        local secret_key = "my-secret-key6"
+        local timestamp = ngx_time()
+        local gmt = ngx_http_time(timestamp)
+        local access_key = "my-access-key6"
+        local custom_header_a = "asld$%dfasf"
+        local custom_header_b = "23879fmsldfk"
+
+        local signing_string = {
+            "GET",
+            "/hello",
+            "age=&name=jack",
+            access_key,
+            gmt,
+            "x-custom-header-a:" .. custom_header_a,
+            "x-custom-header-b:" .. custom_header_b
+        }
+        signing_string = core.table.concat(signing_string, "\n") .. "\n"
+        core.log.info("signing_string:", signing_string)
+
+        local signature = hmac:new(secret_key, hmac.ALGOS.SHA256):final(signing_string)
+        core.log.info("signature:", ngx_encode_base64(signature))
+        local headers = {}
+        headers["X-HMAC-SIGNATURE"] = ngx_encode_base64(signature)
+        headers["X-HMAC-ALGORITHM"] = "hmac-sha256"
+        headers["Date"] = gmt
+        headers["X-HMAC-ACCESS-KEY"] = access_key
+        headers["X-HMAC-SIGNED-HEADERS"] = "x-custom-header-a;x-custom-header-b"
+        headers["x-custom-header-a"] = custom_header_a
+        headers["x-custom-header-b"] = custom_header_b
+
+        local code, body = t.test('/hello?name=jack&age',
+            ngx.HTTP_GET,
+            "",
+            nil,
+            headers
+        )
+
+        ngx.status = code
+        ngx.say(body)
+    }
+}
+--- request
+GET /t
+--- response_body
+passed
+--- no_error_log
+[error]
+
+
+
+=== TEST 43: verify: ok, the value of the request parameter is true.

Review comment:
       Why checking it when value is literal `true` string? It makes no sense for your fixing, the process of literal string `true` is same with other non empty values, you should test arguments with form of "id=123&name".

##########
File path: t/plugin/hmac-auth.t
##########
@@ -1633,3 +1633,125 @@ GET /t
 passed
 --- no_error_log
 [error]
+
+
+
+=== TEST 42: verify: ok, the request parameter is missing `=<value>`.
+--- config
+location /t {
+    content_by_lua_block {
+        local ngx_time   = ngx.time
+        local ngx_http_time = ngx.http_time
+        local core = require("apisix.core")
+        local t = require("lib.test_admin")
+        local hmac = require("resty.hmac")
+        local ngx_encode_base64 = ngx.encode_base64
+
+        local secret_key = "my-secret-key6"
+        local timestamp = ngx_time()
+        local gmt = ngx_http_time(timestamp)
+        local access_key = "my-access-key6"
+        local custom_header_a = "asld$%dfasf"
+        local custom_header_b = "23879fmsldfk"
+
+        local signing_string = {
+            "GET",
+            "/hello",
+            "age=&name=jack",
+            access_key,
+            gmt,
+            "x-custom-header-a:" .. custom_header_a,
+            "x-custom-header-b:" .. custom_header_b
+        }
+        signing_string = core.table.concat(signing_string, "\n") .. "\n"
+        core.log.info("signing_string:", signing_string)

Review comment:
       It this your debug logging? You don't check it by `grep_error_log`.




----------------------------------------------------------------
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.

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



[GitHub] [apisix] Firstsawyou commented on a change in pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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



##########
File path: apisix/plugins/hmac-auth.lua
##########
@@ -224,6 +224,13 @@ local function generate_signature(ctx, secret_key, params)
 
         for _, key in pairs(keys) do
             local param = args[key]
+            -- when args without `=<value>`, value is treated as true.
+            -- In order to be compatible with args lacking `=<value>`,
+            -- we need to replace true with an empty string.
+            if param == true then

Review comment:
       Nice, updated.




----------------------------------------------------------------
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.

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



[GitHub] [apisix] Firstsawyou commented on a change in pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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



##########
File path: t/plugin/hmac-auth.t
##########
@@ -1633,3 +1633,125 @@ GET /t
 passed
 --- no_error_log
 [error]
+
+
+
+=== TEST 42: verify: ok, the request parameter is missing `=<value>`.
+--- config
+location /t {
+    content_by_lua_block {
+        local ngx_time   = ngx.time
+        local ngx_http_time = ngx.http_time
+        local core = require("apisix.core")
+        local t = require("lib.test_admin")
+        local hmac = require("resty.hmac")
+        local ngx_encode_base64 = ngx.encode_base64
+
+        local secret_key = "my-secret-key6"
+        local timestamp = ngx_time()
+        local gmt = ngx_http_time(timestamp)
+        local access_key = "my-access-key6"
+        local custom_header_a = "asld$%dfasf"
+        local custom_header_b = "23879fmsldfk"
+
+        local signing_string = {
+            "GET",
+            "/hello",
+            "age=&name=jack",
+            access_key,
+            gmt,
+            "x-custom-header-a:" .. custom_header_a,
+            "x-custom-header-b:" .. custom_header_b
+        }
+        signing_string = core.table.concat(signing_string, "\n") .. "\n"
+        core.log.info("signing_string:", signing_string)

Review comment:
       Yes, this is the debug log, the test does not need to care about it.

##########
File path: t/plugin/hmac-auth.t
##########
@@ -1633,3 +1633,125 @@ GET /t
 passed
 --- no_error_log
 [error]
+
+
+
+=== TEST 42: verify: ok, the request parameter is missing `=<value>`.
+--- config
+location /t {
+    content_by_lua_block {
+        local ngx_time   = ngx.time
+        local ngx_http_time = ngx.http_time
+        local core = require("apisix.core")
+        local t = require("lib.test_admin")
+        local hmac = require("resty.hmac")
+        local ngx_encode_base64 = ngx.encode_base64
+
+        local secret_key = "my-secret-key6"
+        local timestamp = ngx_time()
+        local gmt = ngx_http_time(timestamp)
+        local access_key = "my-access-key6"
+        local custom_header_a = "asld$%dfasf"
+        local custom_header_b = "23879fmsldfk"
+
+        local signing_string = {
+            "GET",
+            "/hello",
+            "age=&name=jack",
+            access_key,
+            gmt,
+            "x-custom-header-a:" .. custom_header_a,
+            "x-custom-header-b:" .. custom_header_b
+        }
+        signing_string = core.table.concat(signing_string, "\n") .. "\n"
+        core.log.info("signing_string:", signing_string)
+
+        local signature = hmac:new(secret_key, hmac.ALGOS.SHA256):final(signing_string)
+        core.log.info("signature:", ngx_encode_base64(signature))
+        local headers = {}
+        headers["X-HMAC-SIGNATURE"] = ngx_encode_base64(signature)
+        headers["X-HMAC-ALGORITHM"] = "hmac-sha256"
+        headers["Date"] = gmt
+        headers["X-HMAC-ACCESS-KEY"] = access_key
+        headers["X-HMAC-SIGNED-HEADERS"] = "x-custom-header-a;x-custom-header-b"
+        headers["x-custom-header-a"] = custom_header_a
+        headers["x-custom-header-b"] = custom_header_b
+
+        local code, body = t.test('/hello?name=jack&age',
+            ngx.HTTP_GET,
+            "",
+            nil,
+            headers
+        )
+
+        ngx.status = code
+        ngx.say(body)
+    }
+}
+--- request
+GET /t
+--- response_body
+passed
+--- no_error_log
+[error]
+
+
+
+=== TEST 43: verify: ok, the value of the request parameter is true.
+--- config
+location /t {
+    content_by_lua_block {
+        local ngx_time   = ngx.time

Review comment:
       done.




----------------------------------------------------------------
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.

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



[GitHub] [apisix] tokers commented on pull request #2830: feat: the request parameter participating in the signature can be the parameter name

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


   LGTM.


----------------------------------------------------------------
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.

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