Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 158 additions & 0 deletions snippets/dashboard-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,30 @@

disables implicit prepared statement usage

### storage.main.postgres.max_open_connections
ENV: <b>TYK_DB_STORAGE_MAIN_POSTGRES_MAXOPENCONNECTIONS</b><br />
Type: `int`<br />

Maximum number of open connections to the database per connection pool. Dashboard maintains 8 connection pools. 0 (default) means unlimited.

Check warning on line 165 in snippets/dashboard-config.mdx

View check run for this annotation

probelabs / Visor: security

security Issue

The default value of 0 for `max_open_connections` means an unlimited number of open connections to the database. This can lead to resource exhaustion on the database server under high load, impacting availability. This insecure default applies to the `main`, `analytics`, `logs`, and `uptime` postgres configurations.
Raw output
The documentation should explicitly warn about the risk of using the unlimited default in production and recommend that administrators configure a specific, reasonable limit based on their expected load and database capacity.

Check warning on line 165 in snippets/dashboard-config.mdx

View check run for this annotation

probelabs / Visor: performance

performance Issue

The documentation for `storage.main.postgres.max_open_connections` specifies that the default value of 0 means an unlimited number of open connections. This default can be dangerous in production as it may lead to database connection exhaustion under high load, causing severe performance degradation or service failure. The documentation should include a warning about this risk and guide users to set an appropriate limit.
Raw output
Update the description to warn users about the risks of an unlimited connection pool in production environments and recommend tuning this value. This same issue is present for `storage.analytics.postgres.max_open_connections` (line 280), `storage.logs.postgres.max_open_connections` (line 395), and `storage.uptime.postgres.max_open_connections` (line 510).

### storage.main.postgres.max_idle_connections
ENV: <b>TYK_DB_STORAGE_MAIN_POSTGRES_MAXIDLECONNECTIONS</b><br />
Type: `int`<br />

Maximum number of idle connections that will be kept in each connection pool. Dashboard maintains 8 connection pools. 0 (default) uses the Go default which is currently 2.

### storage.main.postgres.connection_max_lifetime
ENV: <b>TYK_DB_STORAGE_MAIN_POSTGRES_CONNECTIONMAXLIFETIME</b><br />
Type: `string`<br />

Maximum length of time that a connection may be reused, as a Go duration string (e.g. "30m"). Empty (default) means connections are reused forever.

### storage.main.postgres.connection_max_idle_time
ENV: <b>TYK_DB_STORAGE_MAIN_POSTGRES_CONNECTIONMAXIDLETIME</b><br />
Type: `string`<br />

Maximum length of time a connection may sit idle before being closed, as a Go duration string (e.g. "5m"). Empty (default) means idle connections are never closed for being idle.

### storage.main.mysql
Connection settings for a MySQL database

Expand Down Expand Up @@ -249,6 +273,30 @@

disables implicit prepared statement usage

### storage.analytics.postgres.max_open_connections
ENV: <b>TYK_DB_STORAGE_ANALYTICS_POSTGRES_MAXOPENCONNECTIONS</b><br />
Type: `int`<br />

Maximum number of open connections to the database per connection pool. Dashboard maintains 8 connection pools. 0 (default) means unlimited.

### storage.analytics.postgres.max_idle_connections
ENV: <b>TYK_DB_STORAGE_ANALYTICS_POSTGRES_MAXIDLECONNECTIONS</b><br />
Type: `int`<br />

Maximum number of idle connections that will be kept in each connection pool. Dashboard maintains 8 connection pools. 0 (default) uses the Go default which is currently 2.

### storage.analytics.postgres.connection_max_lifetime
ENV: <b>TYK_DB_STORAGE_ANALYTICS_POSTGRES_CONNECTIONMAXLIFETIME</b><br />
Type: `string`<br />

Maximum length of time that a connection may be reused, as a Go duration string (e.g. "30m"). Empty (default) means connections are reused forever.

### storage.analytics.postgres.connection_max_idle_time
ENV: <b>TYK_DB_STORAGE_ANALYTICS_POSTGRES_CONNECTIONMAXIDLETIME</b><br />
Type: `string`<br />

Maximum length of time a connection may sit idle before being closed, as a Go duration string (e.g. "5m"). Empty (default) means idle connections are never closed for being idle.

### storage.analytics.mysql
Connection settings for a MySQL database

Expand Down Expand Up @@ -337,6 +385,30 @@

