Type object
File match tyk.conf
Schema URL https://catalog.lintel.tools/schemas/schemastore/tyk-gateway-open-source-v5-7/latest.json
Source https://raw.githubusercontent.com/TykTechnologies/tyk-schemas/refs/heads/main/JSON/draft-07/schema_tyk.oss.conf

Validate with Lintel

npx @lintel/lintel check
Type: object

Schema that describes the config file of OSS tyk gateway.

Properties

listen_port integer required

An explanation about the purpose of this instance.

Default: 0
Examples: 8080
secret string required

Configuration field as API key for the Tyk Gateway API. It should be passed along as the `X-Tyk-Authorization header in any requests made.

Default: ""
Examples: "352d20ee67be67f6340b4c0605b044b7"
use_db_app_configs boolean required

For licensed users this needs to be true. False means it's not using a DB to load the configurations.

Default: false
Examples: false
app_path string required

An explanation about the purpose of this instance.

Default: ""
Examples: "/opt/tyk-gateway/apps/"
storage object required

An explanation about the purpose of this instance.

Default:
{}
Examples: {"type":"redis","host":"tyk-redis","port":6379,"username":"","password":"","database":0,"optimisation_max_idle":2000,"optimisation_max_active":4000}
8 nested properties
type string required

An explanation about the purpose of this instance.

Default: ""
Examples: "redis"
host string required

An explanation about the purpose of this instance.

Default: ""
Examples: "tyk-redis"
port integer required

An explanation about the purpose of this instance.

Default: 0
Examples: 6379
username string

An explanation about the purpose of this instance.

Default: ""
Examples: "<change-me>"
password string

An explanation about the purpose of this instance.

Default: ""
Examples: "<change-me>"
database integer

Only single-node and failover clients.

Default: 0
Examples: 0
optimisation_max_idle integer

An explanation about the purpose of this instance.

Default: 0
Examples: 2000
optimisation_max_active integer

An explanation about the purpose of this instance.

Default: 0
Examples: 4000
policies object required

Tell the gateway where to pick the policies from.

Default:
{
  "policy_source": "file",
  "policy_record_name": "/opt/tyk-gateway/policies/policies.json"
}
Examples: {"policy_source":"file","policy_record_name":"/opt/tyk-gateway/policies/policies.json"}
3 nested properties
policy_source string required

Set to file to load policies file from the file system. Set to service to use the Dashboard service.

Default: "file"
policy_record_name string required

This option is required if policies.policy_source is set to file.

Default: "/opt/tyk-gateway/policies/policies.json"
policy_path string

This option is required if policies.policy_source is set to file.

Default: "/opt/tyk-gateway/policies/"
log_level string

Configuration field to control the gateway logging level.

Default: "info"
Values: "error" "warn" "info" "debug"
Examples: "info", "debug"
template_path string

An explanation about the purpose of this instance.

Default: ""
Examples: "/opt/tyk-gateway/templates"
tyk_js_path string

An explanation about the purpose of this instance.

Default: ""
Examples: "/opt/tyk-gateway/js/tyk.js"
middleware_path string

An explanation about the purpose of this instance.

Default: ""
Examples: "/opt/tyk-gateway/middleware"
enable_analytics boolean

An explanation about the purpose of this instance.

Default: false
Examples: false
analytics_config object

analytics_config contains setting for analytics captured by the gateway

Default:
{
  "type": "",
  "purge_interval": 10,
  "enable_detailed_recording": false
}
4 nested properties
type string required

For OSS gateway use an empty string.

Default: ""
purge_interval integer

Set the interval length on how often the tyk Gateway will purge analytics data. This value is in seconds and defaults to 10 seconds.

Default: 10
Examples: 1
ignored_ips array

An explanation about the purpose of this instance.

Default:
[]
Examples: []
enable_detailed_recording boolean

Set this value to true to have Tyk store the inbound request and outbound response data in HTTP Wire format as part of the Analytics data. Please note, this will greatly increase your analytics DB size and can cause performance degradation on analytics processing by the Dashboard. This setting can be overridden with an organisation flag, enabed at an API level, or on individual Key level.

Default: false
health_check object

An explanation about the purpose of this instance.

Default:
{
  "enable_health_checks": false
}
2 nested properties
enable_health_checks boolean required

An explanation about the purpose of this instance.

Default: false
Examples: true
health_check_value_timeouts integer

health_check_value_timeouts is deprecated!

Default: 0
Examples: 60
optimisations_use_async_session_write boolean

An explanation about the purpose of this instance.

Default: false
Examples: false
enable_non_transactional_rate_limiter boolean

An explanation about the purpose of this instance.

Default: false
Examples: true
enable_sentinel_rate_limiter boolean

An explanation about the purpose of this instance.

Default: false
Examples: false
enable_redis_rolling_limiter boolean

An explanation about the purpose of this instance.

Default: false
Examples: false
allow_master_keys boolean

An explanation about the purpose of this instance.

Default: false
Examples: false
hash_keys boolean

True value will use the hashed value of the key as the key in Redis.

Default: true
Examples: false
close_connections boolean

An explanation about the purpose of this instance.

Default: false
http_server_options object

An explanation about the purpose of this instance.

Default:
{}
Examples: {"enable_websockets":true}
1 nested properties
enable_websockets boolean required

An explanation about the purpose of this instance.

Default: false
Examples: true
allow_insecure_configs boolean

An explanation about the purpose of this instance.

Default: false
Examples: true
coprocess_options object

An explanation about the purpose of this instance.

Default:
{}
Examples: {"enable_coprocess":true,"coprocess_grpc_server":""}
2 nested properties
enable_coprocess boolean required

An explanation about the purpose of this instance.

Default: false
Examples: true
coprocess_grpc_server string required

An explanation about the purpose of this instance.

Default: ""
Examples: ""
enable_bundle_downloader boolean

An explanation about the purpose of this instance.

Default: false
Examples: true
bundle_base_url string

An explanation about the purpose of this instance.

Default: ""
global_session_lifetime integer

An explanation about the purpose of this instance.

Default: 0
Examples: 100
force_global_session_lifetime boolean

An explanation about the purpose of this instance.

Default: false
max_idle_connections_per_host integer

An explanation about the purpose of this instance.

Default: 0
Examples: 500
enable_jsvm boolean

An explanation about the purpose of this instance.

Default: false
Examples: true
enable_hashed_keys_listing boolean

An explanation about the purpose of this instance.

Default: false
Examples: true

Examples

{
  "_description": "Config example with JSVM enabled",
  "listen_port": 8080,
  "log_level": "info",
  "secret": "foo",
  "use_db_app_configs": false,
  "app_path": "/opt/tyk-gateway/apps/",
  "storage": {
    "type": "redis",
    "host": "tyk-redis",
    "port": 6379
  },
  "policies": {
    "policy_source": "file",
    "policy_record_name": "/opt/tyk-gateway/policies/policies.json"
  },
  "enable_analytics": false,
  "analytics_config": {
    "type": ""
  },
  "allow_insecure_configs": true,
  "hash_keys": true,
  "enable_hashed_keys_listing": true,
  "global_session_lifetime": 100,
  "enable_jsvm": true,
  "enable_bundle_downloader": true,
  "bundle_base_url": "",
  "tyk_js_path": "/opt/tyk-gateway/js/tyk.js",
  "middleware_path": "/opt/tyk-gateway/middleware"
}