[GitHub] [apisix] spacewander commented on a change in pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


spacewander commented on a change in pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#discussion_r766450206



##
File path: apisix/plugins/opa.lua
##
@@ -0,0 +1,103 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local core   = require("apisix.core")
+local http   = require("resty.http")
+local helper = require("apisix.plugins.opa.helper")
+
+local schema = {
+type = "object",
+properties = {
+host = {type = "string"},
+ssl_verify = {
+type = "boolean",
+default = true,
+},
+policy = {type = "string"},
+timeout = {
+type = "integer",
+minimum = 1,
+maximum = 6,
+default = 3000,
+description = "timeout in milliseconds",
+},
+keepalive = {type = "boolean", default = true},
+keepalive_timeout = {type = "integer", minimum = 1000, default = 
6},
+keepalive_pool = {type = "integer", minimum = 1, default = 5}
+},
+required = {"host", "policy"}
+}
+
+
+local _M = {
+version = 0.1,
+priority = 2001,
+name = "opa",
+schema = schema,
+}
+
+
+function _M.check_schema(conf)
+return core.schema.check(schema, conf)
+end
+
+
+function _M.access(conf, ctx)
+local body = helper.build_opa_input(conf, ctx, "http")
+local params = {
+method = "POST",
+body = body,
+headers = {
+["Content-Type"] = "application/json",
+},
+keepalive = conf.keepalive,
+ssl_verify = conf.ssl_verify
+}
+
+if conf.keepalive then
+params.keepalive_timeout = conf.keepalive_timeout
+params.keepalive_pool = conf.keepalive_pool
+end
+
+local endpoint = conf.host .. "/v1/data/" .. conf.policy
+
+local httpc = http.new()
+httpc:set_timeout(conf.timeout)
+
+local res, err = httpc:request_uri(endpoint, params)
+
+-- block by default when decision is unavailable
+if not res or err then
+core.log.error("failed to process OPA decision, err: ", err)
+return 403
+end
+
+-- parse the results of the decision
+local data, err = core.json.decode(res.body)
+
+if err then
+core.log.error("invalid response body: ", res.body, " err: ", err)
+return 500

Review comment:
   ```suggestion
   return 503
   ```
   for known error

##
File path: t/plugin/opa.t
##
@@ -0,0 +1,139 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+use t::APISIX 'no_plan';
+
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+});
+
+run_tests();
+
+__DATA__
+
+=== TEST 1: sanity check with minimal valid configuration
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.opa")
+local ok, err = plugin.check_schema({host = 
"http://127.0.0.1:8181;, policy = "example/allow"})
+if not ok then
+ngx.say(err)
+end
+
+ngx.say("done")
+}
+}
+--- response_body
+done
+
+
+
+=== TEST 2: missing `policy`
+--- config
+location /t {
+

[GitHub] [apisix] spacewander merged pull request #5743: test(rocketmq-logger): reduce duplicate sections

2021-12-09 Thread GitBox


spacewander merged pull request #5743:
URL: https://github.com/apache/apisix/pull/5743


   


-- 
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-unsubscr...@apisix.apache.org

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




[apisix] branch master updated (08a363d -> 8c6b782)

2021-12-09 Thread spacewander
This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git.


from 08a363d  chore: bump apisix-build-tools to v2.6.0 (#5748)
 add 8c6b782  test(rocketmq-logger): reduce duplicate sections (#5743)

No new revisions were added by this update.

Summary of changes:
 t/plugin/rocketmq-logger.t  | 465 ++--
 t/plugin/rocketmq-logger2.t | 414 +++
 2 files changed, 435 insertions(+), 444 deletions(-)
 create mode 100644 t/plugin/rocketmq-logger2.t


[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #791: feat: add ApisixPluginConfig translator (#638)

2021-12-09 Thread GitBox


tao12345666333 commented on pull request #791:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/791#issuecomment-990706134


   > But the changes about the v2beta3 make me confused, cause my previous pr 
about the ApisixPluginConfig was in
   > the v2beta2 directory
   
   Yes, apiversion has been upgraded to v2beta3 from #746 
   
   You can open a new PR to upgrade ApisixPluginConfig to v2beta3.
   
   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] juzhiyuan commented on a change in pull request #5743: test(rocketmq-logger): reduce duplicate sections

2021-12-09 Thread GitBox


juzhiyuan commented on a change in pull request #5743:
URL: https://github.com/apache/apisix/pull/5743#discussion_r766442475



##
File path: t/plugin/rocketmq-logger2.t
##
@@ -0,0 +1,414 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+use t::APISIX 'no_plan';
+
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if (!$block->request) {
+$block->set_value("request", "GET /t");
+}
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+});
+
+run_tests;
+
+__DATA__
+
+=== TEST 1: update the nameserver_list, generate different rocketmq producers
+--- config
+location /t {
+content_by_lua_block {
+local t = require("lib.test_admin").test
+local code, body = t('/apisix/admin/routes/1',
+ ngx.HTTP_PUT,
+ [[{
+"upstream": {
+"nodes": {
+"127.0.0.1:1980": 1
+},
+"type": "roundrobin"
+},
+"uri": "/hello"
+}]]
+)
+ngx.sleep(0.5)
+
+if code >= 300 then
+ngx.status = code
+ngx.say("fail")
+return
+end
+
+code, body = t('/apisix/admin/routes/1/plugins',
+ngx.HTTP_PATCH,
+ [[{
+"rocketmq-logger": {
+"nameserver_list" : [ "127.0.0.1:9876" ],
+"topic" : "test2",
+"timeout" : 1,
+"batch_max_size": 1,
+"include_req_body": false
+}
+}]]
+)
+
+if code >= 300 then
+ngx.status = code
+ngx.say("fail")
+return
+end
+
+t('/hello',ngx.HTTP_GET)
+ngx.sleep(0.5)
+
+code, body = t('/apisix/admin/routes/1/plugins',
+ngx.HTTP_PATCH,
+ [[{
+"rocketmq-logger": {
+"nameserver_list" :  [ "127.0.0.1:19876" ],
+"topic" : "test4",
+"timeout" : 1,
+"batch_max_size": 1,
+"include_req_body": false
+}
+}]]
+)
+
+if code >= 300 then
+ngx.status = code
+ngx.say("fail")
+return
+end
+
+t('/hello',ngx.HTTP_GET)
+ngx.sleep(0.5)
+
+ngx.sleep(2)
+ngx.say("passed")
+}
+}
+--- timeout: 10
+--- response
+passed
+--- wait: 5
+--- error_log
+phase_func(): rocketmq nameserver_list[1] port 9876
+phase_func(): rocketmq nameserver_list[1] port 19876
+--- no_error_log eval
+qr/not found topic/
+
+
+
+=== TEST 2: use the topic that does not exist on rocketmq(even if rocketmq 
allows auto create topics, first time push messages to rocketmq would got this 
error)
+--- config
+location /t {
+content_by_lua_block {
+local t = require("lib.test_admin").test
+local code, body = t('/apisix/admin/routes/1/plugins',
+ngx.HTTP_PATCH,
+ [[{
+"rocketmq-logger": {
+"nameserver_list" : [ "127.0.0.1:9876" ],
+"topic" : "undefined_topic",
+"timeout" : 1,
+"batch_max_size": 1,
+"include_req_body": false
+}
+}]]
+)
+
+if code >= 300 then
+ngx.status = code
+ngx.say("fail")
+return
+end
+
+t('/hello',ngx.HTTP_GET)
+ngx.sleep(0.5)
+
+ngx.sleep(2)
+ngx.say("passed")
+}
+}
+--- timeout: 5

[GitHub] [apisix-go-plugin-runner] spacewander commented on issue #52: request help: pkgHttp.Request can't handle body data?

2021-12-09 Thread GitBox


spacewander commented on issue #52:
URL: 
https://github.com/apache/apisix-go-plugin-runner/issues/52#issuecomment-990679861


   @GhangZh 
   Will you give it a try? I can provide some assistance.


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-go-plugin-runner] GhangZh commented on issue #52: request help: pkgHttp.Request can't handle body data?

2021-12-09 Thread GitBox


GhangZh commented on issue #52:
URL: 
https://github.com/apache/apisix-go-plugin-runner/issues/52#issuecomment-990664104


   > The feature is not supported yet, but is already in our plan.
   
   When is this expected to be supported?


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bzp2010 commented on a change in pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


bzp2010 commented on a change in pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#discussion_r766384350



##
File path: apisix/plugins/opa.lua
##
@@ -0,0 +1,104 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local core   = require("apisix.core")
+local http   = require("resty.http")
+local helper = require("apisix.plugins.opa.helper")
+
+local schema = {
+type = "object",
+properties = {
+host = {type = "string"},
+ssl_verify = {
+type = "boolean",
+default = true,
+},
+package = {type = "string"},
+decision = {type = "string", maxLength = 256},
+timeout = {
+type = "integer",
+minimum = 1,
+maximum = 6,
+default = 3000,
+description = "timeout in milliseconds",
+},
+keepalive = {type = "boolean", default = true},
+keepalive_timeout = {type = "integer", minimum = 1000, default = 
6},
+keepalive_pool = {type = "integer", minimum = 1, default = 5}
+},
+required = {"host", "package", "decision"}
+}
+
+
+local _M = {
+version = 0.1,
+priority = 2001,
+name = "opa",
+schema = schema,
+}
+
+
+function _M.check_schema(conf)
+return core.schema.check(schema, conf)
+end
+
+
+function _M.access(conf, ctx)
+local body = helper.build_opa_input(conf, ctx, "http")
+local params = {
+method = "POST",
+body = body,
+headers = {
+["Content-Type"] = "application/json",
+},
+keepalive = conf.keepalive,
+ssl_verify = conf.ssl_verify
+}
+
+if conf.keepalive then
+params.keepalive_timeout = conf.keepalive_timeout
+params.keepalive_pool = conf.keepalive_pool
+end
+
+local endpoint = conf.host .. "/v1/data/" .. conf.package .. "/" .. 
conf.decision
+
+local httpc = http.new()
+httpc:set_timeout(conf.timeout)
+
+local res, err = httpc:request_uri(endpoint, params)
+
+-- block by default when decision is unavailable
+if not res or err then
+core.log.error("failed to process OPA decision, err: ", err)
+return 403
+end
+
+-- parse the results of the decision
+local data, err = core.json.decode(res.body)
+
+if err then
+core.log.error("invalid response body: ", res.body, " err: ", err)
+return 403

Review comment:
   changed




-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] Molio-tan commented on issue #5571: request help: The GmSSL worked well with openresty, but failed on the APISIX.

2021-12-09 Thread GitBox


Molio-tan commented on issue #5571:
URL: https://github.com/apache/apisix/issues/5571#issuecomment-990655289


   Hey guys, after many tries,I give up the GmSSL and choose the another 
TaSSL.Recently, they publish the newer package 
[tassl-1.1.1k](https://github.com/jntass/TASSL-1.1.1k) that based on 
openssl-1.1.1k.I made it success by this 
https://github.com/jntass/TASSL-1.1.1k/blob/master/%E8%BD%AF%E7%AE%97%E6%B3%95%E6%94%AF%E6%8C%81SSL%E5%8D%B8%E8%BD%BD%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97v1.03(%E6%A0%87%E5%87%86nginx).pdf


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] Molio-tan closed issue #5571: request help: The GmSSL worked well with openresty, but failed on the APISIX.

2021-12-09 Thread GitBox


Molio-tan closed issue #5571:
URL: https://github.com/apache/apisix/issues/5571


   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] xianshun163 opened a new issue #5767: bug: nacos.lua make some duplicate instance

2021-12-09 Thread GitBox


xianshun163 opened a new issue #5767:
URL: https://github.com/apache/apisix/issues/5767


   ### Issue description
   
   1、deploy a  service  to register to the nacos
   2、config some rule  and service and upstreams  at the apisix
   3、make a test   
   4、add some  log  at the balancer.lua, and  print the  upstream  nodes
   5、 from the log  , that  is  3 instance  in the apisix,  but  that is  one  
in the nacos.
   
   I  read the  code  nacos.lua   ,and  find the reason:  it will get the same 
service  the  follow code,
   local function get_nacos_services()
   local services = {}
   -- here we use lazy load to work around circle dependency
   local get_upstreams = require('apisix.upstream').upstreams
   local get_routes = require('apisix.router').http_routes
   local get_services = require('apisix.http.service').services
   local values = get_upstreams()
   iter_and_add_service(services, values)
   values = get_routes()
   iter_and_add_service(services, values)
   values = get_services()
   iter_and_add_service(services, values)
   return services
   end
   
   -
   and  I  try to fix it  like this, in the  local function 
fetch_full_registry(premature)  :
   local infos = get_nacos_services()
   if #infos == 0 then
   applications = up_apps
   return
   end
   table.sort(infos,function(a,b)
   return a.namespace_id .. a.group_name .. a.service_name > 
b.namespace_id .. b.group_name .. b.service_name
   end)
   local last_service_info
   for _, service_info in ipairs(infos) do
   if compareService(last_service_info,service_info) then
   goto CONTINUE
   end
   last_service_info = service_info
   local data, err
   local namespace_id = service_info.namespace_id
   
   --
   It  that   another  better way to fix it?  Thank you who can  fix it  in the 
github, and I   can   get the code  next time。
   
   
   
   
   
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):2.10.1
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks 
--version`):
   
   
   ### Steps to reproduce
   
   use  the  nacos as the discovery .
   and  add some code to print the upstream nodes  at the balancer.lua
   
   ### Actual result
   
   the  instance is the same as the nacos
   
   ### Error log
   
   no  error log
   
   ### Expected result
   
   _No response_


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2236: test(label): migrate label test to ginkgo implement

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2236:
URL: https://github.com/apache/apisix-dashboard/pull/2236#issuecomment-989613226


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2236](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (083e135) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `4.99%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#2236  +/-   ##
   ==
   - Coverage   69.87%   64.88%   -5.00% 
   ==
 Files 184  184  
 Lines7274 7274  
 Branches  829  829  
   ==
   - Hits 5083 4720 -363 
   - Misses   1897 2269 +372 
   + Partials  294  285   -9 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `37.13% <ø> (-7.41%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `68.12% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/internal/core/migrate/conflict.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9jb25mbGljdC5nbw==)
 | `0.00% <0.00%> (-80.00%)` | :arrow_down: |
   | 
[api/internal/core/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9taWdyYXRlLmdv)
 | `0.00% <0.00%> (-76.20%)` | :arrow_down: |
   | 
