[GitHub] [apisix-dashboard] juzhiyuan closed issue #602: Etcd api version not match
juzhiyuan closed issue #602: URL: https://github.com/apache/apisix-dashboard/issues/602 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan merged pull request #606: fix: 2.0 release issues
juzhiyuan merged pull request #606: URL: https://github.com/apache/apisix-dashboard/pull/606 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix-dashboard] branch v2.0 updated (bc583e9 -> 5afc139)
This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a change to branch v2.0 in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git. from bc583e9 feat(doc): added FAQ about how to redeploy add 5afc139 fix: 2.0 release issues (#606) No new revisions were added by this update. Summary of changes: .github/workflows/deploy-api.yml | 10 -- .github/workflows/test-api.yml | 10 -- api/conf/schema.json | 2 +- 3 files changed, 1 insertion(+), 21 deletions(-)
[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #606: fix: 2.0 release issues
juzhiyuan commented on pull request #606: URL: https://github.com/apache/apisix-dashboard/pull/606#issuecomment-717021384 Just update the target branch from master to 2.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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan edited a comment on pull request #606: fix: 2.0 release issues
juzhiyuan edited a comment on pull request #606: URL: https://github.com/apache/apisix-dashboard/pull/606#issuecomment-717021384 Just updated the target branch from master to 2.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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on issue #560: apisix升级问题
juzhiyuan commented on issue #560: URL: https://github.com/apache/apisix-dashboard/issues/560#issuecomment-717020837 Hi @jealone , we have released the 2.0 RC version, kindly have a look at https://github.com/apache/apisix-dashboard/tree/v2.0#deployment This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] moonming opened a new pull request #2534: doc: add videos of ApacheCon.
moonming opened a new pull request #2534: URL: https://github.com/apache/apisix/pull/2534 ### What this PR does / why we need it: ### Pre-submission checklist: * [ ] Did you explain what problem does this PR solve? Or what new features have been added? * [ ] Have you added corresponding test cases? * [ ] Have you modified the corresponding document? * [ ] Is this PR backward compatible? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix-dashboard] branch v2.0 updated (0a3ad92 -> bc583e9)
This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a change to branch v2.0 in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git. from 0a3ad92 feat(doc): update run part in deploy add bc583e9 feat(doc): added FAQ about how to redeploy No new revisions were added by this update. Summary of changes: docs/deploy.md | 10 ++ docs/deploy.zh-CN.md | 10 ++ 2 files changed, 20 insertions(+)
[GitHub] [apisix-dashboard] nic-chen opened a new pull request #606: fix: 2.0 release issues
nic-chen opened a new pull request #606: URL: https://github.com/apache/apisix-dashboard/pull/606 1. remove json schema generation from ci 2. improve doc about deploy This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix-dashboard] branch v2.0 updated (c229d07 -> 0a3ad92)
This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a change to branch v2.0 in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git. from c229d07 feat(doc): added tip in deploy add 0a3ad92 feat(doc): update run part in deploy No new revisions were added by this update. Summary of changes: docs/deploy.md | 25 - docs/deploy.zh-CN.md | 25 - 2 files changed, 24 insertions(+), 26 deletions(-)
[GitHub] [apisix] membphis commented on pull request #2516: feature: support percentage for fault injection
membphis commented on pull request #2516: URL: https://github.com/apache/apisix/pull/2516#issuecomment-717009321 @tokers merged already, many thx for your contribution This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix] branch master updated: feature: support percentage for fault injection (#2516)
This is an automated email from the ASF dual-hosted git repository. membphis 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 3306a3e feature: support percentage for fault injection (#2516) 3306a3e is described below commit 3306a3ed3ca58ad319a280e484b700fc20dc221b Author: Alex Zhang AuthorDate: Tue Oct 27 14:10:44 2020 +0800 feature: support percentage for fault injection (#2516) --- apisix/plugins/fault-injection.lua | 27 +++-- doc/plugins/fault-injection.md | 2 + doc/zh-cn/plugins/fault-injection.md | 2 + t/plugin/fault-injection.t | 112 +++ 4 files changed, 139 insertions(+), 4 deletions(-) diff --git a/apisix/plugins/fault-injection.lua b/apisix/plugins/fault-injection.lua index 8cf8b8d..aace3e2 100644 --- a/apisix/plugins/fault-injection.lua +++ b/apisix/plugins/fault-injection.lua @@ -14,8 +14,10 @@ -- See the License for the specific language governing permissions and -- limitations under the License. -- -local core = require("apisix.core") -local sleep = core.sleep +local core = require("apisix.core") + +local sleep = core.sleep +local random = math.random local plugin_name = "fault-injection" @@ -28,6 +30,7 @@ local schema = { properties = { http_status = {type = "integer", minimum = 200}, body = {type = "string", minLength = 0}, +percentage = {type = "integer", minimum = 0, maximum = 100} }, minProperties = 1, }, @@ -35,6 +38,7 @@ local schema = { type = "object", properties = { duration = {type = "number", minimum = 0}, +percentage = {type = "integer", minimum = 0, maximum = 100} }, minProperties = 1, } @@ -51,6 +55,15 @@ local _M = { } +local function sample_hit(percentage) +if not percentage then +return true +end + +return random(0, 100) <= percentage +end + + function _M.check_schema(conf) local ok, err = core.schema.check(schema, conf) if not ok then @@ -64,11 +77,17 @@ end function _M.rewrite(conf, ctx) core.log.info("plugin rewrite phase, conf: ", core.json.delay_encode(conf)) -if conf.delay and conf.delay.duration ~= nil then +if conf.delay + and conf.delay.duration ~= nil + and sample_hit(conf.delay.percentage) +then sleep(conf.delay.duration) end -if conf.abort and conf.abort.http_status ~= nil then +if conf.abort + and conf.abort.http_status ~= nil + and sample_hit(conf.abort.percentage) +then return conf.abort.http_status, conf.abort.body end end diff --git a/doc/plugins/fault-injection.md b/doc/plugins/fault-injection.md index 7209018..ff09cfc 100644 --- a/doc/plugins/fault-injection.md +++ b/doc/plugins/fault-injection.md @@ -29,7 +29,9 @@ Fault injection plugin, this plugin can be used with other plugins and will be e | - | --- | --- | --- | -- | | | abort.http_status | integer | optional| | [200, ...] | user-specified http code returned to the client. | | abort.body| string | optional| || response data returned to the client.| +| abort.percentage | integer | optional| | [0, 100] | percentage of requests to be aborted.| | delay.duration| number | optional| || delay time (can be decimal). | +| delay.percentage | integer | optional| | [0, 100] | percentage of requests to be delayed.| Note: One of `abort` and `delay` must be specified. diff --git a/doc/zh-cn/plugins/fault-injection.md b/doc/zh-cn/plugins/fault-injection.md index eb50de8..ad40492 100644 --- a/doc/zh-cn/plugins/fault-injection.md +++ b/doc/zh-cn/plugins/fault-injection.md @@ -29,7 +29,9 @@ | - | --- | -- | -- | -- | -- | | abort.http_status | integer | 可选 || [200, ...] | 返回给客户端的 http 状态码 | | abort.body| string | 可选 ||| 返回给客户端的响应数据 | +| abort.percentage | integer | 可选 || [0, 100] | 将被中断的请求占比 | | delay.duration| number | 可选 ||| 延迟时间,可以指定小数 | +| delay.percentage | integer | 可选 || [0, 100] | 将被延迟的请求占比 | 注:参数 abort 和 delay 至少要存在一个。 diff --git a/t/plugin/fault-injection.t b/t/plugin/fault-injection.t index 9a44745..c427714 100644 --- a/t/plugin/fault-injection.t +++ b/t/plugin/fault-injection.t @@ -523,3 +523,115 @@ GET /hello HTTP/1.1 Fault Injection! --- no_error_log [error] + + + +=== TEST 16: set route (abort injection but with zero perce
[GitHub] [apisix] membphis merged pull request #2516: feature: support percentage for fault injection
membphis merged pull request #2516: URL: https://github.com/apache/apisix/pull/2516 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix-dashboard] branch v2.0 updated (cacb2e4 -> c229d07)
This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a change to branch v2.0 in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git. from cacb2e4 feat(docs): update deploy docs add c229d07 feat(doc): added tip in deploy No new revisions were added by this update. Summary of changes: docs/deploy.md | 6 +++--- docs/deploy.zh-CN.md | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-)
[GitHub] [apisix] membphis commented on a change in pull request #2516: feature: support percentage for fault injection
membphis commented on a change in pull request #2516: URL: https://github.com/apache/apisix/pull/2516#discussion_r512433219 ## File path: apisix/plugins/fault-injection.lua ## @@ -28,13 +30,15 @@ local schema = { properties = { http_status = {type = "integer", minimum = 200}, body = {type = "string", minLength = 0}, +percentage = {type = "integer", minimum = 0, maximum = 100} Review comment: thx for your explain This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] moonming merged pull request #2528: doc: fixed download links.
moonming merged pull request #2528: URL: https://github.com/apache/apisix/pull/2528 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix] branch master updated: doc: fixed download links. (#2528)
This is an automated email from the ASF dual-hosted git repository. wenming 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 ba324fe doc: fixed download links. (#2528) ba324fe is described below commit ba324fe7f4ce5bc5cf55dfb1500648ef6b93013a Author: Wen Ming AuthorDate: Tue Oct 27 13:51:01 2020 +0800 doc: fixed download links. (#2528) --- README.md| 4 ++-- README_CN.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9e66351..be741b7 100644 --- a/README.md +++ b/README.md @@ -129,8 +129,8 @@ There are several ways to install the Apache Release version of APISIX: - Installation runtime dependencies: OpenResty and etcd, and compilation dependencies: luarocks. Refer to [install dependencies documentation](doc/install-dependencies.md) - Download the latest source code release package: ```shell -wget http://www.apache.org/dist/apisix/2.0/apache-apisix-2.0-src.tar.gz -tar zxvf apache-apisix-2.0-src.tar.gz +wget https://downloads.apache.org/apisix/2.0/apache-apisix-2.0-src.tgz +tar zxvf apache-apisix-2.0-src.tgz ``` - Install the dependencies: ```shell diff --git a/README_CN.md b/README_CN.md index f27e320..ee32bd9 100644 --- a/README_CN.md +++ b/README_CN.md @@ -128,8 +128,8 @@ CentOS 7, Ubuntu 16.04, Ubuntu 18.04, Debian 9, Debian 10, macOS, **ARM64** Ubun - 安装运行时依赖:OpenResty 和 etcd,以及编译的依赖:luarocks。参考[依赖安装文档](doc/zh-cn/install-dependencies.md) - 下载最新的源码发布包: ```shell -wget http://www.apache.org/dist/apisix/2.0/apache-apisix-2.0-src.tar.gz -tar zxvf apache-apisix-2.0-src.tar.gz +wget http://www.apache.org/dist/apisix/2.0/apache-apisix-2.0-src.tgz +tar zxvf apache-apisix-2.0-src.tgz ``` - 安装运行时依赖的 Lua 库: ```shell
[apisix-dashboard] branch v2.0 updated (9b11253 -> cacb2e4)
This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a change to branch v2.0 in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git. from 9b11253 Update deploy.zh-CN.md add cacb2e4 feat(docs): update deploy docs No new revisions were added by this update. Summary of changes: docs/deploy.md | 11 +-- docs/deploy.zh-CN.md | 14 +++--- 2 files changed, 12 insertions(+), 13 deletions(-)
[apisix] branch master updated: feat: implement api breaker plugin. (#2455)
This is an automated email from the ASF dual-hosted git repository. membphis 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 6a7dfa6 feat: implement api breaker plugin. (#2455) 6a7dfa6 is described below commit 6a7dfa677562876538f3afe8b61f25ad2af39e20 Author: YuanSheng Wang AuthorDate: Tue Oct 27 13:40:23 2020 +0800 feat: implement api breaker plugin. (#2455) Co-authored-by: liuheng --- apisix/plugins/api-breaker.lua | 248 +++ bin/apisix | 1 + conf/config-default.yaml | 1 + doc/plugins/api-breaker.md | 117 +++ doc/zh-cn/plugins/api-breaker.md | 116 +++ t/APISIX.pm | 1 + t/admin/plugins.t| 2 +- t/debug/debug-mode.t | 1 + t/lib/server.lua | 9 + t/plugin/api-breaker.t | 651 +++ 10 files changed, 1146 insertions(+), 1 deletion(-) diff --git a/apisix/plugins/api-breaker.lua b/apisix/plugins/api-breaker.lua new file mode 100644 index 000..d97577d --- /dev/null +++ b/apisix/plugins/api-breaker.lua @@ -0,0 +1,248 @@ +-- +-- 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 plugin_name = "api-breaker" +local ngx = ngx +local math = math +local error = error +local ipairs = ipairs + +local shared_buffer = ngx.shared['plugin-'.. plugin_name] +if not shared_buffer then +error("failed to get ngx.shared dict when load plugin " .. plugin_name) +end + + +local schema = { +type = "object", +properties = { +break_response_code = { +type = "integer", +minimum = 200, +maximum = 599, +}, +max_breaker_sec = { +type = "integer", +minimum = 3, +default = 300, +}, +unhealthy = { +type = "object", +properties = { +http_statuses = { +type = "array", +minItems = 1, +items = { +type = "integer", +minimum = 500, +maximum = 599, +}, +uniqueItems = true, +default = {500} +}, +failures = { +type = "integer", +minimum = 1, +default = 3, +} +}, +default = {http_statuses = {500}, failures = 3} +}, +healthy = { +type = "object", +properties = { +http_statuses = { +type = "array", +minItems = 1, +items = { +type = "integer", +minimum = 200, +maximum = 499, +}, +uniqueItems = true, +default = {200} +}, +successes = { +type = "integer", +minimum = 1, +default = 3, +} +}, +default = {http_statuses = {200}, successes = 3} +} +}, +required = {"break_response_code"}, +} + + +-- todo: we can move this into `core.talbe` +local function array_find(array, val) +for i, v in ipairs(array) do +if v == val then +return i +end +end + +return nil +end + + +local function gen_healthy_key(ctx) +return "healthy-" .. core.request.get_host(ctx) .. ctx.var.uri +end + + +local function gen_unhealthy_key(ctx) +return "unhealthy-" .. core.request.get_host(ctx) .. ctx.var.uri +end + + +local function gen_lasttime_key(ctx) +return "unhealthy-lastime" .. core.request.get_host(ctx) .. ctx.var.uri +end + + +local _M = { +version = 0.1, +name = plugin_name, +priority = 1005, +schema = schema, +} + + +function _M.check_schema(conf) +return core.schema.check(schema, conf) +end + + +function _M.access(conf, ctx) +
[GitHub] [apisix] membphis merged pull request #2455: feat: implement api breaker plugin.
membphis merged pull request #2455: URL: https://github.com/apache/apisix/pull/2455 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] liuxiran commented on issue #605: discuss: how to get different type of plugin schema in 2.0 manager-api
liuxiran commented on issue #605: URL: https://github.com/apache/apisix-dashboard/issues/605#issuecomment-716980295 > @liuxiran > > I think we need to update two files: > > 1. update `schema-sync.lua` so that it can sync all types schemas. > > 2. update `internal/handler/plugin/plugin.go` so that it can get different plugin schema by type through query params Thx for your feedback @nic-chen :), when the feature done, I`ll update the comment. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] tzssangglass commented on a change in pull request #2497: feature: prometheus plugin `apisix_http_status` metric `route` tag Im…
tzssangglass commented on a change in pull request #2497: URL: https://github.com/apache/apisix/pull/2497#discussion_r512407701 ## File path: apisix/http/router/radixtree_host_uri.lua ## @@ -131,7 +131,7 @@ function _M.match(api_ctx) match_opts.remote_addr = api_ctx.var.remote_addr match_opts.vars = api_ctx.var match_opts.host = api_ctx.var.host -match_opts.matched = {} +match_opts.matched = core.tablepool.fetch("match_opts_matched", 0, 4) Review comment: ok, let me think of a better name. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix-dashboard] branch v2.0 updated (e05427d -> e874272)
This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a change to branch v2.0 in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git. from e05427d doc: add etcd api version tips (#604) add e874272 Update deploy.md No new revisions were added by this update. Summary of changes: docs/deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[apisix-dashboard] branch v2.0 updated (e874272 -> 9b11253)
This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a change to branch v2.0 in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git. from e874272 Update deploy.md add 9b11253 Update deploy.zh-CN.md No new revisions were added by this update. Summary of changes: docs/deploy.zh-CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[GitHub] [apisix] jeffguorg opened a new issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
jeffguorg opened a new issue #2533: URL: https://github.com/apache/apisix/issues/2533 ### Issue description Hi, we are setting up a k8s cluster and setting up apisix to be the api gateway. but apisix could not proxy the request to the grpc backend services: "failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed" said in logs/error.log backend server is ensured that it is always reachable from apisix ### Environment * apisix version (cmd: `apisix version`): 1.5 * OS: Kubernetes v1.18.8-aliyun.1 /Alpine Linux 3.11.6 [config.txt](https://github.com/apache/apisix/files/5442801/config.txt) [output.txt](https://github.com/apache/apisix/files/5442802/output.txt) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] gy09535 opened a new issue #2532: bug: apisix upstream domain resolve can not support "search xxxx, options xxxxx" in k8s env
gy09535 opened a new issue #2532: URL: https://github.com/apache/apisix/issues/2532 ### Issue description for example in k8s environment , we can use service name as backend nodes, sometime for core DNS query we can combine the service name and "svc.cluster.local" as the domain, the resolve config is ``` nameserver 10.96.0.10 search svc.cluster.local cluster.local options ndots:5 ``` apisix just support "nameserver",ref code: https://github.com/apache/apisix/blob/master/apisix/core/utils.lua#L75,so we must define the full domain ".svc.cluster.local". ### Environment * apisix version (cmd: `apisix version`): * OS: ### Minimal test code / Steps to reproduce the issue 1. 2. 3. ### What's the actual result? (including assertion message & call stack if applicable) ### What's the expected result? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on issue #605: discuss: how to get different type of plugin schema in 2.0 manager-api
nic-chen commented on issue #605: URL: https://github.com/apache/apisix-dashboard/issues/605#issuecomment-716957534 we could do this after the feature you mentioned is done. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis commented on pull request #2455: feat: implement api breaker plugin.
membphis commented on pull request #2455: URL: https://github.com/apache/apisix/pull/2455#issuecomment-716948727 > please add doc in README and plugin list. added a todo issue: https://github.com/apache/apisix/issues/2529 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis opened a new issue #2529: doc(api-breaker): add doc in README and plugin list.
membphis opened a new issue #2529: URL: https://github.com/apache/apisix/issues/2529 original comment: https://github.com/apache/apisix/pull/2455#pullrequestreview-514360658 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix-dashboard] branch v2.0 updated (a6d6a32 -> e05427d)
This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a change to branch v2.0 in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git. from a6d6a32 feat: remove unused dist folder add e05427d doc: add etcd api version tips (#604) No new revisions were added by this update. Summary of changes: README.md | 2 ++ README.zh-CN.md | 1 + 2 files changed, 3 insertions(+)
[apisix-dashboard] branch v2.0 updated (a6d6a32 -> e05427d)
This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a change to branch v2.0 in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git. from a6d6a32 feat: remove unused dist folder add e05427d doc: add etcd api version tips (#604) No new revisions were added by this update. Summary of changes: README.md | 2 ++ README.zh-CN.md | 1 + 2 files changed, 3 insertions(+)
[GitHub] [apisix] tokers commented on issue #2520: bug: "failed to acquire the lock: timeout" in logs/error.log when setuping route at the first time
tokers commented on issue #2520: URL: https://github.com/apache/apisix/issues/2520#issuecomment-716948018 It seems that when check the schema of Routes, APISIX tries to fetch the schema firstly and compile it, the compilation result will be cached inside a LRU cache. The schema creation is exclusive by a Lock. But the creation is totally compution and without IO operations, the default timeout for lock:lock is 5s, which is almost impossible to be timed out. @membphis This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan merged pull request #604: doc: add etcd api version tips
juzhiyuan merged pull request #604: URL: https://github.com/apache/apisix-dashboard/pull/604 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on issue #605: discuss: how to get different type of plugin schema in 2.0 manager-api
nic-chen commented on issue #605: URL: https://github.com/apache/apisix-dashboard/issues/605#issuecomment-71698 @liuxiran I think we need to update two files: 1. update `schema-sync.lua` so that it can sync all types schemas. 2. update `internal/handler/plugin/plugin.go` so that it can get different plugin schema by type through query params This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis commented on a change in pull request #2497: feature: prometheus plugin `apisix_http_status` metric `route` tag Im…
membphis commented on a change in pull request #2497: URL: https://github.com/apache/apisix/pull/2497#discussion_r512392814 ## File path: apisix/http/router/radixtree_host_uri.lua ## @@ -131,7 +131,7 @@ function _M.match(api_ctx) match_opts.remote_addr = api_ctx.var.remote_addr match_opts.vars = api_ctx.var match_opts.host = api_ctx.var.host -match_opts.matched = {} +match_opts.matched = core.tablepool.fetch("match_opts_matched", 0, 4) Review comment: @tzssangglass can you fix this soon? then we can merge 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] fukiki opened a new issue #2531: doc(plugins/hmac-auth): generate signature should be more detailed
fukiki opened a new issue #2531: URL: https://github.com/apache/apisix/issues/2531 ### Issue description In [hmac-auth.md](https://github.com/apache/apisix/blob/master/doc/plugins/hmac-auth.md) , about generate signature, there should be a more detailed introduction: 1、About `signature = HMAC-SHAx-HEX(secret_key, signing_string)` , list some examples for different language, would be better. 2、The parameter signature should be base64 encoded, for example: base64.b64encode(signature) 3、In headers,the value of "X-HMAC-SIGNED-HEADERS", should be splited by ";", such as: "x-hmac-header-a;x-hmac-header-b" ### Environment * apisix version (cmd: `apisix version`): 1.5 * OS: centos 7 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis commented on a change in pull request #2497: feature: prometheus plugin `apisix_http_status` metric `route` tag Im…
membphis commented on a change in pull request #2497: URL: https://github.com/apache/apisix/pull/2497#discussion_r511526516 ## File path: apisix/http/router/radixtree_host_uri.lua ## @@ -131,7 +131,7 @@ function _M.match(api_ctx) match_opts.remote_addr = api_ctx.var.remote_addr match_opts.vars = api_ctx.var match_opts.host = api_ctx.var.host -match_opts.matched = {} +match_opts.matched = core.tablepool.fetch("match_opts_matched", 0, 4) Review comment: `match_opts_matched` is not a good name. Need to add the word `route`. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] zhangguanzhang opened a new issue #2530: request help: [doc] need qucik-star
zhangguanzhang opened a new issue #2530: URL: https://github.com/apache/apisix/issues/2530 ### Issue description need qucik-star ### Environment * apisix version (cmd: `apisix version`): * OS: This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis commented on pull request #2415: feat:The limit-conn plugin supports 'consumer_name' field
membphis commented on pull request #2415: URL: https://github.com/apache/apisix/pull/2415#issuecomment-716942428 @Jaycean many thx, merged This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis merged pull request #2415: feat:The limit-conn plugin supports 'consumer_name' field
membphis merged pull request #2415: URL: https://github.com/apache/apisix/pull/2415 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix] branch master updated: feat:The limit-conn plugin supports 'consumer_name' field (#2415)
This is an automated email from the ASF dual-hosted git repository. membphis 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 e2f450f feat:The limit-conn plugin supports 'consumer_name' field (#2415) e2f450f is described below commit e2f450fa1a3e62c67b2c28b7c204e750dfc437b9 Author: JinChen <36916582+jayc...@users.noreply.github.com> AuthorDate: Tue Oct 27 10:44:44 2020 +0800 feat:The limit-conn plugin supports 'consumer_name' field (#2415) The limit-conn plugin supports the` consumer_name` field The method of PR is referred: #2333 --- apisix/plugins/limit-conn.lua | 2 +- doc/plugins/limit-conn.md | 2 +- doc/zh-cn/plugins/limit-conn.md | 2 +- t/plugin/limit-conn.t | 242 +++- 4 files changed, 244 insertions(+), 4 deletions(-) diff --git a/apisix/plugins/limit-conn.lua b/apisix/plugins/limit-conn.lua index ca8ca3c..2b80a3b 100644 --- a/apisix/plugins/limit-conn.lua +++ b/apisix/plugins/limit-conn.lua @@ -28,7 +28,7 @@ local schema = { default_conn_delay = {type = "number", exclusiveMinimum = 0}, key = {type = "string", enum = {"remote_addr", "server_addr", "http_x_real_ip", -"http_x_forwarded_for"}, +"http_x_forwarded_for", "consumer_name"}, }, rejected_code = {type = "integer", minimum = 200, default = 503}, }, diff --git a/doc/plugins/limit-conn.md b/doc/plugins/limit-conn.md index 0b3c7c7..5a50629 100644 --- a/doc/plugins/limit-conn.md +++ b/doc/plugins/limit-conn.md @@ -37,7 +37,7 @@ Limiting request concurrency plugin. | conn | integer | required| | [0,...] | the maximum number of concurrent requests allowed. Requests exceeding this ratio (and below `conn` + `burst`) will get delayed to conform to this threshold. [...] | burst | integer | required| | [0,...] | the number of excessive concurrent requests (or connections) allowed to be delayed. [...] | default_conn_delay | number | required| | [0,...] | the default processing latency of a typical connection (or request). [...] -| key| object | required| | ["remote_addr", "server_addr", "http_x_real_ip", "http_x_forwarded_for"] | to limit the concurrency level. For example, one can use the host name (or server zone) as the key so that we limit concurrency per host name. Otherwise, we can also use the client address as the key so that we can avoid a single client from flooding our service with too many parallel connections or requests. Now accept those as key: "remote_addr"(c [...] +| key| object | required| | ["remote_addr", "server_addr", "http_x_real_ip", "http_x_forwarded_for", "consumer_name"] | to limit the concurrency level. For example, one can use the host name (or server zone) as the key so that we limit concurrency per host name. Otherwise, we can also use the client address as the key so that we can avoid a single client from flooding our service with too many parallel connections or requests. Now accept those as key [...] | rejected_code | string | optional| 503 | [200,...] | returned when the request exceeds `conn` + `burst` will be rejected. [...] **Key can be customized by the user, only need to modify a line of code of the plug-in to complete. It is a security consideration that is not open in the plugin.** diff --git a/doc/zh-cn/plugins/limit-conn.md b/doc/zh-cn
[apisix] branch master updated: doc(readme): Contributor Over Time (#2454)
This is an automated email from the ASF dual-hosted git repository. membphis 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 dfc50fd doc(readme): Contributor Over Time (#2454) dfc50fd is described below commit dfc50fd95b2e9cf23434c3cdd8a0b9468aa9ca24 Author: Yousa AuthorDate: Tue Oct 27 10:42:15 2020 +0800 doc(readme): Contributor Over Time (#2454) --- README.md| 4 README_CN.md | 4 doc/images/contributor-over-time.png | Bin 0 -> 199476 bytes 3 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 509c635..9e66351 100644 --- a/README.md +++ b/README.md @@ -287,6 +287,10 @@ A wide variety of companies and organizations use APISIX for research, productio Users are encouraged to add themselves to the [Powered By](doc/powered-by.md) page. +## Contributor Over Time + +![contributor-over-time](./doc/images/contributor-over-time.png) + ## Landscape https://landscape.cncf.io/images/left-logo.svg"; width="150"> https://landscape.cncf.io/images/right-logo.svg"; width="200"> diff --git a/README_CN.md b/README_CN.md index 63f80a4..f27e320 100644 --- a/README_CN.md +++ b/README_CN.md @@ -291,6 +291,10 @@ Dashboard 默认只允许 127.0.0.1 访问。你可以自行修改 `conf/config. 欢迎用户把自己加入到 [Powered By](doc/powered-by.md) 页面。 +## 贡献者变化 + +![contributor-over-time](./doc/images/contributor-over-time.png) + ## 全景图 https://landscape.cncf.io/images/left-logo.svg"; width="150"> https://landscape.cncf.io/images/right-logo.svg"; width="200"> diff --git a/doc/images/contributor-over-time.png b/doc/images/contributor-over-time.png new file mode 100644 index 000..b245519 Binary files /dev/null and b/doc/images/contributor-over-time.png differ
[GitHub] [apisix] membphis merged pull request #2454: doc: Contributor Over Time
membphis merged pull request #2454: URL: https://github.com/apache/apisix/pull/2454 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis closed issue #2518: feat: The limit-count plugin supports service_id field
membphis closed issue #2518: URL: https://github.com/apache/apisix/issues/2518 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix] branch master updated (443e7b4 -> 80affa0)
This is an automated email from the ASF dual-hosted git repository. membphis pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/apisix.git. from 443e7b4 release: release 2.0 version. (#2283) add 80affa0 feat: The limit-count plugin supports service_id field. (#2521) No new revisions were added by this update. Summary of changes: apisix/plugins/limit-count.lua | 2 +- doc/plugins/limit-count.md | 12 +-- doc/zh-cn/plugins/limit-count.md | 20 ++-- t/plugin/limit-count.t | 207 +++ 4 files changed, 228 insertions(+), 13 deletions(-)
[GitHub] [apisix] membphis merged pull request #2521: feat: The limit-count plugin supports service_id field.
membphis merged pull request #2521: URL: https://github.com/apache/apisix/pull/2521 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] tokers commented on a change in pull request #2519: feature: support injecting lua_ssl_trusted_certificate.
tokers commented on a change in pull request #2519: URL: https://github.com/apache/apisix/pull/2519#discussion_r512378103 ## File path: bin/apisix ## @@ -389,6 +389,10 @@ http { ssl_session_cacheshared:SSL:20m; ssl_session_timeout 10m; +{% if ssl.ssl_trusted_certificate ~= nil then %} +lua_ssl_trusted_certificate {* ssl.ssl_trusted_certificate *}; Review comment: Added. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] moonming opened a new pull request #2528: doc: fixed download links.
moonming opened a new pull request #2528: URL: https://github.com/apache/apisix/pull/2528 ### What this PR does / why we need it: ### Pre-submission checklist: * [ ] Did you explain what problem does this PR solve? Or what new features have been added? * [ ] Have you added corresponding test cases? * [ ] Have you modified the corresponding document? * [ ] Is this PR backward compatible? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix] branch master updated (5be8d85 -> 443e7b4)
This is an automated email from the ASF dual-hosted git repository. wenming pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/apisix.git. from 5be8d85 doc: correct the guide of creating consumer guide in AdminAPI (#2513) add 443e7b4 release: release 2.0 version. (#2283) No new revisions were added by this update. Summary of changes: CHANGELOG.md | 29 +- CHANGELOG_CN.md| 28 + README.md | 9 +++ README_CN.md | 9 +++ apisix/core/version.lua| 2 +- doc/how-to-build.md| 14 +-- doc/zh-cn/how-to-build.md | 14 +-- ...six-master-0.rockspec => apisix-2.0-0.rockspec} | 4 +-- 8 files changed, 81 insertions(+), 28 deletions(-) copy rockspec/{apisix-master-0.rockspec => apisix-2.0-0.rockspec} (98%)
[apisix] branch master updated (5be8d85 -> 443e7b4)
This is an automated email from the ASF dual-hosted git repository. wenming pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/apisix.git. from 5be8d85 doc: correct the guide of creating consumer guide in AdminAPI (#2513) add 443e7b4 release: release 2.0 version. (#2283) No new revisions were added by this update. Summary of changes: CHANGELOG.md | 29 +- CHANGELOG_CN.md| 28 + README.md | 9 +++ README_CN.md | 9 +++ apisix/core/version.lua| 2 +- doc/how-to-build.md| 14 +-- doc/zh-cn/how-to-build.md | 14 +-- ...six-master-0.rockspec => apisix-2.0-0.rockspec} | 4 +-- 8 files changed, 81 insertions(+), 28 deletions(-) copy rockspec/{apisix-master-0.rockspec => apisix-2.0-0.rockspec} (98%)
[GitHub] [apisix] juzhiyuan edited a comment on issue #2082: request help: Update plugin's schema
juzhiyuan edited a comment on issue #2082: URL: https://github.com/apache/apisix/issues/2082#issuecomment-714225553 - [x] proxy-rewrite ![image](https://user-images.githubusercontent.com/2106987/96826430-ee779980-1465-11eb-8111-f347fda71cbf.png) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] moonming merged pull request #2283: release: release 2.0-rc version.
moonming merged pull request #2283: URL: https://github.com/apache/apisix/pull/2283 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] juzhiyuan opened a new issue #2082: request help: Update plugin's schema
juzhiyuan opened a new issue #2082: URL: https://github.com/apache/apisix/issues/2082 ### Issue description The Apache APISIX Dashboard is using a module named [react-jsonschema-form](https://rjsf-team.github.io/react-jsonschema-form/), which is used to build UI components according to JSONSchema, but due to some differences between Draft7 and other versions Apache APISIX is using, some components couldn't be rendered correctly, so in order to fix this issue, I propose to change some plugin's schema. I will create issues to describe the changes for each plugin, this issue mainly focuses on tracking the total process. ### Environment * apisix version (cmd: `apisix version`): All * OS: ### Process - [x] [prometheus](https://github.com/apache/apisix/issues/2084) & [node-status](https://github.com/apache/apisix/issues/2084) - [x] [basic-auth](https://github.com/apache/apisix/issues/2083) - [x] [ip-restriction](https://github.com/apache/apisix/issues/2085) - [x] [limit-count](https://github.com/apache/apisix/issues/2086) - [x] [fault-injection](https://github.com/apache/apisix/issues/2088) - [ ] [response-rewrite](https://github.com/apache/apisix/issues/2087) - [ ] kafka-log - [ ] jwt-auth This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] liuxiran commented on issue #2082: request help: Update plugin's schema
liuxiran commented on issue #2082: URL: https://github.com/apache/apisix/issues/2082#issuecomment-716931462 Sorry to related fix this issue by https://github.com/api7/dashboard-components/pull/143, which only fix: https://github.com/apache/apisix/issues/2082#issuecomment-714225553, part of this issue, reopen now This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] tokers commented on pull request #2519: feature: support injecting lua_ssl_trusted_certificate.
tokers commented on pull request #2519: URL: https://github.com/apache/apisix/pull/2519#issuecomment-716929152 > Is this also work for vault? Yes, actually for all the external services. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] tokers commented on a change in pull request #2519: feature: support injecting lua_ssl_trusted_certificate.
tokers commented on a change in pull request #2519: URL: https://github.com/apache/apisix/pull/2519#discussion_r512371767 ## File path: conf/config-default.yaml ## @@ -101,6 +101,9 @@ apisix: enable: true enable_http2: true listen_port: 9443 +ssl_trusted_certificate: /path/to/ca-cert # Specifies a file path with trusted CA certificates in the PEM format + # used to verify the certificate when APISIX needs to do SSL/TLS handshaking + # with external services (e.g. ETCD) Review comment: Is this the conventional way in APISIX? ## File path: bin/apisix ## @@ -389,6 +389,10 @@ http { ssl_session_cacheshared:SSL:20m; ssl_session_timeout 10m; +{% if ssl.ssl_trusted_certificate ~= nil then %} +lua_ssl_trusted_certificate {* ssl.ssl_trusted_certificate *}; Review comment: OK This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] DHB-liuhong edited a comment on issue #2520: bug: "failed to acquire the lock: timeout" in logs/error.log when setuping route at the first time
DHB-liuhong edited a comment on issue #2520: URL: https://github.com/apache/apisix/issues/2520#issuecomment-716919846 @membphis https://github.com/apache/apisix/issues/1970 can be recurrent, it looks like the same 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] gxthrj opened a new issue #2527: bug: the plugin hmac-auth missed a '\n'
gxthrj opened a new issue #2527: URL: https://github.com/apache/apisix/issues/2527 ### Issue description We discussed the organization of `x-hmac-signed-headers` in #2336 the last `\n` is missed after executing this line of code (https://github.com/apache/apisix/blob/master/apisix/plugins/hmac-auth.lua#L244) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] juzhiyuan closed issue #2082: request help: Update plugin's schema
juzhiyuan closed issue #2082: URL: https://github.com/apache/apisix/issues/2082 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] juzhiyuan closed issue #2087: request help: Update plugin's schema response-rewrite
juzhiyuan closed issue #2087: URL: https://github.com/apache/apisix/issues/2087 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] DHB-liuhong commented on issue #2520: bug: "failed to acquire the lock: timeout" in logs/error.log when setuping route at the first time
DHB-liuhong commented on issue #2520: URL: https://github.com/apache/apisix/issues/2520#issuecomment-716919846 @membphis https://github.com/apache/apisix/issues/1970 can be recurrent This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] liuxiran commented on issue #605: discuss: how to get different type of plugin schema in 2.0 manager-api
liuxiran commented on issue #605: URL: https://github.com/apache/apisix-dashboard/issues/605#issuecomment-716917346 cc @juzhiyuan @nic-chen @ShiningRush This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] Jaycean opened a new issue #2526: request help: admin-api error : key not found
Jaycean opened a new issue #2526: URL: https://github.com/apache/apisix/issues/2526 ### Issue description When I restart my system or change the docker image, restart all services, it will cause FE to report error 400, check the api error as follows manage-api ``` {"app":"manager-api","level":"error","line":"service/route.go:107","msg":"status: 404, body: {\"message\":\"Key not found\",\"header\":{\"raft_term\":\"2\",\"cluster_id\":\"14841639068965178418\",\"member_id\":\"10276657743932975437\",\"revision\":\"12\"}}\n","time":"2020-10-26T16:43:08+08:00"} {"app":"manager-api","level":"error","line":"route/route.go:152","msg":"Route request parameters are abnormal: status: 404, body: {\"message\":\"Key not found\",\"header\":{\"raft_term\":\"2\",\"cluster_id\":\"14841639068965178418\",\"member_id\":\"10276657743932975437\",\"revision\":\"12\"}}\n route ID: 29fbc3ad-e414-49a2-aab3-239700d5648b","time":"2020-10-26T16:43:08+08:00"} {"app":"manager-api","errMsg":null,"host":"192.168.227.153:8080","latency":33,"level":"info","line":"filter/logging.go:78","method":"PUT","msg":"","params":"","path":"/apisix/admin/routes/29fbc3ad-e414-49a2-aab3-239700d5648b/offline","remoteIp":"192.168.227.153","requestId":"a903fe75-408b-4609-b7c2-eeb30c409ced","respBody":"{\"code\":\"010201\",\"msg\":\"Route request parameters are abnormal: status: 404, body: {\\\"message\\\":\\\"Key not found\\\",\\\"header\\\":{\\\"raft_term\\\":\\\"2\\\",\\\"cluster_id\\\":\\\"14841639068965178418\\\",\\\"member_id\\\":\\\"10276657743932975437\\\",\\\"revision\\\":\\\"12\\\"}}\\n route ID: 29fbc3ad-e414-49a2-aab3-239700d5648b\"}","statusCode":400,"time":"2020-10-26T16:43:08+08:00"} ``` I checked the code and found that the error occurred when admin-api requested etcd: `Key not found` So I tried the command:`make init`,but it didn't work The solution is to delete all tables in the manage library in mysql, and then re-execute `source ./api/script/db/schema.sql` to solve this problem, but in this way I lose all the data that has been created ### Environment * apisix version (cmd: `apisix version`): v1.5 * OS: Centos7 Fedora31 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] liuxiran opened a new issue #605: discuss: how to get different type of plugin schema in 2.0 manager-api
liuxiran opened a new issue #605: URL: https://github.com/apache/apisix-dashboard/issues/605 Please answer these questions before submitting your issue. - Why do you submit this issue? - [ ] Question or discussion - [ ] Bug - [ ] Requirements - [ ] Feature or performance improvement - [ ] Other ___ ### Premise Refered to https://github.com/apache/apisix/issues/2441#issuecomment-714330623, we are tring to implement the feature, that getting different plugin schema by schema type through query params. After refactoring, manager-api will get the plugin schema via [schema.json](https://github.com/apache/apisix-dashboard/blob/v2.0/api/conf/schema.json), which is generated by [schema-sync.sh](https://github.com/apache/apisix-dashboard/blob/v2.0/api/build-tools/schema-sync.sh) and [schema-sync.lua](https://github.com/apache/apisix-dashboard/blob/v2.0/api/build-tools/schema-sync.lua) instead of getting directly from admin-api ### Question Is it possible to add this query param in 2.0 manager-api? - change the plugin schema generated by `schema-sync.sh` and `schema-sync.lua` ? - some other way? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on issue #603: Do we need gin accesslog file?
nic-chen commented on issue #603: URL: https://github.com/apache/apisix-dashboard/issues/603#issuecomment-716906593 we have error log,we could do this in 2.1 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] tashiya-menuri opened a new pull request #2525: bugfux : fixes issue #2327
tashiya-menuri opened a new pull request #2525: URL: https://github.com/apache/apisix/pull/2525 ### What this PR does / why we need it: Fix for https://github.com/apache/apisix/issues/2327 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] tashiya-menuri opened a new pull request #2524: bugfux : fixes issue #2505
tashiya-menuri opened a new pull request #2524: URL: https://github.com/apache/apisix/pull/2524 ### What this PR does / why we need it: Fix for https://github.com/apache/apisix/issues/2505 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] tzssangglass commented on pull request #2497: feature: prometheus plugin `apisix_http_status` metric `route` tag Im…
tzssangglass commented on pull request #2497: URL: https://github.com/apache/apisix/pull/2497#issuecomment-716679065 ping @membphis This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] tzssangglass opened a new issue #2523: request help: jwt-auth plugin RS256 algorithm is not easy to use
tzssangglass opened a new issue #2523: URL: https://github.com/apache/apisix/issues/2523 ### Issue description I didn't find documentation for using the RS256 algorithm in the jwt plugin.After try, I achieved it. step1: set a consumer and config the value of the jwt-auth option, use the private key here. ``` curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "username": "RS256_algorithm", "plugins": { "jwt-auth": { "key": "RS256-key", "secret": "-BEGIN RSA PRIVATE KEY-\nMIICXwIBAAKBgQC50wrZORquQ1W6xS66Hvx9PA/Yp1kL4GosLCDYCFFeuyHemdZC\neDW+jzTfjdfDAExsZ4Z5/gNegOZC3nEIh/IDoEJHHMwziTz1jxh/7VXuFGvdZcIi\naPpKS6EZ+dVx/NfYMcyY+1gf1ASxJghOD+9Np7IepqKuAqxx1BVnk+rvmwIDAQAB\nAoGBAKqZ3vPfQWeL2kFGlse5ewVfBw1ZVp9YwSEcwmqT+GCIXWgIxHTx+CWjRF+Z\n0eTteTxtL0EAvAcfQEdUAWJbrQumsWR1hcWauDwbCRKH5zHCByT6TcJXZ4V5LjhY\neS8EcEruX+vIOwUt7Kr2mAjMy5nwtzhO6OFEmjFBlTLQwfWBAkEA2sXq/PP4cRDZ\nHQWD/d0fTtiHp54L078EAfzdCRhrDFlzAZCCyjANEsGgLJ/Ojjut7Nj0uLmyRMyW\n03j1s6nkUwJBANlx1CWn2XilMHrm6kyx2S6lptCuF7ff0+IDmynHlMCAx9YXApXh\nUbikerduA8q6gUgRL58kG04/v+0UcbbpXpkCQQCexC1yH3f4TfrSdfNBI90ZskhY\nW3lH1QMKkkCy3hap4qx0wTQ5mT+TkhM071DOpf7luNl4ycLW7Qa0N79QAIZjAkEA\nlvlYofiDnyeanIq9vRhywdeUFin6H9nRpIh6cCy5lFsV5Qi+68+wzPGunrNNALIz\n1xTPqsAIEXFj0bkzJxuraQJBAKKRBmn5pCJ5AckXQdsJz5oRBpSrizrsJrbwVHGx\nAZ0Yyd5HHTNck7R9DwTXJFqELEO1JwMXO/iXuj7H0WolPgs=\n-END RSA PRIVATE KEY-\n", "algorithm": "RS256" } } } ``` step2: add a Route or add a Service , and enable the jwt-auth plugin step3: get the token in jwt-auth plugin ``` curl http://127.0.0.1:9080/apisix/plugin/jwt/sign?key=RS256-key -X GET ``` example: `eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJSUzI1Ni1rZXkiLCJleHAiOjE2MDM4MTY0MDV9.Wru7HT7xJLIIHdootPje7Xn9tbvPQAugKR0LFT0ALwRvjqJwPxtkNcCFcM-HOJgO0UVJCTzPe792CIs115fnfTORqMjN2H1g7Cbi2xcJaeDwZoyL1J27kaSJfcB42r4vyK3WQoG3Yk9y7zVVTAey-HpVvu-2m1CMOA2yNw7H810` setp4: update value of the jwt-auth option on same consumer config, use the public key here. ``` curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "username": "RS256_algorithm", "plugins": { "jwt-auth": { "key": "RS256-key", "secret": "-BEGIN PUBLIC KEY-\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC50wrZORquQ1W6xS66Hvx9PA/Y\np1kL4GosLCDYCFFeuyHemdZCeDW+jzTfjdfDAExsZ4Z5/gNegOZC3nEIh/IDoEJH\nHMwziTz1jxh/7VXuFGvdZcIiaPpKS6EZ+dVx/NfYMcyY+1gf1ASxJghOD+9Np7Ie\npqKuAqxx1BVnk+rvmwIDAQAB\n-END PUBLIC KEY-\n", "algorithm": "RS256" } } } ``` setp5: valid jwt success If use the RS256 algorithm, I want to set both the public and private keys at the same time. #2355 ### Environment * apisix version (cmd: `apisix version`): master(lastest version) * OS:macos This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] tzssangglass opened a new issue #2522: request help: jwt-auth plugin work on a route or a service
tzssangglass opened a new issue #2522: URL: https://github.com/apache/apisix/issues/2522 ### Issue description when i try like ``` curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "methods": ["GET"], "uri": "/index.html", "plugins": { "jwt-auth": { "secret": "-BEGIN PUBLIC KEY-\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC50wrZORquQ1W6xS66Hvx9PA/Y\np1kL4GosLCDYCFFeuyHemdZCeDW+jzTfjdfDAExsZ4Z5/gNegOZC3nEIh/IDoEJH\nHMwziTz1jxh/7VXuFGvdZcIiaPpKS6EZ+dVx/NfYMcyY+1gf1ASxJghOD+9Np7Ie\npqKuAqxx1BVnk+rvmwIDAQAB\n-END PUBLIC KEY-\n" } }, "upstream": { "type": "roundrobin", "nodes": { "39.97.63.215:80": 1 } } }' ``` I get ``` { "error_msg": "failed to check the configuration of plugin jwt-auth err: additional properties forbidden, found secret" } ``` ### Environment * apisix version (cmd: `apisix version`): master(latest version) * OS:macos This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] Firstsawyou opened a new pull request #2521: feat: The limit-count plugin supports service_id field.
Firstsawyou opened a new pull request #2521: URL: https://github.com/apache/apisix/pull/2521 fix #2518 ### 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? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix] branch master updated: doc: correct the guide of creating consumer guide in AdminAPI (#2513)
This is an automated email from the ASF dual-hosted git repository. membphis 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 5be8d85 doc: correct the guide of creating consumer guide in AdminAPI (#2513) 5be8d85 is described below commit 5be8d850c0651302bf8e647df59c7dd41ddb2e78 Author: Joey AuthorDate: Mon Oct 26 22:07:37 2020 +0800 doc: correct the guide of creating consumer guide in AdminAPI (#2513) Fix #2512 --- doc/admin-api.md | 3 +-- doc/zh-cn/admin-api.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/admin-api.md b/doc/admin-api.md index 2e95ff7..eb6e0e3 100644 --- a/doc/admin-api.md +++ b/doc/admin-api.md @@ -410,7 +410,7 @@ Return response from etcd currently. *API*:/apisix/admin/consumers/{id} -*Description*:Consumers are consumers of certain types of services and can only be used in conjunction with a user authentication system. +*Description*:Consumers are consumers of certain types of services and can only be used in conjunction with a user authentication system. Consumer regards the `username` property as the identity, so only the HTTP `PUT` method is supported for creating a new consumer. > Request Methods: @@ -418,7 +418,6 @@ Return response from etcd currently. |-|-|--|--| |GET |/apisix/admin/consumers/{id}|NULL|Fetch resource| |PUT |/apisix/admin/consumers/{id}|{...}|Create resource by ID| -|POST |/apisix/admin/consumers |{...}|Create resource, and ID is generated by server| |DELETE |/apisix/admin/consumers/{id}|NULL|Remove resource| > Request Body Parameters: diff --git a/doc/zh-cn/admin-api.md b/doc/zh-cn/admin-api.md index 8e958e7..f971446 100644 --- a/doc/zh-cn/admin-api.md +++ b/doc/zh-cn/admin-api.md @@ -423,7 +423,7 @@ HTTP/1.1 200 OK *地址*:/apisix/admin/consumers/{id} -*说明*:Consumer 是某类服务的消费者,需与用户认证体系配合才能使用。 +*说明*:Consumer 是某类服务的消费者,需与用户认证体系配合才能使用。Consumer 使用 `username` 作为唯一标识,只支持使用 HTTP `PUT` 方法创建 Consumer。 > 请求方法: @@ -431,7 +431,6 @@ HTTP/1.1 200 OK |-|-|--|--| |GET |/apisix/admin/consumers/{id}|无|获取资源| |PUT |/apisix/admin/consumers/{id}|{...}|根据 id 创建资源| -|POST |/apisix/admin/consumers |{...}|创建资源,id 由后台服务自动生成| |DELETE |/apisix/admin/consumers/{id}|无|删除资源| > body 请求参数:
[GitHub] [apisix] membphis merged pull request #2513: doc(AdminAPI): Correct the guide of creating consumer via POST method
membphis merged pull request #2513: URL: https://github.com/apache/apisix/pull/2513 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis closed issue #2512: doc: misleading guide for creating consumer via POST method in Admin API
membphis closed issue #2512: URL: https://github.com/apache/apisix/issues/2512 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan edited a comment on issue #601: limit-count options args without consumer_name?
juzhiyuan edited a comment on issue #601: URL: https://github.com/apache/apisix-dashboard/issues/601#issuecomment-716568716 We are waiting for Dashboard 2.0’s RC feedbacks, it will be released officially no more than 7 days. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on issue #601: limit-count options args without consumer_name?
juzhiyuan commented on issue #601: URL: https://github.com/apache/apisix-dashboard/issues/601#issuecomment-716568716 We are waiting for Dashboard 2.0’s RC feedbacks, it will be released no more than 7 days. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan closed issue #601: limit-count options args without consumer_name?
juzhiyuan closed issue #601: URL: https://github.com/apache/apisix-dashboard/issues/601 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis commented on pull request #2430: fix: plugin hot reload should work on node
membphis commented on pull request #2430: URL: https://github.com/apache/apisix/pull/2430#issuecomment-716567993 that is a big feature, I'll take a look at this PR when I time ^_^ many thx for your contribution @spacewander This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis commented on pull request #2514: add up_version for discovery
membphis commented on pull request #2514: URL: https://github.com/apache/apisix/pull/2514#issuecomment-716563316 need test case to confirm this way can work fine This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix] branch master updated: change(batch-requests): limit the body size to 1M (#2507)
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 2a66762 change(batch-requests): limit the body size to 1M (#2507) 2a66762 is described below commit 2a66762ca6719ca7d8334f2d1428b42218263845 Author: 罗泽轩 AuthorDate: Mon Oct 26 21:50:51 2020 +0800 change(batch-requests): limit the body size to 1M (#2507) To avoid blocking on reading large body file and spending too much memory in encode JSON body. --- apisix/core/request.lua | 54 - apisix/plugins/batch-requests.lua | 72 ++-- doc/plugins/batch-requests.md | 21 doc/zh-cn/plugins/batch-requests.md | 19 t/lib/test_admin.lua| 11 +- t/plugin/batch-requests.t | 215 +++- 6 files changed, 354 insertions(+), 38 deletions(-) diff --git a/apisix/core/request.lua b/apisix/core/request.lua index fcf6e07..2e5af94 100644 --- a/apisix/core/request.lua +++ b/apisix/core/request.lua @@ -16,12 +16,15 @@ -- local lfs = require("lfs") +local log = require("apisix.core.log") local ngx = ngx local get_headers = ngx.req.get_headers +local clear_header = ngx.req.clear_header local tonumber = tonumber local error= error local type = type local str_fmt = string.format +local str_lower = string.lower local io_open = io.open local req_read_body = ngx.req.read_body local req_get_body_data = ngx.req.get_body_data @@ -116,11 +119,52 @@ local function get_file(file_name) end -function _M.get_body(max_size) +local function check_size(size, max_size) +if max_size and size > max_size then +return nil, "request size " .. size .. " is greater than the " +.. "maximum size " .. max_size .. " allowed" +end + +return true +end + + +local function test_expect(var) +local expect = var.http_expect +return expect and str_lower(expect) == "100-continue" +end + + +function _M.get_body(max_size, ctx) +-- TODO: improve the check with set client_max_body dynamically +-- which requires to change Nginx source code +if max_size then +local var = ctx and ctx.var or ngx.var +local content_length = tonumber(var.http_content_length) +if content_length then +local ok, err = check_size(content_length, max_size) +if not ok then +-- When client_max_body_size is exceeded, Nginx will set r->expect_tested = 1 to +-- avoid sending the 100 CONTINUE. +-- We use trick below to imitate this behavior. +if test_expect(var) then +clear_header("expect") +end + +return nil, err +end +end +end + req_read_body() local req_body = req_get_body_data() if req_body then +local ok, err = check_size(#req_body, max_size) +if not ok then +return nil, err +end + return req_body end @@ -129,15 +173,17 @@ function _M.get_body(max_size) return nil end +log.info("attempt to read body from file: ", file_name) + if max_size then local size, err = lfs.attributes (file_name, "size") if not size then return nil, err end -if size > max_size then -return nil, "request size " .. size .. " is greater than the " -.. "maximum size " .. max_size .. " allowed" +local ok, err = check_size(size, max_size) +if not ok then +return nil, err end end diff --git a/apisix/plugins/batch-requests.lua b/apisix/plugins/batch-requests.lua index 7187821..dfe0dfd 100644 --- a/apisix/plugins/batch-requests.lua +++ b/apisix/plugins/batch-requests.lua @@ -16,8 +16,8 @@ -- local core = require("apisix.core") local http = require("resty.http") +local plugin= require("apisix.plugin") local ngx = ngx -local io_open = io.open local ipairs= ipairs local pairs = pairs local str_find = string.find @@ -31,6 +31,20 @@ local schema = { additionalProperties = false, } +local default_max_body_size = 1024 * 1024 -- 1MiB +local metadata_schema = { +type = "object", +properties = { +max_body_size = { +description = "max pipeline body size in bytes", +type = "integer", +exclusiveMinimum = 0, +default = default_max_body_size, +}, +}, +additionalProperties = false, +} + local req_schema = { type = "object", properties = { @@ -95,7 +109,8 @@ local _M = { version = 0.1, priority = 4010, name = plugin_name, -schema = schema +schema = schema, +metadata_schema = metadata_schema, } @@ -178,51 +193,46 @@ local
[GitHub] [apisix] spacewander merged pull request #2507: change(batch-requests): limit the body size to 1M
spacewander merged pull request #2507: URL: https://github.com/apache/apisix/pull/2507 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] spacewander commented on a change in pull request #2519: feature: support injecting lua_ssl_trusted_certificate.
spacewander commented on a change in pull request #2519: URL: https://github.com/apache/apisix/pull/2519#discussion_r511967114 ## File path: bin/apisix ## @@ -389,6 +389,10 @@ http { ssl_session_cacheshared:SSL:20m; ssl_session_timeout 10m; +{% if ssl.ssl_trusted_certificate ~= nil then %} +lua_ssl_trusted_certificate {* ssl.ssl_trusted_certificate *}; Review comment: Better to check if the certificate exists before generating the configuration. ## File path: conf/config-default.yaml ## @@ -101,6 +101,9 @@ apisix: enable: true enable_http2: true listen_port: 9443 +ssl_trusted_certificate: /path/to/ca-cert # Specifies a file path with trusted CA certificates in the PEM format + # used to verify the certificate when APISIX needs to do SSL/TLS handshaking + # with external services (e.g. ETCD) Review comment: ETCD => etcd This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] moonming commented on pull request #2519: feature: support injecting lua_ssl_trusted_certificate.
moonming commented on pull request #2519: URL: https://github.com/apache/apisix/pull/2519#issuecomment-716531667 Is this also work for vault? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] spacewander closed issue #2288: enable a jwt-auth plugin without required field key
spacewander closed issue #2288: URL: https://github.com/apache/apisix/issues/2288 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix] branch master updated (a366365 -> 0096811)
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 a366365 chore: correct log info (#2515) add 0096811 feat(response-rewrite): clear cache headers to avoid polluting the cache (#2504) No new revisions were added by this update. Summary of changes: apisix/core/response.lua| 12 apisix/plugins/response-rewrite.lua | 4 +--- t/lib/server.lua| 2 -- t/plugin/response-rewrite.t | 11 +++ 4 files changed, 24 insertions(+), 5 deletions(-)
[GitHub] [apisix] spacewander merged pull request #2504: feat(response-rewrite): clear cache headers to avoid polluting the cache
spacewander merged pull request #2504: URL: https://github.com/apache/apisix/pull/2504 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] spacewander merged pull request #2459: change(jwt-auth): split schema to adapt different occasions
spacewander merged pull request #2459: URL: https://github.com/apache/apisix/pull/2459 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix] branch master updated: change(jwt-auth): split schema to adapt different occasions (#2459)
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 9500a82 change(jwt-auth): split schema to adapt different occasions (#2459) 9500a82 is described below commit 9500a8219aab57ca80da5e717470f2062403eadd Author: 罗泽轩 AuthorDate: Mon Oct 26 20:26:11 2020 +0800 change(jwt-auth): split schema to adapt different occasions (#2459) Close #2288. --- apisix/plugins/jwt-auth.lua | 32 +++- t/plugin/jwt-auth.t | 73 ++--- 2 files changed, 93 insertions(+), 12 deletions(-) diff --git a/apisix/plugins/jwt-auth.lua b/apisix/plugins/jwt-auth.lua index 054d393..a594e6f 100644 --- a/apisix/plugins/jwt-auth.lua +++ b/apisix/plugins/jwt-auth.lua @@ -31,6 +31,13 @@ local plugin_name = "jwt-auth" local schema = { type = "object", +additionalProperties = false, +properties = {}, +} + +local consumer_schema = { +type = "object", +additionalProperties = false, properties = { key = {type = "string"}, secret = {type = "string"}, @@ -44,7 +51,8 @@ local schema = { type = "boolean", default = false } -} +}, +required = {"key"}, } @@ -75,20 +83,28 @@ do end -- do -function _M.check_schema(conf) +function _M.check_schema(conf, schema_type) core.log.info("input conf: ", core.json.delay_encode(conf)) -local ok, err = core.schema.check(schema, conf) +local ok, err +if schema_type == core.schema.TYPE_CONSUMER then +ok, err = core.schema.check(consumer_schema, conf) +else +ok, err = core.schema.check(schema, conf) +end + if not ok then return false, err end -if not conf.secret then -conf.secret = ngx_encode_base64(resty_random.bytes(32, true)) -end +if schema_type == core.schema.TYPE_CONSUMER then +if not conf.secret then +conf.secret = ngx_encode_base64(resty_random.bytes(32, true)) +end -if not conf.exp then -conf.exp = 60 * 60 * 24 +if not conf.exp then +conf.exp = 60 * 60 * 24 +end end return true diff --git a/t/plugin/jwt-auth.t b/t/plugin/jwt-auth.t index c940135..0a041b0 100644 --- a/t/plugin/jwt-auth.t +++ b/t/plugin/jwt-auth.t @@ -29,9 +29,10 @@ __DATA__ location /t { content_by_lua_block { local plugin = require("apisix.plugins.jwt-auth") -local conf = {} +local core = require("apisix.core") +local conf = {key = "123"} -local ok, err = plugin.check_schema(conf) +local ok, err = plugin.check_schema(conf, core.schema.TYPE_CONSUMER) if not ok then ngx.say(err) end @@ -42,7 +43,7 @@ __DATA__ --- request GET /t --- response_body_like eval -qr/{"algorithm":"HS256","secret":"[a-zA-Z0-9+\\\/]+={0,2}","exp":86400}/ +qr/{"algorithm":"HS256","secret":"[a-zA-Z0-9+\\\/]+={0,2}","key":"123","exp":86400}/ --- no_error_log [error] @@ -52,8 +53,9 @@ qr/{"algorithm":"HS256","secret":"[a-zA-Z0-9+\\\/]+={0,2}","exp":86400}/ --- config location /t { content_by_lua_block { +local core = require("apisix.core") local plugin = require("apisix.plugins.jwt-auth") -local ok, err = plugin.check_schema({key = 123}) +local ok, err = plugin.check_schema({key = 123}, core.schema.TYPE_CONSUMER) if not ok then ngx.say(err) end @@ -454,3 +456,66 @@ Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1c2VyLWtle hello world --- no_error_log [error] + + + +=== TEST 23: without key +--- config +location /t { +content_by_lua_block { +local core = require("apisix.core") +local plugin = require("apisix.plugins.jwt-auth") +local ok, err = plugin.check_schema({}, core.schema.TYPE_CONSUMER) +if not ok then +ngx.say(err) +return +end + +ngx.say("done") +} +} +--- request +GET /t +--- response_body +property "key" is required +--- no_error_log +[error] + + + +=== TEST 24: enable jwt auth plugin with extra field +--- 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, +[[{ +"plugins": { +"jwt-auth": { +"key": "123" +} +}, +"upstream": { +"nodes": { +"127.0.0.1:1980": 1 +
[apisix] branch master updated: chore: correct log info (#2515)
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 a366365 chore: correct log info (#2515) a366365 is described below commit a3663656f9496603e8968ce875abf33a61904854 Author: tashiya-menuri <73444151+tashiya-men...@users.noreply.github.com> AuthorDate: Mon Oct 26 17:55:14 2020 +0530 chore: correct log info (#2515) Close #2449 --- apisix/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apisix/init.lua b/apisix/init.lua index de51cd3..3a51f4b 100644 --- a/apisix/init.lua +++ b/apisix/init.lua @@ -83,7 +83,7 @@ function _M.http_init_worker() end math.randomseed(seed) -- for testing only -core.log.info("random test in [1, 1]: ", math.random(1, 100)) +core.log.info("random test in [1, 1]: ", math.random(1, 1)) local we = require("resty.worker.events") local ok, err = we.configure({shm = "worker-events", interval = 0.1}) @@ -774,7 +774,7 @@ function _M.stream_init_worker() end math.randomseed(seed) -- for testing only -core.log.info("random stream test in [1, 1]: ", math.random(1, 100)) +core.log.info("random stream test in [1, 1]: ", math.random(1, 1)) router.stream_init_worker() plugin.init_worker()
[GitHub] [apisix] spacewander closed issue #2449: chore: wrong log
spacewander closed issue #2449: URL: https://github.com/apache/apisix/issues/2449 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] spacewander merged pull request #2515: bugfux : fixes issue #2449
spacewander merged pull request #2515: URL: https://github.com/apache/apisix/pull/2515 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] wfgydbu commented on issue #2520: bug: "failed to acquire the lock: timeout" in logs/error.log when setuping route at the first time
wfgydbu commented on issue #2520: URL: https://github.com/apache/apisix/issues/2520#issuecomment-716499486 Not sure if it's helpful: The etcd I used is in standalone mode and version is 3.4.10. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] wfgydbu opened a new issue #2520: bug: "failed to acquire the lock: timeout" in logs/error.log when setuping route at the first time
wfgydbu opened a new issue #2520: URL: https://github.com/apache/apisix/issues/2520 ### Issue description After initialized Apisix, and add one route at very first time. Found some errors in error.log described as following. I've reproduced these errors on two different machines in both version 1.4 and 1.5. Apisix of version 1.2 seems work fine. ### Environment * apisix version (cmd: `apisix version`): 1.5 * OS:Centos 7.6 ### Minimal test code / Steps to reproduce the issue 1. A completed clean etcd server with v2 protool enabled. 2. Setup Apisix v1.5(`make deps`). Run `make init`, then `make run`. 3. Setup a route to forward everything: ``` curl -i -X PUT http://127.0.0.1:9080/apisix/admin/routes/1 -d ' { "uri": "/*", "methods": ["PUT", "GET", "POST", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE"], "upstream": { "type": "roundrobin", "nodes": { "127.0.0.1:1980": 10 } } }' ``` 4. Errors found in `logs/error.log` ### What's the actual result? (including assertion message & call stack if applicable) in `error.log`: ``` 1232020/10/26 19:31:35 [error] 351885#351885: *169 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351881#351881: *132 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351871#351871: *353 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351876#351876: *348 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351880#351880: *153 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351891#351891: *438 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351874#351874: *483 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351890#351890: *498 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351887#351887: *251 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351863#351863: *399 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351878#351878: *79 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351889#351889: *198 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351886#351886: *468 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer 2020/10/26 19:31:35 [error] 351875#351875: *199 [lua] config_etcd.lua:397: failed to fetch data from etcd: failed to check item data of [/apisix/routes] err:failed to acquire the lock: timeout, etcd key: /apisix/routes, context: ngx.timer ``` ### What's the expected result? Should be nothing in the log and routes work just fine. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For q
[GitHub] [apisix] liuxiran commented on issue #2087: request help: Update plugin's schema response-rewrite
liuxiran commented on issue #2087: URL: https://github.com/apache/apisix/issues/2087#issuecomment-716492170 this issue would be fixed in the same way with https://github.com/apache/apisix/issues/2082#issuecomment-716356064 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] jiayx opened a new pull request #604: doc: add etcd version tips(#602)
jiayx opened a new pull request #604: URL: https://github.com/apache/apisix-dashboard/pull/604 Please answer these questions before submitting a pull request - Why submit this pull request? - [x] Bugfix - [ ] New feature provided - [ ] Improve performance - Related issues ___ ### Bugfix - Description - Add etcd api version tips ___ ### New feature or improvement - Describe the details and related test reports. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] hzbd commented on issue #601: limit-count options args without consumer_name?
hzbd commented on issue #601: URL: https://github.com/apache/apisix-dashboard/issues/601#issuecomment-716486032 Hi there, It's worked. thank you. Well BTW,Is there a scheduled time for the next release version? I want to use `limit count` by `consumer_name` in the production environment. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis commented on issue #2518: feat: The limit-count plugin supports service_id field
membphis commented on issue #2518: URL: https://github.com/apache/apisix/issues/2518#issuecomment-716472352 welcome 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] tokers opened a new pull request #2519: feature: support injecting lua_ssl_trusted_certificate.
tokers opened a new pull request #2519: URL: https://github.com/apache/apisix/pull/2519 ### What this PR does / why we need it: Support to configure `lua_ssl_trusted_certificate` in configuration, so that one can use the certs signed by their own CA as an external dependency of APISIX, like ETCD. This PR is necessary for the subsequent TLS for ETCD connection feature. ### Pre-submission checklist: * [x] Did you explain what problem does this PR solve? Or what new features have been added? * [ ] Have you added corresponding test cases? * [ ] Have you modified the corresponding document? * [x] Is this PR backward compatible? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] Firstsawyou opened a new issue #2518: feat: The limit-count plugin supports service_id field
Firstsawyou opened a new issue #2518: URL: https://github.com/apache/apisix/issues/2518 ### Issue description When using the `limit-count` plugin, I want to limit the number of requests based on the `service_id` field. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan edited a comment on issue #602: Etcd api version not match
juzhiyuan edited a comment on issue #602: URL: https://github.com/apache/apisix-dashboard/issues/602#issuecomment-716455363 how about README's FAQ section? https://github.com/apache/apisix-dashboard#faq This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org