You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "bzp2010 (via GitHub)" <gi...@apache.org> on 2024/06/08 13:42:55 UTC
[PR] feat: move config-default.yaml to hardcoded lua file [apisix]
bzp2010 opened a new pull request, #11343:
URL: https://github.com/apache/apisix/pull/11343
### Description
For the reasons mentioned in the email https://lists.apache.org/thread/nc7qr5bl0z2bmkfb5rqc01c32lkx0gv2, I'm submitting this PR.
It moves the config-default.yaml in APISIX to a hardcoded Lua. While it is still a script file in the distribution of APISIX, you can think of it as a "binary" and the user gets the clear and unambiguous message "it should never be modified".
And since it's a script file, it'll be more expressive than a pure Lua, e.g. we can read some of the values from environment variables (although I have a better way of doing that).
------
Email copy:
> Hi, community.
>
> I am posting to this mailing list a proposal to remove the config-default.yaml default configuration file, and below I will describe the background and reasons for this and consider the benefits to us.
>
> The proposal does not represent a community resolution, although I am a committer in the APISIX community. We still want to hear a variety of voices to make sure this is truly beneficial.
>
> # Background
>
> Now APISIX has two configuration files, the user configuration file config.yaml and the default configuration file config-default.yaml.
> When APISIX starts up, it reads these two configuration files and merges and overwrites the user configuration file with the default configuration to create the configuration that is actually used at runtime.
>
> The recommendation from the developers is that users should only modify the user configuration file config.yaml, while ensuring that config-default.yaml remains intact.
> This is documented here: https://apisix.apache.org/docs/apisix/next/installation-guide/
>
> > APISIX's default configuration can be found in conf/config-default.yaml file and it should not be modified.
> > It is bound to the source code and the configuration should only be changed by the methods mentioned above.
>
> Users often ask how they should modify custom configurations, or encounter unintended problems after modifying the default configuration file.
> When explaining to them why they should not modify the default configuration file but copy those keys that need to be modified to the user configuration file and then modify them, and explaining the logic of merging the user configuration file with the default configuration file, I do find this issue to be a troubling one.
>
> Also, some PRs encountered errors when improving config-default.yaml. For example: https://github.com/apache/apisix/pull/11284
>
> Let's shift our attention to other major open source projects in the world, I have indeed seen very few implementations with such built-in annoyances. Often software can have its default configuration hard-coded into the program, bundled into a binary for distribution, and the user can use a new configuration file, which they will load at runtime and override the modified keys into the default configuration.
> This way, the user only needs to remember that he should modify config.yaml and nothing else; and APISIX will start normally without providing any configuration. This really reduces the cost of understanding.
>
> Therefore, I suggest the following.
>
> # Proposal
>
> 1. Remove config-default.yaml and move its contents to a Lua file as a Lua table
> 2. Fix test errors
> 3. Use documentation to explicitly document all configuration items, which ideally should be generated from the schema.
>
> This is APISIX enhancement work, which is not perceived by users unless they are using APISIX in a non-correct way.
>
> # Benefit
>
> 1. Reduce the cost of explaining about the section, and the cost of understanding for the user.
> 2. Reduce the APISIX code base
> 3. Improve the documentation quality through the entire process.
>
> # The End
>
> The discussion is asking for feedback, and you can reply to the email directly to the mailing list.
> We can discuss constructive feedback. If there is no constructive feedback, I will start working on it.
### Checklist
- [x] I have explained the need for this PR and the problem it solves
- [x] I have explained the changes or the new features added to this PR
- [ ] I have added tests corresponding to this change
- [ ] I have updated the documentation to reflect this change
- [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
<!--
Note
1. Mark the PR as draft until it's ready to be reviewed.
2. Always add/update tests for any changes unless you have a good reason.
3. Always update the documentation to reflect the changes made in the PR.
4. Make a new commit to resolve conversations instead of `push -f`.
5. To resolve merge conflicts, merge master instead of rebasing.
6. Use "request review" to notify the reviewer after making changes.
7. Only a reviewer can mark a conversation as resolved.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1632214993
##########
conf/config-default.yaml:
##########
@@ -1,690 +0,0 @@
-#
-# 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.
-#
-# CAUTION: DO NOT MODIFY DEFAULT CONFIGURATIONS IN THIS FILE.
-# Keep the custom configurations in conf/config.yaml.
-#
-
-apisix:
Review Comment:
We don't have documentation for the configuration items in the config file right now, and the jsonschema used for validates in the code is outdated (out of sync with the config file), which would be another improvement item.
That is, improve the jsonschema and use it to generate human-readable documentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1676756889
##########
conf/config-default.yaml:
##########
Review Comment:
Yes, it's done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1641865420
##########
conf/config-default.yaml:
##########
Review Comment:
got it. You will make that change in this PR itself?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1641670303
##########
t/core/etcd-mtls.t:
##########
@@ -82,12 +82,8 @@ deployment:
}
--- request
GET /t
---- grep_error_log eval
-qr/init_by_lua:\d+: \S+/
---- grep_error_log_out
-init_by_lua:12: ab
Review Comment:
@shreemaan-abhishek
As you can see on line 88, some smarty-pants developer even asserted in the log that the line numbers were fixed, and that it was impossible to init block unchanged, so the line numbers would change.
It is now modified to use multiple qr blocks at the same time with "and" conditions for log checking.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1641675867
##########
apisix/cli/config.lua:
##########
@@ -0,0 +1,365 @@
+--
+-- 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 table_conact = table.concat
+
+local _M = {
+ apisix = {
+ node_listen = { 9080 },
+ enable_admin = true,
+ enable_dev_mode = false,
+ enable_reuseport = true,
+ show_upstream_status_in_response_header = false,
+ enable_ipv6 = true,
+ enable_http2 = true,
+ enable_server_tokens = true,
+ extra_lua_path = "",
+ extra_lua_cpath = "",
+ proxy_cache = {
+ cache_ttl = "10s",
+ zones = {
+ {
+ name = "disk_cache_one",
+ memory_size = "50m",
+ disk_size = "1G",
+ disk_path = "/tmp/disk_cache_one",
+ cache_levels = "1:2"
+ },
+ {
+ name = "memory_cache",
+ memory_size = "50m"
+ }
+ }
+ },
+ delete_uri_tail_slash = false,
+ normalize_uri_like_servlet = false,
+ router = {
+ http = "radixtree_host_uri",
+ ssl = "radixtree_sni"
+ },
+ proxy_mode = "http",
+ resolver_timeout = 5,
+ enable_resolv_search_opt = true,
+ ssl = {
+ enable = true,
+ listen = { {
+ port = 9443,
+ enable_http3 = false
+ } },
+ ssl_protocols = "TLSv1.2 TLSv1.3",
+ ssl_ciphers = table_conact({
+ "ECDHE-ECDSA-AES128-GCM-SHA256", "ECDHE-RSA-AES128-GCM-SHA256",
+ "ECDHE-ECDSA-AES256-GCM-SHA384", "ECDHE-RSA-AES256-GCM-SHA384",
+ "ECDHE-ECDSA-CHACHA20-POLY1305", "ECDHE-RSA-CHACHA20-POLY1305",
+ "DHE-RSA-AES128-GCM-SHA256", "DHE-RSA-AES256-GCM-SHA384",
+ }, ":"),
+ ssl_session_tickets = false
+ },
+ enable_control = true,
+ disable_sync_configuration_during_start = false,
+ data_encryption = {
+ enable_encrypt_fields = true,
+ keyring = { "qeddd145sfvddff3", "edd1c9f0985e76a2" }
+ },
+ events = {
+ module = "lua-resty-events"
+ }
+ },
+ nginx_config = {
+ error_log = "logs/error.log",
+ error_log_level = "warn",
+ worker_processes = "auto",
+ enable_cpu_affinity = false,
+ worker_rlimit_nofile = 20480,
+ worker_shutdown_timeout = "240s",
+ max_pending_timers = 16384,
+ max_running_timers = 4096,
+ event = {
+ worker_connections = 10620
+ },
+ meta = {
+ lua_shared_dict = {
+ ["prometheus-metrics"] = "15m"
+ }
+ },
+ stream = {
+ enable_access_log = false,
+ access_log = "logs/access_stream.log",
+ -- luacheck: push max code line length 300
+ access_log_format = "$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time",
+ -- luacheck: pop
+ access_log_format_escape = "default",
+ lua_shared_dict = {
+ ["etcd-cluster-health-check-stream"] = "10m",
+ ["lrucache-lock-stream"] = "10m",
+ ["plugin-limit-conn-stream"] = "10m",
+ ["worker-events-stream"] = "10m",
+ ["tars-stream"] = "1m"
+ }
+ },
+ main_configuration_snippet = "",
+ http_configuration_snippet = "",
+ http_server_configuration_snippet = "",
+ http_server_location_configuration_snippet = "",
+ http_admin_configuration_snippet = "",
+ http_end_configuration_snippet = "",
+ stream_configuration_snippet = "",
+ http = {
+ enable_access_log = true,
+ access_log = "logs/access.log",
+ access_log_buffer = 16384,
+ -- luacheck: push max code line length 300
+ access_log_format = '$remote_addr - $remote_user [$time_local] $http_host "$request" $status $body_bytes_sent $request_time "$http_referer" "$http_user_agent" $upstream_addr $upstream_status $upstream_response_time "$upstream_scheme://$upstream_host$upstream_uri"',
+ -- luacheck: pop
+ access_log_format_escape = "default",
+ keepalive_timeout = "60s",
+ client_header_timeout = "60s",
+ client_body_timeout = "60s",
+ client_max_body_size = 0,
+ send_timeout = "10s",
+ underscores_in_headers = "on",
+ real_ip_header = "X-Real-IP",
+ real_ip_recursive = "off",
+ real_ip_from = { "127.0.0.1", "unix:" },
+ proxy_ssl_server_name = true,
+ upstream = {
+ keepalive = 320,
+ keepalive_requests = 1000,
+ keepalive_timeout = "60s"
+ },
+ charset = "utf-8",
+ variables_hash_max_size = 2048,
+ lua_shared_dict = {
+ ["internal-status"] = "10m",
+ ["plugin-limit-req"] = "10m",
+ ["plugin-limit-count"] = "10m",
+ ["prometheus-metrics"] = "10m",
+ ["plugin-limit-conn"] = "10m",
+ ["upstream-healthcheck"] = "10m",
+ ["worker-events"] = "10m",
+ ["lrucache-lock"] = "10m",
+ ["balancer-ewma"] = "10m",
+ ["balancer-ewma-locks"] = "10m",
+ ["balancer-ewma-last-touched-at"] = "10m",
+ ["plugin-limit-req-redis-cluster-slot-lock"] = "1m",
+ ["plugin-limit-count-redis-cluster-slot-lock"] = "1m",
+ ["plugin-limit-conn-redis-cluster-slot-lock"] = "1m",
+ tracing_buffer = "10m",
+ ["plugin-api-breaker"] = "10m",
+ ["etcd-cluster-health-check"] = "10m",
+ discovery = "1m",
+ jwks = "1m",
+ introspection = "10m",
+ ["access-tokens"] = "1m",
+ ["ext-plugin"] = "1m",
+ tars = "1m",
+ ["cas-auth"] = "10m",
+ ["ocsp-stapling"] = "10m"
+ }
+ }
+ },
+ graphql = {
+ max_size = 1048576
+ },
+ plugins = {
+ "real-ip",
+ "ai",
+ "client-control",
+ "proxy-control",
+ "request-id",
+ "zipkin",
+ "ext-plugin-pre-req",
+ "fault-injection",
+ "mocking",
+ "serverless-pre-function",
+ "cors",
+ "ip-restriction",
+ "ua-restriction",
+ "referer-restriction",
+ "csrf",
+ "uri-blocker",
+ "request-validation",
+ "chaitin-waf",
+ "multi-auth",
+ "openid-connect",
+ "cas-auth",
+ "authz-casbin",
+ "authz-casdoor",
+ "wolf-rbac",
+ "ldap-auth",
+ "hmac-auth",
+ "basic-auth",
+ "jwt-auth",
+ "jwe-decrypt",
+ "key-auth",
+ "consumer-restriction",
+ "forward-auth",
+ "opa",
+ "authz-keycloak",
+ "proxy-cache",
+ "body-transformer",
+ "proxy-mirror",
+ "proxy-rewrite",
+ "workflow",
+ "api-breaker",
+ "limit-conn",
+ "limit-count",
+ "limit-req",
+ "gzip",
+ "server-info",
+ "traffic-split",
+ "redirect",
+ "response-rewrite",
+ "degraphql",
+ "kafka-proxy",
+ "grpc-transcode",
+ "grpc-web",
+ "http-dubbo",
+ "public-api",
+ "prometheus",
+ "datadog",
+ "loki-logger",
+ "elasticsearch-logger",
+ "echo",
+ "loggly",
+ "http-logger",
+ "splunk-hec-logging",
+ "skywalking-logger",
+ "google-cloud-logging",
+ "sls-logger",
+ "tcp-logger",
+ "kafka-logger",
+ "rocketmq-logger",
+ "syslog",
+ "udp-logger",
+ "file-logger",
+ "clickhouse-logger",
+ "tencent-cloud-cls",
+ "inspect",
+ "example-plugin",
+ "aws-lambda",
+ "azure-functions",
+ "openwhisk",
+ "openfunction",
+ "serverless-post-function",
+ "ext-plugin-post-req",
+ "ext-plugin-post-resp",
+ },
+ stream_plugins = { "ip-restriction", "limit-conn", "mqtt-proxy", "syslog" },
+ plugin_attr = {
+ ["log-rotate"] = {
+ timeout = 10000,
+ interval = 3600,
+ max_kept = 168,
+ max_size = -1,
+ enable_compression = false
+ },
+ skywalking = {
+ service_name = "APISIX",
+ service_instance_name = "APISIX Instance Name",
+ endpoint_addr = "http://127.0.0.1:12800",
+ report_interval = 3
+ },
+ opentelemetry = {
+ trace_id_source = "x-request-id",
+ resource = {
+ ["service.name"] = "APISIX"
+ },
+ collector = {
+ address = "127.0.0.1:4318",
+ request_timeout = 3,
+ request_headers = {
+ Authorization = "token"
+ }
+ },
+ batch_span_processor = {
+ drop_on_queue_full = false,
+ max_queue_size = 1024,
+ batch_timeout = 2,
+ inactive_timeout = 1,
+ max_export_batch_size = tonumber(os.getenv("OTEL_BSP_MAX_EXPORT_BATCH_SIZE")) or 16
+ },
+ set_ngx_var = false
+ },
+ prometheus = {
+ export_uri = "/apisix/prometheus/metrics",
+ metric_prefix = "apisix_",
+ enable_export_server = true,
+ export_addr = {
+ ip = "127.0.0.1",
+ port = 9091
+ }
+ },
+ ["server-info"] = {
+ report_ttl = 60
+ },
+ ["dubbo-proxy"] = {
+ upstream_multiplex_count = 32
+ },
+ ["proxy-mirror"] = {
+ timeout = {
+ connect = "60s",
+ read = "60s",
+ send = "60s"
+ }
+ },
+ inspect = {
+ delay = 3,
+ hooks_file = "/usr/local/apisix/plugin_inspect_hooks.lua"
+ },
+ zipkin = {
+ set_ngx_var = false
+ }
+ },
+ deployment = {
+ role = "traditional",
+ role_traditional = {
+ config_provider = "etcd"
+ },
+ admin = {
+ admin_key_required = true,
+ admin_key = { {
+ name = "admin",
+ key = "",
+ role = "admin"
+ }, {
+ name = "viewer",
+ key = "4054f7cf07e344346cd3f287985e76a2",
Review Comment:
That's a really good question, I need to think about it, it could probably be set to null by default.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1641671513
##########
conf/config-default.yaml:
##########
Review Comment:
As I mentioned at https://github.com/apache/apisix/pull/11343#discussion_r1632214492.
I will do this in `config.yaml.example`, which is just a placeholder that the APISIX script won't read.
##########
conf/config-default.yaml:
##########
Review Comment:
As I mentioned at https://github.com/apache/apisix/pull/11343#discussion_r1632214492.
I will do this in `config.yaml.example`, which is just a placeholder that the APISIX won't read.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on PR #11343:
URL: https://github.com/apache/apisix/pull/11343#issuecomment-2156045178
This PR has completed most of the work in the proposal, but the update of the documentation is not yet complete.
The schema included in APISIX for checking configuration files is outdated and not at all representative of the actual situation. So it cannot be used to generate usable documentation.
https://github.com/apache/apisix/blob/master/apisix/cli/schema.lua
If the issue were to be addressed in this PR, this PR would become very large, which is not conducive to submission. So I would like to make changes in the next PR to include schema's and document generation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [WIP] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1676753540
##########
apisix/cli/config.lua:
##########
@@ -0,0 +1,365 @@
+--
+-- 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 table_conact = table.concat
+
+local _M = {
+ apisix = {
+ node_listen = { 9080 },
+ enable_admin = true,
+ enable_dev_mode = false,
+ enable_reuseport = true,
+ show_upstream_status_in_response_header = false,
+ enable_ipv6 = true,
+ enable_http2 = true,
+ enable_server_tokens = true,
+ extra_lua_path = "",
+ extra_lua_cpath = "",
+ proxy_cache = {
+ cache_ttl = "10s",
+ zones = {
+ {
+ name = "disk_cache_one",
+ memory_size = "50m",
+ disk_size = "1G",
+ disk_path = "/tmp/disk_cache_one",
+ cache_levels = "1:2"
+ },
+ {
+ name = "memory_cache",
+ memory_size = "50m"
+ }
+ }
+ },
+ delete_uri_tail_slash = false,
+ normalize_uri_like_servlet = false,
+ router = {
+ http = "radixtree_host_uri",
+ ssl = "radixtree_sni"
+ },
+ proxy_mode = "http",
+ resolver_timeout = 5,
+ enable_resolv_search_opt = true,
+ ssl = {
+ enable = true,
+ listen = { {
+ port = 9443,
+ enable_http3 = false
+ } },
+ ssl_protocols = "TLSv1.2 TLSv1.3",
+ ssl_ciphers = table_conact({
+ "ECDHE-ECDSA-AES128-GCM-SHA256", "ECDHE-RSA-AES128-GCM-SHA256",
+ "ECDHE-ECDSA-AES256-GCM-SHA384", "ECDHE-RSA-AES256-GCM-SHA384",
+ "ECDHE-ECDSA-CHACHA20-POLY1305", "ECDHE-RSA-CHACHA20-POLY1305",
+ "DHE-RSA-AES128-GCM-SHA256", "DHE-RSA-AES256-GCM-SHA384",
+ }, ":"),
+ ssl_session_tickets = false
+ },
+ enable_control = true,
+ disable_sync_configuration_during_start = false,
+ data_encryption = {
+ enable_encrypt_fields = true,
+ keyring = { "qeddd145sfvddff3", "edd1c9f0985e76a2" }
+ },
+ events = {
+ module = "lua-resty-events"
+ }
+ },
+ nginx_config = {
+ error_log = "logs/error.log",
+ error_log_level = "warn",
+ worker_processes = "auto",
+ enable_cpu_affinity = false,
+ worker_rlimit_nofile = 20480,
+ worker_shutdown_timeout = "240s",
+ max_pending_timers = 16384,
+ max_running_timers = 4096,
+ event = {
+ worker_connections = 10620
+ },
+ meta = {
+ lua_shared_dict = {
+ ["prometheus-metrics"] = "15m"
+ }
+ },
+ stream = {
+ enable_access_log = false,
+ access_log = "logs/access_stream.log",
+ -- luacheck: push max code line length 300
+ access_log_format = "$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time",
+ -- luacheck: pop
+ access_log_format_escape = "default",
+ lua_shared_dict = {
+ ["etcd-cluster-health-check-stream"] = "10m",
+ ["lrucache-lock-stream"] = "10m",
+ ["plugin-limit-conn-stream"] = "10m",
+ ["worker-events-stream"] = "10m",
+ ["tars-stream"] = "1m"
+ }
+ },
+ main_configuration_snippet = "",
+ http_configuration_snippet = "",
+ http_server_configuration_snippet = "",
+ http_server_location_configuration_snippet = "",
+ http_admin_configuration_snippet = "",
+ http_end_configuration_snippet = "",
+ stream_configuration_snippet = "",
+ http = {
+ enable_access_log = true,
+ access_log = "logs/access.log",
+ access_log_buffer = 16384,
+ -- luacheck: push max code line length 300
+ access_log_format = '$remote_addr - $remote_user [$time_local] $http_host "$request" $status $body_bytes_sent $request_time "$http_referer" "$http_user_agent" $upstream_addr $upstream_status $upstream_response_time "$upstream_scheme://$upstream_host$upstream_uri"',
+ -- luacheck: pop
+ access_log_format_escape = "default",
+ keepalive_timeout = "60s",
+ client_header_timeout = "60s",
+ client_body_timeout = "60s",
+ client_max_body_size = 0,
+ send_timeout = "10s",
+ underscores_in_headers = "on",
+ real_ip_header = "X-Real-IP",
+ real_ip_recursive = "off",
+ real_ip_from = { "127.0.0.1", "unix:" },
+ proxy_ssl_server_name = true,
+ upstream = {
+ keepalive = 320,
+ keepalive_requests = 1000,
+ keepalive_timeout = "60s"
+ },
+ charset = "utf-8",
+ variables_hash_max_size = 2048,
+ lua_shared_dict = {
+ ["internal-status"] = "10m",
+ ["plugin-limit-req"] = "10m",
+ ["plugin-limit-count"] = "10m",
+ ["prometheus-metrics"] = "10m",
+ ["plugin-limit-conn"] = "10m",
+ ["upstream-healthcheck"] = "10m",
+ ["worker-events"] = "10m",
+ ["lrucache-lock"] = "10m",
+ ["balancer-ewma"] = "10m",
+ ["balancer-ewma-locks"] = "10m",
+ ["balancer-ewma-last-touched-at"] = "10m",
+ ["plugin-limit-req-redis-cluster-slot-lock"] = "1m",
+ ["plugin-limit-count-redis-cluster-slot-lock"] = "1m",
+ ["plugin-limit-conn-redis-cluster-slot-lock"] = "1m",
+ tracing_buffer = "10m",
+ ["plugin-api-breaker"] = "10m",
+ ["etcd-cluster-health-check"] = "10m",
+ discovery = "1m",
+ jwks = "1m",
+ introspection = "10m",
+ ["access-tokens"] = "1m",
+ ["ext-plugin"] = "1m",
+ tars = "1m",
+ ["cas-auth"] = "10m",
+ ["ocsp-stapling"] = "10m"
+ }
+ }
+ },
+ graphql = {
+ max_size = 1048576
+ },
+ plugins = {
+ "real-ip",
+ "ai",
+ "client-control",
+ "proxy-control",
+ "request-id",
+ "zipkin",
+ "ext-plugin-pre-req",
+ "fault-injection",
+ "mocking",
+ "serverless-pre-function",
+ "cors",
+ "ip-restriction",
+ "ua-restriction",
+ "referer-restriction",
+ "csrf",
+ "uri-blocker",
+ "request-validation",
+ "chaitin-waf",
+ "multi-auth",
+ "openid-connect",
+ "cas-auth",
+ "authz-casbin",
+ "authz-casdoor",
+ "wolf-rbac",
+ "ldap-auth",
+ "hmac-auth",
+ "basic-auth",
+ "jwt-auth",
+ "jwe-decrypt",
+ "key-auth",
+ "consumer-restriction",
+ "forward-auth",
+ "opa",
+ "authz-keycloak",
+ "proxy-cache",
+ "body-transformer",
+ "proxy-mirror",
+ "proxy-rewrite",
+ "workflow",
+ "api-breaker",
+ "limit-conn",
+ "limit-count",
+ "limit-req",
+ "gzip",
+ "server-info",
+ "traffic-split",
+ "redirect",
+ "response-rewrite",
+ "degraphql",
+ "kafka-proxy",
+ "grpc-transcode",
+ "grpc-web",
+ "http-dubbo",
+ "public-api",
+ "prometheus",
+ "datadog",
+ "loki-logger",
+ "elasticsearch-logger",
+ "echo",
+ "loggly",
+ "http-logger",
+ "splunk-hec-logging",
+ "skywalking-logger",
+ "google-cloud-logging",
+ "sls-logger",
+ "tcp-logger",
+ "kafka-logger",
+ "rocketmq-logger",
+ "syslog",
+ "udp-logger",
+ "file-logger",
+ "clickhouse-logger",
+ "tencent-cloud-cls",
+ "inspect",
+ "example-plugin",
+ "aws-lambda",
+ "azure-functions",
+ "openwhisk",
+ "openfunction",
+ "serverless-post-function",
+ "ext-plugin-post-req",
+ "ext-plugin-post-resp",
+ },
+ stream_plugins = { "ip-restriction", "limit-conn", "mqtt-proxy", "syslog" },
+ plugin_attr = {
+ ["log-rotate"] = {
+ timeout = 10000,
+ interval = 3600,
+ max_kept = 168,
+ max_size = -1,
+ enable_compression = false
+ },
+ skywalking = {
+ service_name = "APISIX",
+ service_instance_name = "APISIX Instance Name",
+ endpoint_addr = "http://127.0.0.1:12800",
+ report_interval = 3
+ },
+ opentelemetry = {
+ trace_id_source = "x-request-id",
+ resource = {
+ ["service.name"] = "APISIX"
+ },
+ collector = {
+ address = "127.0.0.1:4318",
+ request_timeout = 3,
+ request_headers = {
+ Authorization = "token"
+ }
+ },
+ batch_span_processor = {
+ drop_on_queue_full = false,
+ max_queue_size = 1024,
+ batch_timeout = 2,
+ inactive_timeout = 1,
+ max_export_batch_size = tonumber(os.getenv("OTEL_BSP_MAX_EXPORT_BATCH_SIZE")) or 16
+ },
+ set_ngx_var = false
+ },
+ prometheus = {
+ export_uri = "/apisix/prometheus/metrics",
+ metric_prefix = "apisix_",
+ enable_export_server = true,
+ export_addr = {
+ ip = "127.0.0.1",
+ port = 9091
+ }
+ },
+ ["server-info"] = {
+ report_ttl = 60
+ },
+ ["dubbo-proxy"] = {
+ upstream_multiplex_count = 32
+ },
+ ["proxy-mirror"] = {
+ timeout = {
+ connect = "60s",
+ read = "60s",
+ send = "60s"
+ }
+ },
+ inspect = {
+ delay = 3,
+ hooks_file = "/usr/local/apisix/plugin_inspect_hooks.lua"
+ },
+ zipkin = {
+ set_ngx_var = false
+ }
+ },
+ deployment = {
+ role = "traditional",
+ role_traditional = {
+ config_provider = "etcd"
+ },
+ admin = {
+ admin_key_required = true,
+ admin_key = { {
+ name = "admin",
+ key = "",
+ role = "admin"
+ }, {
+ name = "viewer",
+ key = "4054f7cf07e344346cd3f287985e76a2",
Review Comment:
Now that the viewer user (which exists by default), has been removed and the admin user has an empty password, it will be automatically generated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1632214492
##########
conf/config-default.yaml:
##########
@@ -1,690 +0,0 @@
-#
-# 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.
-#
-# CAUTION: DO NOT MODIFY DEFAULT CONFIGURATIONS IN THIS FILE.
-# Keep the custom configurations in conf/config.yaml.
-#
-
-apisix:
Review Comment:
I think this is better, but would it be better to name it something like `config.yaml.example` as it is long and not easy to find what is needed.
This way, we will provide a few minimal default configuration files, `config.yaml`, and an example file containing all the configuration documentation, and if the user wants to use the full configuration file, he can replace `config.yaml` with `config.yaml.example`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1632214993
##########
conf/config-default.yaml:
##########
@@ -1,690 +0,0 @@
-#
-# 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.
-#
-# CAUTION: DO NOT MODIFY DEFAULT CONFIGURATIONS IN THIS FILE.
-# Keep the custom configurations in conf/config.yaml.
-#
-
-apisix:
Review Comment:
We don't have documentation for the configuration items in the config file right now, and the jsonschema used for checksums in the code is outdated (out of sync with the config file), which would be another improvement item.
That is, improve the jsonschema and use it to generate human-readable documentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "nic-6443 (via GitHub)" <gi...@apache.org>.
nic-6443 commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1632205792
##########
conf/config-default.yaml:
##########
@@ -1,690 +0,0 @@
-#
-# 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.
-#
-# CAUTION: DO NOT MODIFY DEFAULT CONFIGURATIONS IN THIS FILE.
-# Keep the custom configurations in conf/config.yaml.
-#
-
-apisix:
Review Comment:
This file contains explanations for all configuration fields, some of which cannot even be found in the documentation. These comments and commented-out configurations were previously good examples for modifying `config.yaml`. Now, this part of the information is missing in `config.lua`.
I am wondering if we can directly use the content from the original `config-default.yaml` as the new `config.yaml`, allowing users to directly modify or remove configurations within it. The `config.lua` will then fill in default values after user updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "moonming (via GitHub)" <gi...@apache.org>.
moonming merged PR #11343:
URL: https://github.com/apache/apisix/pull/11343
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1632214492
##########
conf/config-default.yaml:
##########
@@ -1,690 +0,0 @@
-#
-# 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.
-#
-# CAUTION: DO NOT MODIFY DEFAULT CONFIGURATIONS IN THIS FILE.
-# Keep the custom configurations in conf/config.yaml.
-#
-
-apisix:
Review Comment:
I think this is better, but would it be better to name it something like `config.yaml.example` as it is long and not easy to find what is needed.
This way, we will provide a few minimal default configuration files, `config.yaml`, and an example file containing all the configuration documentation, and if the user wants to use the full configuration file, he can replace `config.yaml` with `config.yamlexample`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1633013628
##########
conf/config-default.yaml:
##########
Review Comment:
since the default.yaml file is removed now, should we specify all configurable parameters in config.yaml as yaml comments?
##########
t/core/etcd-mtls.t:
##########
@@ -82,12 +82,8 @@ deployment:
}
--- request
GET /t
---- grep_error_log eval
-qr/init_by_lua:\d+: \S+/
---- grep_error_log_out
-init_by_lua:12: ab
Review Comment:
why did you remove these?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: move config-default.yaml to hardcoded lua file [apisix]
Posted by "juzhiyuan (via GitHub)" <gi...@apache.org>.
juzhiyuan commented on code in PR #11343:
URL: https://github.com/apache/apisix/pull/11343#discussion_r1634060457
##########
apisix/cli/config.lua:
##########
@@ -0,0 +1,365 @@
+--
+-- 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 table_conact = table.concat
+
+local _M = {
+ apisix = {
+ node_listen = { 9080 },
+ enable_admin = true,
+ enable_dev_mode = false,
+ enable_reuseport = true,
+ show_upstream_status_in_response_header = false,
+ enable_ipv6 = true,
+ enable_http2 = true,
+ enable_server_tokens = true,
+ extra_lua_path = "",
+ extra_lua_cpath = "",
+ proxy_cache = {
+ cache_ttl = "10s",
+ zones = {
+ {
+ name = "disk_cache_one",
+ memory_size = "50m",
+ disk_size = "1G",
+ disk_path = "/tmp/disk_cache_one",
+ cache_levels = "1:2"
+ },
+ {
+ name = "memory_cache",
+ memory_size = "50m"
+ }
+ }
+ },
+ delete_uri_tail_slash = false,
+ normalize_uri_like_servlet = false,
+ router = {
+ http = "radixtree_host_uri",
+ ssl = "radixtree_sni"
+ },
+ proxy_mode = "http",
+ resolver_timeout = 5,
+ enable_resolv_search_opt = true,
+ ssl = {
+ enable = true,
+ listen = { {
+ port = 9443,
+ enable_http3 = false
+ } },
+ ssl_protocols = "TLSv1.2 TLSv1.3",
+ ssl_ciphers = table_conact({
+ "ECDHE-ECDSA-AES128-GCM-SHA256", "ECDHE-RSA-AES128-GCM-SHA256",
+ "ECDHE-ECDSA-AES256-GCM-SHA384", "ECDHE-RSA-AES256-GCM-SHA384",
+ "ECDHE-ECDSA-CHACHA20-POLY1305", "ECDHE-RSA-CHACHA20-POLY1305",
+ "DHE-RSA-AES128-GCM-SHA256", "DHE-RSA-AES256-GCM-SHA384",
+ }, ":"),
+ ssl_session_tickets = false
+ },
+ enable_control = true,
+ disable_sync_configuration_during_start = false,
+ data_encryption = {
+ enable_encrypt_fields = true,
+ keyring = { "qeddd145sfvddff3", "edd1c9f0985e76a2" }
+ },
+ events = {
+ module = "lua-resty-events"
+ }
+ },
+ nginx_config = {
+ error_log = "logs/error.log",
+ error_log_level = "warn",
+ worker_processes = "auto",
+ enable_cpu_affinity = false,
+ worker_rlimit_nofile = 20480,
+ worker_shutdown_timeout = "240s",
+ max_pending_timers = 16384,
+ max_running_timers = 4096,
+ event = {
+ worker_connections = 10620
+ },
+ meta = {
+ lua_shared_dict = {
+ ["prometheus-metrics"] = "15m"
+ }
+ },
+ stream = {
+ enable_access_log = false,
+ access_log = "logs/access_stream.log",
+ -- luacheck: push max code line length 300
+ access_log_format = "$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time",
+ -- luacheck: pop
+ access_log_format_escape = "default",
+ lua_shared_dict = {
+ ["etcd-cluster-health-check-stream"] = "10m",
+ ["lrucache-lock-stream"] = "10m",
+ ["plugin-limit-conn-stream"] = "10m",
+ ["worker-events-stream"] = "10m",
+ ["tars-stream"] = "1m"
+ }
+ },
+ main_configuration_snippet = "",
+ http_configuration_snippet = "",
+ http_server_configuration_snippet = "",
+ http_server_location_configuration_snippet = "",
+ http_admin_configuration_snippet = "",
+ http_end_configuration_snippet = "",
+ stream_configuration_snippet = "",
+ http = {
+ enable_access_log = true,
+ access_log = "logs/access.log",
+ access_log_buffer = 16384,
+ -- luacheck: push max code line length 300
+ access_log_format = '$remote_addr - $remote_user [$time_local] $http_host "$request" $status $body_bytes_sent $request_time "$http_referer" "$http_user_agent" $upstream_addr $upstream_status $upstream_response_time "$upstream_scheme://$upstream_host$upstream_uri"',
+ -- luacheck: pop
+ access_log_format_escape = "default",
+ keepalive_timeout = "60s",
+ client_header_timeout = "60s",
+ client_body_timeout = "60s",
+ client_max_body_size = 0,
+ send_timeout = "10s",
+ underscores_in_headers = "on",
+ real_ip_header = "X-Real-IP",
+ real_ip_recursive = "off",
+ real_ip_from = { "127.0.0.1", "unix:" },
+ proxy_ssl_server_name = true,
+ upstream = {
+ keepalive = 320,
+ keepalive_requests = 1000,
+ keepalive_timeout = "60s"
+ },
+ charset = "utf-8",
+ variables_hash_max_size = 2048,
+ lua_shared_dict = {
+ ["internal-status"] = "10m",
+ ["plugin-limit-req"] = "10m",
+ ["plugin-limit-count"] = "10m",
+ ["prometheus-metrics"] = "10m",
+ ["plugin-limit-conn"] = "10m",
+ ["upstream-healthcheck"] = "10m",
+ ["worker-events"] = "10m",
+ ["lrucache-lock"] = "10m",
+ ["balancer-ewma"] = "10m",
+ ["balancer-ewma-locks"] = "10m",
+ ["balancer-ewma-last-touched-at"] = "10m",
+ ["plugin-limit-req-redis-cluster-slot-lock"] = "1m",
+ ["plugin-limit-count-redis-cluster-slot-lock"] = "1m",
+ ["plugin-limit-conn-redis-cluster-slot-lock"] = "1m",
+ tracing_buffer = "10m",
+ ["plugin-api-breaker"] = "10m",
+ ["etcd-cluster-health-check"] = "10m",
+ discovery = "1m",
+ jwks = "1m",
+ introspection = "10m",
+ ["access-tokens"] = "1m",
+ ["ext-plugin"] = "1m",
+ tars = "1m",
+ ["cas-auth"] = "10m",
+ ["ocsp-stapling"] = "10m"
+ }
+ }
+ },
+ graphql = {
+ max_size = 1048576
+ },
+ plugins = {
+ "real-ip",
+ "ai",
+ "client-control",
+ "proxy-control",
+ "request-id",
+ "zipkin",
+ "ext-plugin-pre-req",
+ "fault-injection",
+ "mocking",
+ "serverless-pre-function",
+ "cors",
+ "ip-restriction",
+ "ua-restriction",
+ "referer-restriction",
+ "csrf",
+ "uri-blocker",
+ "request-validation",
+ "chaitin-waf",
+ "multi-auth",
+ "openid-connect",
+ "cas-auth",
+ "authz-casbin",
+ "authz-casdoor",
+ "wolf-rbac",
+ "ldap-auth",
+ "hmac-auth",
+ "basic-auth",
+ "jwt-auth",
+ "jwe-decrypt",
+ "key-auth",
+ "consumer-restriction",
+ "forward-auth",
+ "opa",
+ "authz-keycloak",
+ "proxy-cache",
+ "body-transformer",
+ "proxy-mirror",
+ "proxy-rewrite",
+ "workflow",
+ "api-breaker",
+ "limit-conn",
+ "limit-count",
+ "limit-req",
+ "gzip",
+ "server-info",
+ "traffic-split",
+ "redirect",
+ "response-rewrite",
+ "degraphql",
+ "kafka-proxy",
+ "grpc-transcode",
+ "grpc-web",
+ "http-dubbo",
+ "public-api",
+ "prometheus",
+ "datadog",
+ "loki-logger",
+ "elasticsearch-logger",
+ "echo",
+ "loggly",
+ "http-logger",
+ "splunk-hec-logging",
+ "skywalking-logger",
+ "google-cloud-logging",
+ "sls-logger",
+ "tcp-logger",
+ "kafka-logger",
+ "rocketmq-logger",
+ "syslog",
+ "udp-logger",
+ "file-logger",
+ "clickhouse-logger",
+ "tencent-cloud-cls",
+ "inspect",
+ "example-plugin",
+ "aws-lambda",
+ "azure-functions",
+ "openwhisk",
+ "openfunction",
+ "serverless-post-function",
+ "ext-plugin-post-req",
+ "ext-plugin-post-resp",
+ },
+ stream_plugins = { "ip-restriction", "limit-conn", "mqtt-proxy", "syslog" },
+ plugin_attr = {
+ ["log-rotate"] = {
+ timeout = 10000,
+ interval = 3600,
+ max_kept = 168,
+ max_size = -1,
+ enable_compression = false
+ },
+ skywalking = {
+ service_name = "APISIX",
+ service_instance_name = "APISIX Instance Name",
+ endpoint_addr = "http://127.0.0.1:12800",
+ report_interval = 3
+ },
+ opentelemetry = {
+ trace_id_source = "x-request-id",
+ resource = {
+ ["service.name"] = "APISIX"
+ },
+ collector = {
+ address = "127.0.0.1:4318",
+ request_timeout = 3,
+ request_headers = {
+ Authorization = "token"
+ }
+ },
+ batch_span_processor = {
+ drop_on_queue_full = false,
+ max_queue_size = 1024,
+ batch_timeout = 2,
+ inactive_timeout = 1,
+ max_export_batch_size = tonumber(os.getenv("OTEL_BSP_MAX_EXPORT_BATCH_SIZE")) or 16
+ },
+ set_ngx_var = false
+ },
+ prometheus = {
+ export_uri = "/apisix/prometheus/metrics",
+ metric_prefix = "apisix_",
+ enable_export_server = true,
+ export_addr = {
+ ip = "127.0.0.1",
+ port = 9091
+ }
+ },
+ ["server-info"] = {
+ report_ttl = 60
+ },
+ ["dubbo-proxy"] = {
+ upstream_multiplex_count = 32
+ },
+ ["proxy-mirror"] = {
+ timeout = {
+ connect = "60s",
+ read = "60s",
+ send = "60s"
+ }
+ },
+ inspect = {
+ delay = 3,
+ hooks_file = "/usr/local/apisix/plugin_inspect_hooks.lua"
+ },
+ zipkin = {
+ set_ngx_var = false
+ }
+ },
+ deployment = {
+ role = "traditional",
+ role_traditional = {
+ config_provider = "etcd"
+ },
+ admin = {
+ admin_key_required = true,
+ admin_key = { {
+ name = "admin",
+ key = "",
+ role = "admin"
+ }, {
+ name = "viewer",
+ key = "4054f7cf07e344346cd3f287985e76a2",
Review Comment:
Should we keep the default key in this change? Or generate it randomly as well?
Other changes LGTM
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org