[api/internal/core/migrate/dataset.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9kYXRhc2V0Lmdv)
 | `0.00% <0.00%> (-53.04%)` | :arrow_down: |
   | 
[api/internal/handler/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbWlncmF0ZS9taWdyYXRlLmdv)
 | `8.06% <0.00%> (-51.62%)` | :arrow_down: |
   | 
[api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=)
 | `23.00% <0.00%> (-44.25%)` | :arrow_down: |
   | 
[api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==)
 | `33.33% <0.00%> (-33.34%)` | :arrow_down: |
   | 
[api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGVhbHRoei9oZWFsdGh6Lmdv)
 | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | 

[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2238: feat: Support APISIX_PROFILE for env-specific configuration

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2238:
URL: https://github.com/apache/apisix-dashboard/pull/2238#issuecomment-990536196


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2238?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2238](https://codecov.io/gh/apache/apisix-dashboard/pull/2238?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (76760c8) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `1.73%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2238?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#2238  +/-   ##
   ==
   - Coverage   69.87%   68.14%   -1.74% 
   ==
 Files 184  184  
 Lines7274 7277   +3 
 Branches  829  829  
   ==
   - Hits 5083 4959 -124 
   - Misses   1897 2023 +126 
   - Partials  294  295   +1 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `51.50% <50.00%> (-0.10%)` | :arrow_down: |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `68.12% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2238?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/internal/conf/conf.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvbmYvY29uZi5nbw==)
 | `57.54% <50.00%> (-0.71%)` | :arrow_down: |
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `32.11% <0.00%> (-35.41%)` | :arrow_down: |
   | 
[api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv)
 | `60.00% <0.00%> (-13.00%)` | :arrow_down: |
   | 
[api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv)
 | `47.24% <0.00%> (-3.94%)` | :arrow_down: |
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `86.97% <0.00%> (-3.65%)` | :arrow_down: |
   | 
[api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=)
 | `84.48% <0.00%> (-1.73%)` | :arrow_down: |
   | 
[api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=)
 | `70.20% <0.00%> (-0.51%)` | :arrow_down: |
   
   --
   
   [Continue to review full report at 

[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2236: test(label): migrate label test to ginkgo implement

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2236:
URL: https://github.com/apache/apisix-dashboard/pull/2236#issuecomment-989613226


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2236](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (083e135) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `7.77%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#2236  +/-   ##
   ==
   - Coverage   69.87%   62.09%   -7.78% 
   ==
 Files 184   57 -127 
 Lines7274 3905-3369 
 Branches  8290 -829 
   ==
   - Hits 5083 2425-2658 
   + Misses   1897 1195 -702 
   + Partials  294  285   -9 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `37.13% <ø> (-7.41%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/internal/core/migrate/conflict.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9jb25mbGljdC5nbw==)
 | `0.00% <0.00%> (-80.00%)` | :arrow_down: |
   | 
[api/internal/core/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9taWdyYXRlLmdv)
 | `0.00% <0.00%> (-76.20%)` | :arrow_down: |
   | 
[api/internal/core/migrate/dataset.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9kYXRhc2V0Lmdv)
 | `0.00% <0.00%> (-53.04%)` | :arrow_down: |
   | 
[api/internal/handler/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbWlncmF0ZS9taWdyYXRlLmdv)
 | `8.06% <0.00%> (-51.62%)` | :arrow_down: |
   | 
[api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=)
 | `23.00% <0.00%> (-44.25%)` | :arrow_down: |
   | 
[api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==)
 | `33.33% <0.00%> (-33.34%)` | :arrow_down: |
   | 
[api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGVhbHRoei9oZWFsdGh6Lmdv)
 | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | 

[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #2238: feat: Support APISIX_PROFILE for env-specific configuration

2021-12-09 Thread GitBox


juzhiyuan commented on pull request #2238:
URL: https://github.com/apache/apisix-dashboard/pull/2238#issuecomment-990635112


   I just rerun the CI, wait for a moment.


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2236: test(label): migrate label test to ginkgo implement

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2236:
URL: https://github.com/apache/apisix-dashboard/pull/2236#issuecomment-989613226


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2236](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (083e135) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `20.71%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#2236   +/-   ##
   ===
   - Coverage   69.87%   49.16%   -20.72% 
   ===
 Files 184   41  -143 
 Lines7274 3171 -4103 
 Branches  8290  -829 
   ===
   - Hits 5083 1559 -3524 
   + Misses   1897 1412  -485 
   + Partials  294  200   -94 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `0.00% <0.00%> (-72.60%)` | :arrow_down: |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
   | 
[api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=)
 | `0.00% <0.00%> (-67.26%)` | :arrow_down: |
   | 
[api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==)
 | `0.00% 

[GitHub] [apisix] bisakhmondal removed a comment on pull request #5745: feat(vault): vault lua module, integration with jwt-auth authentication plugin

2021-12-09 Thread GitBox


bisakhmondal removed a comment on pull request #5745:
URL: https://github.com/apache/apisix/pull/5745#issuecomment-94993


   PS: CI failure, not related to the introduced changes in this PR
   
https://github.com/apache/apisix/runs/4457908407?check_suite_focus=true#step:13:658


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bisakhmondal commented on a change in pull request #5745: feat(vault): vault lua module, integration with jwt-auth authentication plugin

2021-12-09 Thread GitBox


bisakhmondal commented on a change in pull request #5745:
URL: https://github.com/apache/apisix/pull/5745#discussion_r766348818



##
File path: apisix/plugins/jwt-auth.lua
##
@@ -119,29 +143,74 @@ function _M.check_schema(conf, schema_type)
 if schema_type == core.schema.TYPE_CONSUMER then
 ok, err = core.schema.check(consumer_schema, conf)
 else
-ok, err = core.schema.check(schema, conf)
+return core.schema.check(schema, conf)
 end
 
 if not ok then
 return false, err
 end
 
-if schema_type == core.schema.TYPE_CONSUMER then
-if conf.algorithm ~= "RS256" and not conf.secret then
-conf.secret = ngx_encode_base64(resty_random.bytes(32, true))
+-- in nginx init_worker_by_lua context API calls are disabled,
+-- also that is a costly operation during system startup.
+if ngx.get_phase() == "init_worker" then

Review comment:
   Resolved. Thanks




-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2236: test(label): migrate label test to ginkgo implement

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2236:
URL: https://github.com/apache/apisix-dashboard/pull/2236#issuecomment-989613226


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2236](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (f3ff556) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `1.91%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#2236  +/-   ##
   ==
   - Coverage   69.87%   67.96%   -1.92% 
   ==
 Files 184   57 -127 
 Lines7274 3905-3369 
 Branches  8290 -829 
   ==
   - Hits 5083 2654-2429 
   + Misses   1897  960 -937 
   + Partials  294  291   -3 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `58.61% <ø> (+7.01%)` | :arrow_up: |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `32.11% <0.00%> (-35.41%)` | :arrow_down: |
   | 
[api/internal/core/server/server.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc2VydmVyL3NlcnZlci5nbw==)
 | `44.68% <0.00%> (-17.03%)` | :arrow_down: |
   | 
[api/cmd/root.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2NtZC9yb290Lmdv)
 | `62.50% <0.00%> (-15.63%)` | :arrow_down: |
   | 
[api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv)
 | `62.00% <0.00%> (-11.00%)` | :arrow_down: |
   | 
[api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv)
 | `44.88% <0.00%> (-6.30%)` | :arrow_down: |
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `88.02% <0.00%> (-2.61%)` | :arrow_down: |
   | 
[api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=)
 | `70.20% <0.00%> (-0.51%)` | :arrow_down: |
   | 

[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2236: test(label): migrate label test to ginkgo implement

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2236:
URL: https://github.com/apache/apisix-dashboard/pull/2236#issuecomment-989613226


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2236](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (f3ff556) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `20.71%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#2236   +/-   ##
   ===
   - Coverage   69.87%   49.16%   -20.72% 
   ===
 Files 184   41  -143 
 Lines7274 3171 -4103 
 Branches  8290  -829 
   ===
   - Hits 5083 1559 -3524 
   + Misses   1897 1412  -485 
   + Partials  294  200   -94 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `0.00% <0.00%> (-72.60%)` | :arrow_down: |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
   | 
[api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=)
 | `0.00% <0.00%> (-67.26%)` | :arrow_down: |
   | 
[api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==)
 | `0.00% 

[GitHub] [apisix-dashboard] zaunist commented on pull request #2237: test(balancer): migrate balancer test to ginkgo implement

2021-12-09 Thread GitBox


zaunist commented on pull request #2237:
URL: https://github.com/apache/apisix-dashboard/pull/2237#issuecomment-990620756


   cc @starsz @nic-chen 


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] zaunist commented on pull request #2238: feat: Support APISIX_PROFILE for env-specific configuration

2021-12-09 Thread GitBox


zaunist commented on pull request #2238:
URL: https://github.com/apache/apisix-dashboard/pull/2238#issuecomment-990620116


   @juzhiyuan  It looks like the CI failed due to unstable CI, I found stream 
route test untill very unstable, the part of the test is easy to fail.
   @bzp2010 Can you take some time to look the stream route test ?


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bisakhmondal commented on a change in pull request #5745: feat(vault): vault lua module, integration with jwt-auth authentication plugin

2021-12-09 Thread GitBox


bisakhmondal commented on a change in pull request #5745:
URL: https://github.com/apache/apisix/pull/5745#discussion_r766331832



##
File path: apisix/plugins/jwt-auth.lua
##
@@ -76,7 +84,23 @@ local consumer_schema = {
 },
 },
 required = {"public_key", "private_key"},
-}
+},
+{
+properties = {
+vault = {
+type = "object",
+properties = {
+path = {type = "string"},
+add_prefix = {type = "boolean"}

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.

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

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




[GitHub] [apisix] bisakhmondal edited a comment on pull request #5745: feat(vault): vault lua module, integration with jwt-auth authentication plugin

2021-12-09 Thread GitBox


bisakhmondal edited a comment on pull request #5745:
URL: https://github.com/apache/apisix/pull/5745#issuecomment-990610747


   > @bisakhmondal Please don't ignore the suggestion from the maintainer, 
thanks!
   
   Hi @spacewander, please don't take me wrong. I never intended to ignore your 
suggestions. I thought we were having a discussion. I really am sorry if it 
looked that way.
   
   Btw, updated accordingly : ) see f9cdc4e


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bisakhmondal commented on pull request #5745: feat(vault): vault lua module, integration with jwt-auth authentication plugin

2021-12-09 Thread GitBox


bisakhmondal commented on pull request #5745:
URL: https://github.com/apache/apisix/pull/5745#issuecomment-990610747


   > @bisakhmondal Please don't ignore the suggestion from the maintainer, 
thanks!
   
   Hi @spacewander, please don't take me wrong. I never intended to ignore your 
suggestions. I thought we were having a discussion. I really am sorry if it 
looked that way.
   
   Btw, updated accordingly : )


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] xianshun163 opened a new issue #5766: request help: when balancer retry occur ,let it to be a breaker

2021-12-09 Thread GitBox


xianshun163 opened a new issue #5766:
URL: https://github.com/apache/apisix/issues/5766


   ### Issue description
   
   Think  about this scene: 
   1、My app  have  3  pod 
   2、Then  pod  1  is  too busy  and  can not  make a response 
   3、apisix  call the  pod 1  and   will  have  a  time out fail   after  6s  
   4、apisix  will  retry  next pod  and  success
   then, another request come , and  the   apisix  do  again  as  above
   
   I  think  when the pod 1 is time out  ,  it is  good to  have  a  breaker  , 
 and  skip the pod 1  some seconds .
   So   the requests  later  will not  proxy to the pod 1. 
   After  some seconds  we retry  to  proxy to pod 1, if it success,then   the  
apisix make balance to  pod 1~3.
   
   I work  like  the  api-breaker, but  it is   act  on  the pod。
   
   I modify the  balancer.lua  to  realize this function,  the  code  as  
below.  It  is it some beter way to do this. 
   
   the code here:  balancer.lua
   ```bash
   local function pick_server(route, ctx)   
   if ctx.balancer_try_count > 1 then
   if ctx.server_picker and ctx.server_picker.after_balance then
   ctx.server_picker.after_balance(ctx, true)
   end
   -- add a function here, because  that must have a node fail just now
   do_unhealthy_process(route, ctx)
 
   
   --- here is the function ,   the code work  like the  api-breaker
   
   local function do_unhealthy_process(route, ctx)
   local node_unhealthy_key = gen_node_unhealthy_key(ctx.balancer_ip, 
ctx.balancer_port, ctx)
   local node_healthy_key = gen_node_healthy_key(ctx.balancer_ip, 
ctx.balancer_port, ctx)
   local node_lasttime_key = gen_node_lasttime_key(ctx.balancer_ip, 
ctx.balancer_port, ctx)
   local conf = route.value.plugins[node_break_plugin_name]
   local node_failures
   local max_breaker_sec
   if not conf then
   node_failures = conf.unhealthy.node_failures
   max_breaker_sec = conf.max_breaker_sec
   else
   node_failures = 1
   max_breaker_sec = 10
   end
   
   local node_unhealthy_count, err = shared_buffer:incr(node_unhealthy_key, 
1, max_breaker_sec * 10)
   if err then
   core.log.warn("failed to incr node_unhealthy_key: ", 
node_unhealthy_key,
   " err: ", err)
   end
   core.log.warn("a node is unhealthy, node_unhealthy_key: ", 
node_unhealthy_key, " count: ", node_unhealthy_count)
   shared_buffer:delete(node_healthy_key)
   if node_unhealthy_count % node_failures == 0 then
   core.log.warn("the the node to fail:", ctx.balancer_ip, ":", 
ctx.balancer_port)
   shared_buffer:set(node_lasttime_key, ngx.time(), max_breaker_sec)
   end
   end
   
   
   ```
   
   
   
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):2.10.1
   - OS (cmd: `uname -a`):centos 7
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks 
--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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-website] juzhiyuan merged pull request #799: docs: add Keycloak Auth with Apache APISIX blog

2021-12-09 Thread GitBox


juzhiyuan merged pull request #799:
URL: https://github.com/apache/apisix-website/pull/799


   


-- 
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-unsubscr...@apisix.apache.org

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