disables implicit prepared statement usage

### storage.logs.postgres.max_open_connections
ENV: <b>TYK_DB_STORAGE_LOGS_POSTGRES_MAXOPENCONNECTIONS</b><br />
Type: `int`<br />

Maximum number of open connections to the database per connection pool. Dashboard maintains 8 connection pools. 0 (default) means unlimited.

### storage.logs.postgres.max_idle_connections
ENV: <b>TYK_DB_STORAGE_LOGS_POSTGRES_MAXIDLECONNECTIONS</b><br />
Type: `int`<br />

Maximum number of idle connections that will be kept in each connection pool. Dashboard maintains 8 connection pools. 0 (default) uses the Go default which is currently 2.

### storage.logs.postgres.connection_max_lifetime
ENV: <b>TYK_DB_STORAGE_LOGS_POSTGRES_CONNECTIONMAXLIFETIME</b><br />
Type: `string`<br />

Maximum length of time that a connection may be reused, as a Go duration string (e.g. "30m"). Empty (default) means connections are reused forever.

### storage.logs.postgres.connection_max_idle_time
ENV: <b>TYK_DB_STORAGE_LOGS_POSTGRES_CONNECTIONMAXIDLETIME</b><br />
Type: `string`<br />

Maximum length of time a connection may sit idle before being closed, as a Go duration string (e.g. "5m"). Empty (default) means idle connections are never closed for being idle.

### storage.logs.mysql
Connection settings for a MySQL database

Expand Down Expand Up @@ -428,6 +500,30 @@

disables implicit prepared statement usage

### storage.uptime.postgres.max_open_connections
ENV: <b>TYK_DB_STORAGE_UPTIME_POSTGRES_MAXOPENCONNECTIONS</b><br />
Type: `int`<br />

Maximum number of open connections to the database per connection pool. Dashboard maintains 8 connection pools. 0 (default) means unlimited.

### storage.uptime.postgres.max_idle_connections
ENV: <b>TYK_DB_STORAGE_UPTIME_POSTGRES_MAXIDLECONNECTIONS</b><br />
Type: `int`<br />

Maximum number of idle connections that will be kept in each connection pool. Dashboard maintains 8 connection pools. 0 (default) uses the Go default which is currently 2.

### storage.uptime.postgres.connection_max_lifetime
ENV: <b>TYK_DB_STORAGE_UPTIME_POSTGRES_CONNECTIONMAXLIFETIME</b><br />
Type: `string`<br />

Maximum length of time that a connection may be reused, as a Go duration string (e.g. "30m"). Empty (default) means connections are reused forever.

### storage.uptime.postgres.connection_max_idle_time
ENV: <b>TYK_DB_STORAGE_UPTIME_POSTGRES_CONNECTIONMAXIDLETIME</b><br />
Type: `string`<br />

Maximum length of time a connection may sit idle before being closed, as a Go duration string (e.g. "5m"). Empty (default) means idle connections are never closed for being idle.

### storage.uptime.mysql
Connection settings for a MySQL database

Expand Down Expand Up @@ -530,31 +626,31 @@

### redis_master_name
ENV: <b>TYK_DB_REDISMASTERNAME</b><br />
Type: `string`<br />

Redis Sentinel Master name

### redis_sentinel_password
ENV: <b>TYK_DB_REDISSENTINELPASSWORD</b><br />
Type: `string`<br />

Redis Sentinel password

### redis_timeout
ENV: <b>TYK_DB_REDISTIMEOUT</b><br />
Type: `int`<br />

Set a custom Redis network timeout. Default value is 5 seconds.

### redis_database
ENV: <b>TYK_DB_REDISDATABASE</b><br />
Type: `int`<br />

Set this to the index of your Redis database if you are using more than one.

### enable_cluster
ENV: <b>TYK_DB_ENABLECLUSTER</b><br />
Type: `bool`<br />

Check warning on line 653 in snippets/dashboard-config.mdx

View check run for this annotation

probelabs / Visor: architecture

architecture Issue

