From c2933c46405efbd21d0523f8f080c054e513d0a6 Mon Sep 17 00:00:00 2001 From: Emmanuel Keller Date: Thu, 27 Feb 2025 17:38:28 +0000 Subject: [PATCH 1/2] Documents SURREAL_FILE_ALLOWLIST --- src/content/doc-surrealdb/cli/env.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/content/doc-surrealdb/cli/env.mdx b/src/content/doc-surrealdb/cli/env.mdx index a8f6bb447..0a8e031ca 100644 --- a/src/content/doc-surrealdb/cli/env.mdx +++ b/src/content/doc-surrealdb/cli/env.mdx @@ -47,6 +47,11 @@ Environment variables can be used to tailor the behaviour of a running SurrealDB SURREAL_EXTERNAL_SORTING_BUFFER_LIMIT 50000 Specifies the buffer limit for external sorting. + + + SURREAL_FILE_ALLOWLIST + 20 + Limits file access for the mapper filter to only the specified allowed file paths. The paths must be provided as absolute paths, separated by a colon (:) on Unix-like systems or a semicolon (;) on Windows. SURREAL_FUNCTION_ALLOCATION_LIMIT From 98c862362db1d24821ef23654d4034466d5c3a55 Mon Sep 17 00:00:00 2001 From: Dave MacLeod <56599343+Dhghomon@users.noreply.github.com> Date: Wed, 26 Mar 2025 13:52:43 +0900 Subject: [PATCH 2/2] Alphabetize in some places --- src/content/doc-surrealdb/cli/env.mdx | 90 +++++++++++++-------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/src/content/doc-surrealdb/cli/env.mdx b/src/content/doc-surrealdb/cli/env.mdx index 0a8e031ca..3dac99e13 100644 --- a/src/content/doc-surrealdb/cli/env.mdx +++ b/src/content/doc-surrealdb/cli/env.mdx @@ -38,6 +38,11 @@ Environment variables can be used to tailor the behaviour of a running SurrealDB false Enable experimental bearer access and stateful access grant management. Still under active development. Using this experimental feature may introduce risks related to breaking changes and security issues. + + SURREAL_EXPERIMENTAL_GRAPHQL + false + Enables experimental graphql integration. Still under active development. Using this experimental feature may introduce risks related to breaking changes and security issues. + SURREAL_EXPORT_BATCH_SIZE 1000 @@ -59,34 +64,29 @@ Environment variables can be used to tailor the behaviour of a running SurrealDB Used to limit allocation for builtin functions. - SURREAL_EXPERIMENTAL_GRAPHQL - false - Enables experimental graphql integration. Still under active development. Using this experimental feature may introduce risks related to breaking changes and security issues. + SURREAL_HTTP_MAX_IMPORT_BODY_SIZE + 4398046511104 (4 GiB) + Maximum HTTP body size of the HTTP /import endpoints + + + SURREAL_HTTP_MAX_KEY_BODY_SIZE + 16384 (16 KiB) + Maximum HTTP body size of the HTTP /key endpoints SURREAL_HTTP_MAX_ML_BODY_SIZE 4398046511104 (4 GiB) Maximum HTTP body size of the HTTP /ml endpoints - - SURREAL_HTTP_MAX_SQL_BODY_SIZE - 1048576 (1 MiB) - Maximum HTTP body size of the HTTP /sql endpoint - SURREAL_HTTP_MAX_RPC_BODY_SIZE 4194304 (4 MiB) Maximum HTTP body size of the HTTP /rpc endpoint - SURREAL_HTTP_MAX_KEY_BODY_SIZE - 16384 (16 KiB) - Maximum HTTP body size of the HTTP /key endpoints - - - SURREAL_HTTP_MAX_SIGNUP_BODY_SIZE - 1024 (1 KiB) - Maximum HTTP body size of the HTTP /signup endpoint. + SURREAL_HTTP_MAX_SQL_BODY_SIZE + 1048576 (1 MiB) + Maximum HTTP body size of the HTTP /sql endpoint SURREAL_HTTP_MAX_SIGNIN_BODY_SIZE @@ -94,9 +94,9 @@ Environment variables can be used to tailor the behaviour of a running SurrealDB The maximum HTTP body size of the HTTP /signin endpoints - SURREAL_HTTP_MAX_IMPORT_BODY_SIZE - 4398046511104 (4 GiB) - Maximum HTTP body size of the HTTP /import endpoints + SURREAL_HTTP_MAX_SIGNUP_BODY_SIZE + 1024 (1 KiB) + Maximum HTTP body size of the HTTP /signup endpoint. SURREAL_IMPORT_FILE @@ -133,31 +133,31 @@ Environment variables can be used to tailor the behaviour of a running SurrealDB Configuring the memory threshold which can be used across the programme to check if the amount of memory available to the programme is lower than required. The value can be specified as bytes (b, or without any suffix), kibibytes (k, kb, or kib), mebibytes (m, mb, or mib), or gibibytes (g, gb, or gib). If the environment variable is not specified, then the threshold is not used, and no memory limit is enabled. - - SURREAL_NORMAL_FETCH_SIZE - 50 - The maximum number of keys that should be scanned at once in general queries. - SURREAL_NET_MAX_CONCURRENT_REQUESTS 1,048,576 concurrent requests Adds a global limit for concurrent server requests, and introduces a new environment variable + + SURREAL_NORMAL_FETCH_SIZE + 50 + The maximum number of keys that should be scanned at once in general queries. + SURREAL_RUNTIME_MAX_BLOCKING_THREADS 512 Number of threads which can be started for blocking operations. - - SURREAL_RUNTIME_WORKER_THREADS - Number of CPU cores (minimum 4) - Number of runtime worker threads used to start. - SURREAL_RUNTIME_STACK_SIZE 10485760 (10 MiB) Runtime thread memory stack size. Stack size is doubled if compiled from source in Debug mode. + + SURREAL_RUNTIME_WORKER_THREADS + Number of CPU cores (minimum 4) + Number of runtime worker threads used to start. + SURREAL_SCRIPTING_MAX_MEMORY_LIMIT 262144 (256 KiB) @@ -174,14 +174,14 @@ Environment variables can be used to tailor the behaviour of a running SurrealDB Size of the SurrealCS connection pool. - SURREAL_TELEMETRY_DISABLE_TRACING + SURREAL_TELEMETRY_DISABLE_METRICS false - Disables sending traces to the GRPC OTEL collector. Available since SurrealDB v2.1.3 + Disables sending metrics to the GRPC OTEL collector. Available since SurrealDB v2.1.3 - SURREAL_TELEMETRY_DISABLE_METRICS + SURREAL_TELEMETRY_DISABLE_TRACING false - Disables sending metrics to the GRPC OTEL collector. Available since SurrealDB v2.1.3 + Disables sending traces to the GRPC OTEL collector. Available since SurrealDB v2.1.3 SURREAL_TELEMETRY_NAMESPACE @@ -307,18 +307,18 @@ surreal start --user root --pass root allow-arbitrary-query Allows arbitrary queries to be used by user groups. Possible user groups are: 'guest', 'record', and 'system'. - - SURREAL_CAPS_ALLOW_FUNC - surreal start - allow-funcs - Allow execution of all or certain functions. - SURREAL_CAPS_ALLOW_EXPERIMENTAL surreal start allow-experimental Allow execution of experimental features. + + SURREAL_CAPS_ALLOW_FUNC + surreal start + allow-funcs + Allow execution of all or certain functions. + SURREAL_CAPS_ALLOW_GUESTS surreal start @@ -397,18 +397,18 @@ surreal start --user root --pass root kvs-ca Path to the CA file used when connecting to the remote KV store. - - SURREAL_KVS_KEY - surreal start - kvs-key - Path to the private key file used when connecting to the remote KV store. - SURREAL_KVS_CERT surreal start kvs-cert Path to the certificate file used when connecting to the remote KV store. + + SURREAL_KVS_KEY + surreal start + kvs-key + Path to the private key file used when connecting to the remote KV store. + SURREAL_LOG surreal fix, start