[apisix-website] branch master updated: docs: add Keycloak Auth with Apache APISIX blog (#799)

2021-12-09 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-website.git


The following commit(s) were added to refs/heads/master by this push:
 new 37e1edd  docs: add Keycloak Auth with Apache APISIX blog (#799)
37e1edd is described below

commit 37e1edd820ea2e3c800a8a2b6f0109ab385de034
Author: Sylvia <39793568+sylviab...@users.noreply.github.com>
AuthorDate: Fri Dec 10 12:06:05 2021 +0800

docs: add Keycloak Auth with Apache APISIX blog (#799)
---
 .../12/07/apisix-integrate-skywalking-plugin.md|  12 +-
 .../08/apisix-integrate-rocketmq-logger-plugin.md  |   4 +-
 .../12/10/integrate-keycloak-auth-in-apisix.md | 210 
 .../12/07/apisix-integrate-skywalking-plugin.md|  12 +-
 .../08/apisix-integrate-rocketmq-logger-plugin.md  |   6 +-
 .../12/10/integrate-keycloak-auth-in-apisix.md | 212 +
 6 files changed, 447 insertions(+), 9 deletions(-)

diff --git a/website/blog/2021/12/07/apisix-integrate-skywalking-plugin.md 
b/website/blog/2021/12/07/apisix-integrate-skywalking-plugin.md
index a0a01d1..bba5b47 100644
--- a/website/blog/2021/12/07/apisix-integrate-skywalking-plugin.md
+++ b/website/blog/2021/12/07/apisix-integrate-skywalking-plugin.md
@@ -1,8 +1,14 @@
 ---
 title: "Apache APISIX Integrates with SkyWalking to Create a Full Fange of Log 
Processing"
-author: "Haochao Zhuang"
-authorURL: "https://github.com/dmsolr;
-authorImageURL: "https://avatars.githubusercontent.com/u/29735230?v=4;
+authors: 
+  - name: "Haochao Zhuang"
+title: "Author"
+url: "https://github.com/dmsolr;
+image_url: "https://avatars.githubusercontent.com/u/29735230?v=4;
+  - name: "Sylvia"
+title: "Technical Writer"
+url: "https://github.com/SylviaBABY;
+image_url: "https://avatars.githubusercontent.com/u/39793568?v=4;
 keywords: 
 - Apache APISIX
 - Apache SkyWalking
diff --git a/website/blog/2021/12/08/apisix-integrate-rocketmq-logger-plugin.md 
b/website/blog/2021/12/08/apisix-integrate-rocketmq-logger-plugin.md
index 90c7b8d..5d9a1a0 100644
--- a/website/blog/2021/12/08/apisix-integrate-rocketmq-logger-plugin.md
+++ b/website/blog/2021/12/08/apisix-integrate-rocketmq-logger-plugin.md
@@ -1,10 +1,12 @@
 ---
 title: "Apache APISIX & RocketMQ Helps User API Log Monitoring Capabilities"
 authors: 
-  - name: Zhou Yu
+  - name: "Zhou Yu"
+title: "Author"
 url: "https://github.com/yuz10;
 image_url: "https://avatars.githubusercontent.com/u/14816818?v=4;
   - name: "Sylvia"
+title: "Technical Writer"
 url: "https://github.com/SylviaBABY;
 image_url: "https://avatars.githubusercontent.com/u/39793568?v=4;
 keywords: 
diff --git a/website/blog/2021/12/10/integrate-keycloak-auth-in-apisix.md 
b/website/blog/2021/12/10/integrate-keycloak-auth-in-apisix.md
new file mode 100644
index 000..0fa768e
--- /dev/null
+++ b/website/blog/2021/12/10/integrate-keycloak-auth-in-apisix.md
@@ -0,0 +1,210 @@
+---
+title: "How to Integrate Keycloak for Authentication with Apache APISIX"
+authors:
+  - name: "Xinxin Zhu"
+title: "Author"
+url: "https://github.com/starsz;
+image_url: "https://avatars.githubusercontent.com/u/25628854?v=4;
+  - name: "Sylvia"
+title: "Technical Writer"
+url: "https://github.com/SylviaBABY;
+image_url: "https://avatars.githubusercontent.com/u/39793568?v=4;
+keywords: 
+- Apache APISIX
+- Keycloak
+- Authentication
+- Integration
+description: This article shows you how to use OpenID-Connect protocol and 
Keycloak for identity authentication in Apache APISIX through detailed steps.
+tags: [Technology]
+---
+
+> This article shows you how to use OpenID-Connect protocol and Keycloak for 
identity authentication in Apache APISIX through detailed steps.
+
+
+
+[Keycloak](https://www.keycloak.org/) is an open source identity and access 
management solution for modern applications and services. Keycloak supports 
Single-Sign On, which enables services to interface with Keycloak through 
protocols such as OpenID Connect, OAuth 2.0, etc. Keycloak also supports 
integrations with different authentication services, such as Github, Google and 
Facebook.
+
+In addition, Keycloak also supports user federation, and can import users 
through LDAP and Kerberos. For more information about Keycloak, please refer to 
the [official documentation](https://www.keycloak.org/about).
+
+## How to Use
+
+### Environment Preparation
+
+Make sure that Apache APISIX is started in your environment before proceeding 
with the following steps.
+
+ Start Keycloak
+
+Here we use `docker-compose` to start Keycloak with PostgreSQL.
+
+```yaml
+version: '3.7'
+
+services:
+  postgres:
+  image: postgres:12.2
+  container_name: postgres
+  environment:
+POSTGRES_DB: keycloak
+POSTGRES_USER: keycloak
+POSTGRES_PASSWORD: password
+
+  keycloak:
+  image: jboss/keycloak:9.0.2
+  

[GitHub] [apisix-go-plugin-runner] GhangZh opened a new issue #53: request help: support http proxy

2021-12-09 Thread GitBox


GhangZh opened a new issue #53:
URL: https://github.com/apache/apisix-go-plugin-runner/issues/53


   ### Issue description
   I want to support the forward-auth , but how does go-pugin-runner support me 
to proxy the current request directly to the url, and then process the response 
and pass it on?
   I wrote a version in lua, but our technology stack is unified with go, so I 
want to use go to implement
   ```bash
   local core = require("apisix.core")
   local http = require("resty.http")
   local http_new = http.new()
   local res, err = http_new:request_uri("https://forward-auth.xxx.com;, {
   ssl_verify = false,
   method = "GET",
   headers = {
   ["X-Forwarded-User"] = core.request.header(ctx, 
"X-Forwarded-User"),
   ["X-Forwarded-UID"] = core.request.header(ctx, 
"X-Forwarded-UID"),
   ["Cookie"]=core.request.header(ctx,"Cookie")
   },
   })
   if err ~= nil then
   core.log.error(" Serverless Request Error: ", err)
   return
   end
   if (res ~= nil) then
   for k, v in pairs(res.headers) do
   core.response.set_header(k, v)
   end
   end
   if res.status == 302 then
   core.response.set_header("Location", res.headers.location)
   core.response.exit(302)
   return
   end
   ```
   ### Environment
   
   * APISIX Go Plugin Runner's version:
   * APISIX version:
   * Go version:
   * OS (cmd: `uname -a`):
   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #2238: feat: Support APISIX_PROFILE for env-specific configuration

2021-12-09 Thread GitBox


juzhiyuan commented on pull request #2238:
URL: https://github.com/apache/apisix-dashboard/pull/2238#issuecomment-990587474


   Hi @kevinw66, please take a look at the CI 


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] juzhiyuan commented on a change in pull request #5718: docs: refactor Installation Guide

2021-12-09 Thread GitBox


juzhiyuan commented on a change in pull request #5718:
URL: https://github.com/apache/apisix/pull/5718#discussion_r766320046



##
File path: docs/zh/latest/how-to-build.md
##
@@ -21,36 +21,37 @@ title: 如何构建 Apache APISIX
 #
 -->
 
-## 步骤1:安装依赖
-
-Apache APISIX 的运行环境需要依赖 NGINX 和 etcd,所以在安装 Apache APISIX 
前,请根据您使用的操作系统安装对应的依赖。我们提供了 **CentOS7** 、**Fedora 31 & 32** 、**Ubuntu 16.04 & 
18.04** 、 **Debian 9 & 10** 和 **MacOS** 上的依赖安装操作步骤,详情请参考 
[安装依赖](install-dependencies.md)。
-
-通过 Docker 或 Helm Chart 安装 Apache APISIX 时,已经包含了所需的 NGINX 和 etcd,请参照各自对应的文档。
-
-## 步骤2:安装 Apache APISIX
+## 步骤1:安装 Apache APISIX
 
 你可以通过 RPM 仓库、RPM 包、Docker、Helm Chart、源码包等多种方式来安装 Apache APISIX。请在以下选项中选择其中一种执行。
 
 ### 通过 RPM 仓库安装(CentOS 7)
 
-这种安装方式适用于 CentOS 7 操作系统。Apache APISIX 已经支持适用于 CentOS 7 的 RPM 仓库。请运行以下命令安装 RPM 
仓库和 Apache APISIX。
+这种安装方式适用于 CentOS 7 操作系统。
+
+如果尚未安装 OpenResty 的官方 RPM 仓库,请使用以下命令自动安装 OpenResty 和 Apache APISIX 的 RPM 仓库。
 
 ```shell
-sudo yum-config-manager --add-repo 
https://repos.apiseven.com/packages/centos/apache-apisix.repo
-# View the information of the latest apisix package
-sudo yum info -y apisix
+$ sudo yum install -y 
https://repos.apiseven.com/packages/centos/apache-apisix-repo-1.0-1.noarch.rpm
+```
 
-# Will show the existing apisix packages
-sudo yum --showduplicates list apisix
+如果已安装 OpenResty 的官方 RPM 仓库,请使用以下命令自动安装 Apache APISIX 的 RPM 仓库。
 
-# Will install the latest apisix package
-sudo yum install apisix
+```

Review comment:
   We'd better keep the same lang mark as other changes 

##
File path: docs/zh/latest/how-to-build.md
##
@@ -21,36 +21,37 @@ title: 如何构建 Apache APISIX
 #
 -->
 
-## 步骤1:安装依赖
-
-Apache APISIX 的运行环境需要依赖 NGINX 和 etcd,所以在安装 Apache APISIX 
前,请根据您使用的操作系统安装对应的依赖。我们提供了 **CentOS7** 、**Fedora 31 & 32** 、**Ubuntu 16.04 & 
18.04** 、 **Debian 9 & 10** 和 **MacOS** 上的依赖安装操作步骤,详情请参考 
[安装依赖](install-dependencies.md)。
-
-通过 Docker 或 Helm Chart 安装 Apache APISIX 时,已经包含了所需的 NGINX 和 etcd,请参照各自对应的文档。
-
-## 步骤2:安装 Apache APISIX
+## 步骤1:安装 Apache APISIX
 
 你可以通过 RPM 仓库、RPM 包、Docker、Helm Chart、源码包等多种方式来安装 Apache APISIX。请在以下选项中选择其中一种执行。
 
 ### 通过 RPM 仓库安装(CentOS 7)
 
-这种安装方式适用于 CentOS 7 操作系统。Apache APISIX 已经支持适用于 CentOS 7 的 RPM 仓库。请运行以下命令安装 RPM 
仓库和 Apache APISIX。
+这种安装方式适用于 CentOS 7 操作系统。

Review comment:
   Users may ask: how about other versions of CentOS?




-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] juzhiyuan merged pull request #2200: test: migrate route_export_test e2e

2021-12-09 Thread GitBox


juzhiyuan merged pull request #2200:
URL: https://github.com/apache/apisix-dashboard/pull/2200


   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander opened a new pull request #5763: refactor: use manager to manage batch processor

2021-12-09 Thread GitBox


spacewander opened a new pull request #5763:
URL: https://github.com/apache/apisix/pull/5763


   Signed-off-by: spacewander 
   
   ### What this PR does / why we need it:
   
   
   
   ### 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?
   * [x] Have you modified the corresponding document?
   * [x] Is this PR backward compatible? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-ingress-controller] neverCase commented on pull request #791: feat: add ApisixPluginConfig translator (#638)

2021-12-09 Thread GitBox


neverCase commented on pull request #791:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/791#issuecomment-990575890


   > Did you merge code from master?
   
   Yes.
   But the changes about the v2beta3 make me confused, cause my previous pr 
about the ApisixPluginConfig was in
   the v2beta2 directory


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-ingress-controller] neverCase removed a comment on pull request #791: feat: add ApisixPluginConfig translator (#638)

2021-12-09 Thread GitBox


neverCase removed a comment on pull request #791:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/791#issuecomment-990575780


   > Details
   
   Yes.
   But the changes about the v2beta3 make me confused, cause my previous pr 
about the ApisixPluginConfig was in
   the v2beta2 directory


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-ingress-controller] neverCase commented on pull request #791: feat: add ApisixPluginConfig translator (#638)

2021-12-09 Thread GitBox


neverCase commented on pull request #791:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/791#issuecomment-990575780


   > Details
   
   Yes.
   But the changes about the v2beta3 make me confused, cause my previous pr 
about the ApisixPluginConfig was in
   the v2beta2 directory


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-website] yzeng25 commented on a change in pull request #799: docs: add Keycloak Auth with Apache APISIX blog

2021-12-09 Thread GitBox


yzeng25 commented on a change in pull request #799:
URL: https://github.com/apache/apisix-website/pull/799#discussion_r766301570



##
File path: website/blog/2021/12/10/integrate-keycloak-auth-in-apisix.md
##
@@ -0,0 +1,210 @@
+---
+title: "How to Integrate Keycloak for Authentication with Apache APISIX"
+authors:
+  - name: "Peter"

Review comment:
   ```suggestion
 - name: "Xinxin Zhu"
   ```

