From fb19ec41acd2db940cc2372383057dc68d933a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=99=9F=20Wu=20Sheng?= Date: Thu, 29 Jun 2023 23:58:48 +0800 Subject: [PATCH] Set the `SW_QUERY_MAX_QUERY_COMPLEXITY` default value to 3000 (#11025) --- docs/en/changes/changes.md | 1 + docs/en/setup/backend/configuration-vocabulary.md | 2 +- oap-server/server-starter/src/main/resources/application.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index 25e55ee762f9..cc984da4b2a1 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -32,6 +32,7 @@ * Add comment for `docker/.env` to explain the usage. * Fix wrong environment variable name `SW_OTEL_RECEIVER_ENABLED_OTEL_RULES` to right `SW_OTEL_RECEIVER_ENABLED_OTEL_METRICS_RULES`. * Fix instance query in JDBC implementation. +* Set the `SW_QUERY_MAX_QUERY_COMPLEXITY` default value to 3000(was 1000). #### UI diff --git a/docs/en/setup/backend/configuration-vocabulary.md b/docs/en/setup/backend/configuration-vocabulary.md index ac347bf40c92..7ad55f613232 100644 --- a/docs/en/setup/backend/configuration-vocabulary.md +++ b/docs/en/setup/backend/configuration-vocabulary.md @@ -237,7 +237,7 @@ The Configuration Vocabulary lists all available configurations provided by `app | - | - | sampleRate | Sampling rate for receiving trace. Precise to 1/10000. 10000 means sampling rate of 100% by default. | SW_RECEIVER_BROWSER_SAMPLE_RATE | 10000 | | query | graphql | - | GraphQL query implementation. | - | | | - | - | enableLogTestTool | Enable the log testing API to test the LAL. **NOTE**: This API evaluates untrusted code on the OAP server. A malicious script can do significant damage (steal keys and secrets, remove files and directories, install malware, etc). As such, please enable this API only when you completely trust your users. | SW_QUERY_GRAPHQL_ENABLE_LOG_TEST_TOOL | false | -| - | - | maxQueryComplexity | Maximum complexity allowed for the GraphQL query that can be used to abort a query if the total number of data fields queried exceeds the defined threshold. | SW_QUERY_MAX_QUERY_COMPLEXITY | 1000 | +| - | - | maxQueryComplexity | Maximum complexity allowed for the GraphQL query that can be used to abort a query if the total number of data fields queried exceeds the defined threshold. | SW_QUERY_MAX_QUERY_COMPLEXITY | 3000 | | - | - | enableUpdateUITemplate | Allow user add,disable and update UI template. | SW_ENABLE_UPDATE_UI_TEMPLATE | false | | - | - | enableOnDemandPodLog | Ondemand Pod log: fetch the Pod logs on users' demand, the logs are fetched and displayed in real time, and are not persisted in any kind. This is helpful when users want to do some experiments and monitor the logs and see what's happing inside the service. Note: if you print secrets in the logs, they are also visible to the UI, so for the sake of security, this feature is disabled by default, please set this configuration to enable the feature manually. | SW_ENABLE_ON_DEMAND_POD_LOG | false | | query-zipkin | default | - | This module is for Zipkin query API and support zipkin-lens UI | - | | diff --git a/oap-server/server-starter/src/main/resources/application.yml b/oap-server/server-starter/src/main/resources/application.yml index 701cc155f3b5..a5d21126b712 100644 --- a/oap-server/server-starter/src/main/resources/application.yml +++ b/oap-server/server-starter/src/main/resources/application.yml @@ -389,7 +389,7 @@ query: enableLogTestTool: ${SW_QUERY_GRAPHQL_ENABLE_LOG_TEST_TOOL:false} # Maximum complexity allowed for the GraphQL query that can be used to # abort a query if the total number of data fields queried exceeds the defined threshold. - maxQueryComplexity: ${SW_QUERY_MAX_QUERY_COMPLEXITY:1000} + maxQueryComplexity: ${SW_QUERY_MAX_QUERY_COMPLEXITY:3000} # Allow user add, disable and update UI template enableUpdateUITemplate: ${SW_ENABLE_UPDATE_UI_TEMPLATE:false} # "On demand log" allows users to fetch Pod containers' log in real time,