The configuration structure for IAM-based storage authentication is inconsistent across different Tyk components. In the Dashboard, it is defined as a top-level `redis_iam_auth` block. However, in other components like the Gateway, MDCB, and Pump, the equivalent configuration is nested within the specific storage block it applies to (e.g., `storage.iam_auth`, `analytics_storage.iam_auth`). This architectural inconsistency can create confusion for operators who need to configure multiple components in a Tyk stack, as they must remember different structural patterns for the same feature.
Raw output
To improve architectural consistency and user experience, the configuration schema should be harmonized across all components. The nested pattern used in the Gateway (`storage.iam_auth`) is more explicit and scalable. Consider refactoring the Dashboard configuration in a future major version to adopt this nested structure, for example by placing IAM settings under a new `storage.redis.iam_auth` block.

Set this to true if you are using a Redis cluster.

Expand Down Expand Up @@ -628,6 +724,41 @@

Set the number of maximum connections in the Redis connection pool, which defaults to 500. Set to a higher value if you are expecting more traffic.

### redis_iam_auth
RedisIAMAuth configures cloud IAM-based authentication for the Redis/Valkey
connection, using short-lived tokens instead of a static password.

### redis_iam_auth.provider
ENV: <b>TYK_DB_REDISIAMAUTH_PROVIDER</b><br />
Type: `string`<br />

Provider selects the cloud IAM provider. Currently supported: "gcp"
(GCP Memorystore for Valkey and Redis Cluster).

### redis_iam_auth.service_account
ENV: <b>TYK_DB_REDISIAMAUTH_SERVICEACCOUNT</b><br />
Type: `string`<br />

ServiceAccount, for GCP, optionally impersonates this service account to
mint tokens instead of using the ambient Application Default Credentials
identity. Leave empty to use the workload's own identity (Workload Identity
on GKE, or GOOGLE_APPLICATION_CREDENTIALS).

### redis_iam_auth.token_refresh_before_expiry
ENV: <b>TYK_DB_REDISIAMAUTH_TOKENREFRESHBEFOREEXPIRY</b><br />
Type: `string`<br />

The access token issued by the IAM will be refreshed before expiry.
Set the time period before expiry when that refresh will take place as
a human readable duration (for example "2m30s", "5m").
Defaults to "5m" (five minutes) when empty.

### redis_iam_auth.enabled
ENV: <b>TYK_DB_REDISIAMAUTH_ENABLED</b><br />
Type: `bool`<br />

Set to true to use IAM-based authentication for this storage connection.

### force_api_defaults
ENV: <b>TYK_DB_FORCEAPIDEFAULTS</b><br />
Type: `bool`<br />
Expand Down Expand Up @@ -1007,6 +1138,12 @@

ForbidAdminResetAccessToken is a security feature that allows you to prevent user admins from resetting the Dashboard API access tokens of other users. The default is `false`, however we recommend setting this to `true` for enhanced security.

### security.allowed_examples_urls
ENV: <b>TYK_DB_SECURITY_ALLOWEDEXAMPLESURLS</b><br />
Type: `[]string`<br />

AllowedExamplesURLs is a list of exact URLs that are allowed for fetching example API configurations. Only exact URL matches will be permitted when using the /api/examples endpoints. If not configured, defaults to official Tyk example repository URLs.

### ui
This section controls various settings for the look and feel of the Dashboard UI.

Expand Down Expand Up @@ -1436,9 +1573,30 @@
You can now configure the log format to be either the standard or json format
If not set or left empty, it will default to `standard`.

### log_level
ENV: <b>TYK_DB_LOGLEVEL</b><br />
Type: `string`<br />

Configure the log verbosity. Valid values are: debug, info, warn, error.
The system level TYK_LOGLEVEL takes precedence over this field when set.
If unset, defaults to info.

### allow_unsafe_policy_ids
ENV: <b>TYK_DB_ALLOWUNSAFEPOLICYIDS</b><br />
Type: `bool`<br />

AllowUnsafePolicyIds allows the use of non-standard characters in policy identifiers (default: false). The standard characters are alphanumeric characters plus underscore (_), hyphen (-), dot (.) and tilde (~). The use of other characters in IDs can cause unpredictable behavior and is not recommended.

### kv
ENV: <b>TYK_DB_KV</b><br />
Type: `kv.Config`<br />

KV defines named secret stores (such as HashiCorp Vault, Consul, environment
variables, or inline values) that other configuration values can reference.
This lets sensitive settings like database credentials or the admin secret
be kept in an external store instead of the config file; each referenced
value is resolved from its store once, at startup. Store definitions may be
set in the config file or supplied as a JSON object through the
TYK_DB_KV_STORES environment variable; the environment overrides and adds
stores by name, leaving file-defined stores it does not name untouched.

Loading
Loading