##
File path: 
website/i18n/zh/docusaurus-plugin-content-blog/2021/12/10/integrate-keycloak-auth-in-apisix.md
##
@@ -0,0 +1,212 @@
+---
+title: "如何在 Apache APISIX 中集成 Keycloak 实现身份认证"
+authors:
+  - name: "朱欣欣"
+title: "Author"
+url: "https://github.com/starsz;
+image_url: "https://avatars.githubusercontent.com/u/25628854?v=4;
+  - name: "苏钰"
+title: "Technical Writer"
+url: "https://github.com/SylviaBABY;
+image_url: "https://avatars.githubusercontent.com/u/39793568?v=4;
+keywords: 
+- Apache APISIX
+- Keycloak
+- 身份认证
+- 集成
+description: 本文通过详细的步骤为大家展示了如何在 Apache APISIX 使用 OpenID-Connect 协议和 Keycloak 
进行身份认证。通过对接 Keycloak,Apache APISIX 仅需通过配置即可实现对使用者和应用服务进行认证与鉴权,从而大大减少了相关开发工作。
+tags: [Technology]
+---
+
+> 本文通过详细的步骤为大家展示了如何在 Apache APISIX 使用 OpenID-Connect 协议和 Keycloak 进行身份认证。通过对接 
Keycloak,Apache APISIX 仅需通过配置即可实现对使用者和应用服务进行认证与鉴权,从而大大减少了相关开发工作。
+
+
+
+## 什么是 Keycloak
+
+[Keycloak](https://www.keycloak.org/) 是一个针对现代应用程序和服务的开源身份和访问管理解决方案。Keycloak 
支持单点登录(Single-Sign On),因此服务可以通过 OpenID Connect、OAuth 2.0 等协议对接 Keycloak。同时 
Keycloak 也支持集成不同的身份认证服务,例如 Github、Google 和 Facebook 等。
+
+另外 Keycloak 也支持用户联邦功能,可以通过 LDAP 或 Kerberos 来导入用户。更多 Keycloak 
内容可以参考[官方文档介绍](https://www.keycloak.org/documentation)。
+
+## 如何使用
+
+### 环境准备
+
+在进行如下步骤前,请确保环境中已启动 Apache APISIX。
+
+ 启动 Keycloak
+
+这里我们使用 `docker-compose` 将 Keycloak 与其所依赖的的 PostgreSQL 一并启动。
+
+```yaml
+version: '3.7'
+
+services:
+  postgres:
+  image: postgres:12.2
+  container_name: postgres
+  environment:
+POSTGRES_DB: keycloak
+POSTGRES_USER: keycloak
+POSTGRES_PASSWORD: password
+
+  keycloak:
+  image: jboss/keycloak:9.0.2
+  container_name: keycloak
+  environment:
+DB_VENDOR: POSTGRES
+DB_ADDR: postgres
+DB_DATABASE: keycloak
+DB_USER: keycloak
+DB_PASSWORD: password
+KEYCLOAK_USER: admin
+KEYCLOAK_PASSWORD: password
+PROXY_ADDRESS_FORWARDING: "true"
+  ports:
+- 8080:8080
+  depends_on:
+- postgres
+```
+
+```shell
+docker-compose up
+```
+
+执行完毕后需要确认 Keycloak 和 PostgreSQL 是否已成功启动。
+
+```shell
+docker-compose ps
+```
+
+ 配置 Keycloak
+
+Keycloak 启动完成之后,使用浏览器访问 "http://127.0.0.1:8080/auth/admin/",并键入 
`admin/password` 账号密码进行登录管理员控制台。
+
+# 创建 realm
+
+首先,创建一个名称为 `apisix_test_realm`的 `realm`。在 Keycloak 中,`realm` 
是一个专门用来管理项目的工作区,不同 `realm`之间的资源是相互隔离的。
+
+Keycloak 中 `realm` 分为两类 : 一类是 `master realm`,由 Keycloak 刚启动时创建,用于管理 admin 
账号以及创建其他的 `realm`。第二类是 `other realm`, 由 `master realm` 中的 admin 创建,可以在该 `realm` 
中进行用户和应用的创建并进行管理和使用。更多细节可参考 [Keycloak 中 realm 和 
users](https://www.keycloak.org/docs/latest/getting_started/index.html#realms-and-users)
 相关内容。
+
+![创建 
realm](https://static.apiseven.com/202108/1639101202459-72803240-b358-4c69-a9ca-4b6751a8547d.png)
+
+![编辑 realm 
名称](https://static.apiseven.com/202108/1639101243617-0498379f-392e-4837-8f37-eee558c21e3d.png)
+
+# 创建 Client
+
+接下来需要创建 `OpenID Connect Client`。在 Keycloak 中,Client 表示允许向 Keycloak 发起身份认证的客户端。
+
+在本示例场景中,`Apache APISIX` 相当于一个客户端,负责向 Keycloak 发起身份认证请求,因此我们创建一个名称为 `apisix` 的 
Client。关于 Client 更多细节可参考 [Keycloak OIDC 
Clients](https://www.keycloak.org/docs/latest/server_admin/#_oidc_clients)。
+
+![创建 OpenID 
Client](https://static.apiseven.com/202108/1639101288379-9a46b92a-294e-4b40-ac7e-408284a3d0ad.png)
+
+![创建 Client 
名称](https://static.apiseven.com/202108/1639101327347-c8ab463a-1cb0-4eb0-a26f-17d7c0c54846.png)
+
+# 配置 Client
+
+Client 创建完成后,需要为 Client 配置 Apache APISIX 的访问类型。
+
+ 在 Keycloak 中 `Access Type` 分为三类:
+
+1. **confidential**。适用于需要执行浏览器登录的应用,客户端会通过 `client secret` 来获取 `access token` 
, 多运用于服务端渲染的 web 系统。
+2. **public**。适用于需要执行浏览器登录的应用,多运用于使用 vue 和 react 实现的前端项目。
+3. **bearer-only**。适用于不需要执行浏览器登录的应用,只允许携带 `bearer token` 访问,多运用于 RESTful API 
的使用场景。
+
+更多关于 Client 设置细节可参考 [Keycloak OIDC Clients 
高级设置](https://www.keycloak.org/docs/latest/server_admin/#advanced-settings)。
+
+因为我们使用了 Apache APISIX 作为服务端的 Client, 因此可以选择类型一或类型三(这里以类型一为例进行演示)。
+
+![配置 Client 
类型](https://static.apiseven.com/202108/1639101355171-e368730b-2a72-4c4d-9397-cf4a1c8f2806.png)
+
+# 创建 User
+
+Keycloak 支持对接其他第三方的用户系统,例如 Google 和 Facebook。或者使用 LDAP 
的方式进行导入或手动创建用户,这里我们使用「手动创建用户」来进行演示。
+
+![创建用户](https://static.apiseven.com/202108/1639101385277-b2f578c0-e68a-4945-83ac-7a77145bb056.png)
+
+![添加用户相关信息](https://static.apiseven.com/202108/1639101406281-724bbb50-96fc-4aa8-aec1-9414f83c199d.png)
+
+在 Credentials 页面设置用户的密码。
+

[GitHub] [apisix] spacewander merged pull request #5735: fix(log-rotate): after enabling compression collect log exceptions

2021-12-09 Thread GitBox


spacewander merged pull request #5735:
URL: https://github.com/apache/apisix/pull/5735


   


-- 
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-unsubscr...@apisix.apache.org

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




[apisix] branch release/2.10 updated: fix(log-rotate): after enabling compression collect log exceptions (#5735)

2021-12-09 Thread spacewander
This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch release/2.10
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/release/2.10 by this push:
 new ffc6cd6  fix(log-rotate): after enabling compression collect log 
exceptions (#5735)
ffc6cd6 is described below

commit ffc6cd6451a2760b92eaa9e92a13cafe938eb65c
Author: 帅进超 
AuthorDate: Fri Dec 10 11:17:20 2021 +0800

fix(log-rotate): after enabling compression collect log exceptions (#5735)

Co-authored-by: 罗泽轩 
---
 apisix/plugins/log-rotate.lua | 202 --
 t/misc/patch.t|   8 +-
 t/plugin/log-rotate.t |  59 ++--
 t/plugin/log-rotate2.t|  54 +--
 t/plugin/traffic-split.t  |   6 +-
 5 files changed, 240 insertions(+), 89 deletions(-)

diff --git a/apisix/plugins/log-rotate.lua b/apisix/plugins/log-rotate.lua
index b861f7f..643cbed 100644
--- a/apisix/plugins/log-rotate.lua
+++ b/apisix/plugins/log-rotate.lua
@@ -22,12 +22,21 @@ local process = require("ngx.process")
 local signal = require("resty.signal")
 local shell = require("resty.shell")
 local ngx = ngx
+local ngx_time = ngx.time
+local ngx_update_time = ngx.update_time
 local lfs = require("lfs")
-local io = io
-local os = os
-local table = table
-local string = string
-local str_find = core.string.find
+local type = type
+local io_open = io.open
+local os_date = os.date
+local os_remove = os.remove
+local os_rename = os.rename
+local str_sub = string.sub
+local str_find = string.find
+local str_format = string.format
+local str_reverse = string.reverse
+local tab_insert = table.insert
+local tab_sort = table.sort
+
 local local_conf
 
 
@@ -35,7 +44,11 @@ local plugin_name = "log-rotate"
 local INTERVAL = 60 * 60-- rotate interval (unit: second)
 local MAX_KEPT = 24 * 7 -- max number of log files will be kept
 local COMPRESSION_FILE_SUFFIX = ".tar.gz" -- compression file suffix
+local rotate_time
+local default_logs
 local enable_compression = false
+local DEFAULT_ACCESS_LOG_FILENAME = "access.log"
+local DEFAULT_ERROR_LOG_FILENAME = "error.log"
 
 local schema = {
 type = "object",
@@ -53,7 +66,7 @@ local _M = {
 
 
 local function file_exists(path)
-local file = io.open(path, "r")
+local file = io_open(path, "r")
 if file then
 file:close()
 end
@@ -62,7 +75,7 @@ end
 
 
 local function get_last_index(str, key)
-local rev = string.reverse(str)
+local rev = str_reverse(str)
 local _, idx = str_find(rev, key)
 local n
 if idx then
@@ -88,15 +101,15 @@ local function get_log_path_info(file_type)
 local prefix = ngx.config.prefix()
 
 if conf_path then
-local root = string.sub(conf_path, 1, 1)
+local root = str_sub(conf_path, 1, 1)
 -- relative path
 if root ~= "/" then
 conf_path = prefix .. conf_path
 end
 local n = get_last_index(conf_path, "/")
 if n ~= nil and n ~= #conf_path then
-local dir = string.sub(conf_path, 1, n)
-local name = string.sub(conf_path, n + 1)
+local dir = str_sub(conf_path, 1, n)
+local name = str_sub(conf_path, n + 1)
 return dir, name
 end
 end
@@ -105,50 +118,11 @@ local function get_log_path_info(file_type)
 end
 
 
-local function rotate_file(date_str, file_type)
-local log_dir, filename = get_log_path_info(file_type)
-
-core.log.info("rotate log_dir:", log_dir)
-core.log.info("rotate filename:", filename)
-
-local new_filename = date_str .. "__" .. filename
-local file_path = log_dir .. new_filename
-if file_exists(file_path) then
-core.log.info("file exist: ", file_path)
-return false
-end
-
-local file_path_org = log_dir .. filename
-local ok, msg = os.rename(file_path_org, file_path)
-core.log.info("move file from ", file_path_org, " to ", file_path,
-  " res:", ok, " msg:", msg)
-
-if ok and enable_compression then
-local compression_filename = new_filename .. COMPRESSION_FILE_SUFFIX
-local cmd = string.format("cd %s && tar -zcf %s %s",
-log_dir, compression_filename, new_filename)
-core.log.info("log file compress command: " .. cmd)
-local ok, stdout, stderr, reason, status = shell.run(cmd)
-core.log.info("compress log file from ", new_filename, " to ", 
compression_filename,
-" res:", ok)
-
-if ok then
-ok = os.remove(file_path)
-core.log.warn("remove uncompressed log file: ", file_path, " ret: 
", ok)
-else
-core.log.error("failed to compress log file: ", new_filename, " 
ret: ", ok,
-" stdout: ", stdout, " stderr: ", stderr, " reason: ", reason, 
" status: ", status)
-end
-end
-
-return true
-end
-
-
-local function 

[GitHub] [apisix] spacewander merged pull request #5748: chore: bump apisix-build-tools to v2.6.0

2021-12-09 Thread GitBox


spacewander merged pull request #5748:
URL: https://github.com/apache/apisix/pull/5748


   


-- 
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-unsubscr...@apisix.apache.org

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




[apisix] branch master updated: chore: bump apisix-build-tools to v2.6.0 (#5748)

2021-12-09 Thread spacewander
This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
 new 08a363d  chore: bump apisix-build-tools to v2.6.0 (#5748)
08a363d is described below

commit 08a363d2c3a0b4d34d144bf205e8f5dc5cc63d81
Author: 罗泽轩 
AuthorDate: Fri Dec 10 11:06:37 2021 +0800

chore: bump apisix-build-tools to v2.6.0 (#5748)
---
 .github/workflows/centos7-ci.yml | 2 +-
 utils/linux-install-openresty.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/centos7-ci.yml b/.github/workflows/centos7-ci.yml
index db5ad0b..c136202 100644
--- a/.github/workflows/centos7-ci.yml
+++ b/.github/workflows/centos7-ci.yml
@@ -44,7 +44,7 @@ jobs:
   run: |
 export VERSION=${{ steps.branch_env.outputs.version }}
 sudo gem install --no-document fpm
-git clone -b v2.5.0 https://github.com/api7/apisix-build-tools.git
+git clone -b v2.6.0 https://github.com/api7/apisix-build-tools.git
 
 # move codes under build tool
 mkdir ./apisix-build-tools/apisix
diff --git a/utils/linux-install-openresty.sh b/utils/linux-install-openresty.sh
index ce0d8a4..017ebf5 100755
--- a/utils/linux-install-openresty.sh
+++ b/utils/linux-install-openresty.sh
@@ -26,7 +26,7 @@ sudo apt-get update
 
 if [ "$OPENRESTY_VERSION" == "source" ]; then
 cd ..
-wget 
https://raw.githubusercontent.com/api7/apisix-build-tools/v2.5.0/build-apisix-base.sh
+wget 
https://raw.githubusercontent.com/api7/apisix-build-tools/v2.6.0/build-apisix-base.sh
 chmod +x build-apisix-base.sh
 ./build-apisix-base.sh latest
 


[GitHub] [apisix-website] juzhiyuan opened a new pull request #800: chore(navbar): take Team & Helo from Resources navbar

2021-12-09 Thread GitBox


juzhiyuan opened a new pull request #800:
URL: https://github.com/apache/apisix-website/pull/800


   **Changes:**
   
   I just took Team & Help from the Resource navbar to the top-level navbar, 
bcoz they're important to our users and community  


-- 
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-unsubscr...@apisix.apache.org

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




[apisix-website] branch juzhiyuan-patch-1 created (now 0f0632c)

2021-12-09 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a change to branch juzhiyuan-patch-1
in repository https://gitbox.apache.org/repos/asf/apisix-website.git.


  at 0f0632c  chore(navbar): take Team & Helo from Resources navbar

No new revisions were added by this update.


[GitHub] [apisix] Jon-Gaara commented on issue #5749: bug: apisix reload Cannot clear uninitialized plug-ins

2021-12-09 Thread GitBox


Jon-Gaara commented on issue #5749:
URL: https://github.com/apache/apisix/issues/5749#issuecomment-990565028


   1.目前我们在开发测试的时候,由于我一个同事新开发一个插件,但是这个插件不需要参数,所以就没加schema,出现了以上的情况
   
2.还有一种情况,如果我之前的插件是正常运行的,但是由于我把插件的version删掉或者schema删掉,然后reload,这时候肯定是加载不成功的,然后我把version和schema再修改回来,然后reload,结果我一个正常运行的插件,就不能运行。
3.当然这些情况一般只会发生在开发阶段的一些不规范的操作才能产生,但是我觉得因为在apisix的热加载文档有所体现,
   因为根据apisix的文档,不管新增、修改、还是删除插件,都不需要重启服务,但是我发现在某些情况并不会热加载


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] leslie-tsang commented on a change in pull request #5727: feat: add CSRF plugin

2021-12-09 Thread GitBox


leslie-tsang commented on a change in pull request #5727:
URL: https://github.com/apache/apisix/pull/5727#discussion_r766286549



##
File path: apisix/plugins/csrf.lua
##
@@ -0,0 +1,169 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core = require("apisix.core")
+local ngx = ngx
+local plugin_name = "csrf"
+local ngx_encode_base64 = ngx.encode_base64
+local ngx_decode_base64 = ngx.decode_base64
+local request_method = ngx.var.request_method
+local timer = ngx.time
+local cookie_time = ngx.cookie_time
+local ck = require "resty.cookie"
+local math = math
+
+local schema = {
+type = "object",
+properties = {
+  key = {
+description = "use to generate csrf token",
+type = "string",
+  },
+  expires = {
+description = "expires time for csrf token",
+type = "integer",
+default = 7200
+  },
+  name = {
+description = "the csrf token name",
+type = "string",
+default = "apisix_csrf_token"
+  }
+},
+required = {"key"}
+}
+
+local _M = {
+version = 0.1,
+priority = 3500,
+name = plugin_name,
+schema = schema,
+}
+
+function _M.check_schema(conf)
+return core.schema.check(schema, conf)
+end
+
+
+local function gen_sign(random, expires, key)
+local resty_sha256 = require "resty.sha256"

Review comment:
   ```suggestion
   local resty_sha256 = require("resty.sha256")
   ```
   Ditto
   BTW, shall we put this require at the very beginning of the `csrf.lua` ? 

##
File path: apisix/plugins/csrf.lua
##
@@ -0,0 +1,169 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core = require("apisix.core")
+local ngx = ngx
+local plugin_name = "csrf"
+local ngx_encode_base64 = ngx.encode_base64
+local ngx_decode_base64 = ngx.decode_base64
+local request_method = ngx.var.request_method
+local timer = ngx.time
+local cookie_time = ngx.cookie_time
+local ck = require "resty.cookie"

Review comment:
   ```suggestion
   local ck = require("resty.cookie")
   ```
   Would this be better ?

##
File path: apisix/plugins/csrf.lua
##
@@ -0,0 +1,169 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core = require("apisix.core")
+local ngx = ngx
+local plugin_name = "csrf"
+local ngx_encode_base64 = ngx.encode_base64
+local ngx_decode_base64 = ngx.decode_base64
+local request_method = ngx.var.request_method
+local timer = ngx.time
+local cookie_time = ngx.cookie_time
+local ck = require "resty.cookie"
+local math = math
+
+local schema = {
+type = "object",
+properties = {
+  key = {

Review comment:
   From the way this variable is used, it seems more 

[GitHub] [apisix-website] SylviaBABY opened a new pull request #799: docs: add Keycloak Auth with Apache APISIX blog

2021-12-09 Thread GitBox


SylviaBABY opened a new pull request #799:
URL: https://github.com/apache/apisix-website/pull/799


   Changes:
   
   1. add Keycloak Auth with Apache APISIX blog
   2. update co-author fomat
   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2236: test(label): migrate label test to ginkgo implement

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2236:
URL: https://github.com/apache/apisix-dashboard/pull/2236#issuecomment-989613226


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2236](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (17cb2d8) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `7.57%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#2236  +/-   ##
   ==
   - Coverage   69.87%   62.30%   -7.58% 
   ==
 Files 184   57 -127 
 Lines7274 3905-3369 
 Branches  8290 -829 
   ==
   - Hits 5083 2433-2650 
   + Misses   1897 1187 -710 
   + Partials  294  285   -9 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `41.17% <ø> (-3.36%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/internal/core/migrate/conflict.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9jb25mbGljdC5nbw==)
 | `0.00% <0.00%> (-80.00%)` | :arrow_down: |
   | 
[api/internal/core/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9taWdyYXRlLmdv)
 | `0.00% <0.00%> (-76.20%)` | :arrow_down: |
   | 
[api/internal/core/migrate/dataset.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9kYXRhc2V0Lmdv)
 | `0.00% <0.00%> (-53.04%)` | :arrow_down: |
   | 
[api/internal/handler/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbWlncmF0ZS9taWdyYXRlLmdv)
 | `8.06% <0.00%> (-51.62%)` | :arrow_down: |
   | 
[api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=)
 | `23.00% <0.00%> (-44.25%)` | :arrow_down: |
   | 
[api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGVhbHRoei9oZWFsdGh6Lmdv)
 | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | 
[api/internal/handler/stream\_route/stream\_route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3RyZWFtX3JvdXRlL3N0cmVhbV9yb3V0ZS5nbw==)
 | `36.36% <0.00%> (-31.17%)` | :arrow_down: |
   | 

[GitHub] [apisix-dashboard] codecov-commenter commented on pull request #2238: feat: Support APISIX_PROFILE for env-specific configuration

2021-12-09 Thread GitBox


codecov-commenter commented on pull request #2238:
URL: https://github.com/apache/apisix-dashboard/pull/2238#issuecomment-990536196


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2238?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2238](https://codecov.io/gh/apache/apisix-dashboard/pull/2238?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (76760c8) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `20.71%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2238?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#2238   +/-   ##
   ===
   - Coverage   69.87%   49.16%   -20.72% 
   ===
 Files 184   41  -143 
 Lines7274 3171 -4103 
 Branches  8290  -829 
   ===
   - Hits 5083 1559 -3524 
   + Misses   1897 1412  -485 
   + Partials  294  200   -94 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2238?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `0.00% <0.00%> (-72.60%)` | :arrow_down: |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
   | 
[api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=)
 | `0.00% <0.00%> (-67.26%)` | :arrow_down: |
   | 
[api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2238/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==)
 | `0.00% <0.00%> 

[apisix-dashboard] branch release/2.10 created (now cd56394)

2021-12-09 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a change to branch release/2.10
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git.


  at cd56394  chore(deps): bump actions/upload-artifact from 2.2.4 to 2.3.0 
(#2235)

No new revisions were added by this update.


[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2237: test(balancer): migrate balancer test to ginkgo implement

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2237:
URL: https://github.com/apache/apisix-dashboard/pull/2237#issuecomment-989638325


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2237](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (632ccec) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **increase** coverage by `1.33%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#2237  +/-   ##
   ==
   + Coverage   69.87%   71.21%   +1.33% 
   ==
 Files 184   57 -127 
 Lines7274 3905-3369 
 Branches  8290 -829 
   ==
   - Hits 5083 2781-2302 
   + Misses   1897  828-1069 
   - Partials  294  296   +2 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `44.40% <ø> (-0.13%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `51.77% <ø> (+0.17%)` | :arrow_up: |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv)
 | `47.24% <0.00%> (-3.94%)` | :arrow_down: |
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `89.58% <0.00%> (-1.05%)` | :arrow_down: |
   | 
[...es/Route/components/DebugViews/DebugParamsView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL0RlYnVnVmlld3MvRGVidWdQYXJhbXNWaWV3LnRzeA==)
 | | |
   | 
[...mponents/Upstream/components/active-check/Host.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvYWN0aXZlLWNoZWNrL0hvc3QudHN4)
 | | |
   | 
[...pages/Route/components/Step1/RequestConfigView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAxL1JlcXVlc3RDb25maWdWaWV3LnRzeA==)
 | | |
   | 
[web/src/global.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9nbG9iYWwudHN4)
 | | |
   | 
[web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==)
 | | |
   | 

[GitHub] [apisix-dashboard] juzhiyuan merged pull request #2235: chore(deps): bump actions/upload-artifact from 2.2.4 to 2.3.0

2021-12-09 Thread GitBox


juzhiyuan merged pull request #2235:
URL: https://github.com/apache/apisix-dashboard/pull/2235


   


-- 
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-unsubscr...@apisix.apache.org

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




[apisix-dashboard] branch master updated: chore(deps): bump actions/upload-artifact from 2.2.4 to 2.3.0 (#2235)

2021-12-09 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
 new cd56394  chore(deps): bump actions/upload-artifact from 2.2.4 to 2.3.0 
(#2235)
cd56394 is described below

commit cd56394d45320f91d2a3dfdcf824d2db1cceb838
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Fri Dec 10 10:09:40 2021 +0800

chore(deps): bump actions/upload-artifact from 2.2.4 to 2.3.0 (#2235)
---
 .github/workflows/auto-build-rpm.yml   | 2 +-
 .github/workflows/frontend-e2e-test.yml| 2 +-
 .github/workflows/frontend-plugin-e2e-test.yml | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/auto-build-rpm.yml 
b/.github/workflows/auto-build-rpm.yml
index 4f41017..df004d4 100644
--- a/.github/workflows/auto-build-rpm.yml
+++ b/.github/workflows/auto-build-rpm.yml
@@ -80,7 +80,7 @@ jobs:
 
   - name: Publish Artifact
 if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
-uses: actions/upload-artifact@v2.2.4
+uses: actions/upload-artifact@v2.3.0
 with:
   name: "rpm"
   path: "./apisix-build-tools/output/apisix-dashboard-${{ 
steps.branch_env.outputs.version }}-0.el7.x86_64.rpm"
diff --git a/.github/workflows/frontend-e2e-test.yml 
b/.github/workflows/frontend-e2e-test.yml
index 50661d5..95e6239 100644
--- a/.github/workflows/frontend-e2e-test.yml
+++ b/.github/workflows/frontend-e2e-test.yml
@@ -93,7 +93,7 @@ jobs:
   bash <(curl -s https://codecov.io/bash) -f 
./coverage/coverage-final.json -F frontend-e2e-test
 
   - name: Archive code coverage results
-uses: actions/upload-artifact@v2.2.4
+uses: actions/upload-artifact@v2.3.0
 if: always()
 with:
   name: cypress-report
diff --git a/.github/workflows/frontend-plugin-e2e-test.yml 
b/.github/workflows/frontend-plugin-e2e-test.yml
index 075360e..e73e77d 100644
--- a/.github/workflows/frontend-plugin-e2e-test.yml
+++ b/.github/workflows/frontend-plugin-e2e-test.yml
@@ -86,7 +86,7 @@ jobs:
 run: yarn test-plugin:e2e
 
   - name: Archive code coverage results
-uses: actions/upload-artifact@v2.2.4
+uses: actions/upload-artifact@v2.3.0
 if: always()
 with:
   name: cypress-report


[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2237: test(balancer): migrate balancer test to ginkgo implement

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2237:
URL: https://github.com/apache/apisix-dashboard/pull/2237#issuecomment-989638325


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2237](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (632ccec) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `1.60%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#2237  +/-   ##
   ==
   - Coverage   69.87%   68.27%   -1.61% 
   ==
 Files 184   57 -127 
 Lines7274 3905-3369 
 Branches  8290 -829 
   ==
   - Hits 5083 2666-2417 
   + Misses   1897  945 -952 
 Partials  294  294  
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `51.77% <ø> (+0.17%)` | :arrow_up: |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `32.11% <0.00%> (-35.41%)` | :arrow_down: |
   | 
[api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv)
 | `60.00% <0.00%> (-13.00%)` | :arrow_down: |
   | 
[api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv)
 | `47.24% <0.00%> (-3.94%)` | :arrow_down: |
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `88.54% <0.00%> (-2.09%)` | :arrow_down: |
   | 
[api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=)
 | `84.48% <0.00%> (-1.73%)` | :arrow_down: |
   | 
[api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=)
 | `70.20% <0.00%> (-0.51%)` | :arrow_down: |
   | 
[...rc/components/Upstream/components/UpstreamType.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvVXBzdHJlYW1UeXBlLnRzeA==)
 | | |
   | 

[GitHub] [apisix-dashboard] juzhiyuan merged pull request #2234: chore: update URL for online demo

2021-12-09 Thread GitBox


juzhiyuan merged pull request #2234:
URL: https://github.com/apache/apisix-dashboard/pull/2234


   


-- 
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-unsubscr...@apisix.apache.org

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




[apisix-dashboard] branch master updated (6b86ff4 -> 6e3b74a)

2021-12-09 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git.


from 6b86ff4  feat: basic support Apache APISIX 2.11 (#2233)
 add 6e3b74a  chore: update URL for online demo (#2234)

No new revisions were added by this update.

Summary of changes:
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2236: test(label): migrate label test to ginkgo implement

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2236:
URL: https://github.com/apache/apisix-dashboard/pull/2236#issuecomment-989613226


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2236](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (17cb2d8) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `20.71%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#2236   +/-   ##
   ===
   - Coverage   69.87%   49.16%   -20.72% 
   ===
 Files 184   41  -143 
 Lines7274 3171 -4103 
 Branches  8290  -829 
   ===
   - Hits 5083 1559 -3524 
   + Misses   1897 1412  -485 
   + Partials  294  200   -94 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `0.00% <0.00%> (-72.60%)` | :arrow_down: |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
   | 
[api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=)
 | `0.00% <0.00%> (-67.26%)` | :arrow_down: |
   | 
[api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==)
 | `0.00% 

[GitHub] [apisix] tokers commented on a change in pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


tokers commented on a change in pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#discussion_r766288132



##
File path: apisix/plugins/opa.lua
##
@@ -0,0 +1,104 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local core   = require("apisix.core")
+local http   = require("resty.http")
+local helper = require("apisix.plugins.opa.helper")
+
+local schema = {
+type = "object",
+properties = {
+host = {type = "string"},
+ssl_verify = {
+type = "boolean",
+default = true,
+},
+package = {type = "string"},
+decision = {type = "string", maxLength = 256},
+timeout = {
+type = "integer",
+minimum = 1,
+maximum = 6,
+default = 3000,
+description = "timeout in milliseconds",
+},
+keepalive = {type = "boolean", default = true},
+keepalive_timeout = {type = "integer", minimum = 1000, default = 
6},
+keepalive_pool = {type = "integer", minimum = 1, default = 5}
+},
+required = {"host", "package", "decision"}
+}
+
+
+local _M = {
+version = 0.1,
+priority = 2001,
+name = "opa",
+schema = schema,
+}
+
+
+function _M.check_schema(conf)
+return core.schema.check(schema, conf)
+end
+
+
+function _M.access(conf, ctx)
+local body = helper.build_opa_input(conf, ctx, "http")
+local params = {
+method = "POST",
+body = body,
+headers = {
+["Content-Type"] = "application/json",
+},
+keepalive = conf.keepalive,
+ssl_verify = conf.ssl_verify
+}
+
+if conf.keepalive then
+params.keepalive_timeout = conf.keepalive_timeout
+params.keepalive_pool = conf.keepalive_pool
+end
+
+local endpoint = conf.host .. "/v1/data/" .. conf.package .. "/" .. 
conf.decision
+
+local httpc = http.new()
+httpc:set_timeout(conf.timeout)
+
+local res, err = httpc:request_uri(endpoint, params)
+
+-- block by default when decision is unavailable
+if not res or err then
+core.log.error("failed to process OPA decision, err: ", err)
+return 403
+end
+
+-- parse the results of the decision
+local data, err = core.json.decode(res.body)
+
+if err then
+core.log.error("invalid response body: ", res.body, " err: ", err)
+return 403

Review comment:
   Should we return `500` when the json decoding is fail.y




-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2237: test(balancer): migrate balancer test to ginkgo implement

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2237:
URL: https://github.com/apache/apisix-dashboard/pull/2237#issuecomment-989638325


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2237](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (632ccec) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `20.71%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#2237   +/-   ##
   ===
   - Coverage   69.87%   49.16%   -20.72% 
   ===
 Files 184   41  -143 
 Lines7274 3171 -4103 
 Branches  8290  -829 
   ===
   - Hits 5083 1559 -3524 
   + Misses   1897 1412  -485 
   + Partials  294  200   -94 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `0.00% <0.00%> (-72.60%)` | :arrow_down: |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
   | 
[api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=)
 | `0.00% <0.00%> (-67.26%)` | :arrow_down: |
   | 
[api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==)
 | `0.00% 

[GitHub] [apisix] shuaijinchao commented on pull request #5735: fix(log-rotate): after enabling compression collect log exceptions

2021-12-09 Thread GitBox


shuaijinchao commented on pull request #5735:
URL: https://github.com/apache/apisix/pull/5735#issuecomment-990528925


   > @shuaijinchao Please check out the CI problems.
   
   this problem is caused by running the master code on the 2.10 version code 
and is not within the scope of this cherry-pick.


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] lixuewang commented on issue #5471: request help: When I use the domain as upstream nodes. If the DNS resolution of this domain changes.Can apisix sense it in real time?

2021-12-09 Thread GitBox


lixuewang commented on issue #5471:
URL: https://github.com/apache/apisix/issues/5471#issuecomment-990519856


   my case:
   systemA->apisix->(domainname)systemB(has ip IPA and ipB)
   
   1、systemA->apisix->IPA
   2、when domainname resolve ipB
   
   apisix still has many long established link to ipA
   
   but I wish apisix connect to IPB .because IPA is read only ,cannot write
   
   how can I resolve this question?
   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] leslie-tsang commented on issue #5723: CPU usage gets higher when Apache APISIX is running a long time

2021-12-09 Thread GitBox


leslie-tsang commented on issue #5723:
URL: https://github.com/apache/apisix/issues/5723#issuecomment-990513649


   @juzhiyuan plz assign this to me.


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] zaunist commented on pull request #2238: feat: Support APISIX_PROFILE for env-specific configuration

2021-12-09 Thread GitBox


zaunist commented on pull request #2238:
URL: https://github.com/apache/apisix-dashboard/pull/2238#issuecomment-990486493


   Hi @kevinw66 ,it looks great.
   cc @juzhiyuan, please unlock the CI to test this PR.


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on a change in pull request #5745: feat(vault): vault lua module, integration with jwt-auth authentication plugin

2021-12-09 Thread GitBox


spacewander commented on a change in pull request #5745:
URL: https://github.com/apache/apisix/pull/5745#discussion_r766274062



##
File path: apisix/plugins/jwt-auth.lua
##
@@ -76,7 +84,23 @@ local consumer_schema = {
 },
 },
 required = {"public_key", "private_key"},
-}
+},
+{
+properties = {
+vault = {
+type = "object",
+properties = {
+path = {type = "string"},
+add_prefix = {type = "boolean"}

Review comment:
   Please remove the path & add_prefix, which is too flexible, and made 
future evolution harder. Let's be strict from the beginning. It's easier to 
relax the rule than be more strict with the rule. If people really need this 
feature, we can add it at that time.




-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #798: docs: update blog contribution guidelines

2021-12-09 Thread GitBox


juzhiyuan commented on a change in pull request #798:
URL: https://github.com/apache/apisix-website/pull/798#discussion_r766271748



##
File path: website/docs/general/blog-contributing-guide.md
##
@@ -87,6 +112,14 @@ For business users or business cases, you can leave this 
item blank. Because Git
 
 The author's GitHub avatar, it is related with `authorURL`. For the same 
reason described  above, this is an optional field. See below for how to get 
the avatar.
 
+ authors
+
+Required field for co-author template. When a blog is co-authored by 2 people, 
please use `authors` instead of `author` to give credits to both authors. 
`authors` consists of the following fields: `authors.name`, `authors. url`, and 
`authors.image_url.`
+
+- `authors.name`: authors' names in plain text, for example: `name: "John 
Doe"`.
+- `authors. url`: authors' GitHub pages, for example: `url: "www.google.com"`.

Review comment:
   ```suggestion
   - `authors.url`: authors' GitHub pages, for example: `url: "www.google.com"`.
   ```

##
File path: website/docs/general/blog-contributing-guide.md
##
@@ -87,6 +112,14 @@ For business users or business cases, you can leave this 
item blank. Because Git
 
 The author's GitHub avatar, it is related with `authorURL`. For the same 
reason described  above, this is an optional field. See below for how to get 
the avatar.
 
+ authors
+
+Required field for co-author template. When a blog is co-authored by 2 people, 
please use `authors` instead of `author` to give credits to both authors. 
`authors` consists of the following fields: `authors.name`, `authors. url`, and 
`authors.image_url.`

Review comment:
   ```suggestion
   The required field for co-author template. When a blog is co-authored by 2 
people, please use `authors` instead of `author` to give credits to both 
authors. `authors` consists of the following fields: `authors.name`, 
`authors.url`, and `authors.image_url.`
   ```




-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2236: test(label): migrate label test to ginkgo implement

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2236:
URL: https://github.com/apache/apisix-dashboard/pull/2236#issuecomment-989613226


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2236](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6139b03) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `20.71%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#2236   +/-   ##
   ===
   - Coverage   69.87%   49.16%   -20.72% 
   ===
 Files 184   41  -143 
 Lines7274 3171 -4103 
 Branches  8290  -829 
   ===
   - Hits 5083 1559 -3524 
   + Misses   1897 1412  -485 
   + Partials  294  200   -94 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2236?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `0.00% <0.00%> (-72.60%)` | :arrow_down: |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
   | 
[api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=)
 | `0.00% <0.00%> (-67.26%)` | :arrow_down: |
   | 
[api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2236/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==)
 | `0.00% 

[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2237: test(balancer): migrate balancer test to ginkgo implement

2021-12-09 Thread GitBox


codecov-commenter edited a comment on pull request #2237:
URL: https://github.com/apache/apisix-dashboard/pull/2237#issuecomment-989638325


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2237](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (1d034eb) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/6b86ff4c4ee7b129cfeda48108fe5d4f5a2e7c6c?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b86ff4) will **decrease** coverage by `20.71%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#2237   +/-   ##
   ===
   - Coverage   69.87%   49.16%   -20.72% 
   ===
 Files 184   41  -143 
 Lines7274 3171 -4103 
 Branches  8290  -829 
   ===
   - Hits 5083 1559 -3524 
   + Misses   1897 1412  -485 
   + Partials  294  200   -94 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `49.16% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2237?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `0.00% <0.00%> (-72.60%)` | :arrow_down: |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | `0.00% <0.00%> (-70.00%)` | :arrow_down: |
   | 
[api/internal/handler/proto/proto.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcHJvdG8vcHJvdG8uZ28=)
 | `0.00% <0.00%> (-67.26%)` | :arrow_down: |
   | 
[api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2237/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==)
 | `0.00% 

[GitHub] [apisix-dashboard] ltt1987 commented on issue #2219: Add sub_path support when dashboard under a subdirectory via nginx reverse proxy.

2021-12-09 Thread GitBox


ltt1987 commented on issue #2219:
URL: 
https://github.com/apache/apisix-dashboard/issues/2219#issuecomment-990465491


   > Hi, @ltt1987.
   > 
   > I think the problem is that the compilation product of our dashboard 
project currently uses absolute paths to load resources, so you need to 
recompile if you want to proxy dashboard in a subdirectory. These are not 
directly supported by either the Manager API or the `proxy-rewrite` plugin in 
APISIX.
   > 
   > Of course, we can take some measures to improve it, if you are willing to 
try.
   > 
   > Here are the configures about it.
   > 
   > 
https://github.com/apache/apisix-dashboard/blob/d7b772235f1a13660541e6f52c4844a3bb7929f6/web/config/config.ts#L48-L49
   
   Got it! Thanks!


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] ltt1987 closed issue #2219: Add sub_path support when dashboard under a subdirectory via nginx reverse proxy.

2021-12-09 Thread GitBox


ltt1987 closed issue #2219:
URL: https://github.com/apache/apisix-dashboard/issues/2219


   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on a change in pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


spacewander commented on a change in pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#discussion_r766265874



##
File path: t/plugin/opa.t
##
@@ -0,0 +1,140 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+use t::APISIX 'no_plan';
+
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+});
+
+run_tests();
+
+__DATA__
+
+=== TEST 1: sanity check with minimal valid configuration
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.opa")
+local ok, err = plugin.check_schema({host = 
"http://127.0.0.1:8181;, package = "example", decision = "allow"})
+if not ok then
+ngx.say(err)
+end
+
+ngx.say("done")
+}
+}
+--- response_body
+done
+
+
+
+=== TEST 2: missing `host`
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.opa")
+local ok, err = plugin.check_schema({package = "example", decision 
= "allow"})
+if not ok then
+ngx.say(err)
+end
+}
+}
+--- response_body
+property "host" is required
+
+
+
+=== TEST 3: wrong type for `host`
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.opa")
+local ok, err = plugin.check_schema({host = 3233, package = 
"example", decision = "allow"})

Review comment:
   You can take this as an example: 
https://github.com/apache/apisix/blob/c178435d7ada4eeb713d9a1688fb5f54f971abdf/t/plugin/gzip.t#L494




-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] jinyuxiaoqiang opened a new issue #5762: request help: Upgrading to the latest version,how to deal with metaData in etcd cluster.

2021-12-09 Thread GitBox


jinyuxiaoqiang opened a new issue #5762:
URL: https://github.com/apache/apisix/issues/5762


   ### Issue description
   
   I have used version2.2 for a long time,and I have created hundreds of 
routes. How can I upgrade from 2.2 to 2.11.0? Especially the etcd  
compatibility.
   
   ### Environment
   
   Old version env:
   - apisix version (cmd: `apisix version`):2.2.0
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):1.19.3.1
   - etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info 
API):3.4.14
   - apisix-dashboard version, if have:2.3.0
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks 
--version`):3.5.0
   
   New version env
   - apisix version (cmd: `apisix version`):2.11.0
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):1.19.3.1
   - etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info 
API):3.4.14
   - apisix-dashboard version, if have:2.9.0
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks 
--version`):3.5.0
   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] jinyuxiaoqiang closed issue #5588: request help: limit-count-redis time_window 1 may cause reject to some request under count

2021-12-09 Thread GitBox


jinyuxiaoqiang closed issue #5588:
URL: https://github.com/apache/apisix/issues/5588


   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] hamlinzheng opened a new issue #5761: The effective time of the OpenID Connect Plugin in session mode

2021-12-09 Thread GitBox


hamlinzheng opened a new issue #5761:
URL: https://github.com/apache/apisix/issues/5761


   ### Issue description
   
   Thank you very much for your wonderful work! I use OpenID Connect Plugin 
with OIDC Provider in my web project, I try to follow the 
[tutorial](https://apisix.apache.org/docs/apisix/plugins/openid-connect/), and 
it works fine, i can get OIDC auth with setting `bearer_only` to `false`.
   However, I have observed that my visits are often redirected to OIDC 
Provider to re-authenticate (about a few minutes), I think this is abnormal 
because I set the `access_token` expiration time in OIDC to 14 days. So is this 
an issue of the session timeliness on the APISIX side?
   The second problem is that when i set `bearer_only` to `true`, i can use 
`Bearer token` in header to access, but when i set `bearer_only` to `false`, i 
can't access with the same token, I want to know what's wrong with my operation.
   
   I appreciate your support very much.
   
   ### Environment
   
   I try apisix with [apisix-docker](https://github.com/apache/apisix-docker)


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #791: feat: add ApisixPluginConfig translator (#638)

2021-12-09 Thread GitBox


tao12345666333 commented on pull request #791:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/791#issuecomment-990056522


   Did you merge code from master?


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-java-plugin-runner] cws1981 commented on pull request #95: docs: add zh Quick Start doc

2021-12-09 Thread GitBox


cws1981 commented on pull request #95:
URL: 
https://github.com/apache/apisix-java-plugin-runner/pull/95#issuecomment-989976190


   
   
   
   > @cws1981 thanks!
   
   has changed


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-ingress-controller] Firgeis commented on issue #700: ApisixRoute route still work after deleting AR source

2021-12-09 Thread GitBox


Firgeis commented on issue #700:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/700#issuecomment-989955628


   What might also be related is that admin API calls to route are inconsistent:
   
![apisixrouteget](https://user-images.githubusercontent.com/6520188/145424904-60817d60-1a07-4742-94ce-781b0afba39c.gif)
   
   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] anderseknert edited a comment on pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


anderseknert edited a comment on pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#issuecomment-989932907


   > Ok, In that case, I would keeping the current way of combining URLs, which 
seems to provide better flexibility. XD
   
   I'm not sure that it's more flexible. It seems that currently all the fields 
are required to build the URL:
   
   ```lua
   required = {"host", "package", "decision"}
   ```
   But while not super common, it is perfectly legitimate to query OPA for only 
a package, like:
   
   ```
   http://localhost:8181/v1/data/policy
   ```
   
   When OPA is queried on the package level, it will evaluate all the rules 
under that package and return the result. So a policy that looks like the below:
   
   ```rego
   package policy
   
   default allow = false
   
   allow {
   input.user.roles[_] == "admin"
   }
   
   reason = "User needs to be admin" {
   not allow
   }
   ```
   
   When queried at `http://localhost:8181/v1/data/policy`, would respond with 
the result from evaluating both rules:
   
   ```json
   {
   "allow": false,
   "reason": "User needs to be admin"
   }
   ```
   
   In this case, we don't query a rule (or decision as it's called in this 
code) directly, but rather all the rules in the package.


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-ingress-controller] Firgeis commented on issue #700: ApisixRoute route still work after deleting AR source

2021-12-09 Thread GitBox


Firgeis commented on issue #700:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/700#issuecomment-989936435


   I am having the same issue, after creating routes by applying an apixisroute 
CRD then deleting it. CRD is deleted but the routes are still shown in the 
admin (and they work).
   Same case with modifying the routes in the CRD, they don't seem to be 
applied.


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bzp2010 commented on pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


bzp2010 commented on pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#issuecomment-989936453


   Oh, I see, I will change it later. I don't know OPA very well, thank you for 
pointing out my problem.


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] anderseknert commented on pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


anderseknert commented on pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#issuecomment-989932907


   > Ok, In that case, I would keeping the current way of combining URLs, which 
seems to provide better flexibility. XD
   
   I'm not sure that it's more flexible. It seems that currently all the fields 
are required to build the URL:
   
   ```lua
   required = {"host", "package", "decision"}
   ```
   But while not super common, it is perfectly legitimate to only query OPA for 
only a package, like:
   
   ```
   http://localhost:8181/v1/data/policy
   ```
   
   When OPA is queried on the package level, it will evaluate all the rules 
under that package and return the result. So a policy that looks like the below:
   
   ```rego
   package policy
   
   default allow = false
   
   allow {
   input.user.roles[_] == "admin"
   }
   
   reason = "User needs to be admin" {
   not allow
   }
   ```
   
   When queried at `http://localhost:8181/v1/data/policy`, would respond with 
the result from evaluating both rules:
   
   ```json
   {
   "allow": false,
   "reason": "User needs to be admin"
   }
   ```
   
   In this case, we don't query a rule (or decision as it's called in this 
code) directly, but rather all the rules in the package.


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bzp2010 commented on a change in pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


bzp2010 commented on a change in pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#discussion_r765865748



##
File path: apisix/core/request.lua
##
@@ -269,6 +269,15 @@ function _M.get_port(ctx)
 end
 
 
+function _M.get_path(ctx, original)

Review comment:
   Yes, a useless code that I forgot to change.

##
File path: apisix/core/request.lua
##
@@ -269,6 +269,15 @@ function _M.get_port(ctx)
 end
 
 
+function _M.get_path(ctx, original)

Review comment:
   fixed




-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bzp2010 commented on a change in pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


bzp2010 commented on a change in pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#discussion_r765865189



##
File path: apisix/plugins/opa/helper.lua
##
@@ -0,0 +1,62 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local core = require("apisix.core")
+local ngx_var  = ngx.var
+local ngx_time = ngx.time
+
+local _M = {}
+
+
+local function build_var(conf, ctx)
+return {
+server_addr = ngx_var.server_addr,

Review comment:
   fixed




-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bzp2010 commented on a change in pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


bzp2010 commented on a change in pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#discussion_r765864564



##
File path: apisix/plugins/opa.lua
##
@@ -0,0 +1,104 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local core   = require("apisix.core")
+local http   = require("resty.http")
+local helper = require("apisix.plugins.opa.helper")
+
+local schema = {
+type = "object",
+properties = {
+host = {type = "string"},
+ssl_verify = {
+type = "boolean",
+default = true,
+},
+package = {type = "string"},
+decision = {type = "string", maxLength = 256},
+timeout = {
+type = "integer",
+minimum = 1,
+maximum = 6,
+default = 3000,
+description = "timeout in milliseconds",
+},
+keepalive = {type = "boolean", default = true},
+keepalive_timeout = {type = "integer", minimum = 1000, default = 
6},
+keepalive_pool = {type = "integer", minimum = 1, default = 5}
+},
+required = {"host", "package", "decision"}
+}
+
+
+local _M = {
+version = 0.1,
+priority = 2001,
+name = "opa",
+schema = schema,
+}
+
+
+function _M.check_schema(conf)
+local ok, err = core.schema.check(schema, conf)

Review comment:
   fixed

##
File path: apisix/plugins/opa.lua
##
@@ -0,0 +1,104 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local core   = require("apisix.core")
+local http   = require("resty.http")
+local helper = require("apisix.plugins.opa.helper")
+
+local schema = {
+type = "object",
+properties = {
+host = {type = "string"},
+ssl_verify = {
+type = "boolean",
+default = true,
+},
+package = {type = "string"},
+decision = {type = "string", maxLength = 256},
+timeout = {
+type = "integer",
+minimum = 1,
+maximum = 6,
+default = 3000,
+description = "timeout in milliseconds",
+},
+keepalive = {type = "boolean", default = true},
+keepalive_timeout = {type = "integer", minimum = 1000, default = 
6},
+keepalive_pool = {type = "integer", minimum = 1, default = 5}
+},
+required = {"host", "package", "decision"}
+}
+
+
+local _M = {
+version = 0.1,
+priority = 2001,
+name = "opa",
+schema = schema,
+}
+
+
+function _M.check_schema(conf)
+local ok, err = core.schema.check(schema, conf)
+if not ok then
+return false, err
+end
+
+return true
+end
+
+
+function _M.access(conf, ctx)
+local body = helper.build_opa_input(conf, ctx, "http")
+local params = {
+method = "POST",
+body = body,
+headers = {
+["Content-Type"] = "application/json",
+},
+keepalive = conf.keepalive,
+ssl_verify = conf.ssl_verify
+}
+
+if conf.keepalive then
+params.keepalive_timeout = conf.keepalive_timeout
+params.keepalive_pool = conf.keepalive_pool
+end
+
+local endpoint = conf.host .. "/v1/data/" .. conf.package .. "/" .. 
conf.decision
+
+local httpc = http.new()
+httpc:set_timeout(conf.timeout)
+
+local res, err = httpc:request_uri(endpoint, params)
+
+-- block by default when decision is unavailable
+if not res or err then
+

[GitHub] [apisix] bzp2010 commented on a change in pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


bzp2010 commented on a change in pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#discussion_r765855281



##
File path: t/plugin/opa.t
##
@@ -0,0 +1,140 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+use t::APISIX 'no_plan';
+
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+});
+
+run_tests();
+
+__DATA__
+
+=== TEST 1: sanity check with minimal valid configuration
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.opa")
+local ok, err = plugin.check_schema({host = 
"http://127.0.0.1:8181;, package = "example", decision = "allow"})
+if not ok then
+ngx.say(err)
+end
+
+ngx.say("done")
+}
+}
+--- response_body
+done
+
+
+
+=== TEST 2: missing `host`
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.opa")
+local ok, err = plugin.check_schema({package = "example", decision 
= "allow"})
+if not ok then
+ngx.say(err)
+end
+}
+}
+--- response_body
+property "host" is required
+
+
+
+=== TEST 3: wrong type for `host`
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.opa")
+local ok, err = plugin.check_schema({host = 3233, package = 
"example", decision = "allow"})

Review comment:
   @spacewander Yes, I think that's a good way, do we have any current 
examples of doing this for reference?




-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bzp2010 commented on a change in pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


bzp2010 commented on a change in pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#discussion_r765855281



##
File path: t/plugin/opa.t
##
@@ -0,0 +1,140 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+use t::APISIX 'no_plan';
+
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+});
+
+run_tests();
+
+__DATA__
+
+=== TEST 1: sanity check with minimal valid configuration
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.opa")
+local ok, err = plugin.check_schema({host = 
"http://127.0.0.1:8181;, package = "example", decision = "allow"})
+if not ok then
+ngx.say(err)
+end
+
+ngx.say("done")
+}
+}
+--- response_body
+done
+
+
+
+=== TEST 2: missing `host`
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.opa")
+local ok, err = plugin.check_schema({package = "example", decision 
= "allow"})
+if not ok then
+ngx.say(err)
+end
+}
+}
+--- response_body
+property "host" is required
+
+
+
+=== TEST 3: wrong type for `host`
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.opa")
+local ok, err = plugin.check_schema({host = 3233, package = 
"example", decision = "allow"})

Review comment:
   Yes, I think that's a good way, do we have any current examples of doing 
this for reference?




-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bzp2010 commented on a change in pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


bzp2010 commented on a change in pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#discussion_r765852586



##
File path: apisix/plugins/opa/helper.lua
##
@@ -0,0 +1,62 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local core = require("apisix.core")
+local ngx_var  = ngx.var
+local ngx_time = ngx.time
+
+local _M = {}
+
+
+local function build_var(conf, ctx)
+return {
+server_addr = ngx_var.server_addr,

Review comment:
   This is a missing unmodified, previously I was using `reuqest_uri` var 
and separate `?` way to get pure paths, after checking the documentation I 
found that I can get pure paths using `uri` var. I will fix 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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bzp2010 edited a comment on pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


bzp2010 edited a comment on pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#issuecomment-989908679


   Ok, In that case, I would keeping the current way of combining URLs, which 
seems to provide better flexibility. XD
   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bzp2010 commented on pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


bzp2010 commented on pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#issuecomment-989908679


   Ok, In that case, I would start by keeping the current way of combining 
URLs, which seems to provide better flexibility. XD
   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] anderseknert commented on pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


anderseknert commented on pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#issuecomment-989905801


   > Do you mean to merge host, package, decision together and use a single 
field (eg. `url`)?
   
   Yeah. Either way is fine though :)

   > Features such as custom response codes, response headers and error causes 
will be added later in the PR. It will basically follow the roadmap section in 
#5714 to implement it.
   
   Oh, nice! I had missed the roadmap section. Thanks for bringing that to my 
attention! Sounds like a good plan  
   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] tzssangglass commented on issue #5471: request help: When I use the domain as upstream nodes. If the DNS resolution of this domain changes.Can apisix sense it in real time?

2021-12-09 Thread GitBox


tzssangglass commented on issue #5471:
URL: https://github.com/apache/apisix/issues/5471#issuecomment-989901312


   You may be using email to reply, do you have a way to reply on Github. The 
format of emails is confusing on Github.


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-java-plugin-runner] tzssangglass commented on pull request #95: docs: add zh Quick Start doc

2021-12-09 Thread GitBox


tzssangglass commented on pull request #95:
URL: 
https://github.com/apache/apisix-java-plugin-runner/pull/95#issuecomment-989898290


   @cws1981 thanks!


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-java-plugin-runner] tzssangglass commented on a change in pull request #95: docs: add zh Quick Start doc

2021-12-09 Thread GitBox


tzssangglass commented on a change in pull request #95:
URL: 
https://github.com/apache/apisix-java-plugin-runner/pull/95#discussion_r765800772



##
File path: docs/zh/Quick Start.md
##
@@ -0,0 +1,110 @@
+### Quick Start
+
+ 一、准备工作

Review comment:
   ```suggestion
   ### 准备工作
   ```

##
File path: docs/zh/Quick Start.md
##
@@ -0,0 +1,110 @@
+### Quick Start
+
+ 一、准备工作
+
+* JDK 8
+
+* Clone the 
[apisix-java-plugin-runner](https://github.com/apache/apisix-java-plugin-runner)
 project.
+
+ 二、开发扩展插件过滤器
+
+在`runner-plugin` 模块 `org.apache.apisix.plugin.runner.filter` 
包下编写过滤器处理请求,过滤器要实现`PluginFilter` 接口,可以参考 `apisix-runner-sample` 
模块下的样例,官方提供了两个样例还是很全面的,一个是请求重写[RewriteRequestDemoFilter](https://github.com/apache/apisix-java-plugin-runner/blob/main/sample/src/main/java/org/apache/apisix/plugin/runner/filter/RewriteRequestDemoFilter.java),一个是请求拦截[StopRequestDemoFilter](https://github.com/apache/apisix-java-plugin-runner/blob/main/sample/src/main/java/org/apache/apisix/plugin/runner/filter/StopRequestDemoFilter.java)。
+
+```java
+@Component
+public class CheckTokenFilter implements PluginFilter {
+@Override
+public String name() {
+return "CheckTokenFilter";
+}
+
+@Override
+public Mono filter(HttpRequest request, HttpResponse response, 
PluginFilterChain chain) {
+/*
+ * todo your business here
+ */
+
+
+return chain.filter(request, response);
+}
+}
+```
+
+ 三、部署
+
+插件写好后怎么部署是关键,apisix-java-plugin-runner 与 APISIX 用 Unix Domain Socket 进行进程内通讯,
+所以他们要部署在一个服务实例,并且APISIX启动的过程中会带着apisix-java-plugin-runner一起启动,如果是容器化部署就必须在一个容器里运行。
+
+所以如果是容器部署就需要把apisix-java-plugin-runner 与 APISIX 生成在一个docker image里。
+
+先打包`apisix-java-plugin-runner`

Review comment:
   ```suggestion
   先构建 `apisix-java-plugin-runner` 的可执行 jar
   ```

##
File path: docs/zh/Quick Start.md
##
@@ -0,0 +1,110 @@
+### Quick Start
+
+ 一、准备工作
+
+* JDK 8
+
+* Clone the 
[apisix-java-plugin-runner](https://github.com/apache/apisix-java-plugin-runner)
 project.
+
+ 二、开发扩展插件过滤器
+
+在`runner-plugin` 模块 `org.apache.apisix.plugin.runner.filter` 
包下编写过滤器处理请求,过滤器要实现`PluginFilter` 接口,可以参考 `apisix-runner-sample` 
模块下的样例,官方提供了两个样例还是很全面的,一个是请求重写[RewriteRequestDemoFilter](https://github.com/apache/apisix-java-plugin-runner/blob/main/sample/src/main/java/org/apache/apisix/plugin/runner/filter/RewriteRequestDemoFilter.java),一个是请求拦截[StopRequestDemoFilter](https://github.com/apache/apisix-java-plugin-runner/blob/main/sample/src/main/java/org/apache/apisix/plugin/runner/filter/StopRequestDemoFilter.java)。
+
+```java
+@Component
+public class CheckTokenFilter implements PluginFilter {
+@Override
+public String name() {
+return "CheckTokenFilter";
+}
+
+@Override
+public Mono filter(HttpRequest request, HttpResponse response, 
PluginFilterChain chain) {
+/*
+ * todo your business here
+ */
+
+
+return chain.filter(request, response);
+}
+}
+```
+
+ 三、部署
+
+插件写好后怎么部署是关键,apisix-java-plugin-runner 与 APISIX 用 Unix Domain Socket 进行进程内通讯,
+所以他们要部署在一个服务实例,并且APISIX启动的过程中会带着apisix-java-plugin-runner一起启动,如果是容器化部署就必须在一个容器里运行。

Review comment:
   ```suggestion
   apisix-java-plugin-runner 与 APISIX 用 `Unix Domain Socket` 
进行进程间通讯,需要部署在同一个宿主环境。apisix-java-plugin-runner 的生命周期由 APISIX 
管理,如果是容器化部署,apisix-java-plugin-runner 与 APISIX 必须部署在同一个容器中。
   ```

##
File path: docs/zh/Quick Start.md
##
@@ -0,0 +1,110 @@
+### Quick Start
+
+ 一、准备工作

Review comment:
   other headings also need to be changed

##
File path: docs/zh/Quick Start.md
##
@@ -0,0 +1,110 @@
+### Quick Start
+
+ 一、准备工作
+
+* JDK 8
+
+* Clone the 
[apisix-java-plugin-runner](https://github.com/apache/apisix-java-plugin-runner)
 project.
+
+ 二、开发扩展插件过滤器
+
+在`runner-plugin` 模块 `org.apache.apisix.plugin.runner.filter` 
包下编写过滤器处理请求,过滤器要实现`PluginFilter` 接口,可以参考 `apisix-runner-sample` 
模块下的样例,官方提供了两个样例还是很全面的,一个是请求重写[RewriteRequestDemoFilter](https://github.com/apache/apisix-java-plugin-runner/blob/main/sample/src/main/java/org/apache/apisix/plugin/runner/filter/RewriteRequestDemoFilter.java),一个是请求拦截[StopRequestDemoFilter](https://github.com/apache/apisix-java-plugin-runner/blob/main/sample/src/main/java/org/apache/apisix/plugin/runner/filter/StopRequestDemoFilter.java)。
+
+```java
+@Component
+public class CheckTokenFilter implements PluginFilter {
+@Override
+public String name() {
+return "CheckTokenFilter";
+}
+
+@Override
+public Mono filter(HttpRequest request, HttpResponse response, 
PluginFilterChain chain) {
+/*
+ * todo your business here
+ */
+
+
+return chain.filter(request, response);
+}
+}
+```
+
+ 三、部署
+
+插件写好后怎么部署是关键,apisix-java-plugin-runner 与 APISIX 用 Unix Domain Socket 进行进程内通讯,
+所以他们要部署在一个服务实例,并且APISIX启动的过程中会带着apisix-java-plugin-runner一起启动,如果是容器化部署就必须在一个容器里运行。
+

[GitHub] [apisix] lixuewang commented on issue #5471: request help: When I use the domain as upstream nodes. If the DNS resolution of this domain changes.Can apisix sense it in real time?

2021-12-09 Thread GitBox


lixuewang commented on issue #5471:
URL: https://github.com/apache/apisix/issues/5471#issuecomment-989893870


   my case:systemA-apisix-(domainname)systemB(has ip IPA and 
ipB)1、systemA-apisix-IPA2、when domainname resolve 
ipBapisix still has many long established link to ipAbut I 
wish apisix connect to IPB .because IPA is read only ,cannot writehow 
can I resolve this question?
   
   
   
   
   
    回复的原邮件 
   
   
   
   
   发件人
   
   
   
   
   
   
   
   日期
   
   
   2021年12月09日 21:31
   
   
   
   
   收件人
   
   
   
   
   
   
   
   抄送至
   
   
   、
   
   
   
   
   主题
   
   
   Re: [apache/apisix] request help: When I use the domain 
as upstream nodes. If the DNS resolution of this domain changes.Can apisix 
sense it in real time? (Issue #5471)
   
   
   
   
   
   
   i guess TTL can not resolve this problem. i find when os can 
resolve the right ip ,but apisix still use wrong ip.
   
   pls show the case
   
   You are receiving this because you commented.Reply to this email 
directly, https://github.com/apache/apisix/issues/5471#issuecomment-989854827;>view 
it on GitHub, or https://github.com/notifications/unsubscribe-auth/AW3H2T7NKX3RVOTP5CQEKUTUQCVRZANCNFSM5HXDGDNQ;>unsubscribe.Triage notifications on the go with GitHub Mobile for https://apps.apple.com/app/apple-store/id1477376905?ct=notification-emailmt=8pt=524675;>iOS
 or https://play.google.com/store/apps/details?id=com.github.androidreferrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub;>Android.
   https://github.com/notifications/beacon/AW3H2T42ILMDW5TFKHBVWHLUQCVRZA5CNFSM5HXDGDN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHL77Y2Y.gif;
 height="1" width="1" alt="" />
   [
   {
   ***@***.***": "http://schema.org";,
   ***@***.***": "EmailMessage",
   "potentialAction": {
   ***@***.***": "ViewAction",
   "target": 
"https://github.com/apache/apisix/issues/5471#issuecomment-989854827";,
   "url": "https://github.com/apache/apisix/issues/5471#issuecomment-989854827";,
   "name": "View Issue"
   },
   "description": "View this Issue on GitHub",
   "publisher": {
   ***@***.***": "Organization",
   "name": "GitHub",
   "url": "https://github.com";
   }
   }
   ]
   
   
   
   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] bzp2010 commented on pull request #5734: feat: support OPA plugin

2021-12-09 Thread GitBox


bzp2010 commented on pull request #5734:
URL: https://github.com/apache/apisix/pull/5734#issuecomment-989892221


   Hi, @anderseknert. Glad to see your comments.
   
   > I would probably just let the user configure the full OPA URL rather than 
separating host, package and decision. In some cases you'll actually query a 
whole package, which is fine for OPA.
   
   Do you mean to merge host, package, decision together and use a single field 
(eg. `url`)?
   
   > The policy example (and from what I understand, the Lua code) only deals 
with boolean decisions. Maybe good to keep it simple, but could also be useful 
to allow OPA to return for example a reason for denying a request, and surface 
that to the caller. I don't see much in terms of documentation. Will that be 
added in a later PR?
   
   Features such as custom response codes, response headers and error causes 
will be added later in the PR. It will basically follow the roadmap section in 
#5714 to implement 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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] CppCXY commented on issue #5760: Bug: about code style

2021-12-09 Thread GitBox


CppCXY commented on issue #5760:
URL: https://github.com/apache/apisix/issues/5760#issuecomment-989890021


   > The code of APISIX follows the 
https://github.com/apache/apisix/blob/master/CODE_STYLE.md specification. What 
do you think is the problem? Please give an example.
   
   
https://github.com/apache/apisix/blob/5ae38f81f25fc58a040e30d12ba8fef33bb56f60/apisix/wasm.lua#L42
 do not keep 2 line
   
https://github.com/apache/apisix/blob/c178435d7ada4eeb713d9a1688fb5f54f971abdf/apisix/debug.lua#L104
 why do end block no indent
   
https://github.com/apache/apisix/blob/c178435d7ada4eeb713d9a1688fb5f54f971abdf/apisix/stream/plugins/limit-conn.lua#L26
 not only one space after ','
   
   
https://github.com/apache/apisix/blob/c178435d7ada4eeb713d9a1688fb5f54f971abdf/apisix/http/router/radixtree_uri_with_parameter.lua#L28
 strange indent
   
   ...


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] CppCXY commented on issue #5760: Bug: about code style

2021-12-09 Thread GitBox


CppCXY commented on issue #5760:
URL: https://github.com/apache/apisix/issues/5760#issuecomment-989878035


   > https://github.com/apache/apisix/blob/master/CODE_STYLE.md We have a 
CODE_STYLE file here 
   
   I know, but I'm sure you didn't follow your code style


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander merged pull request #5732: feat(consumer-restriction): customize rejected_msg

2021-12-09 Thread GitBox


spacewander merged pull request #5732:
URL: https://github.com/apache/apisix/pull/5732


   


-- 
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-unsubscr...@apisix.apache.org

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




[apisix] branch master updated: feat(consumer-restriction): customize rejected_msg (#5732)

2021-12-09 Thread spacewander
This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
 new c178435  feat(consumer-restriction):  customize rejected_msg (#5732)
c178435 is described below

commit c178435d7ada4eeb713d9a1688fb5f54f971abdf
Author: Gaoll 
AuthorDate: Thu Dec 9 21:58:50 2021 +0800

feat(consumer-restriction):  customize rejected_msg (#5732)

Co-authored-by: gaoliangliang 
Co-authored-by: 高亮亮 
---
 apisix/plugins/consumer-restriction.lua| 8 ++--
 docs/en/latest/plugins/consumer-restriction.md | 1 +
 docs/zh/latest/plugins/consumer-restriction.md | 1 +
 t/plugin/consumer-restriction.t| 5 +++--
 4 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/apisix/plugins/consumer-restriction.lua 
b/apisix/plugins/consumer-restriction.lua
index 8e540ae..a9f7363 100644
--- a/apisix/plugins/consumer-restriction.lua
+++ b/apisix/plugins/consumer-restriction.lua
@@ -51,7 +51,8 @@ local schema = {
 }
 }
 },
-rejected_code = {type = "integer", minimum = 200, default = 403}
+rejected_code = {type = "integer", minimum = 200, default = 403},
+rejected_msg = {type = "string"}
 },
 anyOf = {
 {required = {"blacklist"}},
@@ -105,7 +106,10 @@ local function is_method_allowed(allowed_methods, method, 
user)
 end
 
 local function reject(conf)
-return conf.rejected_code, { message = "The " .. conf.type .. " is 
forbidden." }
+if conf.rejected_msg then
+return conf.rejected_code , { message = conf.rejected_msg }
+end
+return conf.rejected_code , { message = "The " .. conf.type .. " is 
forbidden."}
 end
 
 function _M.check_schema(conf)
diff --git a/docs/en/latest/plugins/consumer-restriction.md 
b/docs/en/latest/plugins/consumer-restriction.md
index bd36daa..4e6cd1a 100644
--- a/docs/en/latest/plugins/consumer-restriction.md
+++ b/docs/en/latest/plugins/consumer-restriction.md
@@ -42,6 +42,7 @@ The `consumer-restriction` makes corresponding access 
restrictions based on diff
 | whitelist | array[string] | required   |   | 
| Grant full access to all users specified in the provided list , 
**has the priority over `allowed_by_methods`** |
 | blacklist | array[string] | required   |   | 
| Reject connection to all users specified in the provided list , 
**has the priority over `whitelist`** |
 | rejected_code | integer | optional | 403   | [200,...]   
| The HTTP status code returned when the request is rejected.   
  |
+| rejected_msg | string | optional ||| 
The message returned when the request is rejected.  
   |
 | allowed_by_methods | array[object] | optional || 
   | Set a list of allowed HTTP methods for the selected user , HTTP 
methods can be `["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", 
"CONNECT", "TRACE"]`
|
 
 For the `type` field is an enumerated type, it can be `consumer_name` or 
`service_id`. They stand for the following meanings:
diff --git a/docs/zh/latest/plugins/consumer-restriction.md 
b/docs/zh/latest/plugins/consumer-restriction.md
index 64d43d2..92a2627 100644
--- a/docs/zh/latest/plugins/consumer-restriction.md
+++ b/docs/zh/latest/plugins/consumer-restriction.md
@@ -42,6 +42,7 @@ title: consumer-restriction
 | whitelist | array[string] | 必选|  |   
  | 与`blacklist`二选一,只能单独启用白名单或黑名单,两个不能一起使用。 |
 | blacklist | array[string] | 必选|  |   
  | 与`whitelist`二选一,只能单独启用白名单或黑名单,两个不能一起使用。 |
 | rejected_code | integer   | 可选| 403  | [200,...] 
  | 当请求被拒绝时,返回的 HTTP 状态码。|
+| rejected_msg | String   | 可选|   || 
当请求被拒绝时,返回的消息内容。|
 
 对于 `type` 字段是个枚举类型,它可以是 `consumer_name` 或 `service_id` 。分别代表以下含义:
 
diff --git a/t/plugin/consumer-restriction.t b/t/plugin/consumer-restriction.t
index 21c26cc..5fc39e0 100644
--- a/t/plugin/consumer-restriction.t
+++ b/t/plugin/consumer-restriction.t
@@ -263,7 +263,8 @@ Authorization: Basic amFjazIwMjA6MTIzNDU2
 "consumer-restriction": {
  "blacklist": [
  "jack1"
- ]
+ ],
+ "rejected_msg": "request is forbidden"
 }
 }
 }]]
@@ -302,7 

[GitHub] [apisix] juzhiyuan commented on issue #5760: Bug: about code style

2021-12-09 Thread GitBox


juzhiyuan commented on issue #5760:
URL: https://github.com/apache/apisix/issues/5760#issuecomment-989876491


   https://github.com/apache/apisix/blob/master/CODE_STYLE.md We have a 
CODE_STYLE file here 


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander closed issue #5760: Bug: about code style

2021-12-09 Thread GitBox


spacewander closed issue #5760:
URL: https://github.com/apache/apisix/issues/5760


   


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on issue #5760: Bug: about code style

2021-12-09 Thread GitBox


spacewander commented on issue #5760:
URL: https://github.com/apache/apisix/issues/5760#issuecomment-989870431


   Having a code style is good, but is not necessary. A strange style doesn't 
prevent LuaJIT to become a fantasy project. We don't want to waste time arguing 
the code style.


-- 
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-unsubscr...@apisix.apache.org

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




  1   2   >