Type object
Schema URL https://catalog.lintel.tools/schemas/schemastore/krakend/_shared/latest--krakend.json
Parent schema krakend
Type: object

Properties

version const: 3 required

The syntax version tells KrakenD how to read this configuration. This is not the KrakenD version. Each KrakenD version is linked to a syntax version, and since KrakenD v2.0 the version must be 3

Constant: 3
async_agent object[]

Async agents are routines listening to queues or PubSub systems that react to new events and push data to your backends. Through async agents, you can start a lot of consumers to process your events autonomously.

See: https://www.krakend.io/docs/async/

cache_ttl string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

8 nested properties
allow_insecure_connections boolean

By default, KrakenD verifies every SSL connection. This option allows you to connect to backends considered insecure, for instance when you are using self-signed certificates

Default: false
ca_certs array

An array with all the CA certificates you would like to validate the server you are connecting to.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[]
Examples: ["ca.pem"]
cipher_suites array

The list of cipher suites as defined in the documentation.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  4865,
  4866,
  4867
]
uniqueItems=true
client_certs object[]

The list of all client certificates available when fetching data from the upstream service.

See: https://www.krakend.io/docs/service-settings/tls/

curve_preferences enum[]

The list of all the identifiers for the curve preferences. Use 23 for CurveP256, 24 for CurveP384 or 25 for CurveP521.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  23,
  24,
  25
]
uniqueItems=true
disable_system_ca_pool boolean

Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the ca_certs list when true.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
max_version enum

Maximum TLS version supported.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
min_version enum

Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the ciphers_list.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
debug_endpoint boolean

Enables the /__debug/ endpoint for this configuration. You can safely enable it in production.

Default: false
dialer_fallback_delay string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
dialer_keep_alive string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
dialer_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
disable_compression boolean

When true prevents requesting compression with an Accept-Encoding: gzip request header when the Request contains no existing Accept-Encoding value. If the Transport requests gzip on its own and gets a gzipped response, it's transparently decoded. However, if the user explicitly requested gzip it is not automatically uncompressed.

See: https://www.krakend.io/docs/service-settings/http-transport-settings/

Default: false
disable_keep_alives boolean

When true it disables HTTP keep-alives and will only use the connection to the server for a single HTTP request.

See: https://www.krakend.io/docs/service-settings/http-transport-settings/

Default: false
disable_rest boolean

Endpoints require in its endpoint definition the usage of a RESTful pattern. If you require unrestful patterns, like /file.{ext} (instead of its RESTful counterpart /file/{ext}), then you must set this parameter to true. You can use multiple variables if needed, but only one can be in an unrestful position, and when you do, it must be in the last position of the definition. E.g.: you can declare an endpoint /file/{name}/base.{ext} but you cannot do /file.{ext}.json because the variable {ext} is not in the last position of the definitino, and therefore the remaining path after {ext} is ignored by the router.

Default: false
dns_cache_ttl string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
echo_endpoint boolean

Enables the /__echo/ endpoint for this configuration, that returns information about the incoming request. When using /__echo as a backend you can check the actual headers and content a backend receives after all the zero-trust filtering.

Default: false
endpoints object[]

Your API contract, or the list of all paths recognized by this gateway. The paths /__health/, /__debug/, /__echo/, /__catchall, and /__stats/ are reserved by the system and you cannot declare them. Their existence depends on their respective settings.

See: https://www.krakend.io/docs/endpoints/

expect_continue_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
extra_config object
34 nested properties
ai/mcp object
1 nested properties
servers object[] required

The array of MCP servers available for linking to endpoints. Each object represents a different MCP server. The entry is only the definition of the server. You must create an endpoint that serves as the entrypoint to each server.

auth/api-keys object

Enterprise only. Enables a Role-Based Access Control (RBAC) mechanism by reading the Authorization header of incoming requests.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

6 nested properties
keys object[] required

A list of objects defining each API Key.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

hash enum

The hashing function used to store the value of the key. When you use plain the API key is written as it will passed by the user. The rest of the hashes require you to save the API key after applying the desired function.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: "plain"
Values: "plain" "fnv128" "sha256" "sha1"
identifier string

The header name or the query string name that contains the API key. Defaults to key when using the query_string strategy and to Authorization when using the header strategy. The identifier set here is used across all endpoints with API key authentication enabled, but they can override this entry individually.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: "Authorization"
Examples: "Authorization", "X-Key"
propagate_role string

The name of a header that will propagate to the backend containing the matching role. The backend receives no header when the string is empty, or the attribute is not declared. Otherwise, the backend receives the declared header name containing the first matching role of the user. The header value will be ANY when the endpoint does not require roles. For instance, if an API key has roles [A, B], and the endpoint demands roles [B, C], the backend will receive a header with the value B.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: ""
Examples: "X-Krakend-Role"
salt string

A salt string for the desired hashing function. When provided, the API key is concatenated after the salt string and both hashed together.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: ""
Examples: "mySalt"
strategy enum

Specifies where to expect the user API key, whether inside a header or as part of the query string. The strategy set here is used across all endpoints with API key authentication enabled, but they can override this entry individually.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: "header"
Values: "header" "query_string"
auth/basic object

Enterprise only. The Basic Authentication component protects the access to selected endpoints using basic username and password credentials.

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

2 nested properties
htpasswd_path string

Absolute Path to the htpasswd filename (recommended) or relative ./ to the workdir (less secure).

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

Examples: "/path/to/.htpasswd"
users object

Additional users to the htpasswd file can be declared directly inside the configuration. The content of both places will be merged (and this list will overwrite users already defined in the htpasswd file). The key of each entry is the username, and the value the bcrypt.

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

Examples: {"admin":"$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ...","user2":"$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ..."}
auth/revoker object

The API Gateway authorizes users that provide valid tokens according to your criteria, but at some point, you might want to change your mind and decide to revoke JWT tokens that are still valid.

11 nested properties
N integer required

The maximum Number of elements you want to keep in the bloom filter. Tens of millions work fine on machines with low resources.

See: https://www.krakend.io/docs/authorization/revoking-tokens/

Examples: 10000000
P number required

The Probability of returning a false positive. E.g.,1e-7 for one false positive every 10 million different tokens. The values N and P determine the size of the resulting bloom filter to fulfill your expectations. E.g: 0.0000001

See: https://www.krakend.io/docs/authorization/revoking-tokens/

Examples: 1e-7
TTL integer required

The lifespan of the JWT you are generating in seconds. The value must match the expiration you are setting in the identity provider when creating the tokens.

See: https://www.krakend.io/docs/authorization/revoking-tokens/

hash_name enum required

Either optimal (recommended) or default. The optimal consumes less CPU but has less entropy when generating the hash, although the loss is negligible.

See: https://www.krakend.io/docs/authorization/revoking-tokens/

Values: "optimal" "default"
port integer required

The port number exposed on each KrakenD instance for the RPC service to interact with the bloomfilter. This port is allocated only to the clients (running KrakenDs).

See: https://www.krakend.io/docs/authorization/revoking-tokens/

token_keys string[] required

The list with all the claims in your JWT payload that need watching. These fields establish the criteria to revoke accesses in the future. The Revoker does not use this value, only the clients.

See: https://www.krakend.io/docs/authorization/revoking-tokens/

Examples: ["jti"]
revoke_server_api_key string

A string used as an exchange API key to secure the communication between the Revoke Server and the KrakenD instances and to consume the REST API of the Revoker Server as well. E.g., a string generated with uuidgen.

See: https://www.krakend.io/docs/enterprise/authentication/revoke-server/

Examples: "639ee23f-f4c5-40c4-855c-912bf01fae87"
revoke_server_max_retries integer

Maximum number of retries after a connection fails. When the value is less than zero it is changed automatically to zero.

See: https://www.krakend.io/docs/enterprise/authentication/revoke-server/

Default: 0
revoke_server_max_workers integer

How many workers are used concurrently to execute an action (e.g., push a token) to all registered instances, allowing you to limit the amount of memory consumed by the server. For example, if you have 100 KrakenD servers and need to push 5MB of data each, you need to send 500MB in total. A max_workers=5 will consume a maximum of 5MB x 5 workers = 25MB of memory in a given instant. Defaults to the same number of CPUs available.

See: https://www.krakend.io/docs/enterprise/authentication/revoke-server/

Default: 5
revoke_server_ping_interval string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
revoke_server_ping_url string

The address to the /instances endpoint in the Revoke Server.

See: https://www.krakend.io/docs/enterprise/authentication/revoke-server/

auth/validator object

Enables global configurations for the HTTP client responsible of downloading and caching the JWK URLs for token validation and signing.

1 nested properties
shared_cache_duration integer required

The cache duration in seconds for the JWK client retrieving the jwk_url. The endpoint must enable the cache option in order to use this second level cache.

See: https://www.krakend.io/docs/authorization/jwk-caching/

documentation/openapi object

Enterprise only. Generates OpenAPI documentation automatically through krakend openapi export command.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

28 nested properties
description string

An introductory, optionally verbose, explanation supporting CommonMark syntax. If you'd like to load an external markdown file, you can use flexible configuration, for instance "description": {{include "openapi/intro.md" | toJson }}

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "Hi there, I am [OpenAPI](https://www.krakend.io/docs/enterprise/endpoints/openapi/)"
audience string[]

The list of audiences that will consume this endpoint. These values do not define the gateway logic in any way. They are a way to group endpoints and filter them out when generating the OpenAPI documentation. Use * to indicate an endpoint will be present in any audience generated.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: ["gold","silver","*"]
base_path string

A starting path that is appended to any endpoint.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
components_schemas object

The JSON Schemas you can reuse inside endpoint definitions using ref. You can either pass the JSON Schema object, or a bas64 string.

Examples: {"Pet":{"type":"object","required":["id","name"]}}
contact_email string

Email where users of your API can write to.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
contact_name string
Examples: "/v1"
contact_url string

Contact URL that users of your API can read.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
cookie_name string

When generating an OpenAPI spec, the name of the cookie used under components securitySchemes.

Default: "SESSIONID"
custom_security_schemes object

Allows you to add custom security schemes under components/securitySchemes in the generated OpenAPI spec. This is useful when you want to define your own security schemes, different from the built-in ones (e.g., jwt, apikey, cookie, etc.). When the property is in the service level you must declare the schema (e.g., "OAuth2Security":{...}), and when it is in the endpoint you should only write the object name with not properties inside, e.g, {"OAuth2Security":{}.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: {"OAuth2Security":{"description":"OAuth2 security scheme","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://example.com/oauth/authorize","scopes":{},"tokenUrl":"https://example.com/oauth/token"}}}}
disable_default_response_definitions boolean

By default, KrakenD adds a 500 and a 200 response definition to each endpoint. Set this property to true if you want to avoid this behavior.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Default: false
example object | string

Deprecated in OAS3 (use response_definition instead). A free form JSON object or a string you would like to show as a sample response of the endpoint. The examples assume they are JSON content types except when using the output_encoding=string.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

header_definition object[]

Sets a detailed description for the headers allowed in the endpoint. Make sure to include the same headers in the endpoint's input_headers.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The type of content","name":"Content-Type"}]
host string

The hostname where you will publish your API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "my.api.com"
jwt_key string

When generating an OpenAPI spec, the name of the JWT key used under components securitySchemes.

Default: "KrakenD-JWT"
license_name string

The license name (e.g.: Apache License)

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
license_url string

The URL where the license is hosted

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
operation_id string

A unique string identifying the operation identifier. Usually the method + the endpoint. If provided, these IDs must be unique among all operations described in your API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "GET/foo"
param_definition object[]

Sets a detailed description for the URL parameters (e.g.: /foo/{param}) required in the endpoint. Make sure to include to write the param exactly as in the endpoint definition.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The unique user ID","name":"id_user"}]
query_definition object[]

Sets a detailed description for the query strings allowed in the endpoint. Make sure to include the same strings in the endpoint's input_query_strings.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The number of the page","name":"page"}]
request_definition object[]

Describes the payload needed to consume the endpoint. If a JSON Schema validation exists, it takes precedence when generating the documentation. An example use case is when you need to document a multipart/form-data request body.This property is an array because you can document requests with multiple content types.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"Updates the user","content_type":"application/json","example":{"first_name":"Mary","id_user":33}}]
response_definition object

Describes the different status codes returned by this endpoint. Each key is the definition of the status code, represented by a string. E.g., 200 (success), 500 (internal error), etc.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: {"404":{"description":"Page not found","@comment":"Some comment","content_type":"application/json","example":{"status":"KO"}}}
schemes string[]

The list of schemes supported by the API, e.g. http or https

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Default:
[
  "http"
]
Examples: ["https","http"]
servers object[]

The list of servers where the API is hosted. The server URL can be a relative path, e.g., /v1 or an absolute path. The URL might contain {variables}, although these are only recognized by OpenAPI and to KrakenD they are just literal strings because it does not use them.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"url":"/v1"}], [{"url":"https://example.com:{port}","variables":{"port":{"default":"8443","enum":["8443","443"]}}}]
summary string

A short summary for the endpoint. Use the description field for the longest explanation.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

tag_definition object[]

Sets a detailed description for the tags classifiying endpoints when generating the OpenAPI spec.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"Description of tag1","name":"Tag1"}]
tags string[]

You can assign a list of tags to each API operation. If you declare tags in the tag_definition at the OpenAPI service level, they will have a description in the documentation. Tagged operations may be handled differently by tools and libraries. For example, Swagger UI uses tags to group the displayed operations.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

terms_of_service string

The URL to the terms of service for using this API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
version string

The version numbering you want to apply to this release of API., e.g.: 1.0.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "1.0"
documentation/postman object

Enterprise only. Generates postman documentation automatically through krakend postman export command.

See: https://www.krakend.io/docs/enterprise/developer/postman/

4 nested properties
description string

An introductory, optionally verbose, explanation supporting Markdown syntax. If you'd like to load an external markdown file, you can use flexible configuration, for instance "description": {{include "postman/intro.md" | toJson }}

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "Hi there, I am a [postman collection](https://www.krakend.io/docs/enterprise/developer/postman/)"
folder object[]

The folder definition where you will add endpoints

name string

The name of the Postman collection you are generating.

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "KrakenD Config v1"
version string

The version you assign to this Postman collection you are generating using semantic versioning.

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "1.2.3", "0.7.9"
pattern=^[0-9].[0-9].[0-9]+$
governance/processors object

Declares rules and limits to be enforced.

1 nested properties
quotas object[] required

The list of quota processors available for attachment. You can have multiple processors with different configurations.

See: https://www.krakend.io/docs/enterprise/governance/quota/

governance/quota object

Enterprise only. Attach a quota to the endpoint, backend, or service. Needs a governance/processor namespace.

See: https://www.krakend.io/docs/enterprise/governance/quota/

7 nested properties
quota_name string required

Name of the quota you want to reuse, written exactly as declared under the processors list.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "my_quota"
tier_key string required

Header used to determine the tier. Use tier_value and tier_value_as on each tier to determine how to match the value.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "X-User-Tier", "X-User-ID"
tiers object[] required

List of tiers to match against the request. The first tier that matches will be used to determine the quota to consume.

See: https://www.krakend.io/docs/enterprise/governance/quota/

disable_quota_headers boolean

When set to true, the quota headers X-Quota-Limit, X-Quota-Remaining, and Retry-After will not be added to the response. This is useful when you want to hide the quota information from the client.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
on_unmatched_tier_allow boolean

When a tier cannot be infered from the request, whether to allow the request to continue or not. In case a request does not match any of the tiers, the request will be rejected with a 400 error unless you set this to true.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
weight_key string

Instead of incrementing the quota counter by one unit, use the value provided in a field or header with its dynamic value. For instance, an LLM can return how many tokens it consumed, and you can use that value to increment the quota counter. The value must be a parseable number, and the field or header must be present in the backend response. The weight_key is only used in the endpoint and backend scopes, and it is ignored in the service level.

See: https://www.krakend.io/docs/enterprise/governance/quota/

weight_strategy enum

Where to find the key containing the counter value to increment. Use body for any type of encoding different than no-op and header for no-op.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: "body"
Values: "body" "header"
grpc object

Enterprise only. gRPC server integration

2 nested properties
catalog string[] required

The paths to the different .pb files you want to load, or the paths to directories containing .pb files. All content is scanned in the order of the list, and after fetching all files it resolves the dependencies of their imports. The order you use here is not important to resolve imports, but it matters when there are conflicts (different files using the same namespace and package type).

See: https://www.krakend.io/docs/enterprise/grpc/server/

Examples: ["./grpc/flights.pb","./grpc/definitions","/etc/krakend/grpc"]
server object

Defines the gRPC server properties.

See: https://www.krakend.io/docs/enterprise/grpc/server/

2 nested properties
opentelemetry object

Overrides OpenTelemetry settings for the gRPC server.

services object[]

Defines one object per available gRPC service.

See: https://www.krakend.io/docs/enterprise/grpc/server/

modifier/lua-endpoint object

Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.

See: https://www.krakend.io/docs/endpoints/lua/

7 nested properties
allow_open_libs boolean

As an efficiency point the Lua component does not load the standard libraries by default. If you need to import Lua libraries (e.g, the I/O, String, etc.), then you must set this flag to true.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
live boolean

For security and efficiency, the Lua script is loaded once into memory and not reloaded even if the file contents change. Set this flag to true if you want to modify the Lua script while KrakenD is running and apply the changes live (mostly during development to avoid the snippet being cached).

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
md5 object

The md5sum is an extra security feature to make sure that once you have coded the Lua script, the MD5 of what is loaded into memory matches what you expect and has not been tampered by a malicious 3rd party. The key of the object must match exactly the filename under sources, including all the path.

See: https://www.krakend.io/docs/endpoints/lua/

Examples: {"./path/to/file1.lua":"49ae50f58e35f4821ad4550e1a4d1de0"}
post string

The Lua code that is executed after performing the request. Available when used in the backend section. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "local r = response.load(); r:headers('Set-Cookie', 'key1='.. r:data('response'));"
pre string

The Lua code that is executed before performing the request. Unlike post, it's available in all sections. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "print('Backend response, pre-logic:'); local r = request.load(); print(r:body());"
skip_next boolean

Available on the backend section only. Instead of connecting to next backend in the pipe, returns an empty response and executes the post lua function.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
sources string[]

An array with all the Lua files that will be processed. If no path is provided (e.g., myfile.lua) the file loads from the working directory.

See: https://www.krakend.io/docs/endpoints/lua/

modifier/request-body-extractor object

Enterprise only. Extracts fields from the incoming request body and promotes them to request headers or query strings.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

1 nested properties
operations object[] required

A list of extraction operations to apply. Each operation extracts a value from the request body and writes it to a header or query string parameter. Operations are evaluated in sequential order.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

modifier/response-headers object

Enterprise only. Allows you to transform response headers declaratively.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

4 nested properties
add object

The headers you want to add. Every key under add is the header name, and the values are declared in an array with all those you want to set. If the header didn't exist previously, it is created with the values you passed. If the header existed, then the new values are appended.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

Examples: {"X-Hello":["World"]}
delete string[]

The list of headers you want to delete. All headers listed will be missing in the response.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

Examples: ["X-Krakend","X-Krakend-Completed"]
minItems=1
rename object

The headers you want to rename. The key used under rename is the original header name, and the value the new header name. This operation is destructive, meaning that if you rename to a header name that already existed it will be replaced with the new header and value.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

Examples: {"Header-A":"Header-A-New-Name"}
replace object

The headers you want to replace. The key used under replace is the header name, and the value an array with all the header values you want to set. The replacement overwrites any other value that could exist in this header.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

Examples: {"Cache-Control":["no-store"],"Vary":["foo","bar","foobar"]}
plugin/http-server object
9 nested properties
name string[] required

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/extending/http-server-plugins/

Default:
[]
Examples: ["myplugin"]
geoip object

Enterprise only. The GeoIP integration allows you load Maxmind's GeoIP2 City database (payment and free versions) and enrich all KrakenD calls to your backends with geo data.

See: https://www.krakend.io/docs/enterprise/endpoints/geoip/

1 nested properties
citydb_path string required

The path in the filesystem containing the database in GeoIP2 Binary (.mmdb) format. Relative to the working dir or absolute path.

See: https://www.krakend.io/docs/enterprise/endpoints/geoip/

Examples: "path/to/GeoIP2-City.mmdb"
ip-filter object

Enterprise only. The IP filtering plugin allows you to restrict the traffic to your API gateway based on the IP address. It works in two different modes (allow or deny) where you define the list of IPs (CIDR blocks) that are authorized to use the API, or that are denied from using the API.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

4 nested properties
CIDR string[] required

The CIDR blocks (list of IPs) you want to allow or deny.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["192.168.0.0/24","172.17.2.56/32"]
allow boolean required

When true, only the matching IPs are able to access the content. When false, all matching IPs are discarded.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Default: false
client_ip_headers string[]

A custom list of all headers that might contain the real IP of the client. The first matching IP in the list will be used. Default headers are (in order of checking): X-Forwarded-For, X-Real-IP, and X-Appengine-Remote-Addr.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["X-Forwarded-For","X-Real-IP","X-Appengine-Remote-Addr"]
trusted_proxies string[]

A custom list of all the recognized machines/balancers that proxy the client to your application. This list is used to avoid spoofing when trying to get the real IP of the client.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["10.0.0.0/16"]
jwk-aggregator object

Enterprise only. The JWK aggregator plugin allows KrakenD to validate tokens issued by multiple Identity Providers.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

3 nested properties
origins string[] required

The list of all JWK URLs recognized as valid Identity Providers by the gateway.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

port integer required

The port of the local server doing the aggregation. The port is only accessible within the gateway machine using localhost, and it's never exposed to the external network. Choose any port that is free in the system.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

Examples: 9876
cache boolean

When true, it stores the response of the Identity provider for the time specified in its Cache-Control header.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

redis-ratelimit object

Enterprise only. The global rate limit functionality enables a Redis database store to centralize all KrakenD node counters. Instead of having each KrakenD node count its hits, the counters are global and stored in the database.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

6 nested properties
burst integer required

How many requests a client can make above the rate specified during a peak.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

host string required

The URL to the Redis instance that stores the counters using the format host:port.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

Examples: "redis", "redis:6379"
period string required

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
rate integer required

Number of allowed requests during the observed period.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

tokenizer enum required

One of the preselected strategies to rate-limit users.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

Values: "jwt" "ip" "url" "path" "header" "param" "cookie"
tokenizer_field string

The field used to set a custom field for the tokenizer (e.g., extracting the token from a custom header other than Authorization or using a claim from a JWT other than the jti).

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

static-filesystem object

Enterprise only. Allows you to fetch and serve static content in two different use cases. When the plugin is used as an http server handler, the static content is for your end-users, giving them CSS, JS, images, or JSON files, to name a few examples. On the other side, when the plugin is used as an http client executor, the KrakenD endpoints use static content as if it were a backend.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

3 nested properties
path string required

The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: ./assets) or absolute (e.g.: /var/www/assets).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "./static/"
prefix string required

This is the beginning (prefix) of all URLs that are resolved using this plugin. All matching URLs won't be passed to the router, meaning that they are not considered endpoints. Make sure you are not overwriting valid endpoints. When the prefix is /, then all traffic is served as static and you must declare a prefix under skip (e.g.: /api) to match endpoints.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "/media/assets"
skip string[]

An array with all the prefix URLs that despite they could match with the prefix, you don't want to treat them as static content and pass them to the router.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: ["/media/ignore/this/directory","/media/file.json"]
url-rewrite object

Enterprise only. Allows you to declare additional URLs other than the ones defined under the endpoints configuration, used as aliases of existing endpoints.

See: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/

Any of: variant, variant
2 nested properties
literal object

A map with the exact desired url and its mapping to an endpoint. If the endpoint has {placeholders} you need to write them, but the literal value {placeholders} is passed.

See: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/

Examples: {"/hi-there":"/hello","/whatsup":"/hello"}
regexp string[][]

A list of lists, containing the regular expression that defines the URL to be rewritten, and its endpoint destination. You can use the capturing groups with the syntax ${1}, ${2}, etc.

See: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/

virtualhost object

Enterprise only. The Virtual Host plugin allows you to run different configurations of KrakenD endpoints based on the host accessing the server.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

1 nested properties
hosts string[] required

All recognized virtual hosts by KrakenD must be listed here. The values declared here must match the content of the Host header when passed by the client.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

Examples: ["api-a.host.com","api-b.host.com"]
wildcard object

Enterprise only. Enables wildcard processing of requests without declaring all endpoint subresrouces.

See: https://www.krakend.io/docs/enterprise/endpoints/wildcard/

1 nested properties
endpoints object required

The key of the map is the KrakenD endpoint that receives all the wildcard traffic. The value is an array with all the user paths that match this wildcard (you don't need to declare the subresources).

See: https://www.krakend.io/docs/enterprise/endpoints/wildcard/

Examples: {"/__wildcard/foo":["/foo","/aliasfoo"]}
qos/ratelimit/service object
Any of: variant, variant
10 nested properties
capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from all users together at any given instant. When the gateway starts, the bucket is full. As requests from users come, the remaining tokens in the bucket decrease. At the same time, the max_rate refills the bucket at the desired rate until its maximum capacity is reached. The default value for the capacity is the max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as max_rate.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
cleanup_period string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
cleanup_threads integer

These are the number of routines that search for and remove outdated rate limit counters. The more routine(s) you add, the faster the memory optimization is completed, but the more CPU it will consume. Generally speaking, a single thread is more than enough because the delete operation is very fast, even with a large number of counters. This is an advanced micro-optimization setting that you should use with caution.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
client_capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from each individual user at any given instant. Works just as capacity, but instead of having one bucket for all users, keeps a counter for every connected client and endpoint, and refills from client_max_rate instead of max_rate. The client is recognized using the strategy field (an IP address, a token, a header, etc.). The default value for the client_capacity is the client_max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as client_max_rate.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
client_max_rate number

Number of tokens you add to the Token Bucket for each individual user (user quota) in the time interval you want (every). The remaining tokens in the bucket are the requests a specific user can do. It keeps a counter for every client and endpoint. Keep in mind that every KrakenD instance keeps its counters in memory for every single client.

See: https://www.krakend.io/docs/endpoints/rate-limit/

every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
key string

Available when using client_max_rate and you have set a strategy equal to header or param. It makes no sense in other contexts. For header it is the header name containing the user identification (e.g., Authorization on tokens, or X-Original-Forwarded-For for IPs). When they contain a list of space-separated IPs, it will take the IP from the client that hit the first trusted proxy. For param it is the name of the placeholder used in the endpoint, like id_user for an endpoint /user/{id_user}.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Examples: "X-Tenant", "Authorization", "id_user"
max_rate number

Sets the maximum number of requests all users can do in the given time frame. Internally uses the Token Bucket algorithm. The absence of max_rate in the configuration or a 0 is the equivalent to no limitation. You can use decimals if needed.

See: https://www.krakend.io/docs/endpoints/rate-limit/

num_shards integer

All rate limit counters are stored in memory in groups (shards). All counters in the same shard share a mutex (which controls that one counter is modified at a time), and this helps with contention. Having, for instance, 2048 shards (default) and 1M users connected concurrently (same instant) means that each user will need to coordinate writes in their counter with an average of under 500 other users (1M/2048=489). Lowering the shards might increase contention and latency but free additional memory. This is an advanced micro-optimization setting that should be used with caution.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 2048
strategy enum

Available when using client_max_rate. Sets the strategy you will use to set client counters. Choose ip when the restrictions apply to the client's IP address, or set it to header when there is a header that identifies a user uniquely. That header must be defined with the key entry.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Values: "ip" "header" "param"
qos/ratelimit/service/redis object

Enterprise only. Redis-backed service ratelimit

Any of: variant, variant, variant, variant
10 nested properties
capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from all users together at any given instant. When the gateway starts, the bucket is full. As requests from users come, the remaining tokens in the bucket decrease. At the same time, the max_rate refills the bucket at the desired rate until its maximum capacity is reached. The default value for the capacity is the max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as max_rate.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Default: 1
client_capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from each individual user at any given instant. Works just as capacity, but instead of having one bucket for all users, keeps a counter for every connected client and endpoint, and refills from client_max_rate instead of max_rate. The client is recognized using the strategy field (an IP address, a token, a header, etc.). The default value for the client_capacity is the client_max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as client_max_rate.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Default: 1
client_max_rate number

Number of tokens you add to the Token Bucket for each individual user (user quota) in the time interval you want (every). The remaining tokens in the bucket are the requests a specific user can do. It keeps a counter for every client and endpoint. Keep in mind that every KrakenD instance keeps its counters in memory for every single client.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

connection_name string

The connection pool name or cluster name that is used by this ratelimit. The value must match what you configured in the Redis Connection Pool

connection_pool string

The connection pool name that is used by this ratelimit. The value must match what you configured in the Redis Connection Pool

every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
key string

Available when using client_max_rate and you have set a strategy equal to header or param. It makes no sense in other contexts. For header it is the header name containing the user identification (e.g., Authorization on tokens, or X-Original-Forwarded-For for IPs). When they contain a list of space-separated IPs, it will take the IP from the client that hit the first trusted proxy. For param it is the name of the placeholder used in the endpoint, like id_user for an endpoint /user/{id_user}.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Examples: "X-Tenant", "Authorization", "id_user"
max_rate number

Sets the maximum number of requests all users can do in the given time frame. Internally uses the Token Bucket algorithm. The absence of max_rate in the configuration or a 0 is the equivalent to no limitation. You can use decimals if needed.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

on_failure_allow boolean

Whether you want to allow a request to continue when the Redis connection is failing or not. The default behavior blocks the request if Redis is not responding correctly

Default: false
strategy enum

Available when using client_max_rate. Sets the strategy you will use to set client counters. Choose ip when the restrictions apply to the client's IP address, or set it to header when there is a header that identifies a user uniquely. That header must be defined with the key entry.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Values: "ip" "header" "param"
qos/ratelimit/tiered object

Enterprise only. Apply ratelimit based on tier match.

2 nested properties
tier_key string required

The header name containing the tier name. The string you provide is case-insensitive. If you need to take the value from a place that is not a header (a token, an API key), you must use propagate functions in the components that convert values to internal headers.

See: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/

tiers object[] required

The list of all tier definitions and limits for each. Each item in the list is a tier object.

See: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/

redis object

Defines the Redis connection pools available to any functionality requiring Redis.

See: /docs/enterprise/throttling/global-rate-limit/

2 nested properties
clusters object[]

Defines all the clusters available to Redis functionality. The different components requiring Redis will access the pool based on its name

connection_pools object[]

Defines all the connetion pools available to Redis functionality. The different components requiring Redis will access the pool based on its name

router object

The optional router configuration allows you to set global flags that change the way KrakenD processes the requests at the router layer.

See: https://www.krakend.io/docs/service-settings/router-options/

21 nested properties
app_engine boolean

The app_engine boolean trusts headers starting with X-AppEngine... for better integration with that PaaS.

See: https://www.krakend.io/docs/service-settings/router-options/

auto_options boolean

When true, enables the autogenerated OPTIONS endpoint for all the registered paths

See: https://www.krakend.io/docs/service-settings/router-options/

decompress_gzip integer

Enterprise only. Decompresses any Gzipped content before sending it to the backend when the Content-Encoding has gzip in the first position. You can also set this value per endpoint.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: 0
disable_access_log boolean

Stops registering access requests to KrakenD in the logs. You can still have a Backend Log if needed.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
disable_gzip boolean

Enterprise only. All the output to the end user on the Enterprise Edition uses gzip when accepted by the client. Use this flag to remove gzip compression.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
disable_handle_method_not_allowed boolean

Whether to checks if another method is allowed for the current route, if the current request can not be routed. If this is the case, the request is answered with Method Not Allowed and HTTP status code 405. If no other Method is allowed, the request is a 404.

See: https://www.krakend.io/docs/service-settings/router-options/

disable_health boolean

When true you don't have any exposed health endpoint. You can still use a TCP checker or build an endpoint yourself.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
disable_path_decoding boolean

Disables automatic validation of the url params looking for url encoded ones.

See: https://www.krakend.io/docs/service-settings/router-options/

disable_redirect_fixed_path boolean

If true, the router tries to fix the current request path, if no handle is registered for it

See: https://www.krakend.io/docs/service-settings/router-options/

disable_redirect_trailing_slash boolean

Disables automatic redirection if the current route can't be matched but a handler for the path with (without) the trailing slash exists. Only works if disable_redirect_fixed_path is also set to true.

See: https://www.krakend.io/docs/service-settings/router-options/

error_body object

Sets custom error bodies for 404 and 405 errors.

See: https://www.krakend.io/docs/service-settings/router-options/

2 nested properties
404 object

Write any JSON object structure you would like to return to users when they request an endpoint not known by KrakenD. 404 Not Found errors.

405 object

Write any JSON object structure you would like to return to users

forwarded_by_client_ip boolean

When set to true, the client IP will be parsed from the default request's headers, or the custom ones (remote_ip_headers). If the IP has passed through a trusted proxy (e.g.: a proxy, load balancer, or a third party application) it will be extracted. If no IP can be fetched, it falls back to the IP obtained from the request's remote address. When declared you must configure trusted_proxies too.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
health_path string

The path where you'd like to expose the health endpoint.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: "/__health"
hide_version_header boolean

Removes the version of KrakenD used in the X-KrakenD-version headers.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
logger_skip_paths string[]

Defines the set of paths that are removed from the logging.

See: https://www.krakend.io/docs/service-settings/router-options/

max_multipart_memory integer

Sets the maxMemory param that is given to http.Request's Multipart Form method call.

See: https://www.krakend.io/docs/service-settings/router-options/

max_payload integer

Enterprise only. Limits the maximum number of bytes a user can send to the gateway. 0 means no limit. You can also set this value per endpoint.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: 0
remote_ip_headers string[]

List of headers used to obtain the client IP when forwarded_by_client_ip is set to true and the remote address is matched by at least one of the network origins of trusted_proxies.

See: https://www.krakend.io/docs/service-settings/router-options/

remove_extra_slash boolean

A parameter can be parsed from the URL even with extra slashes.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
return_error_msg boolean

When there is an error in the gateway (such as a timeout, a non-200 status code, etc.) it returns to the client the reason for the failure. The error is written in the body as is.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
trusted_proxies string[]

List of network origins (IPv4 addresses, IPv4 CIDRs, IPv6 addresses or IPv6 CIDRs) from which to trust request's headers that contain alternative client IP when forwarded_by_client_ip is true. When declared you must configure forwarded_by_client_ip set to true, and optionally remote_ip_headers.

See: https://www.krakend.io/docs/service-settings/router-options/

security/bot-detector object

The bot detector module checks incoming connections to the gateway to determine if a bot made them, helping you detect and reject bots carrying out scraping, content theft, and form spam.

See: https://www.krakend.io/docs/throttling/botdetector/

5 nested properties
allow string[]

An array with EXACT MATCHES of trusted user agents that can connect.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["MyAndroidClient/1.0","Pingdom.com_bot_version_1.1"]
cache_size integer

Size of the LRU cache that helps speed the bot detection. The size is the mumber of users agents that you want to keep in memory.

See: https://www.krakend.io/docs/throttling/botdetector/

Examples: 1000
deny string[]

An array with EXACT MATCHES of undesired bots, to reject immediately.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["facebookexternalhit/1.1"]
empty_user_agent_is_bot boolean

Whether to consider an empty user-agent a bot (and reject it) or not.

See: https://www.krakend.io/docs/throttling/botdetector/

Default: false
patterns string[]

An array with all the regular expressions that define bots. Matching bots are rejected.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["GoogleBot.*","(facebookexternalhit)/.*"]
security/cors object

When KrakenD endpoints are consumed from a browser, you might need to enable the Cross-Origin Resource Sharing (CORS) module as browsers restrict cross-origin HTTP requests initiated from scripts.

See: https://www.krakend.io/docs/service-settings/cors/

Default:
{
  "allow_methods": [
    "POST",
    "GET"
  ],
  "allow_origins": [
    "http://foobar.com"
  ],
  "max_age": "12h"
}
7 nested properties
allow_origins string[] required

An array with all the origins allowed, examples of values are https://example.com, or * (any origin).

See: https://www.krakend.io/docs/service-settings/cors/

allow_credentials boolean

When requests can include user credentials like cookies, HTTP authentication or client side SSL certificates

See: https://www.krakend.io/docs/service-settings/cors/

Default: true
allow_headers string[]
Default:
[]
allow_methods enum[]

The array of all HTTP methods accepted, in uppercase.

See: https://www.krakend.io/docs/service-settings/cors/

uniqueItems=true
debug boolean

Show debugging information in the logger, to be used only during development.

See: https://www.krakend.io/docs/service-settings/cors/

Default: true
expose_headers string[]

Headers that are safe to expose to the API of a CORS API specification-

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[]
max_age string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
security/http object

Security through HTTP headers, including HSTS, HPKP, MIME-Sniffing prevention, Clickjacking protection, and others.

See: https://www.krakend.io/docs/service-settings/security/

17 nested properties
allowed_hosts string[]

When a request hits KrakenD, it will confirm if the value of the Host HTTP header is in the list. If so, it will further process the request. If the host is not in the allowed hosts list, KrakenD will simply reject the request.

See: https://www.krakend.io/docs/service-settings/security/

Default:
[]
allowed_hosts_are_regex boolean

Treat the allowed hosts list as regular expressions.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
browser_xss_filter boolean
Default: false
content_security_policy string

The HTTP Content-Security-Policy (CSP) default-src directive serves as a fallback for the other CSP fetch directives.

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "default-src 'self';"
content_type_nosniff boolean

Enabling this feature will prevent the user's browser from interpreting files as something else than declared by the content type in the HTTP headers.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
custom_frame_options_value string

You can add an X-Frame-Options header using custom_frame_options_value with the value of DENY (default behavior) or even set your custom value.

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "ALLOW-FROM https://example.com"
force_sts_header boolean

Force a STS Header even if using plain HTTP.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
frame_deny boolean

Set to true to enable clickjacking protection, together with custom_frame_options_value.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
host_proxy_headers string[]

A set of header keys that may hold a proxied hostname value for the request.

See: https://www.krakend.io/docs/service-settings/security/

Examples: ["X-Forwarded-Hosts"]
hpkp_public_key string

HTTP Public Key Pinning (HPKP) is a security mechanism which allows HTTPS websites to resist impersonation by attackers using mis-issued or otherwise fraudulent certificates. (For example, sometimes attackers can compromise certificate authorities, and then can mis-issue certificates for a web origin.).

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "pin-sha256="base64=="; max-age=expireTime [; includeSubDomains][; report-uri="reportURI"]"
is_development boolean

This will cause the AllowedHosts, SSLRedirect, and STSSeconds/STSIncludeSubdomains options to be ignored during development. When deploying to production, be sure to set this to false.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
referrer_policy string

Allows the Referrer-Policy header with the value to be set with a custom value.

See: https://www.krakend.io/docs/service-settings/security/

Default: "same-origin"
ssl_host string

When the SSL redirect is true, the host where the request is redirected to.

See: https://www.krakend.io/docs/service-settings/security/

Default: "ssl.host.domain"
Examples: "ssl.host.domain"
ssl_proxy_headers object

Header keys with associated values that would indicate a valid https request. Useful when using Nginx, e.g: "X-Forwarded-Proto": "https"

See: https://www.krakend.io/docs/service-settings/security/

Examples: {"X-Forwarded-Proto":"https"}
ssl_redirect boolean

Redirect any request that is not using HTTPS

See: https://www.krakend.io/docs/service-settings/security/

Default: true
sts_include_subdomains boolean

Set to true when you want the includeSubdomains be appended to the Strict-Transport-Security header.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
sts_seconds integer

Enable this policy by setting the max-age of the Strict-Transport-Security header. Setting to 0 disables HSTS.

See: https://www.krakend.io/docs/service-settings/security/

Default: 0
server/static-filesystem object

Enterprise only. Allows you to fetch and serve static content by registering a static web server for a set of defined paths (the prefixes).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

4 nested properties
path string required

The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: ./assets) or absolute (e.g.: /var/www/assets).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "./static/"
prefix string required

This is the beginning (prefix) of all URLs that are resolved using this plugin. All matching URLs won't be passed to the router, meaning that they are not considered endpoints. Make sure you are not overwriting valid endpoints. When the prefix is /, then all traffic is served as static and you must declare a prefix under skip (e.g.: /api) to match endpoints.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "/media/assets"
directory_listing boolean

Whether to allow directory listings or not

Default: false
skip string[]

An array with all the prefix URLs that despite they could match with the prefix, you don't want to treat them as static content and pass them to the router.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: ["/media/ignore/this/directory","/media/file.json"]
server/virtualhost object

Enterprise only. The Virtual Host server allows you to run different configurations of KrakenD endpoints based on the host accessing the server.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

One of: variant, variant
2 nested properties
aliased_hosts object

A map of all recognized virtual hosts where the key is the alias and the value the host name, including the port if it's not 443 or 80. The values declared here must match the content of the Host header passed by the client. The alias must be an alphanumeric string.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

Examples: {"user_api":"users.svc.example.com:9000"}
1 nested properties
[a-z0-9_]+ string

The key of this map must compile with the regexp a-z0-9_ and the host name is the string that matches the value sent by the user in the Host header.

hosts string[]

All recognized virtual hosts by KrakenD must be listed here. The values declared here must match the content of the Host header when passed by the client.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

Examples: ["api-a.example.com","api-b.example.com"]
telemetry/gelf object

Send structured events in GELF format to your Graylog Cluster.

See: https://www.krakend.io/docs/logging/graylog-gelf/

2 nested properties
address string required

The address (including the port) of your Graylog cluster (or any other service that receives GELF inputs). E.g., myGraylogInstance:12201

See: https://www.krakend.io/docs/logging/graylog-gelf/

enable_tcp boolean required

Set to false (recommended) to use UDP, or true to use TCP. TCP performance is worst than UDP under heavy load.

See: https://www.krakend.io/docs/logging/graylog-gelf/

telemetry/influx object

Enables the extended logging capabilities.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

6 nested properties
address string required

The complete url of the influxdb including the port if different from defaults in http/https.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

ttl string required

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
buffer_size integer

The buffer size is a protection mechanism that allows you to temporarily store datapoints for later reporting when Influx is unavailable. If the buffer is 0, reported metrics that fail are discarded immediately. If the buffer is a positive number, KrakenD creates a buffer with the number of datapoints set. When the buffer is full because the Influx server keeps failing, newer datapoints replace older ones in the buffer.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

min=0
db string

Name of the InfluxDB database (Influx v1) or the bucket name (Influx v2).

See: https://www.krakend.io/docs/telemetry/influxdb-native/

Default: "krakend"
password string

Password to authenticate to InfluxDB. In Influx v2, you also need to add grant access with influx v1 auth.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

username string

Username to authenticate to InfluxDB.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

telemetry/logging object

Enables the extended logging capabilities.

See: https://www.krakend.io/docs/logging/

11 nested properties
level enum required

What type of reporting level do you expect from the application? The options below go from more verbose to least. Use the DEBUG level in the development stages but not in production. Some components can add extra verbosity while in DEBUG mode and send multiline content, which is not always suitable for automated log parsing.

See: https://www.krakend.io/docs/logging/

Values: "DEBUG" "INFO" "WARNING" "ERROR" "CRITICAL"
format string

Specify the format of the application logs: default, logstash, or custom. The custom format needs an additional key "custom_format".

See: https://www.krakend.io/docs/logging/

Default: "default"
Examples: "default", "logstash", "custom"
access_log_custom_format string

Enterprise only. You can write the access log pattern you would like to use. Add a newline \n at the end of the pattern. See the variables you can use.

See: https://www.krakend.io/docs/logging/

Default: ""
Examples: "%{prefix} %{time} [AccessLog] |%{statusCode}| %{latencyMs} | %{clientIP} | %{method} %{path} "
access_log_format enum

Enterprise only. Enable a formatter for the access log. You can write your own pattern using the custom value, or you can use one of the predefined ones.

See: https://www.krakend.io/docs/logging/

Default: ""
Values: "" "default" "httpdCommon" "httpdCombine" "json" "custom"
access_log_missing_key_marker string

Enterprise only. When you use a custom access log format, the variable you are trying to print could be empty. For instance, you have added in the format %{header.Authorization} but the header is missing in the request. In this case, the printed value is what you configure here. If the string is set to an empty value, a dash - is printed.

See: https://www.krakend.io/docs/logging/

Default: "-"
Examples: "%{default}", "%{httpdCommon}", "%{prefix} %{time} [AccessLog] |%{statusCode}| %{latencyMs} | %{clientIP} | %{method} %{path} "
backend object

Enables the Backend Log capabilities.

See: https://www.krakend.io/enterprise/docs/logging/

4 nested properties
custom_format string

Specify the custom format of the Backend Logs.

See: https://www.krakend.io/enterprise/docs/logging/

Default: "%{prefix}%{time} |%{statusCode}| %{latencyMs} | %{method} %{host} %{path} "
Examples: "%{time:kitchen} | (╯°□°)╯( ┻━┻ %{statusCode} | %{method} %{host} %{path} "
log_with_level enum

What type of reporting level do you want to set at the backends? The options below go from more verbose to least. Use the DEBUG level in the development stages but not in production. Some components can add extra verbosity while in DEBUG mode and send multiline content, which is not always suitable for automated log parsing.

See: https://www.krakend.io/enterprise/docs/logging/

Values: "DEBUG" "INFO" "WARNING" "ERROR" "CRITICAL"
no_value string

When the variable does not resolve to any value, the string you want to write in the log. If the string is set to an empty value, a dash - is printed.

See: https://www.krakend.io/enterprise/docs/logging/

Default: "-"
Examples: "-", "null", "no_value", "<empty>"
prefix string

Adds the defined string at the beginning of every logged line, so you can quickly filter messages with external tools later on.

See: https://www.krakend.io/enterprise/docs/logging/

Default: ""
Examples: ">>> "
custom_format string

Lets you write a custom logging pattern using variables, e.g: %{message}.

See: https://www.krakend.io/docs/logging/

prefix string

Adds the defined string at the beginning of every logged line, so you can quickly filter messages with external tools later on. It's recommended to always add a prefix [INSIDE BRACKETS] to make use of predefined dashboards.

See: https://www.krakend.io/docs/logging/

stdout boolean

Set to true to send logs to stdout.

See: https://www.krakend.io/docs/logging/

Default: false
syslog boolean

Set to true to send logs to syslog.

See: https://www.krakend.io/docs/logging/

Default: false
syslog_facility enum

When using syslog, the facility tells KrakenD where to send the messages as set by the locals of the syslog standard.

See: https://www.krakend.io/docs/logging/

Default: "local3"
Values: "local0" "local1" "local2" "local3" "local4" "local5" "local6" "local7"
telemetry/logstash object

Enables logstash when the extra_config "telemetry/logging" is also present.

See: https://www.krakend.io/docs/logging/logstash/

1 nested properties
enabled boolean required
Default: true
telemetry/metrics object

Collects extended metrics to push to InfluxDB or expose them in the /__stats/ endpoint.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

6 nested properties
backend_disabled boolean

Skip any metrics happening in the backend layer. Disabling layers saves memory consumption but reduces visibility.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: false
collection_time string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
endpoint_disabled boolean

When true do not publish the /__stats/ endpoint. Metrics won't be accessible via the endpoint but still collected (and you can send them to Influx for instance).

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: false
listen_address string

Change the listening address where the metrics endpoint is exposed.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: ":8090"
pattern=^:[0-9]+$
proxy_disabled boolean

Skip any metrics happening in the proxy layer (traffic against your backends). Disabling layers saves memory consumption but reduces visibility.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: false
router_disabled boolean

Skip any metrics happening in the router layer (activity in KrakenD endpoints). Disabling layers saves memory consumption but reduces visibility.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: false
telemetry/moesif object

The Moesif integration helps you understand and monetize API usage with a robust analytics and billing platform.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

15 nested properties
application_id string required

The Collector Application ID is used to send events, actions, users, and companies to Moesif's Collector API. Moesif provides it under the 'API Keys' section.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

user_id_headers string[] required

Defines the list of possible headers that can identify a user uniquely. When the header is Authorization, it automatically extracts the username if it contains an Authorization: Basic value with no additional configuration. If, on the other hand, you use tokens and pass an Authorization: Bearer, it will extract the user ID from the JWT claim defined under user_id_jwt_claim. If there are multiple headers in the list, all of them are tested in the given order, and the first existing header in the list is used to extract the user ID (successfully or not).

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["X-User-ID","Authorization"]
batch_size integer

Number of events you will send on every batch reporting asynchronously to Moesif. For high throughput you will need to increase this value.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: 200
debug boolean

Set to true when configuring Moesif for the first time while in development, to see the activity in the logs. Set to false in production.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: false
event_queue_size integer

Sends the number of events you can hold in-memory to send them asynchronously to Moesif. If the throughput of your API generates more events than the size of the queue, the exceeding events will be discarded and not reported.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: 1000000
identify_company object

It sets which strategy you want to use to identify the company. Identifying the company helps you efficiently govern your API. Choose the system you wish to apply (declare only one property). The claim value you access must be of type string. You can access nested structured using the dot . separator. When using dots, literals with an exact match containing the dot are checked first.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

3 nested properties
header string

The company is identified using a header. Provide the header name.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: "X-Tenant"
jwt_claim string

The company is stored in a claim inside the JWT. The claim must return a string.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: "company_id"
query_string string

The company is always passed inside a query string when calling any URL. Provide the query string name.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: "company"
log_body boolean

Send the body of all endpoints and requests to Moesif.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: true
metadata object

A free-form object that allows you to push custom metadata along with events. The custom metadata appears in Moesif under a key krakend, you can use nesting if needed.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: {"instance_id":"1234abcd","region":"us-west-1"}
request_body_masks string[]

The list of fields in the request body that you want to mask before sending them to Moesif. You can set log_body to false to prevent any body being sent.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["password","credit_card"]
request_header_masks string[]

The list of request headers that you want to mask their values before sending them to Moesif.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["Authorization"]
response_body_masks string[]

The list of fields in the response body that you want to mask before sending them to Moesif. You can set log_body to false to prevent any body being sent.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["password","credit_card"]
response_header_masks string[]

The list of response headers that you want to mask their values before sending them to Moesif.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["Cookie"]
should_skip string

Defines an expression expressed as Security Policy that avoids reporting to Moesif when the result of the evaluation is true.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: "( req_method=='GET' || req_path.startsWith('/bar/')) && hasHeader('X-Something')"
timer_wake_up_seconds integer

Specifies how often a background thread runs to send events to Moesif. Value in seconds.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: 2
user_id_jwt_claim string

When using JWT tokens, it defines which claim contains the user ID. The claim value you access must be of type string. You can access nested structured using the dot . separator. When using dots, literals with an exact match containing the dot are checked first.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: "sub"
Examples: "sub", "user.id"
telemetry/newrelic object

The New Relic integration lets you push KrakenD metrics and distributed traces to your New Relic dashboard. It uses internally the official New Relic SDK and brings its features to your APM dashboard.

See: https://www.krakend.io/docs/enterprise/telemetry/newrelic/

3 nested properties
license string required

The API key provided by New Relic to push data into your account.

See: https://www.krakend.io/docs/enterprise/telemetry/newrelic/

debug boolean

Set to true when configuring New Relic for the first time while in development, to see the activity in the logs. Set to false in production.

See: https://www.krakend.io/docs/enterprise/telemetry/newrelic/

Default: false
headers_to_pass string[]

Defines an explicit list of headers sent during the client request that will be reported to NewRelic, in addition to the default headers NewRelic sets. Setting the ["*"] value will send all headers sent by the client to NewRelic. Whether you declare this setting or not, you will usually receive from the NewRelic SDK the Accept, Content-Type, User-Agent, and Referer headers.

See: https://www.krakend.io/docs/enterprise/telemetry/newrelic/

Examples: ["*"]
telemetry/opencensus object

Enables the extended logging capabilities.

See: https://www.krakend.io/docs/telemetry/opencensus/

4 nested properties
exporters object required

The exporter(s) you would like to enable. See each exporter configuration in its own section.

9 nested properties
datadog object

Datadog is a monitoring and security platform for developers, IT operations teams and business in the cloud.

See: https://www.krakend.io/docs/telemetry/datadog/

influxdb object

Exports data to InfluxDB: A time series database designed to handle high write and query loads.

See: https://www.krakend.io/docs/telemetry/influxdb/

jaeger object

Submit spans to a Jaeger Collector (HTTP) with endpoint or to a Jaeger Agent (UDP) with agent_endpoint.

See https://www.krakend.io/docs/telemetry/jaeger/

One of: variant, variant
logger object

Opencensus can export data to the system logger as another exporter. Recommended to use telemetry/logging instead.

See: https://www.krakend.io/docs/telemetry/logger/

ocagent object

Exporting metrics, logs, and events to the OpenCensus Agent.

See: https://www.krakend.io/docs/telemetry/ocagent/

prometheus object

Prometheus is an open-source systems monitoring and alerting toolkit.

stackdriver object

Export metrics and traces to Google Cloud

xray object

AWS X-Ray is a service offered by Amazon that provides an end-to-end view of requests as they travel through your application, and shows a map of your application's underlying components.

One of: variant, variant
zipkin object

Export telemetry data to a Zipkin collector

enabled_layers object

Lets you specify what data you want to export. All layers are enabled by default unless you declare this section.

3 nested properties
backend boolean

Reports the activity between KrakenD and your services

Default: false
pipe boolean

Reports the activity at the beginning of the proxy layer. It gives a more detailed view of the internals of the pipe between end-users and KrakenD, having into account merging of different backends.

Default: false
router boolean

Reports the activity between end-users and KrakenD

Default: false
reporting_period integer

The number of seconds passing between reports. If duration is less than or equal to zero, it enables the default behavior of each exporter.

See: https://www.krakend.io/docs/telemetry/opencensus/

Default: 0
sample_rate integer

A number between 0 (no requests at all) and 100 (all requests) representing the percentage of sampled requests you want to send to the exporter. Sampling the 100% of the requests is generally discouraged when the relationship between traffic and dedicated resources is sparse.

See: https://www.krakend.io/docs/telemetry/opencensus/

Default: 0
min=0max=100
telemetry/opentelemetry object

Enables metrics and traces using OpenTelemetry.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

9 nested properties
exporters object required

The places where you will send telemetry data. You can declare multiple exporters even when they are of the same type. For instance, when you have a self-hosted Grafana and would like to migrate to its cloud version and check the double reporting during the transition. There are two families of exporters: otlp or prometheus.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

2 nested properties
otlp object[]

The list of OTLP exporters you want to use. Set at least one object to push metrics and traces to an external collector using OTLP.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

minItems=1
prometheus object[]

Set here at least the settings for one Prometheus exporter. Each exporter will start a local port that offers metrics to be pulled from KrakenD.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

minItems=1
deploy_env string

The environment you are deploying, this can be useful for deployment tracking. The string can have any value that makes sense to you to identify the running environment.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: ""
Examples: "development", "testing", "staging", "production"
histograms object

Use an histogram bucket configuration different from the defaults to define the detail of histogram metrics (decrease or increase their size). You don't need to set this attribute unless you want full control of the histogram definition.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

2 nested properties
size_buckets number[]

The size of the buckets in bytes you want to use for the histograms.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default:
[
  128,
  256,
  512,
  1024,
  4096,
  8192,
  16384,
  32768,
  65536,
  262144,
  524288,
  1048576,
  4194304,
  16777216,
  67108864
]
time_buckets number[]

The duration of buckets in seconds you want to use for the histograms.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default:
[
  0.01,
  0.02,
  0.05,
  0.075,
  0.1,
  0.125,
  0.15,
  0.175,
  0.2,
  0.25,
  0.3,
  0.35,
  0.5,
  0.75,
  1.0,
  1.5,
  2.0,
  3.5,
  5.0,
  10.0
]
layers object

A request and response flow passes through three different layers. This attribute lets you specify what data you want to export in each layer. All layers are enabled by default unless you declare this section.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

3 nested properties
backend object

Reports the activity between KrakenD and each of your backend services. This is the more granular layer.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

global object

Reports the activity between end-users and KrakenD

See: https://www.krakend.io/docs/telemetry/opentelemetry/

proxy object

Reports the activity at the beginning of the proxy layer, including spawning the required requests to multiple backends, merging, endpoint transformation and any other internals of the proxy between the request processing and the backend communication

See: https://www.krakend.io/docs/telemetry/opentelemetry/

metric_reporting_period integer

How often you want to report and flush the metrics in seconds. This setting is only used by otlp exporters.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: 30
service_name string

A friendly name identifying metrics reported by this installation. When unset, it uses the name attribute in the root level of the configuration.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

service_version string

The version you are deploying, this can be useful for deployment tracking.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

skip_paths string[]

The paths you don't want to report. Use the literal value used in the endpoint definition, including any {placeholders}. In the global layer, this attribute works only on metrics, because traces are initiated before there is an endpoint to match against. If you do not want any path skipped, just add an array with an empty string [""].

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default:
[
  "/__health",
  "/__debug/",
  "/__echo/",
  "/__stats/"
]
Examples: ["/foo/{bar}"]
trace_sample_rate number

The sample rate for traces defines the percentage of reported traces. This option is key to reduce the amount of data generated (and resource usage), while you still can debug and troubleshoot issues. For instance, a number of 0.25 will report a 25% of the traces seen in the system.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: 1
Examples: 0.25
min=0max=1
telemetry/opentelemetry-security object

Enables the security layer needed to use OpenTelemetry through the Internet, like pushing data to a SaaS provider.

See: https://www.krakend.io/docs/telemetry/opentelemetry-security/

1 nested properties
otlp object[] required

The list of OTLP exporters that require authentication. Set at least one object to push metrics and traces to an external collector using OTLP.

See: https://www.krakend.io/docs/telemetry/opentelemetry-security/

minItems=1
host string[]

The default host list for all backends if they specify none.

idle_connection_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
idle_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
listen_ip string

The IP address that KrakenD listens to in IPv4 or IPv6. An empty string, or no declaration at all means listening on all interfaces. The inclusion of :: is meant for IPv6 format only (this is not the port). Examples of valid addresses are 192.0.2.1 (IPv4), 2001:db8::68 (IPv6). The values :: and 0.0.0.0 listen to all addresses and both are valid for IPv4 and IPv6 simultaneously.

Default: "0.0.0.0"
Examples: "172.12.1.1", "::1"
max_header_bytes integer

Allows overriding the maximum size of headers sent in bytes. It does not limit the request body. When the value is zero, the default is used instead (1MB)

See: https://www.krakend.io/docs/service-settings/http-transport-settings/

Default: 1000000
max_idle_connections integer

The maximum number of idle (keep-alive) connections across all hosts. Zero means no limit.

See: https://www.krakend.io/docs/service-settings/http-transport-settings/

Default: 0
max_idle_connections_per_host integer

If non-zero, controls the maximum idle (keep-alive) connections to keep per-host. If zero, 250 is used instead.

See: https://www.krakend.io/docs/service-settings/http-transport-settings/

Default: 250
max_shutdown_wait_time string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
name string

Used in telemetry. A friendly name, title, date, version or any other short description that helps you recognize the configuration.

Default: "KrakenD configuration at MyCompany"
output_encoding enum

The encoding used to display the content to the end-user. This setting is the default for all endpoints, unless they have another output_encoding overrinding this value.

See: https://www.krakend.io/docs/endpoints/content-types/

Default: "json"
Values: "json" "fast-json" "json-collection" "xml" "negotiate" "string" "no-op"
plugin object

Enables external plugins that are copied in a specific folder

2 nested properties
pattern string required

The pattern narrows down the contents of the folder. It represents the substring that must be present in the plugin name to load.

Default: ".so"
Examples: ".so", "-production.so"
folder string required

The path in the filesystem where all the plugins you want to load are. MUST END IN SLASH. The folder can be a relative or absolute path. KrakenD Enterprise uses /opt/krakend/plugins/ for all plugins.

Default: "/opt/krakend/plugins/"
Examples: "/opt/krakend/plugins/", "./plugins/"
port integer

The TCP port where KrakenD is listening to. Recommended value is in the range 1024-65535 to run as an unpriviliged user

Default: 8080
min=0max=65535
read_header_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
read_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
response_header_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
sequential_start boolean

A sequential start registers all async agents in order, allowing you to have the starting logs in sequential order. A non-sequential start is much faster, but logs are harder to follow.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
tls object

Enabling TLS for HTTPS and HTTP/2.

See: https://www.krakend.io/docs/service-settings/tls/

Any of: object object, null null
9 nested properties
ca_certs string[]

An array with all the CA certificates you would like to load to KrakenD when using mTLS, in addition to the certificates present in the system's CA. Each certificate in the list is a relative or absolute path to the PEM file. If you have a format other than PEM, you must convert the certificate to PEM using a conversion tool. See also disable_system_ca_pool to avoid system's CA.

See: https://www.krakend.io/docs/authorization/mutual-authentication/

Default:
[]
Examples: ["ca.pem"]
cipher_suites integer[]

The list of cipher suites as defined in the documentation.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  4865,
  4866,
  4867
]
uniqueItems=true
curve_preferences enum[]

The list of all the identifiers for the curve preferences. Use 23 for CurveP256, 24 for CurveP384 or 25 for CurveP521.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  23,
  24,
  25
]
uniqueItems=true
disable_system_ca_pool boolean

Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the ca_certs list when true.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
disabled boolean

A flag to disable TLS (useful while in development).

See: https://www.krakend.io/docs/service-settings/tls/

Default: false
enable_mtls boolean

Whether to enable or not Mutual Authentication. When mTLS is enabled, all KrakenD endpoints require clients to provide a known client-side X.509 authentication certificate. KrakenD relies on the system’s CA to validate certificates.

See: https://www.krakend.io/docs/authorization/mutual-authentication/

Default: false
keys array

An array with all the key pairs you want the TLS to work with. You can support multiple and unrelated domains in a single process.

minItems=1
max_version enum

Maximum TLS version supported.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
min_version enum

Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the ciphers_list.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
use_h2c boolean

Enable the support for HTTP/2 with no TLS. This option is only advised when you have a load balancer in front of KrakenD doing SSL termination, and you have no option to enable SSL communication between the balancer and KrakenD (no internal certificates available either). Otherwise, enabling this flag is less secure and less performant.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
write_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$

Definitions

https://www.krakend.io/schema/v2.13/ai/anthropic.json object

Connect to Anthropic models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

v1 object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

5 nested properties
credentials string required

Your Anthropic API key. You can set it as an environment variable for better security.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

variables object required

The variables specific to the Anthropic usage that are used to construct the payload.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

7 nested properties
model string required

The name of the Anthropic model you want to use.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

Examples: "claude-opus-4-1-20250805", "claude-sonnet-4-20250514", "claude-3-7-sonnet-latest", "claude-3-5-haiku-latest"
extra_payload object

A map of additional payload attributes you want to use in your custom input_template (this payload is not used in the default template). The attributes set here are accessible in your custom template as {{ .variables.extra_payload.yourchosenkey }}. This option helps adding rare customization and future attributes.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

max_tokens integer

Maximum number of tokens that can be generated in the response. A token is approximately four characters. 100 tokens correspond to roughly 60-80 words.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

Default: 1024
stop_sequences string[]

An array of sequences where the model will stop generating further tokens if found. This can be useful to control the length and content of the output.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

temperature number

The temperature is used for sampling during response generation, which occurs when topP and topK are applied. Temperature controls the degree of randomness in token selection. Lower temperatures are good for prompts that require a less open-ended or creative response, while higher temperatures can lead to more diverse or creative results.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

min=0max=2
top_k integer

Top-K changes how the model selects tokens for output. A top-K of 1 means the next selected token is the most probable among all tokens in the model's vocabulary (also called greedy decoding), while a top-K of 3 means that the next token is selected from among the three most probable tokens by using temperature.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

top_p number

Top-P changes how the model selects tokens for output. Tokens are selected from the most probable to least probable until the sum of their probabilities equals the top-P value. For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 and the top-P value is 0.5, then the model will select either A or B as the next token by using temperature and excludes C as a candidate.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

debug boolean

Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

Default: false
input_template string

A path to a custom Go template that sets the payload format sent to Anthropic. You don't need to set this value unless you want to override the default template making use of all the variables listed in this configuration.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

output_template string

A path to a custom Go template that sets how the response from Anthropic is transformed before being sent to the client. The default template extracts the text from the first choice returned by Anthropic so in most cases you don't need to set a custom output template.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

https://www.krakend.io/schema/v2.13/ai/bedrock.json object

Connect to Bedrock models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

v1 object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

5 nested properties
credentials string required

Your Bedrock API key. You can set it as an environment variable for better security.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

variables object required

The variables specific to the Bedrock usage that are used to construct the payload.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

6 nested properties
extra_payload object

A map of additional payload attributes you want to use in your custom input_template (this payload is not used in the default template). The attributes set here are accessible in your custom template as {{ .variables.extra_payload.yourchosenkey }}. This option helps adding rare customization and future attributes.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

max_tokens integer

An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

stop_sequences string[]

An array of sequences where the model will stop generating further tokens if found. This can be useful to control the length and content of the output.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

temperature number

What sampling temperature to use, recommended between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Change this or top_p but not both.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

min=0max=2
top_k integer

Top-K changes how the model selects tokens for output. A top-K of 1 means the next selected token is the most probable among all tokens in the model's vocabulary (also called greedy decoding), while a top-K of 3 means that the next token is selected from among the three most probable tokens by using temperature.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

top_p number

A float value between 0 and 1 that controls the nucleus sampling for text generation. It represents the cumulative probability threshold for token selection, where only the most probable tokens that add up to this threshold are considered. A higher value (closer to 1) allows for more diverse outputs, while a lower value (closer to 0) makes the output more focused and deterministic. Change this or temperature but not both.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

debug boolean

Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

Default: false
input_template string

A path to a custom Go template that sets the payload format sent to Bedrock. You don't need to set this value unless you want to override the default template making use of all the variables listed in this configuration.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

output_template string

A path to a custom Go template that sets how the response from Bedrock is transformed before being sent to the client. The default template extracts the text from the first choice returned by Bedrock so in most cases you don't need to set a custom output template.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

https://www.krakend.io/schema/v2.13/ai/gemini.json object

Connect to Google Gemini models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

v1beta object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

5 nested properties
credentials string required

Your Google Gemini API key. You can set it as an environment variable for better security.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

debug boolean

Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

Default: false
input_template string

A path to a custom Go template that sets the payload format sent to Google Gemini. You don't need to set this value unless you want to override the default template making use of all the variables listed in this configuration.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

output_template string

A path to a custom Go template that sets how the response from Google Gemini is transformed before being sent to the client. The default template extracts the text from the first choice returned by Google Gemini so in most cases you don't need to set a custom output template.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

variables object

The variables specific to the Google Gemini usage that are used to construct the payload.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

7 nested properties
candidate_count integer

An integer value that specifies how many different completions (responses) the model should generate for a single input prompt. This can be useful for exploring multiple variations of the output.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

Default: 1
extra_payload object

A map of additional payload attributes you want to use in your custom input_template (this payload is not used in the default template). The attributes set here are accessible in your custom template as {{ .variables.extra_payload.yourchosenkey }}. This option helps adding rare customization and future attributes.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

max_output_tokens integer

Maximum number of tokens that can be generated in the response. A token is approximately four characters. 100 tokens correspond to roughly 60-80 words.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

stop_sequences string[]

An array of sequences where the model will stop generating further tokens if found. This can be useful to control the length and content of the output.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

temperature number

The temperature is used for sampling during response generation, which occurs when topP and topK are applied. Temperature controls the degree of randomness in token selection. Lower temperatures are good for prompts that require a less open-ended or creative response, while higher temperatures can lead to more diverse or creative results.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

min=0max=2
top_k integer

Top-K changes how the model selects tokens for output. A top-K of 1 means the next selected token is the most probable among all tokens in the model's vocabulary (also called greedy decoding), while a top-K of 3 means that the next token is selected from among the three most probable tokens by using temperature.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

top_p number

Top-P changes how the model selects tokens for output. Tokens are selected from the most probable to least probable until the sum of their probabilities equals the top-P value. For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 and the top-P value is 0.5, then the model will select either A or B as the next token by using temperature and excludes C as a candidate.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

https://www.krakend.io/schema/v2.13/ai/mistral.json object

Connect to Mistral models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

v1 object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

5 nested properties
credentials string required

Your Mistral API key. You can set it as an environment variable for better security.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

variables object required

The variables specific to the Mistral usage that are used to construct the payload.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

9 nested properties
model string required

The name of the Mistral model you want to use. The value you provide is passed as is to Mistral and KrakenD does not prove if the model is currently accepted by the vendor. Check the available models on Mistral documentation.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

Examples: "mistral-small-latest", "codestral-latest"
extra_payload object

A map of additional payload attributes you want to use in your custom input_template (this payload is not used in the default template). The attributes set here are accessible in your custom template as {{ .variables.extra_payload.yourchosenkey }}. This option helps adding rare customization and future attributes.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

max_tokens integer

An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

n integer

An integer value that specifies how many different completions (responses) the model should generate for a single input prompt. This can be useful for exploring multiple variations of the output.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

Default: 1
random_seed integer

An integer value to seed the random number generator used by the model. Setting a specific seed can help produce reproducible results across different requests.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

safe_prompt boolean

A boolean flag to enable or disable Mistral's safe prompt feature, which helps filter out inappropriate or harmful content from the model's responses. By default, this feature is enabled to ensure safer interactions.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

Default: false
stop string[]

An array of sequences where the model will stop generating further tokens if found. This can be useful to control the length and content of the output.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

temperature number

What sampling temperature to use, recommended between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Change this or top_p but not both.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

min=0max=2
top_p number

A float value between 0 and 1 that controls the nucleus sampling for text generation. It represents the cumulative probability threshold for token selection, where only the most probable tokens that add up to this threshold are considered. A higher value (closer to 1) allows for more diverse outputs, while a lower value (closer to 0) makes the output more focused and deterministic. Change this or temperature but not both.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

debug boolean

Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

Default: false
input_template string

A path to a custom Go template that sets the payload format sent to Mistral. You don't need to set this value unless you want to override the default template making use of all the variables listed in this configuration.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

output_template string

A path to a custom Go template that sets how the response from Mistral is transformed before being sent to the client. The default template extracts the text from the first choice returned by Mistral so in most cases you don't need to set a custom output template.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

https://www.krakend.io/schema/v2.13/ai/openai.json object

Connect to OpenAI's GPT models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

v1 object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

5 nested properties
credentials string required

Your OpenAI API key. You can set it as an environment variable for better security.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

Examples: "sk-xxxx"
variables object required

The variables specific to the OpenAI usage that are used to construct the payload.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

6 nested properties
model string required

The name of the OpenAI model you want to use. The value you provide is passed as is to OpenAI and KrakenD does not prove if the model is currently accepted by the vendor. Check the available models on OpenAI documentation.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

Examples: "gpt-5-nano", "gpt-4"
extra_payload object

A map of additional payload attributes you want to use in your custom input_template (this payload is not used in the default template). The attributes set here are accessible in your custom template as {{ .variables.extra_payload.yourchosenkey }}. This option helps adding rare customization and future attributes.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

max_output_tokens integer

An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. Setting this value to 0 does not set any limit.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

temperature number

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

min=0max=2
top_p number

The nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

min=0max=1
truncation enum

The strategy to use when truncating messages to fit within the model's context length (, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

Default: "disabled"
Values: "auto" "disabled"
debug boolean

Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

Default: false
input_template string

A path to a custom Go template that sets the payload format sent to OpenAI. You don't need to set this value unless you want to override the default template making use of all the variables listed in this configuration.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

output_template string

A path to a custom Go template that sets how the response from OpenAI is transformed before being sent to the client. The default template extracts the text from the first choice returned by OpenAI so in most cases you don't need to set a custom output template.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

https://www.krakend.io/schema/v2.13/ai/llm.json object

Ready-to-use LLM connectors available for major AI vendors.

See: https://www.krakend.io/docs/enterprise/ai-gateway/unified-llm-interface/

anthropic object

Connect to Anthropic models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

1 nested properties
v1 object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

5 nested properties
credentials string required

Your Anthropic API key. You can set it as an environment variable for better security.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

variables object required

The variables specific to the Anthropic usage that are used to construct the payload.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

debug boolean

Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

Default: false
input_template string

A path to a custom Go template that sets the payload format sent to Anthropic. You don't need to set this value unless you want to override the default template making use of all the variables listed in this configuration.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

output_template string

A path to a custom Go template that sets how the response from Anthropic is transformed before being sent to the client. The default template extracts the text from the first choice returned by Anthropic so in most cases you don't need to set a custom output template.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

gemini object

Connect to Google Gemini models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

1 nested properties
v1beta object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

5 nested properties
credentials string required

Your Google Gemini API key. You can set it as an environment variable for better security.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

debug boolean

Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

Default: false
input_template string

A path to a custom Go template that sets the payload format sent to Google Gemini. You don't need to set this value unless you want to override the default template making use of all the variables listed in this configuration.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

output_template string

A path to a custom Go template that sets how the response from Google Gemini is transformed before being sent to the client. The default template extracts the text from the first choice returned by Google Gemini so in most cases you don't need to set a custom output template.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

variables object

The variables specific to the Google Gemini usage that are used to construct the payload.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

mistral object

Connect to Mistral models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

1 nested properties
v1 object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

5 nested properties
credentials string required

Your Mistral API key. You can set it as an environment variable for better security.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

variables object required

The variables specific to the Mistral usage that are used to construct the payload.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

debug boolean

Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

Default: false
input_template string

A path to a custom Go template that sets the payload format sent to Mistral. You don't need to set this value unless you want to override the default template making use of all the variables listed in this configuration.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

output_template string

A path to a custom Go template that sets how the response from Mistral is transformed before being sent to the client. The default template extracts the text from the first choice returned by Mistral so in most cases you don't need to set a custom output template.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

openai object

Connect to OpenAI's GPT models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

1 nested properties
v1 object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

5 nested properties
credentials string required

Your OpenAI API key. You can set it as an environment variable for better security.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

Examples: "sk-xxxx"
variables object required

The variables specific to the OpenAI usage that are used to construct the payload.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

debug boolean

Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

Default: false
input_template string

A path to a custom Go template that sets the payload format sent to OpenAI. You don't need to set this value unless you want to override the default template making use of all the variables listed in this configuration.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

output_template string

A path to a custom Go template that sets how the response from OpenAI is transformed before being sent to the client. The default template extracts the text from the first choice returned by OpenAI so in most cases you don't need to set a custom output template.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

bedrock object

Connect to Bedrock models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

1 nested properties
v1 object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

5 nested properties
credentials string required

Your Bedrock API key. You can set it as an environment variable for better security.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

variables object required

The variables specific to the Bedrock usage that are used to construct the payload.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

debug boolean

Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

Default: false
input_template string

A path to a custom Go template that sets the payload format sent to Bedrock. You don't need to set this value unless you want to override the default template making use of all the variables listed in this configuration.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

output_template string

A path to a custom Go template that sets how the response from Bedrock is transformed before being sent to the client. The default template extracts the text from the first choice returned by Bedrock so in most cases you don't need to set a custom output template.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

https://www.krakend.io/schema/v2.13/auth/aws-sigv4.json object

Enterprise only. Enables AWS Sigv4 authentication between KrakenD and Google Cloud service account.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

region string required

The AWS region where the service is deployed.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Examples: "us-east-1"
service string required

The name of the service in AWS you'd like to sign the request.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Examples: "dynamodb"
assume_role_arn string

The Amazon Resource Name (ARN) of the role to assume.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Examples: "arn:aws:sts::{account ID}:assumed-role/{resource}"
debug boolean

Enables debug logging for AWS Sigv4 signing process.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Default: false
sts_region string

The AWS region where the STS service is deployed.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Examples: "us-west-1"
https://www.krakend.io/schema/v2.13/auth/client-credentials.json object

2-legged OAuth2 flow: Request to your authorization server an access token to reach protected resources.

See: https://www.krakend.io/docs/authorization/client-credentials/

client_id string required

The Client ID provided to the Auth server

See: https://www.krakend.io/docs/authorization/client-credentials/

client_secret string required

The secret string provided to the Auth server.

See: https://www.krakend.io/docs/authorization/client-credentials/

Examples: "mys3cr3t"
token_url string required

The endpoint URL where the negotiation of the token happens

See: https://www.krakend.io/docs/authorization/client-credentials/

Examples: "https://your.custom.identity.service.tld/token_endpoint"
endpoint_params object

Any additional parameters you want to include in the payload when requesting the token. For instance, adding the audience request parameter may denote the target API for which the token should be issued.

See: https://www.krakend.io/docs/authorization/client-credentials/

Examples: {"audience":["YOUR-AUDIENCE"]}
scopes string

A comma-separated list of scopes needed, e.g.: scopeA,scopeB

See: https://www.krakend.io/docs/authorization/client-credentials/

Examples: "scopeA,scopeB"
https://www.krakend.io/schema/v2.13/auth/gcp.json object

Enterprise only. Enables GCP authentication between KrakenD and Google Cloud service account.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

audience string

The audience in GCP looks like an URL, and contains the destination service you will ask a token for. Most of the times this URL will match exactly with the host entry.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Examples: "https://gcptest-76fewi6rca-uc.a.run.app"
credentials_file string

The relative or absolute path to a credentials file in JSON format that contains all the credentials to authenticate API calls to the given service account.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Examples: "/etc/krakend/gcp.json"
credentials_json object

An inline JSON object containing all the credentials fields to authenticate to GCP.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Examples: {"type":"service_account","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"[email protected]","client_id":"123","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/xyz%40developer.gserviceaccount.com","private_key":"-----BEGIN PRIVATE KEY-----\nSOME_KEY\n-----END PRIVATE KEY-----\n","private_key_id":"private_key_id","project_id":"project_id","token_uri":"https://accounts.google.com/o/oauth2/token"}
custom_claims object

Custom private claims that you can optionally add to an ID token.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

s2s_auth_header string

The header name to use in service-to-service authentication. This is useful to honor the original Authorization header in case it's needed by the backend (for example, CloudRun).

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Default: ""
Examples: "X-Serverless-Authorization"
https://www.krakend.io/schema/v2.13/auth/ntlm.json object

Enterprise only. Enables NTLM authentication between KrakenD and a Microsoft server such as Dynamics.

See: https://www.krakend.io/docs/enterprise/authentication/ntlm/

password string required

The password you will use, in clear text.

See: https://www.krakend.io/docs/enterprise/authentication/ntlm/

Examples: "myp4ssw0rd"
user string required

The username you will send as NTLM authentication user.

See: https://www.krakend.io/docs/enterprise/authentication/ntlm/

Examples: "krakendclient"
https://www.krakend.io/schema/v2.13/backend/amqp/consumer.json object

The AMQP component allows to send and receive messages to and from a queue through the API Gateway.

See: https://www.krakend.io/docs/backends/amqp-consumer/

exchange string required

The exchange name (must have a topic type if already exists).

See: https://www.krakend.io/docs/backends/amqp-consumer/

Examples: "some-exchange"
name string required
routing_key string[] required

The list of routing keys you will use to consume messages.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Examples: ["#"]
auto_ack boolean

When KrakenD retrieves the messages, regardless of the success or failure of the operation, it marks them as ACKnowledge.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
backoff_strategy enum

When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the max_retries. The backoff strategy defines the delay in seconds in between consecutive failed retries. Check the meaning of each strategy.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: "fallback"
Values: "linear" "linear-jitter" "exponential" "exponential-jitter" "fallback"
delete boolean

When true, AMQP deletes the queue when there are no remaining connections. This option is not recommended in most of the scenarios. If for instance, the connectivity between KrakenD and AMQP is lost for whatever reason and it's the only client, AMQP will delete the queue no matter the number of messages there are inside, and when KrakenD gets the connection again the queue won't exist and future connections will recreate it again.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
durable boolean

Durable queues will survive server restarts and remain when there are no remaining consumers or bindings. true is recommended, but depends on the use case.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
exclusive boolean

When true, AMQP will allow a single KrakenD instance to access the queue. This option is not recommended in environments where the gateway needs high availability and you have several instances running.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
max_retries integer

The maximum number of times you will allow KrakenD to retry reconnecting to a broken messaging system. During startup KrakenD will wait for a maximum of 3 retries before starting to use this policy. Use 0 for unlimited retries.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: 0
nack_discard boolean

When true, messages that cannot be processed are discarded instead of being sent back to the queue. This is useful for scenarios where you want to avoid reprocessing failed messages.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
no_local boolean

The no_local flag is not supported by RabbitMQ.

See: https://www.krakend.io/docs/backends/amqp-consumer/

no_wait boolean

When true, do not wait for the server to confirm the request and immediately begin deliveries. If it is not possible to consume, a channel exception will be raised and the channel will be closed.

See: https://www.krakend.io/docs/backends/amqp-consumer/

prefetch_count integer

The number of messages you want to prefetch prior to consume them.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: 0
https://www.krakend.io/schema/v2.13/backend/amqp/producer.json object

Send messages to a queue through the API Gateway.

See: https://www.krakend.io/docs/backends/amqp-producer/

exchange string required

The exchange name (must have a topic type if already exists).

See: https://www.krakend.io/docs/backends/amqp-producer/

Examples: "some-exchange"
name string required
routing_key string required

The routing key you will use to send messages, case sensitive.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: "#"
backoff_strategy enum

When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the max_retries. The backoff strategy defines the delay in seconds in between consecutive failed retries. Check the meaning of each strategy.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: "fallback"
Values: "linear" "linear-jitter" "exponential" "exponential-jitter" "fallback"
delete boolean

When true, AMQP deletes the queue when there are no remaining connections. This option is not recommended in most of the scenarios. If for instance, the connectivity between KrakenD and AMQP is lost for whatever reason and it's the only client, AMQP will delete the queue no matter the number of messages there are inside, and when KrakenD gets the connection again the queue won't exist and future connections will recreate it again.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
durable boolean

true is recommended, but depends on the use case. Durable queues will survive server restarts and remain when there are no remaining consumers or bindings.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
exclusive boolean

When true, AMQP will allow a single KrakenD instance to access the queue. This option is not recommended in environments where the gateway needs high availability and you have several instances running.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
exp_key string

Take a parameter from a {placeholder} in the endpoint definition to use as the expiration key. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as {id}, you must write Id.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: ""
immediate boolean

A consumer must be connected to the queue when true.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
mandatory boolean

The exchange must have at least one queue bound when true.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
max_retries integer

The maximum number of times you will allow KrakenD to retry reconnecting to a broken messaging system. During startup KrakenD will wait for a maximum of 3 retries before starting to use this policy. Use 0 for unlimited retries.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: 0
msg_id_key string

Take a parameter from a {placeholder} in the endpoint definition to use as the message identifier. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as {id}, you must write Id.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: ""
no_local boolean

The no_local flag is not supported by RabbitMQ.

See: https://www.krakend.io/docs/backends/amqp-consumer/

no_wait boolean

When true, do not wait for the server to confirm the request and immediately begin deliveries. If it is not possible to consume, a channel exception will be raised and the channel will be closed.

See: https://www.krakend.io/docs/backends/amqp-producer/

priority_key string

Take a parameter from a {placeholder} in the endpoint definition to use as the reply key. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as {id}, you must write Id.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: ""
reply_to_key string

Take a parameter from a {placeholder} in the endpoint definition to use as the reply key. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as {id}, you must write Id.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: ""
static_routing_key boolean

Defines whether the routing_key will have a static value or not, instead of taking the value from a parameter.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
https://www.krakend.io/schema/v2.13/backend/conditional.json object

Evaluates a rule to determine if the backend is callable or not, and skip to the next one in case it's not.

See: https://www.krakend.io/docs/enterprise/backends/conditional/

strategy enum required

Choose header when you want to check the value of a specific header, policy when you want to write a more complex logical expression, or fallback when the backend will execute when all the rest of conditional backends have failed to evaluate to true. Only one fallback can be defined per endpoint.

See: https://www.krakend.io/docs/enterprise/backends/conditional/

Values: "header" "policy" "fallback"
name string

Only used with the header strategy. It is the name of the header you want to use for the evaluation in the canonical format of the MIME header. Make sure to declare the header in the input_headers list of the endpoint.

See: https://www.krakend.io/docs/enterprise/backends/conditional/

Examples: "X-Test"
value string

The value according to the strategy. With the header strategy, this is the literal value contained in the header (case sensitive). With the policy strategy, the Security Policy expression. When using policies you can access to the variables req and req_params (a previous backend response might be in the latter), and to advanced macros. Access to headers require you to add the corresponding input_headers in the endpoint.

See: https://www.krakend.io/docs/enterprise/backends/conditional/

Examples: "TestA", "hasHeader('X-Test') && req_params.Resp0_message == '0 items left'"
https://www.krakend.io/schema/v2.13/backend/graphql.json object

Convert REST endpoints to GraphQL calls (adapter/transformer)

type enum

The type of query you are declaring, query (read), or mutation (write).

See: https://www.krakend.io/docs/backends/graphql/

Values: "query" "mutation"
operationName string

A meaningful and explicit name for your operation, required in multi-operation documents and for helpful debugging and server-side logging.

See: https://www.krakend.io/docs/backends/graphql/

Examples: "addMktPreferencesForUser"
query string

An inline GraphQL query you want to send to the server. Use this attribute for simple and inline queries, use query_path instead for larger queries. Use escaping when needed.

See: https://www.krakend.io/docs/backends/graphql/

Examples: "{ find_follower(func: uid("0x3")) { name } }"
query_path string

Path to the file containing the query. This file is loaded during startup and never checked again, if it changes KrakenD will be unaware of it.

See: https://www.krakend.io/docs/backends/graphql/

Examples: "./graphql/mutations/marketing.graphql"
variables object

A dictionary defining all the variables sent to the GraphQL server. You can use {placeholders} to inject parameters from the endpoint URL.

See: https://www.krakend.io/docs/backends/graphql/

https://www.krakend.io/schema/v2.13/client_tls.json object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

allow_insecure_connections boolean

By default, KrakenD verifies every SSL connection. This option allows you to connect to backends considered insecure, for instance when you are using self-signed certificates

Default: false
ca_certs array

An array with all the CA certificates you would like to validate the server you are connecting to.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[]
Examples: ["ca.pem"]
cipher_suites array

The list of cipher suites as defined in the documentation.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  4865,
  4866,
  4867
]
uniqueItems=true
client_certs object[]

The list of all client certificates available when fetching data from the upstream service.

See: https://www.krakend.io/docs/service-settings/tls/

curve_preferences enum[]

The list of all the identifiers for the curve preferences. Use 23 for CurveP256, 24 for CurveP384 or 25 for CurveP521.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  23,
  24,
  25
]
uniqueItems=true
disable_system_ca_pool boolean

Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the ca_certs list when true.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
max_version enum

Maximum TLS version supported.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
min_version enum

Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the ciphers_list.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
https://www.krakend.io/schema/v2.13/timeunits.json
https://www.krakend.io/schema/v2.13/backend/grpc.json object

Enterprise only. Handles the communication with a backend using gRPC, after having defined the protocol buffer definitions.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

8 nested properties
allow_insecure_connections boolean

By default, KrakenD verifies every SSL connection. This option allows you to connect to backends considered insecure, for instance when you are using self-signed certificates

Default: false
ca_certs array

An array with all the CA certificates you would like to validate the server you are connecting to.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[]
Examples: ["ca.pem"]
cipher_suites array

The list of cipher suites as defined in the documentation.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  4865,
  4866,
  4867
]
uniqueItems=true
client_certs object[]

The list of all client certificates available when fetching data from the upstream service.

See: https://www.krakend.io/docs/service-settings/tls/

curve_preferences enum[]

The list of all the identifiers for the curve preferences. Use 23 for CurveP256, 24 for CurveP384 or 25 for CurveP521.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  23,
  24,
  25
]
uniqueItems=true
disable_system_ca_pool boolean

Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the ca_certs list when true.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
max_version enum

Maximum TLS version supported.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
min_version enum

Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the ciphers_list.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
disable_query_params boolean

When true, it does not use URL parameters ({placeholders} in endpoints) or query strings to fill the gRPC payload to send. If use_request_body is not set, or set to false, and this option is set to true, there will be no input used for the gRPC message to send. That is still a valid option, when we just want to send the message with its default values, or when the input for the gRPC calls is just the empty message.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
header_mapping object

A dictionary that rename the received header (key) to a new header name (value). If the header starts with grpc they will be renamed to in-grpc-* as the word is reserved.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Examples: {"X-Tenant":"customerid"}
idle_conn_disconnect_time string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
input_assume_bytes

When set to true, when the backend has to fill a bytes field for a grpc protobuf payload to send, first tries to decode the input data (the one coming from either a json body field, a query param or header string) from base64: if it succeeds it fills the field to send with that binary / bytes data. If the incoming field is not a valid base64 decoded field (the one used in jsonpb), it will fill the binary field with the verbatim conversion of the incoming string to bytes.

Default: false
input_mapping object

A dictionary that converts query string parameters and parameters from {placeholders} into a different field during the backend request. When passing parameters using {placeholder} the parameter capitalizes the first letter, so you receive Placeholder.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Examples: {"lat":"where.latitude","lon":"where.longitude"}
max_call_recv_msg_size number

Specifies the maximum size (in bytes) for messages the grpc client is allowed to receive. If the value is unset, or 0, it uses its default (4MB)

Examples: 33554432, 4194304, 0
output_duration_as_string boolean

Well-known Duration types (google.protobuf.Duration) are returned as a struct containing fields with seconds and nanos fields (flag set to false). Setting this flag to true transforms the timestamps into a string representation in seconds.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
output_enum_as_string boolean

Enum types are returned as numeric values (flag set to false). Set this flag to true to return the string representation of the enum value. For instance, an enum representing allergies, such as ['NUTS', 'MILK', ' SOY', 'WHEAT'] would return a value SOY when this flag is true, or 2 when false.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
output_remove_unset_values boolean

This attribute defines what to do when a field that is declared in the definition does not exist in the backend response. When the flag is true, any fields in the definition that are not present in the backend response are removed before returning the content to the user. When the flag is false missing fields are returned but set with a zeroed-value depending on its type (zero, nil, false, etc).

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
output_timestamp_as_string boolean

Well-known Timestamp types (google.protobuf.Timestamp) are returned as a struct containing fields with seconds and nanos fields (flag set to false). Setting this flag to true transforms the timestamps into a string representation in RFC3999 format.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
read_buffer_size number

Specifies the size of the client buffer reading the gRPC communication in bytes. If the value is unset, or 0, it uses its default (32KB). Use a negative value to disable the buffer, and if you do there won't be memory pre-allocation to read. To determine the right number, calculate the average size of the responses the gRPC client will receive.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Examples: 32768, 8192, -1
request_naming_convention enum

Defines the naming convention used to format the request. Applies to query strings and JSON field names. By default, the gateway uses snake_case which makes use of the standard encoding/json package, while when you choose camelCase the protobuf/encoding deserialization is used instead.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: "snake_case"
Values: "camelCase" "snake_case"
response_naming_convention enum

Defines the naming convention used to format the returned data. By default, the gateway uses snake_case which makes use of the standard encoding/json package, while when you choose camelCase the protobuf/encoding deserialization is used instead.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: "snake_case"
Values: "camelCase" "snake_case"
use_alternate_host_on_error boolean

When true, before sending a message to a host, it checks if the connection status is in a "transient failure" or "failure" state and tries to use a different host (from the service discovery or randomly from the list of hosts). If the connection is in a valid state, but an error happens when sending the gRPC message, it also tries to use a different host to retry sending the message. Depending on the host list, the retry attempts may go to the same host initially in a "bad state".

See: https://www.krakend.io/docs/enterprise/backends/grpc/

use_request_body boolean

Enables the use of the sent body to fill the gRPC request. Take into account that when you set this flag to true a body is expected, and this body is consumed in the first backend. If the endpoint that uses this gRPC backend has additional backends (either gRPC or HTTP) that also expect to consume the payload, these requests might fail.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
https://www.krakend.io/schema/v2.13/backend/http_client.json object

Enterprise only. Allows you to set the different HTTP client options with the backend, like TLS, no redirect or connect via a proxy.

See: https://www.krakend.io/docs/enterprise/backends/http-client/

client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

8 nested properties
allow_insecure_connections boolean

By default, KrakenD verifies every SSL connection. This option allows you to connect to backends considered insecure, for instance when you are using self-signed certificates

Default: false
ca_certs array

An array with all the CA certificates you would like to validate the server you are connecting to.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[]
Examples: ["ca.pem"]
cipher_suites array

The list of cipher suites as defined in the documentation.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  4865,
  4866,
  4867
]
uniqueItems=true
client_certs object[]

The list of all client certificates available when fetching data from the upstream service.

See: https://www.krakend.io/docs/service-settings/tls/

curve_preferences enum[]

The list of all the identifiers for the curve preferences. Use 23 for CurveP256, 24 for CurveP384 or 25 for CurveP521.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  23,
  24,
  25
]
uniqueItems=true
disable_system_ca_pool boolean

Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the ca_certs list when true.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
max_version enum

Maximum TLS version supported.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
min_version enum

Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the ciphers_list.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
no_redirect boolean

Set no_redirect to true if you don't want KrakenD to follow redirects and let the consuming user to receive the 30x status code.

See: https://www.krakend.io/docs/enterprise/backends/http-client/

Default: false
proxy_address

The proxy address used to forward the traffic. The address must contain the protocol and the port.

See: https://www.krakend.io/docs/enterprise/backends/http-client/

Examples: "http://proxy.corp:9099"
send_body_on_redirect boolean

Post the original body to the final URL after a 307 or a 308 redirection.

See: https://www.krakend.io/docs/enterprise/backends/http-client/

Default: false
https://www.krakend.io/schema/v2.13/backend/lambda.json object

Invoke Amazon Lambda functions on a KrakenD endpoint call.

See: https://www.krakend.io/docs/backends/lambda/

endpoint string

An optional parameter to customize the Lambda endpoint to call. Useful when Localstack is used for testing instead of direct AWS usage.

See: https://www.krakend.io/docs/backends/

function_name string

Name of the lambda function as saved in the AWS service. You have to choose between function_name and function_param_name but not both.

See: https://www.krakend.io/docs/backends/

function_param_name string

The endpoint {placeholder} that sets the function name, with the first letter uppercased. You have to choose between function_name and function_param_name but not both. If your endpoint defines the route /foo/{bar} the value of function_param_name must be Bar with the uppercased B.

See: https://www.krakend.io/docs/backends/

max_retries integer

Maximum times you want to execute the function until you have a successful response. The value -1 defers the max retry setting to the service specific configuration.

See: https://www.krakend.io/docs/backends/

Default: 0
region string

The AWS identifier region

See: https://www.krakend.io/docs/backends/

Examples: "us-east-1", "eu-west-2"
https://www.krakend.io/schema/v2.13/backend/pubsub/publisher.json object

Publishes to a topic using the desired driver.

See: https://www.krakend.io/docs/backends/pubsub/

topic_url string required

Topic URL according to the selected driver

See: https://www.krakend.io/docs/backends/pubsub/

https://www.krakend.io/schema/v2.13/messaging/kafka/sasl.json object

Enterprise only. SASL base authentication with broker: there are multiple SASL authentication methods but the current implementation is limited to plaintext (SASL/PLAIN) authentication

mechanism enum

Name of the enabled SASL mechanism

Default: "PLAIN"
Values: "PLAIN" "OAUTHBEARER"
azure_event_hub boolean

Kafka > 1.x should use SASL V1, except on Azure EventHub which uses V0

Default: false
disable_hanshake boolean

Whether or not to send the Kafka SASL handshake first if enabled. You should only set this to false if you're using a non-Kafka SASL proxy

Default: true
auth_identity string

Auth Identity is an (optional) authorization identity (authzid) to use for SASL/PLAIN authentication (if different from User) when an authenticated user is permitted to act as the presented alternative user. See RFC4616 for details

user string

Authentication identity (authcid) to present for SASL/PLAIN or SASL/SCRAM authentication

password string

Password for SASL/PLAIN authentication

scram_auth_id string

Authz id used for SASL/SCRAM authentication

https://www.krakend.io/schema/v2.13/messaging/kafka/cluster.json object

Enterprise only. Defines how to connect to a Kafka cluster

brokers string[] required
client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

8 nested properties
allow_insecure_connections boolean

By default, KrakenD verifies every SSL connection. This option allows you to connect to backends considered insecure, for instance when you are using self-signed certificates

Default: false
ca_certs array

An array with all the CA certificates you would like to validate the server you are connecting to.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[]
Examples: ["ca.pem"]
cipher_suites array

The list of cipher suites as defined in the documentation.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  4865,
  4866,
  4867
]
uniqueItems=true
client_certs object[]

The list of all client certificates available when fetching data from the upstream service.

See: https://www.krakend.io/docs/service-settings/tls/

curve_preferences enum[]

The list of all the identifiers for the curve preferences. Use 23 for CurveP256, 24 for CurveP384 or 25 for CurveP521.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  23,
  24,
  25
]
uniqueItems=true
disable_system_ca_pool boolean

Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the ca_certs list when true.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
max_version enum

Maximum TLS version supported.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
min_version enum

Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the ciphers_list.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
sasl object

Enterprise only. SASL base authentication with broker: there are multiple SASL authentication methods but the current implementation is limited to plaintext (SASL/PLAIN) authentication

7 nested properties
mechanism enum

Name of the enabled SASL mechanism

Default: "PLAIN"
Values: "PLAIN" "OAUTHBEARER"
azure_event_hub boolean

Kafka > 1.x should use SASL V1, except on Azure EventHub which uses V0

Default: false
disable_hanshake boolean

Whether or not to send the Kafka SASL handshake first if enabled. You should only set this to false if you're using a non-Kafka SASL proxy

Default: true
auth_identity string

Auth Identity is an (optional) authorization identity (authzid) to use for SASL/PLAIN authentication (if different from User) when an authenticated user is permitted to act as the presented alternative user. See RFC4616 for details

user string

Authentication identity (authcid) to present for SASL/PLAIN or SASL/SCRAM authentication

password string

Password for SASL/PLAIN authentication

scram_auth_id string

Authz id used for SASL/SCRAM authentication

dial_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
read_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
write_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
keep_alive string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
client_id string

A name to give to the client stablishing the connection

Default: "KrakenD v[X].[Y].[Z]"
rack_id string

A name to identify the rack we are connecting from

Default: ""
channel_buffer_size number

The number of events to buffer in internal and external channels. This permits the producer and consumer to continue processing some messages in the background while user code is working, greatly improving throughput

Default: 256
min=0
metadata_retry_backoff string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
metadata_retry_max number

When a disconnection happens, the client needs to refresh its metadata to know the current state of the kafka cluster (effectively the number of attempts to reconnect)

Default: 3
min=0
https://www.krakend.io/schema/v2.13/messaging/kafka/producer.json object

Enterprise only. Defines details about how to write messages to a Kafka cluster

max_message_bytes number

Maximum permitted size of a message. Should be set equal to or smaller than the broker's message.max.bytes.

min=0
required_acks string

Level of acknowledgement reliability needed from the broker. Equivalent to the request.required.acks setting of the JVM producer. Can be a positibe number (as a string), or one of hte following values: no_response (no required acks), wait_for_local (waits for only the local commit to succeed before responding), wait_for_all (waits for all in-sync replicas to commit before responding).

Default: "wait_for_local"
required_acks_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
compression_codec enum

Type of compression to use on messages (defaults to no compression). Similar to compression.codec setting of the JVM producer.

Default: "none"
Values: "none" "gzip" "snappy" "lz4" "zstd"
compression_level string

Level of compression to use on messages. The meaning depends on the actual compression type used and defaults to default compression level for the codec.

partitioner enum

Select behaviour for choosing the partition to send messages (similar to the partitioner.class setting for the JVM producer). The options are:

  • sarama: DEPRECATED uses a Partitioner which behaves as follows: If the message's key is nil then a random partition is chosen. Otherwise the FNV-1a hash of the encoded bytes of the message key is used, modulus the number of partitions. This ensures that messages with the same key always end up on the same partition.
  • standard is like sarama except that it handles absolute values in the same way as the reference Java implementation. sarama was supposed to do that but it had a mistake and now there are people depending on both behaviours. This will all go away on the next major version bump.
  • random uses a Partitioner which chooses a random partition each time.
  • roundrobin uses a Partitioner which walks through the available partitions one at a time.
Default: "standard"
Values: "sarama" "standard" "random" "roundrobin"
idempotent boolean

If enabled, the producer will ensure that exactly one copy of each message is written

Default: false
retry_max number

The total number of times to retry sending a message. Similar to the message.send.max.retries setting of the JVM producer.

Default: 3
min=0
retry_backoff string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
https://www.krakend.io/schema/v2.13/messaging/kafka/writer.json object

Enterprise only. Defines how to write messages to a Kafka cluster

cluster object required

Enterprise only. Defines how to connect to a Kafka cluster

12 nested properties
brokers string[] required
client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

8 nested properties
allow_insecure_connections boolean

By default, KrakenD verifies every SSL connection. This option allows you to connect to backends considered insecure, for instance when you are using self-signed certificates

Default: false
ca_certs array

An array with all the CA certificates you would like to validate the server you are connecting to.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[]
Examples: ["ca.pem"]
cipher_suites array

The list of cipher suites as defined in the documentation.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  4865,
  4866,
  4867
]
uniqueItems=true
client_certs object[]

The list of all client certificates available when fetching data from the upstream service.

See: https://www.krakend.io/docs/service-settings/tls/

curve_preferences enum[]

The list of all the identifiers for the curve preferences. Use 23 for CurveP256, 24 for CurveP384 or 25 for CurveP521.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  23,
  24,
  25
]
uniqueItems=true
disable_system_ca_pool boolean

Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the ca_certs list when true.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
max_version enum

Maximum TLS version supported.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
min_version enum

Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the ciphers_list.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
sasl object

Enterprise only. SASL base authentication with broker: there are multiple SASL authentication methods but the current implementation is limited to plaintext (SASL/PLAIN) authentication

7 nested properties
mechanism enum

Name of the enabled SASL mechanism

Default: "PLAIN"
Values: "PLAIN" "OAUTHBEARER"
azure_event_hub boolean

Kafka > 1.x should use SASL V1, except on Azure EventHub which uses V0

Default: false
disable_hanshake boolean

Whether or not to send the Kafka SASL handshake first if enabled. You should only set this to false if you're using a non-Kafka SASL proxy

Default: true
auth_identity string

Auth Identity is an (optional) authorization identity (authzid) to use for SASL/PLAIN authentication (if different from User) when an authenticated user is permitted to act as the presented alternative user. See RFC4616 for details

user string

Authentication identity (authcid) to present for SASL/PLAIN or SASL/SCRAM authentication

password string

Password for SASL/PLAIN authentication

scram_auth_id string

Authz id used for SASL/SCRAM authentication

dial_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
read_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
write_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
keep_alive string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
client_id string

A name to give to the client stablishing the connection

Default: "KrakenD v[X].[Y].[Z]"
rack_id string

A name to identify the rack we are connecting from

Default: ""
channel_buffer_size number

The number of events to buffer in internal and external channels. This permits the producer and consumer to continue processing some messages in the background while user code is working, greatly improving throughput

Default: 256
min=0
metadata_retry_backoff string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
metadata_retry_max number

When a disconnection happens, the client needs to refresh its metadata to know the current state of the kafka cluster (effectively the number of attempts to reconnect)

Default: 3
min=0
topic string required

Topic to write to

producer object

Enterprise only. Defines details about how to write messages to a Kafka cluster

9 nested properties
max_message_bytes number

Maximum permitted size of a message. Should be set equal to or smaller than the broker's message.max.bytes.

min=0
required_acks string

Level of acknowledgement reliability needed from the broker. Equivalent to the request.required.acks setting of the JVM producer. Can be a positibe number (as a string), or one of hte following values: no_response (no required acks), wait_for_local (waits for only the local commit to succeed before responding), wait_for_all (waits for all in-sync replicas to commit before responding).

Default: "wait_for_local"
required_acks_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
compression_codec enum

Type of compression to use on messages (defaults to no compression). Similar to compression.codec setting of the JVM producer.

Default: "none"
Values: "none" "gzip" "snappy" "lz4" "zstd"
compression_level string

Level of compression to use on messages. The meaning depends on the actual compression type used and defaults to default compression level for the codec.

partitioner enum

Select behaviour for choosing the partition to send messages (similar to the partitioner.class setting for the JVM producer). The options are:

  • sarama: DEPRECATED uses a Partitioner which behaves as follows: If the message's key is nil then a random partition is chosen. Otherwise the FNV-1a hash of the encoded bytes of the message key is used, modulus the number of partitions. This ensures that messages with the same key always end up on the same partition.
  • standard is like sarama except that it handles absolute values in the same way as the reference Java implementation. sarama was supposed to do that but it had a mistake and now there are people depending on both behaviours. This will all go away on the next major version bump.
  • random uses a Partitioner which chooses a random partition each time.
  • roundrobin uses a Partitioner which walks through the available partitions one at a time.
Default: "standard"
Values: "sarama" "standard" "random" "roundrobin"
idempotent boolean

If enabled, the producer will ensure that exactly one copy of each message is written

Default: false
retry_max number

The total number of times to retry sending a message. Similar to the message.send.max.retries setting of the JVM producer.

Default: 3
min=0
retry_backoff string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
key_meta string

Name of the header where the kafka message key value is written

https://www.krakend.io/schema/v2.13/backend/pubsub/kafka/publisher.json object

Enterprise only. Allows for fine grained control over a kafka publishing connection

writer object required

Enterprise only. Defines how to write messages to a Kafka cluster

4 nested properties
cluster object required

Enterprise only. Defines how to connect to a Kafka cluster

12 nested properties
brokers string[] required
client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

sasl object

Enterprise only. SASL base authentication with broker: there are multiple SASL authentication methods but the current implementation is limited to plaintext (SASL/PLAIN) authentication

dial_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
read_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
write_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
keep_alive string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
client_id string

A name to give to the client stablishing the connection

Default: "KrakenD v[X].[Y].[Z]"
rack_id string

A name to identify the rack we are connecting from

Default: ""
channel_buffer_size number

The number of events to buffer in internal and external channels. This permits the producer and consumer to continue processing some messages in the background while user code is working, greatly improving throughput

Default: 256
min=0
metadata_retry_backoff string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
metadata_retry_max number

When a disconnection happens, the client needs to refresh its metadata to know the current state of the kafka cluster (effectively the number of attempts to reconnect)

Default: 3
min=0
topic string required

Topic to write to

producer object

Enterprise only. Defines details about how to write messages to a Kafka cluster

9 nested properties
max_message_bytes number

Maximum permitted size of a message. Should be set equal to or smaller than the broker's message.max.bytes.

min=0
required_acks string

Level of acknowledgement reliability needed from the broker. Equivalent to the request.required.acks setting of the JVM producer. Can be a positibe number (as a string), or one of hte following values: no_response (no required acks), wait_for_local (waits for only the local commit to succeed before responding), wait_for_all (waits for all in-sync replicas to commit before responding).

Default: "wait_for_local"
required_acks_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
compression_codec enum

Type of compression to use on messages (defaults to no compression). Similar to compression.codec setting of the JVM producer.

Default: "none"
Values: "none" "gzip" "snappy" "lz4" "zstd"
compression_level string

Level of compression to use on messages. The meaning depends on the actual compression type used and defaults to default compression level for the codec.

partitioner enum

Select behaviour for choosing the partition to send messages (similar to the partitioner.class setting for the JVM producer). The options are:

  • sarama: DEPRECATED uses a Partitioner which behaves as follows: If the message's key is nil then a random partition is chosen. Otherwise the FNV-1a hash of the encoded bytes of the message key is used, modulus the number of partitions. This ensures that messages with the same key always end up on the same partition.
  • standard is like sarama except that it handles absolute values in the same way as the reference Java implementation. sarama was supposed to do that but it had a mistake and now there are people depending on both behaviours. This will all go away on the next major version bump.
  • random uses a Partitioner which chooses a random partition each time.
  • roundrobin uses a Partitioner which walks through the available partitions one at a time.
Default: "standard"
Values: "sarama" "standard" "random" "roundrobin"
idempotent boolean

If enabled, the producer will ensure that exactly one copy of each message is written

Default: false
retry_max number

The total number of times to retry sending a message. Similar to the message.send.max.retries setting of the JVM producer.

Default: 3
min=0
retry_backoff string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
key_meta string

Name of the header where the kafka message key value is written

success_status_code number

HTTP status code to return for a successful write in the queue

Default: 200
min=200max=201
https://www.krakend.io/schema/v2.13/backend/pubsub/subscriber.json object

Subscribes a backend using the desired driver.

See: https://www.krakend.io/docs/backends/pubsub/

subscription_url string required

Subscription URL according to the selected driver

See: https://www.krakend.io/docs/backends/pubsub/

https://www.krakend.io/schema/v2.13/messaging/kafka/group.json object

Enterprise only. Defines the detaisl for a Kafka consumer group.

id string

Name of the consumer group to use

session_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
heartbeat_interval string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
rebalance_strategies enum[]

Priority-ordered list of client-side consumer group balancing strategies that will be offered to the coordinator. The first strategy that all group members support will be chosen by the leader. Options are: range, roundrobin, and sticky

Default:
[
  "range"
]
rebalance_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
instance_id string

Support KIP-345

fetch_default number

The default number of message bytes to fetch from the broker in each request (default 1MB). This should be larger than the majority of your messages, or else the consumer will spend a lot of time negotiating sizes and not actually consuming. Similar to the JVM's fetch.message.max.bytes

isolation_level enum

Supports 2 modes: read_commited to consume and return all messages in message channel, and read_uncommited to hide messages that are part of an aborted transaction

Default: "read_commited"
Values: "read_commited" "read_uncommited"
https://www.krakend.io/schema/v2.13/messaging/kafka/reader.json object

Enterprise only. Defines how to read messages from a Kafka cluster

cluster object required

Enterprise only. Defines how to connect to a Kafka cluster

12 nested properties
brokers string[] required
client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

8 nested properties
allow_insecure_connections boolean

By default, KrakenD verifies every SSL connection. This option allows you to connect to backends considered insecure, for instance when you are using self-signed certificates

Default: false
ca_certs array

An array with all the CA certificates you would like to validate the server you are connecting to.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[]
Examples: ["ca.pem"]
cipher_suites array

The list of cipher suites as defined in the documentation.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  4865,
  4866,
  4867
]
uniqueItems=true
client_certs object[]

The list of all client certificates available when fetching data from the upstream service.

See: https://www.krakend.io/docs/service-settings/tls/

curve_preferences enum[]

The list of all the identifiers for the curve preferences. Use 23 for CurveP256, 24 for CurveP384 or 25 for CurveP521.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  23,
  24,
  25
]
uniqueItems=true
disable_system_ca_pool boolean

Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the ca_certs list when true.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
max_version enum

Maximum TLS version supported.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
min_version enum

Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the ciphers_list.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
sasl object

Enterprise only. SASL base authentication with broker: there are multiple SASL authentication methods but the current implementation is limited to plaintext (SASL/PLAIN) authentication

7 nested properties
mechanism enum

Name of the enabled SASL mechanism

Default: "PLAIN"
Values: "PLAIN" "OAUTHBEARER"
azure_event_hub boolean

Kafka > 1.x should use SASL V1, except on Azure EventHub which uses V0

Default: false
disable_hanshake boolean

Whether or not to send the Kafka SASL handshake first if enabled. You should only set this to false if you're using a non-Kafka SASL proxy

Default: true
auth_identity string

Auth Identity is an (optional) authorization identity (authzid) to use for SASL/PLAIN authentication (if different from User) when an authenticated user is permitted to act as the presented alternative user. See RFC4616 for details

user string

Authentication identity (authcid) to present for SASL/PLAIN or SASL/SCRAM authentication

password string

Password for SASL/PLAIN authentication

scram_auth_id string

Authz id used for SASL/SCRAM authentication

dial_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
read_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
write_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
keep_alive string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
client_id string

A name to give to the client stablishing the connection

Default: "KrakenD v[X].[Y].[Z]"
rack_id string

A name to identify the rack we are connecting from

Default: ""
channel_buffer_size number

The number of events to buffer in internal and external channels. This permits the producer and consumer to continue processing some messages in the background while user code is working, greatly improving throughput

Default: 256
min=0
metadata_retry_backoff string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
metadata_retry_max number

When a disconnection happens, the client needs to refresh its metadata to know the current state of the kafka cluster (effectively the number of attempts to reconnect)

Default: 3
min=0
topics string[] required

List of topics to read from

group object

Enterprise only. Defines the detaisl for a Kafka consumer group.

8 nested properties
id string

Name of the consumer group to use

session_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
heartbeat_interval string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
rebalance_strategies enum[]

Priority-ordered list of client-side consumer group balancing strategies that will be offered to the coordinator. The first strategy that all group members support will be chosen by the leader. Options are: range, roundrobin, and sticky

Default:
[
  "range"
]
rebalance_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
instance_id string

Support KIP-345

fetch_default number

The default number of message bytes to fetch from the broker in each request (default 1MB). This should be larger than the majority of your messages, or else the consumer will spend a lot of time negotiating sizes and not actually consuming. Similar to the JVM's fetch.message.max.bytes

isolation_level enum

Supports 2 modes: read_commited to consume and return all messages in message channel, and read_uncommited to hide messages that are part of an aborted transaction

Default: "read_commited"
Values: "read_commited" "read_uncommited"
key_meta string

Name of the header where the kafka message key value is written

https://www.krakend.io/schema/v2.13/backend/pubsub/kafka/subscriber.json object

Enterprise only. Allows for fine grained control over a kafka subcription connection

reader object required

Enterprise only. Defines how to read messages from a Kafka cluster

4 nested properties
cluster object required

Enterprise only. Defines how to connect to a Kafka cluster

12 nested properties
brokers string[] required
client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

sasl object

Enterprise only. SASL base authentication with broker: there are multiple SASL authentication methods but the current implementation is limited to plaintext (SASL/PLAIN) authentication

dial_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
read_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
write_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
keep_alive string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
client_id string

A name to give to the client stablishing the connection

Default: "KrakenD v[X].[Y].[Z]"
rack_id string

A name to identify the rack we are connecting from

Default: ""
channel_buffer_size number

The number of events to buffer in internal and external channels. This permits the producer and consumer to continue processing some messages in the background while user code is working, greatly improving throughput

Default: 256
min=0
metadata_retry_backoff string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
metadata_retry_max number

When a disconnection happens, the client needs to refresh its metadata to know the current state of the kafka cluster (effectively the number of attempts to reconnect)

Default: 3
min=0
topics string[] required

List of topics to read from

group object

Enterprise only. Defines the detaisl for a Kafka consumer group.

8 nested properties
id string

Name of the consumer group to use

session_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
heartbeat_interval string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
rebalance_strategies enum[]

Priority-ordered list of client-side consumer group balancing strategies that will be offered to the coordinator. The first strategy that all group members support will be chosen by the leader. Options are: range, roundrobin, and sticky

Default:
[
  "range"
]
rebalance_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
instance_id string

Support KIP-345

fetch_default number

The default number of message bytes to fetch from the broker in each request (default 1MB). This should be larger than the majority of your messages, or else the consumer will spend a lot of time negotiating sizes and not actually consuming. Similar to the JVM's fetch.message.max.bytes

isolation_level enum

Supports 2 modes: read_commited to consume and return all messages in message channel, and read_uncommited to hide messages that are part of an aborted transaction

Default: "read_commited"
Values: "read_commited" "read_uncommited"
key_meta string

Name of the header where the kafka message key value is written

https://www.krakend.io/schema/v2.13/backend/soap.json object

Enterprise only. Build and modify requests to communicate with SOAP services.

See: https://www.krakend.io/docs/backends/soap/

content_type string

The Content-Type used in your template, and that will be sent to the SOAP server. This is not the content-type the end-user sent in the request.

See: https://www.krakend.io/docs/backends/soap/

Default: "text/xml"
Examples: "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/backends/soap/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/backends/soap/

Examples: "./path/to.xml"
template string

An inline base64 encoded Go template with the body XML content you want to send to the SOAP service. This option is useful if you don't want to rely on external files and embed the template in the configuration.

See: https://www.krakend.io/docs/backends/soap/

https://www.krakend.io/schema/v2.13/backend/static-filesystem.json object

Enterprise only. Allows you to fetch and serve static content from the disk instead of a remote server, and you can use it to mock data.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

path string required

The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: ./assets) or absolute (e.g.: /var/www/assets).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "./static/"
directory_listing boolean

Whether to allow directory listings or not

Default: false
https://www.krakend.io/schema/v2.13/governance/quota.json object

Enterprise only. Attach a quota to the endpoint, backend, or service. Needs a governance/processor namespace.

See: https://www.krakend.io/docs/enterprise/governance/quota/

quota_name string required

Name of the quota you want to reuse, written exactly as declared under the processors list.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "my_quota"
tier_key string required

Header used to determine the tier. Use tier_value and tier_value_as on each tier to determine how to match the value.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "X-User-Tier", "X-User-ID"
tiers object[] required

List of tiers to match against the request. The first tier that matches will be used to determine the quota to consume.

See: https://www.krakend.io/docs/enterprise/governance/quota/

disable_quota_headers boolean

When set to true, the quota headers X-Quota-Limit, X-Quota-Remaining, and Retry-After will not be added to the response. This is useful when you want to hide the quota information from the client.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
on_unmatched_tier_allow boolean

When a tier cannot be infered from the request, whether to allow the request to continue or not. In case a request does not match any of the tiers, the request will be rejected with a 400 error unless you set this to true.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
weight_key string

Instead of incrementing the quota counter by one unit, use the value provided in a field or header with its dynamic value. For instance, an LLM can return how many tokens it consumed, and you can use that value to increment the quota counter. The value must be a parseable number, and the field or header must be present in the backend response. The weight_key is only used in the endpoint and backend scopes, and it is ignored in the service level.

See: https://www.krakend.io/docs/enterprise/governance/quota/

weight_strategy enum

Where to find the key containing the counter value to increment. Use body for any type of encoding different than no-op and header for no-op.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: "body"
Values: "body" "header"
https://www.krakend.io/schema/v2.13/modifier/body-generator.json object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

https://www.krakend.io/schema/v2.13/modifier/jmespath.json object

Enterprise only. The JMESPath query language allows you to select, slice, filter, map, project, flatten, sort, and all sorts of operations on data.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

expr string required

The JMESPath expression you want to apply to this endpoint.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

https://www.krakend.io/schema/v2.13/modifier/lua.json object

Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.

See: https://www.krakend.io/docs/endpoints/lua/

allow_open_libs boolean

As an efficiency point the Lua component does not load the standard libraries by default. If you need to import Lua libraries (e.g, the I/O, String, etc.), then you must set this flag to true.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
live boolean

For security and efficiency, the Lua script is loaded once into memory and not reloaded even if the file contents change. Set this flag to true if you want to modify the Lua script while KrakenD is running and apply the changes live (mostly during development to avoid the snippet being cached).

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
md5 object

The md5sum is an extra security feature to make sure that once you have coded the Lua script, the MD5 of what is loaded into memory matches what you expect and has not been tampered by a malicious 3rd party. The key of the object must match exactly the filename under sources, including all the path.

See: https://www.krakend.io/docs/endpoints/lua/

Examples: {"./path/to/file1.lua":"49ae50f58e35f4821ad4550e1a4d1de0"}
post string

The Lua code that is executed after performing the request. Available when used in the backend section. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "local r = response.load(); r:headers('Set-Cookie', 'key1='.. r:data('response'));"
pre string

The Lua code that is executed before performing the request. Unlike post, it's available in all sections. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "print('Backend response, pre-logic:'); local r = request.load(); print(r:body());"
skip_next boolean

Available on the backend section only. Instead of connecting to next backend in the pipe, returns an empty response and executes the post lua function.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
sources string[]

An array with all the Lua files that will be processed. If no path is provided (e.g., myfile.lua) the file loads from the working directory.

See: https://www.krakend.io/docs/endpoints/lua/

https://www.krakend.io/schema/v2.13/modifier/martian.json object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

3 nested properties
body string required

The body you want to set, formatted in base64.

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
contentType string

The content-type representing the body you are setting

Examples: "application/x-www-form-urlencoded", "text/plain"
cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

5 nested properties
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

name string required

The name of the Cookie you want to check. Notice that the input_headers must contain Cookie in the list when you want to check cookies sent by the client.

scope const: ["request"] required

Scopes in which this modifier acts

Constant: ["request"]
else object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

value

If besides the cookie name, you set this value, it ensures the cookie has a literal match.

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

9 nested properties
name string required

Name of the Cookie you want to set

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
value string required

Value of the Cookie you want to set

domain string

Domain of the Cookie you want to set

Examples: "example.com"
expires string

Date in RFC 3339 format and is absolute, not relative to the current time.

Examples: "2025-04-12T23:20:50.52Z"
httpOnly boolean

Create the Cookie with the httpOnly flag. When true, mitigates the risk of client side script accessing the protected cookie (if the browser supports it), mitigating the Most Common XSS

Default: false
maxAge integer

For how long this Cookie is valid, in seconds. 0 means that the attribute is not set. maxAge<0 means delete cookie now

Default: 0
path string

Path of the Cookie you want to set

Examples: "/path/to"
secure boolean

Cookie secure flag. When true, the user agent will include the cookie in the request when using https only

Default: false
fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

3 nested properties

The list of modifiers you want to execute in the declared order

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
aggregateErrors boolean

When true, the group will continue to execute consecutive modifiers when a modifier in the group encounters an error. The Group will then return all errors returned by each modifier after all modifiers have been executed. When false, if an error is returned by a modifier, the error is returned by ModifyRequest/Response and no further modifiers are run.

Default: false
header.Append object
3 nested properties
name string required

Name of the header you want to append a value. Add the same name under the input_headers list to append more values to an existing header passed by the client. In addition, to see the header in the response, you must use no-op.

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
value string required

The value you want to add or append.

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

2 nested properties
names string[] required

List of all the headers you want to supress from the request or the response. If you want to see the headers in the client, you must use the output_encoding: no-op, and if you want the client headers to propagate to the backend, you need to use input_headers too.

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

3 nested properties
from string required

The origin header you want to copy. When the header is provided by the user it must be included in the input_headers list.

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
to string required

The destination header you want to create. If this header is returned to the end-user you must use no-op in the output_encoding of the endpoint.

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

5 nested properties
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

name string required

Name of the header you want to check. You must add under input_headers the name included in the filter.

Examples: "X-Some", "Content-Type"
scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
else object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

value string

Value of the header you want to check

header.Id object
2 nested properties
scope const: ["request"] required

Scopes in which this modifier acts

Constant: ["request"]
header string

The header name you want to use to save the ID. In the case the header is already set, the header is unmodified.

Default: "X-Krakend-Id"
header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

3 nested properties
name string required

Name of the header you want to set

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
value string required

Value of the header you want to set

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

4 nested properties
header string required

Name of the header you want to check. You must add under input_headers the name included in the filter.

Examples: "X-Some", "Content-Type"
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

regex string required

The regular expression you want to check against the header value

Examples: ".*localhost.*", "^foo-[a-z]+$"
scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

4 nested properties
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

port integer required

The port number you want to check

scope const: ["request"] required

Scopes in which this modifier acts

Constant: ["request"]
else object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
4 nested properties
defaultForScheme boolean

Uses the default port of the schema. 80 for <http://> or 443 for <https://>. Other schemas are ignored.

port integer

Defines which port will be used.

remove boolean

Removes the port from the host string when true.

scope const: ["request"]

Scopes in which this modifier acts

Constant: ["request"]
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

2 nested properties
modifiers object[] required

The list of modifiers you want to execute, order specified in the items using priority.

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

5 nested properties
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

name string required

Name of the query string you want to check

Examples: "page", "limit"
scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
else object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

value string

Value of the query string you want to check

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

3 nested properties
name string required

Name of the query string you want to set

Examples: "page", "limit"
scope const: ["request"] required

Scopes in which this modifier acts

Constant: ["request"]
value string required

The value of the query string you want to set

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

2 nested properties
headerName string required

The header you want to create. If this header is returned to the end-user you must use no-op in the output_encoding of the endpoint.

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

7 nested properties
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
else object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

host string

The literal hostname that must match, including the port

Examples: "localhost:8080"
path string

The /path of the URL, without query strings.

Examples: "/path/to"
query string

The query strings you want to check. Use key1=value1&key2=value2 to check that the request has exactly these keys and values (order is irrelevant, but content not). Suppose the request has more query strings than declared here because the input_query_strings allowed them to pass. In that case, the evaluation will be false, and the else modifier will be executed.

Examples: "/path/to"
scheme string

The literal scheme it must match

Examples: "http", "https"
url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

5 nested properties
scope const: ["request"] required

Scopes in which this modifier acts

Constant: ["request"]
host string

The hostname part of the URL including the port

Examples: "example.com", "localhost:8080"
path string

The path part of the URL

Examples: "/path/to"
query string

Sets the query string parameters you want to pass, overwriting anything passed in the request. Notice that if you set a query, if the user passes other query string parameters listed under input_query_strings, they will be lost, and only the values passed in the modifier will be sent. For such uses, see the querystring.Modifier

Examples: "param=1", "key1=val&key2=val"
scheme string

The scheme to apply

Examples: "http", "https"
url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

4 nested properties
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

regex string required

The regular expression you want to check against the URL

scope const: ["request"] required

Scopes in which this modifier acts

Constant: ["request"]
else object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

https://www.krakend.io/schema/v2.13/modifier/response-body.json object

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

modifiers object[]

A list of modifiers you would like to apply to specific fields. The modifiers are evaluated and applied in sequential order.

See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

Default:
[]
https://www.krakend.io/schema/v2.13/plugin/http-client.json object
name string

The name of the plugin to load. Only one plugin is supported per backend.

See: https://www.krakend.io/docs/extending/injecting-plugins/

Examples: "no-redirect", "http-logger", "static-filesystem"
https://www.krakend.io/schema/v2.13/plugin/middleware.json object
name string[] required

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/enterprise/extending/middleware-plugins/

https://www.krakend.io/schema/v2.13/plugin/content-replacer.json Record<string, object>

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

https://www.krakend.io/schema/v2.13/plugin/ip-filter.json object

Enterprise only. The IP filtering plugin allows you to restrict the traffic to your API gateway based on the IP address. It works in two different modes (allow or deny) where you define the list of IPs (CIDR blocks) that are authorized to use the API, or that are denied from using the API.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

CIDR string[] required

The CIDR blocks (list of IPs) you want to allow or deny.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["192.168.0.0/24","172.17.2.56/32"]
allow boolean required

When true, only the matching IPs are able to access the content. When false, all matching IPs are discarded.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Default: false
client_ip_headers string[]

A custom list of all headers that might contain the real IP of the client. The first matching IP in the list will be used. Default headers are (in order of checking): X-Forwarded-For, X-Real-IP, and X-Appengine-Remote-Addr.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["X-Forwarded-For","X-Real-IP","X-Appengine-Remote-Addr"]
trusted_proxies string[]

A custom list of all the recognized machines/balancers that proxy the client to your application. This list is used to avoid spoofing when trying to get the real IP of the client.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["10.0.0.0/16"]
https://www.krakend.io/schema/v2.13/plugin/response-schema-validator.json object

Enterprise only. The response schema validator plugin adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

schema object required

Write your JSON schema directly in this field, with any number of fields or validations you need.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

error object

In case the validation fails, the error definition containing body and status.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

Examples: {"body":"We couldn't process you request, try again later.","status":401}
2 nested properties
body string

The error message you want to show when the validation fails. Set it to an empty string "" to show the JSON-schema validation error.

Default: ""
status integer

The HTTP status code you want to set back in the response.

Default: 500
https://www.krakend.io/schema/v2.13/plugin/req-resp-modifier.json object
content-replacer Record<string, object>

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

ip-filter object

Enterprise only. The IP filtering plugin allows you to restrict the traffic to your API gateway based on the IP address. It works in two different modes (allow or deny) where you define the list of IPs (CIDR blocks) that are authorized to use the API, or that are denied from using the API.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

4 nested properties
CIDR string[] required

The CIDR blocks (list of IPs) you want to allow or deny.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["192.168.0.0/24","172.17.2.56/32"]
allow boolean required

When true, only the matching IPs are able to access the content. When false, all matching IPs are discarded.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Default: false
client_ip_headers string[]

A custom list of all headers that might contain the real IP of the client. The first matching IP in the list will be used. Default headers are (in order of checking): X-Forwarded-For, X-Real-IP, and X-Appengine-Remote-Addr.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["X-Forwarded-For","X-Real-IP","X-Appengine-Remote-Addr"]
trusted_proxies string[]

A custom list of all the recognized machines/balancers that proxy the client to your application. This list is used to avoid spoofing when trying to get the real IP of the client.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["10.0.0.0/16"]
name string[]

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/extending/plugin-modifiers/

Default:
[]
Examples: ["myplugin"]
response-schema-validator object

Enterprise only. The response schema validator plugin adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

2 nested properties
schema object required

Write your JSON schema directly in this field, with any number of fields or validations you need.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

error object

In case the validation fails, the error definition containing body and status.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

Examples: {"body":"We couldn't process you request, try again later.","status":401}
2 nested properties
body string

The error message you want to show when the validation fails. Set it to an empty string "" to show the JSON-schema validation error.

Default: ""
status integer

The HTTP status code you want to set back in the response.

Default: 500
https://www.krakend.io/schema/v2.13/proxy/flatmap.json object[]

The flatmap middleware allows you to manipulate collections (or arrays, or lists, you name it) from the backend response. While the basic manipulation operations allow you to work directly with objects, the collections require a different approach: the flatmap component.

See: https://www.krakend.io/docs/backend/flatmap/

Examples:
  • [ { "type": "move", "args": [ "a.*.b1.*.c", "a.*.b1.*.d" ] } ]
https://www.krakend.io/schema/v2.13/proxy.json object
flatmap_filter object[]

The flatmap middleware allows you to manipulate collections (or arrays, or lists, you name it) from the backend response. While the basic manipulation operations allow you to work directly with objects, the collections require a different approach: the flatmap component.

See: https://www.krakend.io/docs/backend/flatmap/

Examples: [{"type":"move","args":["a.*.b1.*.c","a.*.b1.*.d"]}]
shadow boolean

Mark this backend as a shadow backend. Sending copies of the traffic but ignore its responses.

See: https://www.krakend.io/docs/backends/shadow-backends/

Default: true
https://www.krakend.io/schema/v2.13/qos/circuit-breaker.json object

The circuit breaker prevents sending more traffic to a failing backend.

See: https://www.krakend.io/docs/backends/circuit-breaker/

interval integer required

Time window where the errors count, in seconds.

See: https://www.krakend.io/docs/backends/circuit-breaker/

max_errors integer required

The CONSECUTIVE (not total) number of errors within the interval window to consider the backend unhealthy. All HTTP status codes different than 20x are considered an error, except for the no-op encoding that does not evaluate status codes and is limited to connectivity/networking, security and component errors. See the definition of error below.

See: https://www.krakend.io/docs/backends/circuit-breaker/

timeout integer required

For how many seconds the circuit breaker will wait before testing again if the backend is healthy.

See: https://www.krakend.io/docs/backends/circuit-breaker/

log_status_change boolean

Whether to log the changes of state of this circuit breaker or not.

See: https://www.krakend.io/docs/backends/circuit-breaker/

Default: false
name string

A friendly name to follow this circuit breaker's activity in the logs.

See: https://www.krakend.io/docs/backends/circuit-breaker/

Examples: "cb-backend-1"
https://www.krakend.io/schema/v2.13/qos/circuit-breaker-http.json object

Enterprise only. The HTTP circuit breaker prevents sending more traffic to a backend that is returning status codes that are considered errors.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

interval integer required

Time window where the errors count, in seconds.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

max_errors integer required

The CONSECUTIVE (not total) number of errors within the interval window to consider the backend unhealthy. All HTTP status codes different than 20x are considered an error, except for the no-op encoding that does not evaluate status codes and is limited to connectivity/networking, security and component errors. See the definition of error below.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Examples: 5
timeout integer required

For how many seconds the circuit breaker will wait before testing again if the backend is healthy. This number of seconds can also be read as the minimum cooldown of the backend interaction.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Examples: 10
valid_status_codes integer[] required

A list of HTTP status codes that will be considered successful responses. Any response with a status code not in this list will be counted as an error by the circuit breaker.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Examples: [200,201,404]
minItems=1uniqueItems=true
log_status_change boolean

Whether to log the changes of state of this circuit breaker or not.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Default: false
name string

A friendly name to follow this circuit breaker's activity in the logs.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Examples: "cb-backend-1"
https://www.krakend.io/schema/v2.13/qos/ratelimit/proxy.json object

Restrict the rate of requests KrakenD makes to your backends.

See: https://www.krakend.io/docs/backends/rate-limit/

capacity integer required

The capacity according to the token bucket algorithm. Defines the maximum requests you can do in an instant (including the zero moment when you start the gateway), and can be larger or smaller than the max_rate. When unsure, use the same value of max_rate, so the maximum number of requests can be consumed at once.

See: https://www.krakend.io/docs/backends/rate-limit/

Default: 1
max_rate number required

Maximum requests per second you want to accept in this backend.

See: https://www.krakend.io/docs/backends/rate-limit/

Examples: 0.5
every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
https://www.krakend.io/schema/v2.13/telemetry/backend_log.json object

Enables the Backend Log capabilities.

See: https://www.krakend.io/enterprise/docs/logging/

custom_format string

Specify the custom format of the Backend Logs.

See: https://www.krakend.io/enterprise/docs/logging/

Default: "%{prefix}%{time} |%{statusCode}| %{latencyMs} | %{method} %{host} %{path} "
Examples: "%{time:kitchen} | (╯°□°)╯( ┻━┻ %{statusCode} | %{method} %{host} %{path} "
log_with_level enum

What type of reporting level do you want to set at the backends? The options below go from more verbose to least. Use the DEBUG level in the development stages but not in production. Some components can add extra verbosity while in DEBUG mode and send multiline content, which is not always suitable for automated log parsing.

See: https://www.krakend.io/enterprise/docs/logging/

Values: "DEBUG" "INFO" "WARNING" "ERROR" "CRITICAL"
no_value string

When the variable does not resolve to any value, the string you want to write in the log. If the string is set to an empty value, a dash - is printed.

See: https://www.krakend.io/enterprise/docs/logging/

Default: "-"
Examples: "-", "null", "no_value", "<empty>"
prefix string

Adds the defined string at the beginning of every logged line, so you can quickly filter messages with external tools later on.

See: https://www.krakend.io/enterprise/docs/logging/

Default: ""
Examples: ">>> "
https://www.krakend.io/schema/v2.13/telemetry/opentelemetry-backend.json object

Enterprise only. Overrides metrics and traces declared by the OpenTelemetry service.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

backend object

Reports the activity between KrakenD and each of your backend services. This is the more granular layer.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

2 nested properties
metrics object
5 nested properties
detailed_connection boolean

Whether you want to enable detailed metrics for the HTTP connection phase or not. Includes times to connect, DNS querying, and the TLS handshake.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
disable_stage boolean

Whether to turn off the metrics or not. Setting this to true means stop reporting any data.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
read_payload boolean

Whether you want to enable metrics for the response reading payload or not (HTTP connection not taken into account).

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
round_trip boolean

Whether you want to enable metrics for the actual HTTP request for the backend or not (manipulation not taken into account). This is the time your backend needs to produce a result.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
static_attributes object[]

a list of tags or labels you want to associate with these metrics.

see: https://www.krakend.io/docs/telemetry/opentelemetry/

Examples: [{"key":"my_metric_attr","value":"my_metric_val"}]
traces object
7 nested properties
detailed_connection boolean

Whether you want to add detailed trace attributes for the HTTP connection phase or not. Includes times to connect, DNS querying, and the TLS handshake.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
disable_stage boolean

Whether to turn off the traces or not. Setting this to true means stop reporting any data.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
read_payload boolean

Whether you want to add trace attributes for the response reading payload or not (HTTP connection not taken into account).

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
report_headers boolean

Whether you want to report the final headers that reached the backend.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
round_trip boolean

Whether you want to add trace attributes for the actual HTTP request for the backend or not (manipulation not taken into account). This is the time your backend needs to produce a result.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
skip_headers string[]

A list of headers you want to skip when reporting the headers that reached the backend. This is useful to avoid reporting sensitive data.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Examples: ["X-Backend-Secret","X-All-Secret"]
static_attributes object[]

a list of tags or labels you want to associate with these metrics.

see: https://www.krakend.io/docs/telemetry/opentelemetry/

Examples: [{"key":"my_metric_attr","value":"my_metric_val"}]
https://www.krakend.io/schema/v2.13/validation/cel.json object[]

The Common Expression Language (CEL) middleware enables expression evaluation, when an expression returns false, KrakenD does not return the content as the condition has failed. Otherwise, if all expressions returned true, the content is served.

See: https://www.krakend.io/docs/endpoints/common-expression-language-cel/

https://www.krakend.io/schema/v2.13/validation/response-json-schema.json object

Enterprise only. The response schema validator adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

schema object required

Write your JSON schema directly in this field, with any number of fields or validations you need.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

error object

In case the validation fails, the error definition containing body and status.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

Examples: {"body":"We couldn't process you request, try again later.","status":401}
3 nested properties
body string

The error message you want to show when the validation fails. Set it to an empty string "" to show the JSON-schema validation error.

Default: ""
content_type string

The Content-Type header you want to set back in the response when you are setting a custom body

Default: "text/plain"
Examples: "application/json"
status integer

The HTTP status code you want to set back in the response.

Default: 500
https://www.krakend.io/schema/v2.13/security/policies.json object

Enterprise only. The policies engine allows you to write custom sets of policies that are validated during requests, responses, or token validation.

See: https://www.krakend.io/docs/enterprise/security-policies/

auto_join_policies boolean

When true, all policies of the same type concatenate with an AND operation to evaluate a single expression. Performs faster, but its harder the debug.

Default: false
debug boolean

When true, all the inputs and evaluation results are printed in the console.

Default: false
disable_macros boolean

Advanced macros can be disabled in those policies not needing them for a faster evaluation.

Default: false
jwt object

All the policies applied in the JWT context (token validation). You must configure auth/validator for the policies to run, otherwise they will be skipped. Any policy failing will generate a 401 Unauthorized error. Works in the endpoint context only, and is not available under backend.

See: https://www.krakend.io/docs/enterprise/security-policies/

1 nested properties
policies string[] required

An array with all the policies to evaluate. Each policy is represented as a string

See: https://www.krakend.io/docs/enterprise/security-policies/

minItems=1
req object

All the policies applied in the request context.

See: https://www.krakend.io/docs/enterprise/security-policies/

2 nested properties
policies string[] required

An array with all the policies to evaluate. Each policy is represented as a string

See: https://www.krakend.io/docs/enterprise/security-policies/

minItems=1
error object
3 nested properties
body string

Leave an empty string to use the validation error, or write a string with the error response body. This error is NOT returned in the response, but in the application logs, unless you enable return_detailed_errors in the router section. You can add escaped JSON, XML, etc in the string and add a Content-Type.

See: https://www.krakend.io/docs/enterprise/security-policies/

Default: ""
content_type string

The Content-Type header you'd like to send with the error response. When unset, uses text/plain by default.

See: https://www.krakend.io/docs/enterprise/security-policies/

Default: "text/plain"
status integer

The HTTP status code you want to return when the validation fails.

See: https://www.krakend.io/docs/enterprise/security-policies/

Default: 500
resp object

All the policies applied in the response context.

See: https://www.krakend.io/docs/enterprise/security-policies/

2 nested properties
policies string[] required

An array with all the policies to evaluate. Each policy is represented as a string

See: https://www.krakend.io/docs/enterprise/security-policies/

minItems=1
error object
3 nested properties
body string

Leave an empty string to use the validation error, or write a string with the error response body. This error is NOT returned in the response, but in the application logs, unless you enable return_detailed_errors in the router section. You can add escaped JSON, XML, etc in the string and add a Content-Type.

See: https://www.krakend.io/docs/enterprise/security-policies/

Default: ""
content_type string

The Content-Type header you'd like to send with the error response. When unset, uses text/plain by default.

See: https://www.krakend.io/docs/enterprise/security-policies/

Default: "text/plain"
status integer

The HTTP status code you want to return when the validation fails.

See: https://www.krakend.io/docs/enterprise/security-policies/

Default: 500
https://www.krakend.io/schema/v2.13/workflow_extra_config.json object
modifier/jmespath object

Enterprise only. The JMESPath query language allows you to select, slice, filter, map, project, flatten, sort, and all sorts of operations on data.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

1 nested properties
expr string required

The JMESPath expression you want to apply to this endpoint.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

modifier/lua-proxy object

Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.

See: https://www.krakend.io/docs/endpoints/lua/

7 nested properties
allow_open_libs boolean

As an efficiency point the Lua component does not load the standard libraries by default. If you need to import Lua libraries (e.g, the I/O, String, etc.), then you must set this flag to true.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
live boolean

For security and efficiency, the Lua script is loaded once into memory and not reloaded even if the file contents change. Set this flag to true if you want to modify the Lua script while KrakenD is running and apply the changes live (mostly during development to avoid the snippet being cached).

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
md5 object

The md5sum is an extra security feature to make sure that once you have coded the Lua script, the MD5 of what is loaded into memory matches what you expect and has not been tampered by a malicious 3rd party. The key of the object must match exactly the filename under sources, including all the path.

See: https://www.krakend.io/docs/endpoints/lua/

Examples: {"./path/to/file1.lua":"49ae50f58e35f4821ad4550e1a4d1de0"}
post string

The Lua code that is executed after performing the request. Available when used in the backend section. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "local r = response.load(); r:headers('Set-Cookie', 'key1='.. r:data('response'));"
pre string

The Lua code that is executed before performing the request. Unlike post, it's available in all sections. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "print('Backend response, pre-logic:'); local r = request.load(); print(r:body());"
skip_next boolean

Available on the backend section only. Instead of connecting to next backend in the pipe, returns an empty response and executes the post lua function.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
sources string[]

An array with all the Lua files that will be processed. If no path is provided (e.g., myfile.lua) the file loads from the working directory.

See: https://www.krakend.io/docs/endpoints/lua/

modifier/request-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

modifier/response-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

plugin/req-resp-modifier object
4 nested properties
content-replacer Record<string, object>

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

ip-filter object

Enterprise only. The IP filtering plugin allows you to restrict the traffic to your API gateway based on the IP address. It works in two different modes (allow or deny) where you define the list of IPs (CIDR blocks) that are authorized to use the API, or that are denied from using the API.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

4 nested properties
CIDR string[] required

The CIDR blocks (list of IPs) you want to allow or deny.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["192.168.0.0/24","172.17.2.56/32"]
allow boolean required

When true, only the matching IPs are able to access the content. When false, all matching IPs are discarded.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Default: false
client_ip_headers string[]

A custom list of all headers that might contain the real IP of the client. The first matching IP in the list will be used. Default headers are (in order of checking): X-Forwarded-For, X-Real-IP, and X-Appengine-Remote-Addr.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["X-Forwarded-For","X-Real-IP","X-Appengine-Remote-Addr"]
trusted_proxies string[]

A custom list of all the recognized machines/balancers that proxy the client to your application. This list is used to avoid spoofing when trying to get the real IP of the client.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["10.0.0.0/16"]
name string[]

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/extending/plugin-modifiers/

Default:
[]
Examples: ["myplugin"]
response-schema-validator object

Enterprise only. The response schema validator plugin adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

2 nested properties
schema object required

Write your JSON schema directly in this field, with any number of fields or validations you need.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

error object

In case the validation fails, the error definition containing body and status.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

Examples: {"body":"We couldn't process you request, try again later.","status":401}
proxy object
5 nested properties
combiner string

For custom builds of KrakenD only

Examples: "combiner_name"
flatmap_filter object[]

The flatmap middleware allows you to manipulate collections (or arrays, or lists, you name it) from the backend response. While the basic manipulation operations allow you to work directly with objects, the collections require a different approach: the flatmap component.

See: https://www.krakend.io/docs/backend/flatmap/

Examples: [{"type":"move","args":["a.*.b1.*.c","a.*.b1.*.d"]}]
sequential boolean

The sequential proxy allows you to chain backend requests, making calls dependent one of each other.

See: https://www.krakend.io/docs/endpoints/sequential-proxy/

Default: true
sequential_propagated_params string[]

The list of parameters you want to propagate from a previous response to the next request. Parameters are accessible by Lua scripts, CEL, security policies, the body generator, or plugins. When you add a resp-like parameter in this list, the parameter becomes available to the components mentioned in subsequent calls, uppercasing the first letter. For instance, if you add resp0_user, you can access in the second, third, etc. backends in Lua to req:params('Resp0_user').The format of the parameters must start with respX_ or respX, where X is the backend index from which you want to take the parameter. If you don't set the underscore _, you set the whole payload as a parameter. For instance, resp0 sets a parameter Resp0 to use in Lua or a Body generator and contains the entire payload of the backend 0 (as a string). In this extreme case, you must use no-op in the backend's output (even the endpoint has a json output encoding) and you should access the value in Lua or a plugin. Note that access to nested parameters uses a single string with the dot notation inside, e.g.: req_params['Resp0_f1.f2.f3'] (CEL and Security Policies), or {{ index .req_params "Resp0_f1.f2.f3" }} (body generators).

See: https://www.krakend.io/docs/endpoints/sequential-proxy/

Examples: ["resp0"], ["resp1_my_field","resp0_user_id"]
static object

The static proxy injects static data in the final response when the selected strategy matches.

See: https://www.krakend.io/docs/endpoints/static-proxy/

2 nested properties
data object required

The static data (as a JSON object) that you will return.

See: https://www.krakend.io/docs/endpoints/static-proxy/

strategy enum required

One of the supported strategies

See: https://www.krakend.io/docs/endpoints/static-proxy/

Values: "always" "success" "complete" "errored" "incomplete"
security/policies object

Enterprise only. The policies engine allows you to write custom sets of policies that are validated during requests, responses, or token validation.

See: https://www.krakend.io/docs/enterprise/security-policies/

Any of: variant, variant, variant
6 nested properties
auto_join_policies boolean

When true, all policies of the same type concatenate with an AND operation to evaluate a single expression. Performs faster, but its harder the debug.

Default: false
debug boolean

When true, all the inputs and evaluation results are printed in the console.

Default: false
disable_macros boolean

Advanced macros can be disabled in those policies not needing them for a faster evaluation.

Default: false
jwt object

All the policies applied in the JWT context (token validation). You must configure auth/validator for the policies to run, otherwise they will be skipped. Any policy failing will generate a 401 Unauthorized error. Works in the endpoint context only, and is not available under backend.

See: https://www.krakend.io/docs/enterprise/security-policies/

1 nested properties
policies string[] required

An array with all the policies to evaluate. Each policy is represented as a string

See: https://www.krakend.io/docs/enterprise/security-policies/

minItems=1
req object

All the policies applied in the request context.

See: https://www.krakend.io/docs/enterprise/security-policies/

2 nested properties
policies string[] required

An array with all the policies to evaluate. Each policy is represented as a string

See: https://www.krakend.io/docs/enterprise/security-policies/

minItems=1
error object
resp object

All the policies applied in the response context.

See: https://www.krakend.io/docs/enterprise/security-policies/

2 nested properties
policies string[] required

An array with all the policies to evaluate. Each policy is represented as a string

See: https://www.krakend.io/docs/enterprise/security-policies/

minItems=1
error object
validation/cel object[]

The Common Expression Language (CEL) middleware enables expression evaluation, when an expression returns false, KrakenD does not return the content as the condition has failed. Otherwise, if all expressions returned true, the content is served.

See: https://www.krakend.io/docs/endpoints/common-expression-language-cel/

minItems=1
validation/json-schema object

apply automatic validations using the JSON Schema vocabulary before the content passes to the backends. The json schema component allows you to define validation rules on the body, type definition, or even validate the fields' values.

See: https://www.krakend.io/docs/endpoints/json-schema/

https://www.krakend.io/schema/v2.13/workflow.json object
backend object[] required

List of all the backend objects called within this workflow. Each backend can initiate another workflow if needed.

minItems=1
endpoint string required

An endpoint name for the workflow that will be used in logs. The name will be appended to the string /__workflow/ in the logs, and although it does not receive traffic under this route, it is necessary when you want to pass URL {params} to the nested backends.

See: https://www.krakend.io/docs/endpoints/

Examples: "/workflow-1/{param1}"
concurrent_calls integer

The concurrent requests are an excellent technique to improve the response times and decrease error rates by requesting in parallel the same information multiple times. Yes, you make the same request to several backends instead of asking to just one. When the first backend returns the information, the remaining requests are canceled.

See: https://www.krakend.io/docs/endpoints/concurrent-requests/

Default: 1
min=1max=5
extra_config object
9 nested properties
modifier/jmespath object

Enterprise only. The JMESPath query language allows you to select, slice, filter, map, project, flatten, sort, and all sorts of operations on data.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

1 nested properties
expr string required

The JMESPath expression you want to apply to this endpoint.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

modifier/lua-proxy object

Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.

See: https://www.krakend.io/docs/endpoints/lua/

7 nested properties
allow_open_libs boolean

As an efficiency point the Lua component does not load the standard libraries by default. If you need to import Lua libraries (e.g, the I/O, String, etc.), then you must set this flag to true.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
live boolean

For security and efficiency, the Lua script is loaded once into memory and not reloaded even if the file contents change. Set this flag to true if you want to modify the Lua script while KrakenD is running and apply the changes live (mostly during development to avoid the snippet being cached).

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
md5 object

The md5sum is an extra security feature to make sure that once you have coded the Lua script, the MD5 of what is loaded into memory matches what you expect and has not been tampered by a malicious 3rd party. The key of the object must match exactly the filename under sources, including all the path.

See: https://www.krakend.io/docs/endpoints/lua/

Examples: {"./path/to/file1.lua":"49ae50f58e35f4821ad4550e1a4d1de0"}
post string

The Lua code that is executed after performing the request. Available when used in the backend section. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "local r = response.load(); r:headers('Set-Cookie', 'key1='.. r:data('response'));"
pre string

The Lua code that is executed before performing the request. Unlike post, it's available in all sections. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "print('Backend response, pre-logic:'); local r = request.load(); print(r:body());"
skip_next boolean

Available on the backend section only. Instead of connecting to next backend in the pipe, returns an empty response and executes the post lua function.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
sources string[]

An array with all the Lua files that will be processed. If no path is provided (e.g., myfile.lua) the file loads from the working directory.

See: https://www.krakend.io/docs/endpoints/lua/

modifier/request-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

modifier/response-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

plugin/req-resp-modifier object
4 nested properties
content-replacer Record<string, object>

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

ip-filter object

Enterprise only. The IP filtering plugin allows you to restrict the traffic to your API gateway based on the IP address. It works in two different modes (allow or deny) where you define the list of IPs (CIDR blocks) that are authorized to use the API, or that are denied from using the API.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

name string[]

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/extending/plugin-modifiers/

Default:
[]
Examples: ["myplugin"]
response-schema-validator object

Enterprise only. The response schema validator plugin adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

proxy object
5 nested properties
combiner string

For custom builds of KrakenD only

Examples: "combiner_name"
flatmap_filter object[]

The flatmap middleware allows you to manipulate collections (or arrays, or lists, you name it) from the backend response. While the basic manipulation operations allow you to work directly with objects, the collections require a different approach: the flatmap component.

See: https://www.krakend.io/docs/backend/flatmap/

Examples: [{"type":"move","args":["a.*.b1.*.c","a.*.b1.*.d"]}]
sequential boolean

The sequential proxy allows you to chain backend requests, making calls dependent one of each other.

See: https://www.krakend.io/docs/endpoints/sequential-proxy/

Default: true
sequential_propagated_params string[]

The list of parameters you want to propagate from a previous response to the next request. Parameters are accessible by Lua scripts, CEL, security policies, the body generator, or plugins. When you add a resp-like parameter in this list, the parameter becomes available to the components mentioned in subsequent calls, uppercasing the first letter. For instance, if you add resp0_user, you can access in the second, third, etc. backends in Lua to req:params('Resp0_user').The format of the parameters must start with respX_ or respX, where X is the backend index from which you want to take the parameter. If you don't set the underscore _, you set the whole payload as a parameter. For instance, resp0 sets a parameter Resp0 to use in Lua or a Body generator and contains the entire payload of the backend 0 (as a string). In this extreme case, you must use no-op in the backend's output (even the endpoint has a json output encoding) and you should access the value in Lua or a plugin. Note that access to nested parameters uses a single string with the dot notation inside, e.g.: req_params['Resp0_f1.f2.f3'] (CEL and Security Policies), or {{ index .req_params "Resp0_f1.f2.f3" }} (body generators).

See: https://www.krakend.io/docs/endpoints/sequential-proxy/

Examples: ["resp0"], ["resp1_my_field","resp0_user_id"]
static object

The static proxy injects static data in the final response when the selected strategy matches.

See: https://www.krakend.io/docs/endpoints/static-proxy/

security/policies object

Enterprise only. The policies engine allows you to write custom sets of policies that are validated during requests, responses, or token validation.

See: https://www.krakend.io/docs/enterprise/security-policies/

Any of: variant, variant, variant
6 nested properties
auto_join_policies boolean

When true, all policies of the same type concatenate with an AND operation to evaluate a single expression. Performs faster, but its harder the debug.

Default: false
debug boolean

When true, all the inputs and evaluation results are printed in the console.

Default: false
disable_macros boolean

Advanced macros can be disabled in those policies not needing them for a faster evaluation.

Default: false
jwt object

All the policies applied in the JWT context (token validation). You must configure auth/validator for the policies to run, otherwise they will be skipped. Any policy failing will generate a 401 Unauthorized error. Works in the endpoint context only, and is not available under backend.

See: https://www.krakend.io/docs/enterprise/security-policies/

req object

All the policies applied in the request context.

See: https://www.krakend.io/docs/enterprise/security-policies/

resp object

All the policies applied in the response context.

See: https://www.krakend.io/docs/enterprise/security-policies/

validation/cel object[]

The Common Expression Language (CEL) middleware enables expression evaluation, when an expression returns false, KrakenD does not return the content as the condition has failed. Otherwise, if all expressions returned true, the content is served.

See: https://www.krakend.io/docs/endpoints/common-expression-language-cel/

minItems=1
validation/json-schema object

apply automatic validations using the JSON Schema vocabulary before the content passes to the backends. The json schema component allows you to define validation rules on the body, type definition, or even validate the fields' values.

See: https://www.krakend.io/docs/endpoints/json-schema/

ignore_errors

Allow the workflow to continue with the rest of declared actions when there are errors (like security policies, network errors, etc). The default behavior of KrakenD is to abort an execution that has errors as soon as possible. If you use conditional backends and similar approaches, you might want to allow the gateway to go through all steps.

See: https://www.krakend.io/docs/endpoints/

Default: false
output_encoding enum

The gateway can work with several content types, even allowing your clients to choose how to consume the content. See the supported encodings

Default: "json"
Values: "json" "json-collection" "yaml" "fast-json" "xml" "negotiate" "string" "no-op"
timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
https://www.krakend.io/schema/v2.13/backend_extra_config.json object
ai/llm object

Ready-to-use LLM connectors available for major AI vendors.

See: https://www.krakend.io/docs/enterprise/ai-gateway/unified-llm-interface/

5 nested properties
anthropic object

Connect to Anthropic models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

1 nested properties
v1 object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

gemini object

Connect to Google Gemini models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

1 nested properties
v1beta object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

mistral object

Connect to Mistral models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

1 nested properties
v1 object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

openai object

Connect to OpenAI's GPT models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

1 nested properties
v1 object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

bedrock object

Connect to Bedrock models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

1 nested properties
v1 object

All settings depend on a specific version, as the vendor might change the API over time.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

auth/aws-sigv4 object

Enterprise only. Enables AWS Sigv4 authentication between KrakenD and Google Cloud service account.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

5 nested properties
region string required

The AWS region where the service is deployed.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Examples: "us-east-1"
service string required

The name of the service in AWS you'd like to sign the request.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Examples: "dynamodb"
assume_role_arn string

The Amazon Resource Name (ARN) of the role to assume.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Examples: "arn:aws:sts::{account ID}:assumed-role/{resource}"
debug boolean

Enables debug logging for AWS Sigv4 signing process.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Default: false
sts_region string

The AWS region where the STS service is deployed.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Examples: "us-west-1"
auth/client-credentials object

2-legged OAuth2 flow: Request to your authorization server an access token to reach protected resources.

See: https://www.krakend.io/docs/authorization/client-credentials/

5 nested properties
client_id string required

The Client ID provided to the Auth server

See: https://www.krakend.io/docs/authorization/client-credentials/

client_secret string required

The secret string provided to the Auth server.

See: https://www.krakend.io/docs/authorization/client-credentials/

Examples: "mys3cr3t"
token_url string required

The endpoint URL where the negotiation of the token happens

See: https://www.krakend.io/docs/authorization/client-credentials/

Examples: "https://your.custom.identity.service.tld/token_endpoint"
endpoint_params object

Any additional parameters you want to include in the payload when requesting the token. For instance, adding the audience request parameter may denote the target API for which the token should be issued.

See: https://www.krakend.io/docs/authorization/client-credentials/

Examples: {"audience":["YOUR-AUDIENCE"]}
scopes string

A comma-separated list of scopes needed, e.g.: scopeA,scopeB

See: https://www.krakend.io/docs/authorization/client-credentials/

Examples: "scopeA,scopeB"
auth/gcp object

Enterprise only. Enables GCP authentication between KrakenD and Google Cloud service account.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Any of: variant, variant, variant
5 nested properties
audience string

The audience in GCP looks like an URL, and contains the destination service you will ask a token for. Most of the times this URL will match exactly with the host entry.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Examples: "https://gcptest-76fewi6rca-uc.a.run.app"
credentials_file string

The relative or absolute path to a credentials file in JSON format that contains all the credentials to authenticate API calls to the given service account.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Examples: "/etc/krakend/gcp.json"
credentials_json object

An inline JSON object containing all the credentials fields to authenticate to GCP.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Examples: {"type":"service_account","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"[email protected]","client_id":"123","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/xyz%40developer.gserviceaccount.com","private_key":"-----BEGIN PRIVATE KEY-----\nSOME_KEY\n-----END PRIVATE KEY-----\n","private_key_id":"private_key_id","project_id":"project_id","token_uri":"https://accounts.google.com/o/oauth2/token"}
custom_claims object

Custom private claims that you can optionally add to an ID token.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

s2s_auth_header string

The header name to use in service-to-service authentication. This is useful to honor the original Authorization header in case it's needed by the backend (for example, CloudRun).

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Default: ""
Examples: "X-Serverless-Authorization"
auth/ntlm object

Enterprise only. Enables NTLM authentication between KrakenD and a Microsoft server such as Dynamics.

See: https://www.krakend.io/docs/enterprise/authentication/ntlm/

2 nested properties
password string required

The password you will use, in clear text.

See: https://www.krakend.io/docs/enterprise/authentication/ntlm/

Examples: "myp4ssw0rd"
user string required

The username you will send as NTLM authentication user.

See: https://www.krakend.io/docs/enterprise/authentication/ntlm/

Examples: "krakendclient"
backend/amqp/consumer object

The AMQP component allows to send and receive messages to and from a queue through the API Gateway.

See: https://www.krakend.io/docs/backends/amqp-consumer/

13 nested properties
exchange string required

The exchange name (must have a topic type if already exists).

See: https://www.krakend.io/docs/backends/amqp-consumer/

Examples: "some-exchange"
name string required
routing_key string[] required

The list of routing keys you will use to consume messages.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Examples: ["#"]
auto_ack boolean

When KrakenD retrieves the messages, regardless of the success or failure of the operation, it marks them as ACKnowledge.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
backoff_strategy enum

When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the max_retries. The backoff strategy defines the delay in seconds in between consecutive failed retries. Check the meaning of each strategy.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: "fallback"
Values: "linear" "linear-jitter" "exponential" "exponential-jitter" "fallback"
delete boolean

When true, AMQP deletes the queue when there are no remaining connections. This option is not recommended in most of the scenarios. If for instance, the connectivity between KrakenD and AMQP is lost for whatever reason and it's the only client, AMQP will delete the queue no matter the number of messages there are inside, and when KrakenD gets the connection again the queue won't exist and future connections will recreate it again.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
durable boolean

Durable queues will survive server restarts and remain when there are no remaining consumers or bindings. true is recommended, but depends on the use case.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
exclusive boolean

When true, AMQP will allow a single KrakenD instance to access the queue. This option is not recommended in environments where the gateway needs high availability and you have several instances running.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
max_retries integer

The maximum number of times you will allow KrakenD to retry reconnecting to a broken messaging system. During startup KrakenD will wait for a maximum of 3 retries before starting to use this policy. Use 0 for unlimited retries.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: 0
nack_discard boolean

When true, messages that cannot be processed are discarded instead of being sent back to the queue. This is useful for scenarios where you want to avoid reprocessing failed messages.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
no_local boolean

The no_local flag is not supported by RabbitMQ.

See: https://www.krakend.io/docs/backends/amqp-consumer/

no_wait boolean

When true, do not wait for the server to confirm the request and immediately begin deliveries. If it is not possible to consume, a channel exception will be raised and the channel will be closed.

See: https://www.krakend.io/docs/backends/amqp-consumer/

prefetch_count integer

The number of messages you want to prefetch prior to consume them.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: 0
backend/amqp/producer object

Send messages to a queue through the API Gateway.

See: https://www.krakend.io/docs/backends/amqp-producer/

17 nested properties
exchange string required

The exchange name (must have a topic type if already exists).

See: https://www.krakend.io/docs/backends/amqp-producer/

Examples: "some-exchange"
name string required
routing_key string required

The routing key you will use to send messages, case sensitive.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: "#"
backoff_strategy enum

When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the max_retries. The backoff strategy defines the delay in seconds in between consecutive failed retries. Check the meaning of each strategy.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: "fallback"
Values: "linear" "linear-jitter" "exponential" "exponential-jitter" "fallback"
delete boolean

When true, AMQP deletes the queue when there are no remaining connections. This option is not recommended in most of the scenarios. If for instance, the connectivity between KrakenD and AMQP is lost for whatever reason and it's the only client, AMQP will delete the queue no matter the number of messages there are inside, and when KrakenD gets the connection again the queue won't exist and future connections will recreate it again.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
durable boolean

true is recommended, but depends on the use case. Durable queues will survive server restarts and remain when there are no remaining consumers or bindings.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
exclusive boolean

When true, AMQP will allow a single KrakenD instance to access the queue. This option is not recommended in environments where the gateway needs high availability and you have several instances running.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
exp_key string

Take a parameter from a {placeholder} in the endpoint definition to use as the expiration key. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as {id}, you must write Id.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: ""
immediate boolean

A consumer must be connected to the queue when true.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
mandatory boolean

The exchange must have at least one queue bound when true.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
max_retries integer

The maximum number of times you will allow KrakenD to retry reconnecting to a broken messaging system. During startup KrakenD will wait for a maximum of 3 retries before starting to use this policy. Use 0 for unlimited retries.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: 0
msg_id_key string

Take a parameter from a {placeholder} in the endpoint definition to use as the message identifier. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as {id}, you must write Id.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: ""
no_local boolean

The no_local flag is not supported by RabbitMQ.

See: https://www.krakend.io/docs/backends/amqp-consumer/

no_wait boolean

When true, do not wait for the server to confirm the request and immediately begin deliveries. If it is not possible to consume, a channel exception will be raised and the channel will be closed.

See: https://www.krakend.io/docs/backends/amqp-producer/

priority_key string

Take a parameter from a {placeholder} in the endpoint definition to use as the reply key. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as {id}, you must write Id.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: ""
reply_to_key string

Take a parameter from a {placeholder} in the endpoint definition to use as the reply key. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as {id}, you must write Id.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: ""
static_routing_key boolean

Defines whether the routing_key will have a static value or not, instead of taking the value from a parameter.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
backend/conditional object

Evaluates a rule to determine if the backend is callable or not, and skip to the next one in case it's not.

See: https://www.krakend.io/docs/enterprise/backends/conditional/

3 nested properties
strategy enum required

Choose header when you want to check the value of a specific header, policy when you want to write a more complex logical expression, or fallback when the backend will execute when all the rest of conditional backends have failed to evaluate to true. Only one fallback can be defined per endpoint.

See: https://www.krakend.io/docs/enterprise/backends/conditional/

Values: "header" "policy" "fallback"
name string

Only used with the header strategy. It is the name of the header you want to use for the evaluation in the canonical format of the MIME header. Make sure to declare the header in the input_headers list of the endpoint.

See: https://www.krakend.io/docs/enterprise/backends/conditional/

Examples: "X-Test"
value string

The value according to the strategy. With the header strategy, this is the literal value contained in the header (case sensitive). With the policy strategy, the Security Policy expression. When using policies you can access to the variables req and req_params (a previous backend response might be in the latter), and to advanced macros. Access to headers require you to add the corresponding input_headers in the endpoint.

See: https://www.krakend.io/docs/enterprise/backends/conditional/

Examples: "TestA", "hasHeader('X-Test') && req_params.Resp0_message == '0 items left'"
backend/graphql object

Convert REST endpoints to GraphQL calls (adapter/transformer)

One of: variant, variant
5 nested properties
type enum

The type of query you are declaring, query (read), or mutation (write).

See: https://www.krakend.io/docs/backends/graphql/

Values: "query" "mutation"
operationName string

A meaningful and explicit name for your operation, required in multi-operation documents and for helpful debugging and server-side logging.

See: https://www.krakend.io/docs/backends/graphql/

Examples: "addMktPreferencesForUser"
query string

An inline GraphQL query you want to send to the server. Use this attribute for simple and inline queries, use query_path instead for larger queries. Use escaping when needed.

See: https://www.krakend.io/docs/backends/graphql/

Examples: "{ find_follower(func: uid("0x3")) { name } }"
query_path string

Path to the file containing the query. This file is loaded during startup and never checked again, if it changes KrakenD will be unaware of it.

See: https://www.krakend.io/docs/backends/graphql/

Examples: "./graphql/mutations/marketing.graphql"
variables object

A dictionary defining all the variables sent to the GraphQL server. You can use {placeholders} to inject parameters from the endpoint URL.

See: https://www.krakend.io/docs/backends/graphql/

backend/grpc object

Enterprise only. Handles the communication with a backend using gRPC, after having defined the protocol buffer definitions.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

16 nested properties
client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

8 nested properties
allow_insecure_connections boolean

By default, KrakenD verifies every SSL connection. This option allows you to connect to backends considered insecure, for instance when you are using self-signed certificates

Default: false
ca_certs array

An array with all the CA certificates you would like to validate the server you are connecting to.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[]
Examples: ["ca.pem"]
cipher_suites array

The list of cipher suites as defined in the documentation.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  4865,
  4866,
  4867
]
uniqueItems=true
client_certs object[]

The list of all client certificates available when fetching data from the upstream service.

See: https://www.krakend.io/docs/service-settings/tls/

curve_preferences enum[]

The list of all the identifiers for the curve preferences. Use 23 for CurveP256, 24 for CurveP384 or 25 for CurveP521.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  23,
  24,
  25
]
uniqueItems=true
disable_system_ca_pool boolean

Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the ca_certs list when true.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
max_version enum

Maximum TLS version supported.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
min_version enum

Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the ciphers_list.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
disable_query_params boolean

When true, it does not use URL parameters ({placeholders} in endpoints) or query strings to fill the gRPC payload to send. If use_request_body is not set, or set to false, and this option is set to true, there will be no input used for the gRPC message to send. That is still a valid option, when we just want to send the message with its default values, or when the input for the gRPC calls is just the empty message.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
header_mapping object

A dictionary that rename the received header (key) to a new header name (value). If the header starts with grpc they will be renamed to in-grpc-* as the word is reserved.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Examples: {"X-Tenant":"customerid"}
idle_conn_disconnect_time string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
input_assume_bytes

When set to true, when the backend has to fill a bytes field for a grpc protobuf payload to send, first tries to decode the input data (the one coming from either a json body field, a query param or header string) from base64: if it succeeds it fills the field to send with that binary / bytes data. If the incoming field is not a valid base64 decoded field (the one used in jsonpb), it will fill the binary field with the verbatim conversion of the incoming string to bytes.

Default: false
input_mapping object

A dictionary that converts query string parameters and parameters from {placeholders} into a different field during the backend request. When passing parameters using {placeholder} the parameter capitalizes the first letter, so you receive Placeholder.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Examples: {"lat":"where.latitude","lon":"where.longitude"}
max_call_recv_msg_size number

Specifies the maximum size (in bytes) for messages the grpc client is allowed to receive. If the value is unset, or 0, it uses its default (4MB)

Examples: 33554432, 4194304, 0
output_duration_as_string boolean

Well-known Duration types (google.protobuf.Duration) are returned as a struct containing fields with seconds and nanos fields (flag set to false). Setting this flag to true transforms the timestamps into a string representation in seconds.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
output_enum_as_string boolean

Enum types are returned as numeric values (flag set to false). Set this flag to true to return the string representation of the enum value. For instance, an enum representing allergies, such as ['NUTS', 'MILK', ' SOY', 'WHEAT'] would return a value SOY when this flag is true, or 2 when false.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
output_remove_unset_values boolean

This attribute defines what to do when a field that is declared in the definition does not exist in the backend response. When the flag is true, any fields in the definition that are not present in the backend response are removed before returning the content to the user. When the flag is false missing fields are returned but set with a zeroed-value depending on its type (zero, nil, false, etc).

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
output_timestamp_as_string boolean

Well-known Timestamp types (google.protobuf.Timestamp) are returned as a struct containing fields with seconds and nanos fields (flag set to false). Setting this flag to true transforms the timestamps into a string representation in RFC3999 format.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
read_buffer_size number

Specifies the size of the client buffer reading the gRPC communication in bytes. If the value is unset, or 0, it uses its default (32KB). Use a negative value to disable the buffer, and if you do there won't be memory pre-allocation to read. To determine the right number, calculate the average size of the responses the gRPC client will receive.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Examples: 32768, 8192, -1
request_naming_convention enum

Defines the naming convention used to format the request. Applies to query strings and JSON field names. By default, the gateway uses snake_case which makes use of the standard encoding/json package, while when you choose camelCase the protobuf/encoding deserialization is used instead.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: "snake_case"
Values: "camelCase" "snake_case"
response_naming_convention enum

Defines the naming convention used to format the returned data. By default, the gateway uses snake_case which makes use of the standard encoding/json package, while when you choose camelCase the protobuf/encoding deserialization is used instead.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: "snake_case"
Values: "camelCase" "snake_case"
use_alternate_host_on_error boolean

When true, before sending a message to a host, it checks if the connection status is in a "transient failure" or "failure" state and tries to use a different host (from the service discovery or randomly from the list of hosts). If the connection is in a valid state, but an error happens when sending the gRPC message, it also tries to use a different host to retry sending the message. Depending on the host list, the retry attempts may go to the same host initially in a "bad state".

See: https://www.krakend.io/docs/enterprise/backends/grpc/

use_request_body boolean

Enables the use of the sent body to fill the gRPC request. Take into account that when you set this flag to true a body is expected, and this body is consumed in the first backend. If the endpoint that uses this gRPC backend has additional backends (either gRPC or HTTP) that also expect to consume the payload, these requests might fail.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
backend/http object
One of: variant, variant
2 nested properties
return_error_code boolean

Returns the HTTP status code of the backend (when there is only one). The headers are not returned.

See: https://www.krakend.io/docs/backends/detailed-errors/

return_error_details string

Returns to the client details of a failing request.

See: https://www.krakend.io/docs/backends/detailed-errors/

backend/http/client object

Enterprise only. Allows you to set the different HTTP client options with the backend, like TLS, no redirect or connect via a proxy.

See: https://www.krakend.io/docs/enterprise/backends/http-client/

4 nested properties
client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

8 nested properties
allow_insecure_connections boolean

By default, KrakenD verifies every SSL connection. This option allows you to connect to backends considered insecure, for instance when you are using self-signed certificates

Default: false
ca_certs array

An array with all the CA certificates you would like to validate the server you are connecting to.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[]
Examples: ["ca.pem"]
cipher_suites array

The list of cipher suites as defined in the documentation.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  4865,
  4866,
  4867
]
uniqueItems=true
client_certs object[]

The list of all client certificates available when fetching data from the upstream service.

See: https://www.krakend.io/docs/service-settings/tls/

curve_preferences enum[]

The list of all the identifiers for the curve preferences. Use 23 for CurveP256, 24 for CurveP384 or 25 for CurveP521.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  23,
  24,
  25
]
uniqueItems=true
disable_system_ca_pool boolean

Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the ca_certs list when true.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
max_version enum

Maximum TLS version supported.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
min_version enum

Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the ciphers_list.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
no_redirect boolean

Set no_redirect to true if you don't want KrakenD to follow redirects and let the consuming user to receive the 30x status code.

See: https://www.krakend.io/docs/enterprise/backends/http-client/

Default: false
proxy_address

The proxy address used to forward the traffic. The address must contain the protocol and the port.

See: https://www.krakend.io/docs/enterprise/backends/http-client/

Examples: "http://proxy.corp:9099"
send_body_on_redirect boolean

Post the original body to the final URL after a 307 or a 308 redirection.

See: https://www.krakend.io/docs/enterprise/backends/http-client/

Default: false
backend/lambda object

Invoke Amazon Lambda functions on a KrakenD endpoint call.

See: https://www.krakend.io/docs/backends/lambda/

5 nested properties
endpoint string

An optional parameter to customize the Lambda endpoint to call. Useful when Localstack is used for testing instead of direct AWS usage.

See: https://www.krakend.io/docs/backends/

function_name string

Name of the lambda function as saved in the AWS service. You have to choose between function_name and function_param_name but not both.

See: https://www.krakend.io/docs/backends/

function_param_name string

The endpoint {placeholder} that sets the function name, with the first letter uppercased. You have to choose between function_name and function_param_name but not both. If your endpoint defines the route /foo/{bar} the value of function_param_name must be Bar with the uppercased B.

See: https://www.krakend.io/docs/backends/

max_retries integer

Maximum times you want to execute the function until you have a successful response. The value -1 defers the max retry setting to the service specific configuration.

See: https://www.krakend.io/docs/backends/

Default: 0
region string

The AWS identifier region

See: https://www.krakend.io/docs/backends/

Examples: "us-east-1", "eu-west-2"
backend/pubsub/publisher object

Publishes to a topic using the desired driver.

See: https://www.krakend.io/docs/backends/pubsub/

1 nested properties
topic_url string required

Topic URL according to the selected driver

See: https://www.krakend.io/docs/backends/pubsub/

backend/pubsub/subscriber object

Subscribes a backend using the desired driver.

See: https://www.krakend.io/docs/backends/pubsub/

1 nested properties
subscription_url string required

Subscription URL according to the selected driver

See: https://www.krakend.io/docs/backends/pubsub/

backend/pubsub/publisher/kafka object

Enterprise only. Allows for fine grained control over a kafka publishing connection

2 nested properties
writer object required

Enterprise only. Defines how to write messages to a Kafka cluster

4 nested properties
cluster object required

Enterprise only. Defines how to connect to a Kafka cluster

topic string required

Topic to write to

producer object

Enterprise only. Defines details about how to write messages to a Kafka cluster

key_meta string

Name of the header where the kafka message key value is written

success_status_code number

HTTP status code to return for a successful write in the queue

Default: 200
min=200max=201
backend/pubsub/subscriber/kafka object

Enterprise only. Allows for fine grained control over a kafka subcription connection

1 nested properties
reader object required

Enterprise only. Defines how to read messages from a Kafka cluster

4 nested properties
cluster object required

Enterprise only. Defines how to connect to a Kafka cluster

topics string[] required

List of topics to read from

group object

Enterprise only. Defines the detaisl for a Kafka consumer group.

key_meta string

Name of the header where the kafka message key value is written

backend/soap object

Enterprise only. Build and modify requests to communicate with SOAP services.

See: https://www.krakend.io/docs/backends/soap/

One of: variant, variant
4 nested properties
content_type string

The Content-Type used in your template, and that will be sent to the SOAP server. This is not the content-type the end-user sent in the request.

See: https://www.krakend.io/docs/backends/soap/

Default: "text/xml"
Examples: "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/backends/soap/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/backends/soap/

Examples: "./path/to.xml"
template string

An inline base64 encoded Go template with the body XML content you want to send to the SOAP service. This option is useful if you don't want to rely on external files and embed the template in the configuration.

See: https://www.krakend.io/docs/backends/soap/

backend/static-filesystem object

Enterprise only. Allows you to fetch and serve static content from the disk instead of a remote server, and you can use it to mock data.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

2 nested properties
path string required

The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: ./assets) or absolute (e.g.: /var/www/assets).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "./static/"
directory_listing boolean

Whether to allow directory listings or not

Default: false
governance/quota object

Enterprise only. Attach a quota to the endpoint, backend, or service. Needs a governance/processor namespace.

See: https://www.krakend.io/docs/enterprise/governance/quota/

7 nested properties
quota_name string required

Name of the quota you want to reuse, written exactly as declared under the processors list.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "my_quota"
tier_key string required

Header used to determine the tier. Use tier_value and tier_value_as on each tier to determine how to match the value.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "X-User-Tier", "X-User-ID"
tiers object[] required

List of tiers to match against the request. The first tier that matches will be used to determine the quota to consume.

See: https://www.krakend.io/docs/enterprise/governance/quota/

disable_quota_headers boolean

When set to true, the quota headers X-Quota-Limit, X-Quota-Remaining, and Retry-After will not be added to the response. This is useful when you want to hide the quota information from the client.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
on_unmatched_tier_allow boolean

When a tier cannot be infered from the request, whether to allow the request to continue or not. In case a request does not match any of the tiers, the request will be rejected with a 400 error unless you set this to true.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
weight_key string

Instead of incrementing the quota counter by one unit, use the value provided in a field or header with its dynamic value. For instance, an LLM can return how many tokens it consumed, and you can use that value to increment the quota counter. The value must be a parseable number, and the field or header must be present in the backend response. The weight_key is only used in the endpoint and backend scopes, and it is ignored in the service level.

See: https://www.krakend.io/docs/enterprise/governance/quota/

weight_strategy enum

Where to find the key containing the counter value to increment. Use body for any type of encoding different than no-op and header for no-op.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: "body"
Values: "body" "header"
modifier/body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

modifier/jmespath object

Enterprise only. The JMESPath query language allows you to select, slice, filter, map, project, flatten, sort, and all sorts of operations on data.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

1 nested properties
expr string required

The JMESPath expression you want to apply to this endpoint.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

modifier/lua-backend object

Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.

See: https://www.krakend.io/docs/endpoints/lua/

7 nested properties
allow_open_libs boolean

As an efficiency point the Lua component does not load the standard libraries by default. If you need to import Lua libraries (e.g, the I/O, String, etc.), then you must set this flag to true.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
live boolean

For security and efficiency, the Lua script is loaded once into memory and not reloaded even if the file contents change. Set this flag to true if you want to modify the Lua script while KrakenD is running and apply the changes live (mostly during development to avoid the snippet being cached).

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
md5 object

The md5sum is an extra security feature to make sure that once you have coded the Lua script, the MD5 of what is loaded into memory matches what you expect and has not been tampered by a malicious 3rd party. The key of the object must match exactly the filename under sources, including all the path.

See: https://www.krakend.io/docs/endpoints/lua/

Examples: {"./path/to/file1.lua":"49ae50f58e35f4821ad4550e1a4d1de0"}
post string

The Lua code that is executed after performing the request. Available when used in the backend section. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "local r = response.load(); r:headers('Set-Cookie', 'key1='.. r:data('response'));"
pre string

The Lua code that is executed before performing the request. Unlike post, it's available in all sections. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "print('Backend response, pre-logic:'); local r = request.load(); print(r:body());"
skip_next boolean

Available on the backend section only. Instead of connecting to next backend in the pipe, returns an empty response and executes the post lua function.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
sources string[]

An array with all the Lua files that will be processed. If no path is provided (e.g., myfile.lua) the file loads from the working directory.

See: https://www.krakend.io/docs/endpoints/lua/

modifier/martian object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

3 nested properties
body string required

The body you want to set, formatted in base64.

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
contentType string

The content-type representing the body you are setting

Examples: "application/x-www-form-urlencoded", "text/plain"
cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

5 nested properties
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

name string required

The name of the Cookie you want to check. Notice that the input_headers must contain Cookie in the list when you want to check cookies sent by the client.

scope const: ["request"] required

Scopes in which this modifier acts

Constant: ["request"]
else object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

value

If besides the cookie name, you set this value, it ensures the cookie has a literal match.

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

9 nested properties
name string required

Name of the Cookie you want to set

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
value string required

Value of the Cookie you want to set

domain string

Domain of the Cookie you want to set

Examples: "example.com"
expires string

Date in RFC 3339 format and is absolute, not relative to the current time.

Examples: "2025-04-12T23:20:50.52Z"
httpOnly boolean

Create the Cookie with the httpOnly flag. When true, mitigates the risk of client side script accessing the protected cookie (if the browser supports it), mitigating the Most Common XSS

Default: false
maxAge integer

For how long this Cookie is valid, in seconds. 0 means that the attribute is not set. maxAge<0 means delete cookie now

Default: 0
path string

Path of the Cookie you want to set

Examples: "/path/to"
secure boolean

Cookie secure flag. When true, the user agent will include the cookie in the request when using https only

Default: false
fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

3 nested properties

The list of modifiers you want to execute in the declared order

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
aggregateErrors boolean

When true, the group will continue to execute consecutive modifiers when a modifier in the group encounters an error. The Group will then return all errors returned by each modifier after all modifiers have been executed. When false, if an error is returned by a modifier, the error is returned by ModifyRequest/Response and no further modifiers are run.

Default: false
header.Append object
3 nested properties
name string required

Name of the header you want to append a value. Add the same name under the input_headers list to append more values to an existing header passed by the client. In addition, to see the header in the response, you must use no-op.

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
value string required

The value you want to add or append.

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

2 nested properties
names string[] required

List of all the headers you want to supress from the request or the response. If you want to see the headers in the client, you must use the output_encoding: no-op, and if you want the client headers to propagate to the backend, you need to use input_headers too.

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

3 nested properties
from string required

The origin header you want to copy. When the header is provided by the user it must be included in the input_headers list.

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
to string required

The destination header you want to create. If this header is returned to the end-user you must use no-op in the output_encoding of the endpoint.

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

5 nested properties
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

name string required

Name of the header you want to check. You must add under input_headers the name included in the filter.

Examples: "X-Some", "Content-Type"
scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
else object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

value string

Value of the header you want to check

header.Id object
2 nested properties
scope const: ["request"] required

Scopes in which this modifier acts

Constant: ["request"]
header string

The header name you want to use to save the ID. In the case the header is already set, the header is unmodified.

Default: "X-Krakend-Id"
header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

3 nested properties
name string required

Name of the header you want to set

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
value string required

Value of the header you want to set

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

4 nested properties
header string required

Name of the header you want to check. You must add under input_headers the name included in the filter.

Examples: "X-Some", "Content-Type"
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

regex string required

The regular expression you want to check against the header value

Examples: ".*localhost.*", "^foo-[a-z]+$"
scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

4 nested properties
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

port integer required

The port number you want to check

scope const: ["request"] required

Scopes in which this modifier acts

Constant: ["request"]
else object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
4 nested properties
defaultForScheme boolean

Uses the default port of the schema. 80 for <http://> or 443 for <https://>. Other schemas are ignored.

port integer

Defines which port will be used.

remove boolean

Removes the port from the host string when true.

scope const: ["request"]

Scopes in which this modifier acts

Constant: ["request"]
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

2 nested properties
modifiers object[] required

The list of modifiers you want to execute, order specified in the items using priority.

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

5 nested properties
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

name string required

Name of the query string you want to check

Examples: "page", "limit"
scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
else object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

value string

Value of the query string you want to check

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

3 nested properties
name string required

Name of the query string you want to set

Examples: "page", "limit"
scope const: ["request"] required

Scopes in which this modifier acts

Constant: ["request"]
value string required

The value of the query string you want to set

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

2 nested properties
headerName string required

The header you want to create. If this header is returned to the end-user you must use no-op in the output_encoding of the endpoint.

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

7 nested properties
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

scope enum required

Scopes in which this modifier acts

Values: ["request","response"] ["request"] ["response"]
else object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

host string

The literal hostname that must match, including the port

Examples: "localhost:8080"
path string

The /path of the URL, without query strings.

Examples: "/path/to"
query string

The query strings you want to check. Use key1=value1&key2=value2 to check that the request has exactly these keys and values (order is irrelevant, but content not). Suppose the request has more query strings than declared here because the input_query_strings allowed them to pass. In that case, the evaluation will be false, and the else modifier will be executed.

Examples: "/path/to"
scheme string

The literal scheme it must match

Examples: "http", "https"
url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

5 nested properties
scope const: ["request"] required

Scopes in which this modifier acts

Constant: ["request"]
host string

The hostname part of the URL including the port

Examples: "example.com", "localhost:8080"
path string

The path part of the URL

Examples: "/path/to"
query string

Sets the query string parameters you want to pass, overwriting anything passed in the request. Notice that if you set a query, if the user passes other query string parameters listed under input_query_strings, they will be lost, and only the values passed in the modifier will be sent. For such uses, see the querystring.Modifier

Examples: "param=1", "key1=val&key2=val"
scheme string

The scheme to apply

Examples: "http", "https"
url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

4 nested properties
modifier object required

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

regex string required

The regular expression you want to check against the URL

scope const: ["request"] required

Scopes in which this modifier acts

Constant: ["request"]
else object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

modifier/request-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

modifier/response-body object

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

1 nested properties
modifiers object[]

A list of modifiers you would like to apply to specific fields. The modifiers are evaluated and applied in sequential order.

See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

Default:
[]
modifier/response-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

plugin/http-client object
1 nested properties
name string

The name of the plugin to load. Only one plugin is supported per backend.

See: https://www.krakend.io/docs/extending/injecting-plugins/

Examples: "no-redirect", "http-logger", "static-filesystem"
plugin/middleware object
1 nested properties
name string[] required

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/enterprise/extending/middleware-plugins/

plugin/req-resp-modifier object
4 nested properties
content-replacer Record<string, object>

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

ip-filter object

Enterprise only. The IP filtering plugin allows you to restrict the traffic to your API gateway based on the IP address. It works in two different modes (allow or deny) where you define the list of IPs (CIDR blocks) that are authorized to use the API, or that are denied from using the API.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

4 nested properties
CIDR string[] required

The CIDR blocks (list of IPs) you want to allow or deny.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["192.168.0.0/24","172.17.2.56/32"]
allow boolean required

When true, only the matching IPs are able to access the content. When false, all matching IPs are discarded.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Default: false
client_ip_headers string[]

A custom list of all headers that might contain the real IP of the client. The first matching IP in the list will be used. Default headers are (in order of checking): X-Forwarded-For, X-Real-IP, and X-Appengine-Remote-Addr.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["X-Forwarded-For","X-Real-IP","X-Appengine-Remote-Addr"]
trusted_proxies string[]

A custom list of all the recognized machines/balancers that proxy the client to your application. This list is used to avoid spoofing when trying to get the real IP of the client.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["10.0.0.0/16"]
name string[]

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/extending/plugin-modifiers/

Default:
[]
Examples: ["myplugin"]
response-schema-validator object

Enterprise only. The response schema validator plugin adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

2 nested properties
schema object required

Write your JSON schema directly in this field, with any number of fields or validations you need.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

error object

In case the validation fails, the error definition containing body and status.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

Examples: {"body":"We couldn't process you request, try again later.","status":401}
proxy object
2 nested properties
flatmap_filter object[]

The flatmap middleware allows you to manipulate collections (or arrays, or lists, you name it) from the backend response. While the basic manipulation operations allow you to work directly with objects, the collections require a different approach: the flatmap component.

See: https://www.krakend.io/docs/backend/flatmap/

Examples: [{"type":"move","args":["a.*.b1.*.c","a.*.b1.*.d"]}]
shadow boolean

Mark this backend as a shadow backend. Sending copies of the traffic but ignore its responses.

See: https://www.krakend.io/docs/backends/shadow-backends/

Default: true
qos/circuit-breaker object

The circuit breaker prevents sending more traffic to a failing backend.

See: https://www.krakend.io/docs/backends/circuit-breaker/

5 nested properties
interval integer required

Time window where the errors count, in seconds.

See: https://www.krakend.io/docs/backends/circuit-breaker/

max_errors integer required

The CONSECUTIVE (not total) number of errors within the interval window to consider the backend unhealthy. All HTTP status codes different than 20x are considered an error, except for the no-op encoding that does not evaluate status codes and is limited to connectivity/networking, security and component errors. See the definition of error below.

See: https://www.krakend.io/docs/backends/circuit-breaker/

timeout integer required

For how many seconds the circuit breaker will wait before testing again if the backend is healthy.

See: https://www.krakend.io/docs/backends/circuit-breaker/

log_status_change boolean

Whether to log the changes of state of this circuit breaker or not.

See: https://www.krakend.io/docs/backends/circuit-breaker/

Default: false
name string

A friendly name to follow this circuit breaker's activity in the logs.

See: https://www.krakend.io/docs/backends/circuit-breaker/

Examples: "cb-backend-1"
qos/circuit-breaker/http object

Enterprise only. The HTTP circuit breaker prevents sending more traffic to a backend that is returning status codes that are considered errors.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

6 nested properties
interval integer required

Time window where the errors count, in seconds.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

max_errors integer required

The CONSECUTIVE (not total) number of errors within the interval window to consider the backend unhealthy. All HTTP status codes different than 20x are considered an error, except for the no-op encoding that does not evaluate status codes and is limited to connectivity/networking, security and component errors. See the definition of error below.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Examples: 5
timeout integer required

For how many seconds the circuit breaker will wait before testing again if the backend is healthy. This number of seconds can also be read as the minimum cooldown of the backend interaction.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Examples: 10
valid_status_codes integer[] required

A list of HTTP status codes that will be considered successful responses. Any response with a status code not in this list will be counted as an error by the circuit breaker.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Examples: [200,201,404]
minItems=1uniqueItems=true
log_status_change boolean

Whether to log the changes of state of this circuit breaker or not.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Default: false
name string

A friendly name to follow this circuit breaker's activity in the logs.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Examples: "cb-backend-1"
qos/http-cache object

Enable in-memory caching for backend responses for as long as its Cache-Control header permits. Only safe methods are cached (GET or HEAD). The final backend URL and the Vary headers are used to create the caching key.

See: https://www.krakend.io/docs/backends/caching/

One of: variant, variant, variant
3 nested properties
max_items integer

To be released on open source on v2.10. The maximum number of items the LRU cache will store for this cache bucket before starting to do evictions. When max_items is declared, you must declare max_size as well.

See: https://www.krakend.io/docs/backends/caching/

min=1
max_size integer

To be released on open source on v2.10. The maximum number of bytes you allow the LRU cache to store for this cache bucket before starting to do evictions. This is not the total cache you allow to the system, but the number of bytes you reserve to this backend (or its shared neighbours). will store before starting to do evictions. When max_size is declared, you must declare max_items as well.

See: https://www.krakend.io/docs/backends/caching/

Examples: 104857600, 1048576
min=1024
shared boolean

Allows different backend definitions with this flag set to true to reuse the store between them when the request is the same. Otherwise, each backend uses a private cache context that is not accessible by other endpoints. The cache definition is unique for every backend URL + Vary header combination.

See: https://www.krakend.io/docs/backends/caching/

qos/ratelimit/proxy object

Restrict the rate of requests KrakenD makes to your backends.

See: https://www.krakend.io/docs/backends/rate-limit/

3 nested properties
capacity integer required

The capacity according to the token bucket algorithm. Defines the maximum requests you can do in an instant (including the zero moment when you start the gateway), and can be larger or smaller than the max_rate. When unsure, use the same value of max_rate, so the maximum number of requests can be consumed at once.

See: https://www.krakend.io/docs/backends/rate-limit/

Default: 1
max_rate number required

Maximum requests per second you want to accept in this backend.

See: https://www.krakend.io/docs/backends/rate-limit/

Examples: 0.5
every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
security/policies object

Enterprise only. The policies engine allows you to write custom sets of policies that are validated during requests, responses, or token validation.

See: https://www.krakend.io/docs/enterprise/security-policies/

Any of: variant, variant
5 nested properties
auto_join_policies boolean

When true, all policies of the same type concatenate with an AND operation to evaluate a single expression. Performs faster, but its harder the debug.

Default: false
debug boolean

When true, all the inputs and evaluation results are printed in the console.

Default: false
disable_macros boolean

Advanced macros can be disabled in those policies not needing them for a faster evaluation.

Default: false
req object

All the policies applied in the request context.

See: https://www.krakend.io/docs/enterprise/security-policies/

2 nested properties
policies string[] required

An array with all the policies to evaluate. Each policy is represented as a string

See: https://www.krakend.io/docs/enterprise/security-policies/

minItems=1
error object
resp object

All the policies applied in the response context.

See: https://www.krakend.io/docs/enterprise/security-policies/

2 nested properties
policies string[] required

An array with all the policies to evaluate. Each policy is represented as a string

See: https://www.krakend.io/docs/enterprise/security-policies/

minItems=1
error object
telemetry/logging object

Enterprise only. Add a specific Backend Log. Useful to see status codes, headers, and other information that come from your backends.

See: https://www.krakend.io/docs/enterprise/logging/

1 nested properties
backend object

Enables the Backend Log capabilities.

See: https://www.krakend.io/enterprise/docs/logging/

4 nested properties
custom_format string

Specify the custom format of the Backend Logs.

See: https://www.krakend.io/enterprise/docs/logging/

Default: "%{prefix}%{time} |%{statusCode}| %{latencyMs} | %{method} %{host} %{path} "
Examples: "%{time:kitchen} | (╯°□°)╯( ┻━┻ %{statusCode} | %{method} %{host} %{path} "
log_with_level enum

What type of reporting level do you want to set at the backends? The options below go from more verbose to least. Use the DEBUG level in the development stages but not in production. Some components can add extra verbosity while in DEBUG mode and send multiline content, which is not always suitable for automated log parsing.

See: https://www.krakend.io/enterprise/docs/logging/

Values: "DEBUG" "INFO" "WARNING" "ERROR" "CRITICAL"
no_value string

When the variable does not resolve to any value, the string you want to write in the log. If the string is set to an empty value, a dash - is printed.

See: https://www.krakend.io/enterprise/docs/logging/

Default: "-"
Examples: "-", "null", "no_value", "<empty>"
prefix string

Adds the defined string at the beginning of every logged line, so you can quickly filter messages with external tools later on.

See: https://www.krakend.io/enterprise/docs/logging/

Default: ""
Examples: ">>> "
telemetry/opentelemetry object

Enterprise only. Overrides metrics and traces declared by the OpenTelemetry service.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

1 nested properties
backend object

Reports the activity between KrakenD and each of your backend services. This is the more granular layer.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

2 nested properties
metrics object
traces object
validation/cel object[]

The Common Expression Language (CEL) middleware enables expression evaluation, when an expression returns false, KrakenD does not return the content as the condition has failed. Otherwise, if all expressions returned true, the content is served.

See: https://www.krakend.io/docs/endpoints/common-expression-language-cel/

minItems=1
validation/response-json-schema object

Enterprise only. The response schema validator adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

2 nested properties
schema object required

Write your JSON schema directly in this field, with any number of fields or validations you need.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

error object

In case the validation fails, the error definition containing body and status.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

Examples: {"body":"We couldn't process you request, try again later.","status":401}
3 nested properties
body string

The error message you want to show when the validation fails. Set it to an empty string "" to show the JSON-schema validation error.

Default: ""
content_type string

The Content-Type header you want to set back in the response when you are setting a custom body

Default: "text/plain"
Examples: "application/json"
status integer

The HTTP status code you want to set back in the response.

Default: 500
workflow object
7 nested properties
backend object[] required

List of all the backend objects called within this workflow. Each backend can initiate another workflow if needed.

minItems=1
endpoint string required

An endpoint name for the workflow that will be used in logs. The name will be appended to the string /__workflow/ in the logs, and although it does not receive traffic under this route, it is necessary when you want to pass URL {params} to the nested backends.

See: https://www.krakend.io/docs/endpoints/

Examples: "/workflow-1/{param1}"
concurrent_calls integer

The concurrent requests are an excellent technique to improve the response times and decrease error rates by requesting in parallel the same information multiple times. Yes, you make the same request to several backends instead of asking to just one. When the first backend returns the information, the remaining requests are canceled.

See: https://www.krakend.io/docs/endpoints/concurrent-requests/

Default: 1
min=1max=5
extra_config object
9 nested properties
modifier/jmespath object

Enterprise only. The JMESPath query language allows you to select, slice, filter, map, project, flatten, sort, and all sorts of operations on data.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

modifier/lua-proxy object

Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.

See: https://www.krakend.io/docs/endpoints/lua/

modifier/request-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
modifier/response-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
plugin/req-resp-modifier object
proxy object
security/policies object

Enterprise only. The policies engine allows you to write custom sets of policies that are validated during requests, responses, or token validation.

See: https://www.krakend.io/docs/enterprise/security-policies/

Any of: variant, variant, variant
validation/cel object[]

The Common Expression Language (CEL) middleware enables expression evaluation, when an expression returns false, KrakenD does not return the content as the condition has failed. Otherwise, if all expressions returned true, the content is served.

See: https://www.krakend.io/docs/endpoints/common-expression-language-cel/

minItems=1
validation/json-schema object

apply automatic validations using the JSON Schema vocabulary before the content passes to the backends. The json schema component allows you to define validation rules on the body, type definition, or even validate the fields' values.

See: https://www.krakend.io/docs/endpoints/json-schema/

ignore_errors

Allow the workflow to continue with the rest of declared actions when there are errors (like security policies, network errors, etc). The default behavior of KrakenD is to abort an execution that has errors as soon as possible. If you use conditional backends and similar approaches, you might want to allow the gateway to go through all steps.

See: https://www.krakend.io/docs/endpoints/

Default: false
output_encoding enum

The gateway can work with several content types, even allowing your clients to choose how to consume the content. See the supported encodings

Default: "json"
Values: "json" "json-collection" "yaml" "fast-json" "xml" "negotiate" "string" "no-op"
timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
https://www.krakend.io/schema/v2.13/backend.json object

A backend object is an array of all the services that an endpoint connects to. It defines the list of hostnames that connects to and the URL to send or receive the data.

url_pattern string required

The path inside the service (no protocol, no host, no method). E.g: /users. Some functionalities under extra_config might drop the requirement of declaring a valid url_pattern, but they are exceptions. The URL must be RESTful, if it is not (e.g.: /url.{some_variable}.json), then see how to disable RESTful checking.

See: https://www.krakend.io/docs/backends/

Examples: "/users", "/user/{id_user}"
allow string[]

Only return the fields in the list. Only the matching fields (case-sensitive) are returned in the final response. Use a dot . separator to define nested attributes, e.g.: a.b returns {"a":{"b": true}}

See: https://www.krakend.io/docs/backends/data-manipulation/

Examples: ["user_id","field1.subfield2"]
uniqueItems=true
deny string[]

Don't return the fields in the list. All matching fields (case-sensitive) defined in the list, are removed from the response. Use a dot . separator to define nested attributes, e.g.: a.b removes {"a":{"b": true}}.

See: https://www.krakend.io/docs/backends/data-manipulation/

Examples: ["token","CVV","password"]
uniqueItems=true
disable_host_sanitize boolean

Set it to true when the host doesn't need to be checked for an HTTP protocol. This is the case of sd=dns or when using other protocols like amqp://, nats://, kafka://, etc. When set to true, and the protocol is not HTTP, KrakenD fails with an invalid host error.

Default: false
encoding enum

Defines your needed encoding to set how to parse the response. Defaults to the value of its endpoint's encoding, or to json if not defined anywhere else. Notice that fast-json and yaml are for Enterprise only.

See: https://www.krakend.io/docs/backends/supported-encodings/

Default: "json"
Values: "json" "safejson" "fast-json" "xml" "rss" "string" "no-op" "yaml"
extra_config object
41 nested properties
ai/llm object

Ready-to-use LLM connectors available for major AI vendors.

See: https://www.krakend.io/docs/enterprise/ai-gateway/unified-llm-interface/

5 nested properties
anthropic object

Connect to Anthropic models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/

gemini object

Connect to Google Gemini models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/

mistral object

Connect to Mistral models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/

openai object

Connect to OpenAI's GPT models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/openai/

bedrock object

Connect to Bedrock models easily by providing your API key and optional parameters.

See: https://www.krakend.io/docs/enterprise/ai-gateway/bedrock/

auth/aws-sigv4 object

Enterprise only. Enables AWS Sigv4 authentication between KrakenD and Google Cloud service account.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

5 nested properties
region string required

The AWS region where the service is deployed.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Examples: "us-east-1"
service string required

The name of the service in AWS you'd like to sign the request.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Examples: "dynamodb"
assume_role_arn string

The Amazon Resource Name (ARN) of the role to assume.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Examples: "arn:aws:sts::{account ID}:assumed-role/{resource}"
debug boolean

Enables debug logging for AWS Sigv4 signing process.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Default: false
sts_region string

The AWS region where the STS service is deployed.

See: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/

Examples: "us-west-1"
auth/client-credentials object

2-legged OAuth2 flow: Request to your authorization server an access token to reach protected resources.

See: https://www.krakend.io/docs/authorization/client-credentials/

5 nested properties
client_id string required

The Client ID provided to the Auth server

See: https://www.krakend.io/docs/authorization/client-credentials/

client_secret string required

The secret string provided to the Auth server.

See: https://www.krakend.io/docs/authorization/client-credentials/

Examples: "mys3cr3t"
token_url string required

The endpoint URL where the negotiation of the token happens

See: https://www.krakend.io/docs/authorization/client-credentials/

Examples: "https://your.custom.identity.service.tld/token_endpoint"
endpoint_params object

Any additional parameters you want to include in the payload when requesting the token. For instance, adding the audience request parameter may denote the target API for which the token should be issued.

See: https://www.krakend.io/docs/authorization/client-credentials/

Examples: {"audience":["YOUR-AUDIENCE"]}
scopes string

A comma-separated list of scopes needed, e.g.: scopeA,scopeB

See: https://www.krakend.io/docs/authorization/client-credentials/

Examples: "scopeA,scopeB"
auth/gcp object

Enterprise only. Enables GCP authentication between KrakenD and Google Cloud service account.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Any of: variant, variant, variant
5 nested properties
audience string

The audience in GCP looks like an URL, and contains the destination service you will ask a token for. Most of the times this URL will match exactly with the host entry.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Examples: "https://gcptest-76fewi6rca-uc.a.run.app"
credentials_file string

The relative or absolute path to a credentials file in JSON format that contains all the credentials to authenticate API calls to the given service account.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Examples: "/etc/krakend/gcp.json"
credentials_json object

An inline JSON object containing all the credentials fields to authenticate to GCP.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Examples: {"type":"service_account","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"[email protected]","client_id":"123","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/xyz%40developer.gserviceaccount.com","private_key":"-----BEGIN PRIVATE KEY-----\nSOME_KEY\n-----END PRIVATE KEY-----\n","private_key_id":"private_key_id","project_id":"project_id","token_uri":"https://accounts.google.com/o/oauth2/token"}
custom_claims object

Custom private claims that you can optionally add to an ID token.

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

s2s_auth_header string

The header name to use in service-to-service authentication. This is useful to honor the original Authorization header in case it's needed by the backend (for example, CloudRun).

See: https://www.krakend.io/docs/enterprise/authentication/gcp/

Default: ""
Examples: "X-Serverless-Authorization"
auth/ntlm object

Enterprise only. Enables NTLM authentication between KrakenD and a Microsoft server such as Dynamics.

See: https://www.krakend.io/docs/enterprise/authentication/ntlm/

2 nested properties
password string required

The password you will use, in clear text.

See: https://www.krakend.io/docs/enterprise/authentication/ntlm/

Examples: "myp4ssw0rd"
user string required

The username you will send as NTLM authentication user.

See: https://www.krakend.io/docs/enterprise/authentication/ntlm/

Examples: "krakendclient"
backend/amqp/consumer object

The AMQP component allows to send and receive messages to and from a queue through the API Gateway.

See: https://www.krakend.io/docs/backends/amqp-consumer/

13 nested properties
exchange string required

The exchange name (must have a topic type if already exists).

See: https://www.krakend.io/docs/backends/amqp-consumer/

Examples: "some-exchange"
name string required
routing_key string[] required

The list of routing keys you will use to consume messages.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Examples: ["#"]
auto_ack boolean

When KrakenD retrieves the messages, regardless of the success or failure of the operation, it marks them as ACKnowledge.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
backoff_strategy enum

When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the max_retries. The backoff strategy defines the delay in seconds in between consecutive failed retries. Check the meaning of each strategy.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: "fallback"
Values: "linear" "linear-jitter" "exponential" "exponential-jitter" "fallback"
delete boolean

When true, AMQP deletes the queue when there are no remaining connections. This option is not recommended in most of the scenarios. If for instance, the connectivity between KrakenD and AMQP is lost for whatever reason and it's the only client, AMQP will delete the queue no matter the number of messages there are inside, and when KrakenD gets the connection again the queue won't exist and future connections will recreate it again.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
durable boolean

Durable queues will survive server restarts and remain when there are no remaining consumers or bindings. true is recommended, but depends on the use case.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
exclusive boolean

When true, AMQP will allow a single KrakenD instance to access the queue. This option is not recommended in environments where the gateway needs high availability and you have several instances running.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
max_retries integer

The maximum number of times you will allow KrakenD to retry reconnecting to a broken messaging system. During startup KrakenD will wait for a maximum of 3 retries before starting to use this policy. Use 0 for unlimited retries.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: 0
nack_discard boolean

When true, messages that cannot be processed are discarded instead of being sent back to the queue. This is useful for scenarios where you want to avoid reprocessing failed messages.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: false
no_local boolean

The no_local flag is not supported by RabbitMQ.

See: https://www.krakend.io/docs/backends/amqp-consumer/

no_wait boolean

When true, do not wait for the server to confirm the request and immediately begin deliveries. If it is not possible to consume, a channel exception will be raised and the channel will be closed.

See: https://www.krakend.io/docs/backends/amqp-consumer/

prefetch_count integer

The number of messages you want to prefetch prior to consume them.

See: https://www.krakend.io/docs/backends/amqp-consumer/

Default: 0
backend/amqp/producer object

Send messages to a queue through the API Gateway.

See: https://www.krakend.io/docs/backends/amqp-producer/

17 nested properties
exchange string required

The exchange name (must have a topic type if already exists).

See: https://www.krakend.io/docs/backends/amqp-producer/

Examples: "some-exchange"
name string required
routing_key string required

The routing key you will use to send messages, case sensitive.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: "#"
backoff_strategy enum

When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the max_retries. The backoff strategy defines the delay in seconds in between consecutive failed retries. Check the meaning of each strategy.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: "fallback"
Values: "linear" "linear-jitter" "exponential" "exponential-jitter" "fallback"
delete boolean

When true, AMQP deletes the queue when there are no remaining connections. This option is not recommended in most of the scenarios. If for instance, the connectivity between KrakenD and AMQP is lost for whatever reason and it's the only client, AMQP will delete the queue no matter the number of messages there are inside, and when KrakenD gets the connection again the queue won't exist and future connections will recreate it again.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
durable boolean

true is recommended, but depends on the use case. Durable queues will survive server restarts and remain when there are no remaining consumers or bindings.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
exclusive boolean

When true, AMQP will allow a single KrakenD instance to access the queue. This option is not recommended in environments where the gateway needs high availability and you have several instances running.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
exp_key string

Take a parameter from a {placeholder} in the endpoint definition to use as the expiration key. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as {id}, you must write Id.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: ""
immediate boolean

A consumer must be connected to the queue when true.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
mandatory boolean

The exchange must have at least one queue bound when true.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
max_retries integer

The maximum number of times you will allow KrakenD to retry reconnecting to a broken messaging system. During startup KrakenD will wait for a maximum of 3 retries before starting to use this policy. Use 0 for unlimited retries.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: 0
msg_id_key string

Take a parameter from a {placeholder} in the endpoint definition to use as the message identifier. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as {id}, you must write Id.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: ""
no_local boolean

The no_local flag is not supported by RabbitMQ.

See: https://www.krakend.io/docs/backends/amqp-consumer/

no_wait boolean

When true, do not wait for the server to confirm the request and immediately begin deliveries. If it is not possible to consume, a channel exception will be raised and the channel will be closed.

See: https://www.krakend.io/docs/backends/amqp-producer/

priority_key string

Take a parameter from a {placeholder} in the endpoint definition to use as the reply key. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as {id}, you must write Id.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: ""
reply_to_key string

Take a parameter from a {placeholder} in the endpoint definition to use as the reply key. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as {id}, you must write Id.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: ""
static_routing_key boolean

Defines whether the routing_key will have a static value or not, instead of taking the value from a parameter.

See: https://www.krakend.io/docs/backends/amqp-producer/

Default: false
backend/conditional object

Evaluates a rule to determine if the backend is callable or not, and skip to the next one in case it's not.

See: https://www.krakend.io/docs/enterprise/backends/conditional/

3 nested properties
strategy enum required

Choose header when you want to check the value of a specific header, policy when you want to write a more complex logical expression, or fallback when the backend will execute when all the rest of conditional backends have failed to evaluate to true. Only one fallback can be defined per endpoint.

See: https://www.krakend.io/docs/enterprise/backends/conditional/

Values: "header" "policy" "fallback"
name string

Only used with the header strategy. It is the name of the header you want to use for the evaluation in the canonical format of the MIME header. Make sure to declare the header in the input_headers list of the endpoint.

See: https://www.krakend.io/docs/enterprise/backends/conditional/

Examples: "X-Test"
value string

The value according to the strategy. With the header strategy, this is the literal value contained in the header (case sensitive). With the policy strategy, the Security Policy expression. When using policies you can access to the variables req and req_params (a previous backend response might be in the latter), and to advanced macros. Access to headers require you to add the corresponding input_headers in the endpoint.

See: https://www.krakend.io/docs/enterprise/backends/conditional/

Examples: "TestA", "hasHeader('X-Test') && req_params.Resp0_message == '0 items left'"
backend/graphql object

Convert REST endpoints to GraphQL calls (adapter/transformer)

One of: variant, variant
5 nested properties
type enum

The type of query you are declaring, query (read), or mutation (write).

See: https://www.krakend.io/docs/backends/graphql/

Values: "query" "mutation"
operationName string

A meaningful and explicit name for your operation, required in multi-operation documents and for helpful debugging and server-side logging.

See: https://www.krakend.io/docs/backends/graphql/

Examples: "addMktPreferencesForUser"
query string

An inline GraphQL query you want to send to the server. Use this attribute for simple and inline queries, use query_path instead for larger queries. Use escaping when needed.

See: https://www.krakend.io/docs/backends/graphql/

Examples: "{ find_follower(func: uid("0x3")) { name } }"
query_path string

Path to the file containing the query. This file is loaded during startup and never checked again, if it changes KrakenD will be unaware of it.

See: https://www.krakend.io/docs/backends/graphql/

Examples: "./graphql/mutations/marketing.graphql"
variables object

A dictionary defining all the variables sent to the GraphQL server. You can use {placeholders} to inject parameters from the endpoint URL.

See: https://www.krakend.io/docs/backends/graphql/

backend/grpc object

Enterprise only. Handles the communication with a backend using gRPC, after having defined the protocol buffer definitions.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

16 nested properties
client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

disable_query_params boolean

When true, it does not use URL parameters ({placeholders} in endpoints) or query strings to fill the gRPC payload to send. If use_request_body is not set, or set to false, and this option is set to true, there will be no input used for the gRPC message to send. That is still a valid option, when we just want to send the message with its default values, or when the input for the gRPC calls is just the empty message.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
header_mapping object

A dictionary that rename the received header (key) to a new header name (value). If the header starts with grpc they will be renamed to in-grpc-* as the word is reserved.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Examples: {"X-Tenant":"customerid"}
idle_conn_disconnect_time string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
input_assume_bytes

When set to true, when the backend has to fill a bytes field for a grpc protobuf payload to send, first tries to decode the input data (the one coming from either a json body field, a query param or header string) from base64: if it succeeds it fills the field to send with that binary / bytes data. If the incoming field is not a valid base64 decoded field (the one used in jsonpb), it will fill the binary field with the verbatim conversion of the incoming string to bytes.

Default: false
input_mapping object

A dictionary that converts query string parameters and parameters from {placeholders} into a different field during the backend request. When passing parameters using {placeholder} the parameter capitalizes the first letter, so you receive Placeholder.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Examples: {"lat":"where.latitude","lon":"where.longitude"}
max_call_recv_msg_size number

Specifies the maximum size (in bytes) for messages the grpc client is allowed to receive. If the value is unset, or 0, it uses its default (4MB)

Examples: 33554432, 4194304, 0
output_duration_as_string boolean

Well-known Duration types (google.protobuf.Duration) are returned as a struct containing fields with seconds and nanos fields (flag set to false). Setting this flag to true transforms the timestamps into a string representation in seconds.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
output_enum_as_string boolean

Enum types are returned as numeric values (flag set to false). Set this flag to true to return the string representation of the enum value. For instance, an enum representing allergies, such as ['NUTS', 'MILK', ' SOY', 'WHEAT'] would return a value SOY when this flag is true, or 2 when false.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
output_remove_unset_values boolean

This attribute defines what to do when a field that is declared in the definition does not exist in the backend response. When the flag is true, any fields in the definition that are not present in the backend response are removed before returning the content to the user. When the flag is false missing fields are returned but set with a zeroed-value depending on its type (zero, nil, false, etc).

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
output_timestamp_as_string boolean

Well-known Timestamp types (google.protobuf.Timestamp) are returned as a struct containing fields with seconds and nanos fields (flag set to false). Setting this flag to true transforms the timestamps into a string representation in RFC3999 format.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
read_buffer_size number

Specifies the size of the client buffer reading the gRPC communication in bytes. If the value is unset, or 0, it uses its default (32KB). Use a negative value to disable the buffer, and if you do there won't be memory pre-allocation to read. To determine the right number, calculate the average size of the responses the gRPC client will receive.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Examples: 32768, 8192, -1
request_naming_convention enum

Defines the naming convention used to format the request. Applies to query strings and JSON field names. By default, the gateway uses snake_case which makes use of the standard encoding/json package, while when you choose camelCase the protobuf/encoding deserialization is used instead.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: "snake_case"
Values: "camelCase" "snake_case"
response_naming_convention enum

Defines the naming convention used to format the returned data. By default, the gateway uses snake_case which makes use of the standard encoding/json package, while when you choose camelCase the protobuf/encoding deserialization is used instead.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: "snake_case"
Values: "camelCase" "snake_case"
use_alternate_host_on_error boolean

When true, before sending a message to a host, it checks if the connection status is in a "transient failure" or "failure" state and tries to use a different host (from the service discovery or randomly from the list of hosts). If the connection is in a valid state, but an error happens when sending the gRPC message, it also tries to use a different host to retry sending the message. Depending on the host list, the retry attempts may go to the same host initially in a "bad state".

See: https://www.krakend.io/docs/enterprise/backends/grpc/

use_request_body boolean

Enables the use of the sent body to fill the gRPC request. Take into account that when you set this flag to true a body is expected, and this body is consumed in the first backend. If the endpoint that uses this gRPC backend has additional backends (either gRPC or HTTP) that also expect to consume the payload, these requests might fail.

See: https://www.krakend.io/docs/enterprise/backends/grpc/

Default: false
backend/http object
One of: variant, variant
2 nested properties
return_error_code boolean

Returns the HTTP status code of the backend (when there is only one). The headers are not returned.

See: https://www.krakend.io/docs/backends/detailed-errors/

return_error_details string

Returns to the client details of a failing request.

See: https://www.krakend.io/docs/backends/detailed-errors/

backend/http/client object

Enterprise only. Allows you to set the different HTTP client options with the backend, like TLS, no redirect or connect via a proxy.

See: https://www.krakend.io/docs/enterprise/backends/http-client/

4 nested properties
client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

no_redirect boolean

Set no_redirect to true if you don't want KrakenD to follow redirects and let the consuming user to receive the 30x status code.

See: https://www.krakend.io/docs/enterprise/backends/http-client/

Default: false
proxy_address

The proxy address used to forward the traffic. The address must contain the protocol and the port.

See: https://www.krakend.io/docs/enterprise/backends/http-client/

Examples: "http://proxy.corp:9099"
send_body_on_redirect boolean

Post the original body to the final URL after a 307 or a 308 redirection.

See: https://www.krakend.io/docs/enterprise/backends/http-client/

Default: false
backend/lambda object

Invoke Amazon Lambda functions on a KrakenD endpoint call.

See: https://www.krakend.io/docs/backends/lambda/

5 nested properties
endpoint string

An optional parameter to customize the Lambda endpoint to call. Useful when Localstack is used for testing instead of direct AWS usage.

See: https://www.krakend.io/docs/backends/

function_name string

Name of the lambda function as saved in the AWS service. You have to choose between function_name and function_param_name but not both.

See: https://www.krakend.io/docs/backends/

function_param_name string

The endpoint {placeholder} that sets the function name, with the first letter uppercased. You have to choose between function_name and function_param_name but not both. If your endpoint defines the route /foo/{bar} the value of function_param_name must be Bar with the uppercased B.

See: https://www.krakend.io/docs/backends/

max_retries integer

Maximum times you want to execute the function until you have a successful response. The value -1 defers the max retry setting to the service specific configuration.

See: https://www.krakend.io/docs/backends/

Default: 0
region string

The AWS identifier region

See: https://www.krakend.io/docs/backends/

Examples: "us-east-1", "eu-west-2"
backend/pubsub/publisher object

Publishes to a topic using the desired driver.

See: https://www.krakend.io/docs/backends/pubsub/

1 nested properties
topic_url string required

Topic URL according to the selected driver

See: https://www.krakend.io/docs/backends/pubsub/

backend/pubsub/subscriber object

Subscribes a backend using the desired driver.

See: https://www.krakend.io/docs/backends/pubsub/

1 nested properties
subscription_url string required

Subscription URL according to the selected driver

See: https://www.krakend.io/docs/backends/pubsub/

backend/pubsub/publisher/kafka object

Enterprise only. Allows for fine grained control over a kafka publishing connection

2 nested properties
writer object required

Enterprise only. Defines how to write messages to a Kafka cluster

success_status_code number

HTTP status code to return for a successful write in the queue

Default: 200
min=200max=201
backend/pubsub/subscriber/kafka object

Enterprise only. Allows for fine grained control over a kafka subcription connection

1 nested properties
reader object required

Enterprise only. Defines how to read messages from a Kafka cluster

backend/soap object

Enterprise only. Build and modify requests to communicate with SOAP services.

See: https://www.krakend.io/docs/backends/soap/

One of: variant, variant
4 nested properties
content_type string

The Content-Type used in your template, and that will be sent to the SOAP server. This is not the content-type the end-user sent in the request.

See: https://www.krakend.io/docs/backends/soap/

Default: "text/xml"
Examples: "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/backends/soap/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/backends/soap/

Examples: "./path/to.xml"
template string

An inline base64 encoded Go template with the body XML content you want to send to the SOAP service. This option is useful if you don't want to rely on external files and embed the template in the configuration.

See: https://www.krakend.io/docs/backends/soap/

backend/static-filesystem object

Enterprise only. Allows you to fetch and serve static content from the disk instead of a remote server, and you can use it to mock data.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

2 nested properties
path string required

The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: ./assets) or absolute (e.g.: /var/www/assets).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "./static/"
directory_listing boolean

Whether to allow directory listings or not

Default: false
governance/quota object

Enterprise only. Attach a quota to the endpoint, backend, or service. Needs a governance/processor namespace.

See: https://www.krakend.io/docs/enterprise/governance/quota/

7 nested properties
quota_name string required

Name of the quota you want to reuse, written exactly as declared under the processors list.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "my_quota"
tier_key string required

Header used to determine the tier. Use tier_value and tier_value_as on each tier to determine how to match the value.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "X-User-Tier", "X-User-ID"
tiers object[] required

List of tiers to match against the request. The first tier that matches will be used to determine the quota to consume.

See: https://www.krakend.io/docs/enterprise/governance/quota/

disable_quota_headers boolean

When set to true, the quota headers X-Quota-Limit, X-Quota-Remaining, and Retry-After will not be added to the response. This is useful when you want to hide the quota information from the client.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
on_unmatched_tier_allow boolean

When a tier cannot be infered from the request, whether to allow the request to continue or not. In case a request does not match any of the tiers, the request will be rejected with a 400 error unless you set this to true.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
weight_key string

Instead of incrementing the quota counter by one unit, use the value provided in a field or header with its dynamic value. For instance, an LLM can return how many tokens it consumed, and you can use that value to increment the quota counter. The value must be a parseable number, and the field or header must be present in the backend response. The weight_key is only used in the endpoint and backend scopes, and it is ignored in the service level.

See: https://www.krakend.io/docs/enterprise/governance/quota/

weight_strategy enum

Where to find the key containing the counter value to increment. Use body for any type of encoding different than no-op and header for no-op.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: "body"
Values: "body" "header"
modifier/body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

modifier/jmespath object

Enterprise only. The JMESPath query language allows you to select, slice, filter, map, project, flatten, sort, and all sorts of operations on data.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

1 nested properties
expr string required

The JMESPath expression you want to apply to this endpoint.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

modifier/lua-backend object

Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.

See: https://www.krakend.io/docs/endpoints/lua/

7 nested properties
allow_open_libs boolean

As an efficiency point the Lua component does not load the standard libraries by default. If you need to import Lua libraries (e.g, the I/O, String, etc.), then you must set this flag to true.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
live boolean

For security and efficiency, the Lua script is loaded once into memory and not reloaded even if the file contents change. Set this flag to true if you want to modify the Lua script while KrakenD is running and apply the changes live (mostly during development to avoid the snippet being cached).

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
md5 object

The md5sum is an extra security feature to make sure that once you have coded the Lua script, the MD5 of what is loaded into memory matches what you expect and has not been tampered by a malicious 3rd party. The key of the object must match exactly the filename under sources, including all the path.

See: https://www.krakend.io/docs/endpoints/lua/

Examples: {"./path/to/file1.lua":"49ae50f58e35f4821ad4550e1a4d1de0"}
post string

The Lua code that is executed after performing the request. Available when used in the backend section. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "local r = response.load(); r:headers('Set-Cookie', 'key1='.. r:data('response'));"
pre string

The Lua code that is executed before performing the request. Unlike post, it's available in all sections. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "print('Backend response, pre-logic:'); local r = request.load(); print(r:body());"
skip_next boolean

Available on the backend section only. Instead of connecting to next backend in the pipe, returns an empty response and executes the post lua function.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
sources string[]

An array with all the Lua files that will be processed. If no path is provided (e.g., myfile.lua) the file loads from the working directory.

See: https://www.krakend.io/docs/endpoints/lua/

modifier/martian object

The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.

See: https://www.krakend.io/docs/endpoints/martian/

20 nested properties
body.Modifier object

The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.

See: https://www.krakend.io/docs/backends/martian/

cookie.Filter object

The cookie.Filter executes the contained modifier when a cookie is provided under the name.

See: https://www.krakend.io/docs/backends/martian/

cookie.Modifier object

Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.

See: https://www.krakend.io/docs/backends/martian/

fifo.Group object

The fifo.Group holds a list of modifiers executed in first-in, first-out order.

See: https://www.krakend.io/docs/backends/martian/

header.Blacklist object

The header.Blacklist removes the listed headers under names in the request and response of the backend.

See: https://www.krakend.io/docs/backends/martian/

header.Copy object

The header.Copy lets you duplicate a header using another name

See: https://www.krakend.io/docs/backends/martian/

header.Filter object

The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.

See: https://www.krakend.io/docs/backends/martian/

header.Modifier object

The header.Modifier adds a new header or changes the value of an existing one.

See: https://www.krakend.io/docs/backends/martian/

header.RegexFilter object

The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.

See: https://www.krakend.io/docs/backends/martian/

port.Filter object

The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.

See: https://www.krakend.io/docs/backends/martian/

port.Modifier object

The port.Modifier alters the request URL and Host header to use the provided port.

See: https://www.krakend.io/docs/backends/martian/

One of: variant, variant, variant
priority.Group object

The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.

See: https://www.krakend.io/docs/backends/martian/

querystring.Filter object

The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.

See: https://www.krakend.io/docs/backends/martian/

querystring.Modifier object

The querystring.Modifier adds a new query string or modifies existing ones in the request.

See: https://www.krakend.io/docs/backends/martian/

stash.Modifier object

The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Filter object

The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.

See: https://www.krakend.io/docs/backends/martian/

url.Modifier object

The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.

See: https://www.krakend.io/docs/backends/martian/

url.RegexFilter object

The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.

See: https://www.krakend.io/docs/backends/martian/

modifier/request-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

modifier/response-body object

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

1 nested properties
modifiers object[]

A list of modifiers you would like to apply to specific fields. The modifiers are evaluated and applied in sequential order.

See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

Default:
[]
modifier/response-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

plugin/http-client object
1 nested properties
name string

The name of the plugin to load. Only one plugin is supported per backend.

See: https://www.krakend.io/docs/extending/injecting-plugins/

Examples: "no-redirect", "http-logger", "static-filesystem"
plugin/middleware object
1 nested properties
name string[] required

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/enterprise/extending/middleware-plugins/

plugin/req-resp-modifier object
4 nested properties
content-replacer Record<string, object>

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

ip-filter object

Enterprise only. The IP filtering plugin allows you to restrict the traffic to your API gateway based on the IP address. It works in two different modes (allow or deny) where you define the list of IPs (CIDR blocks) that are authorized to use the API, or that are denied from using the API.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

name string[]

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/extending/plugin-modifiers/

Default:
[]
Examples: ["myplugin"]
response-schema-validator object

Enterprise only. The response schema validator plugin adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

proxy object
2 nested properties
flatmap_filter object[]

The flatmap middleware allows you to manipulate collections (or arrays, or lists, you name it) from the backend response. While the basic manipulation operations allow you to work directly with objects, the collections require a different approach: the flatmap component.

See: https://www.krakend.io/docs/backend/flatmap/

Examples: [{"type":"move","args":["a.*.b1.*.c","a.*.b1.*.d"]}]
shadow boolean

Mark this backend as a shadow backend. Sending copies of the traffic but ignore its responses.

See: https://www.krakend.io/docs/backends/shadow-backends/

Default: true
qos/circuit-breaker object

The circuit breaker prevents sending more traffic to a failing backend.

See: https://www.krakend.io/docs/backends/circuit-breaker/

5 nested properties
interval integer required

Time window where the errors count, in seconds.

See: https://www.krakend.io/docs/backends/circuit-breaker/

max_errors integer required

The CONSECUTIVE (not total) number of errors within the interval window to consider the backend unhealthy. All HTTP status codes different than 20x are considered an error, except for the no-op encoding that does not evaluate status codes and is limited to connectivity/networking, security and component errors. See the definition of error below.

See: https://www.krakend.io/docs/backends/circuit-breaker/

timeout integer required

For how many seconds the circuit breaker will wait before testing again if the backend is healthy.

See: https://www.krakend.io/docs/backends/circuit-breaker/

log_status_change boolean

Whether to log the changes of state of this circuit breaker or not.

See: https://www.krakend.io/docs/backends/circuit-breaker/

Default: false
name string

A friendly name to follow this circuit breaker's activity in the logs.

See: https://www.krakend.io/docs/backends/circuit-breaker/

Examples: "cb-backend-1"
qos/circuit-breaker/http object

Enterprise only. The HTTP circuit breaker prevents sending more traffic to a backend that is returning status codes that are considered errors.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

6 nested properties
interval integer required

Time window where the errors count, in seconds.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

max_errors integer required

The CONSECUTIVE (not total) number of errors within the interval window to consider the backend unhealthy. All HTTP status codes different than 20x are considered an error, except for the no-op encoding that does not evaluate status codes and is limited to connectivity/networking, security and component errors. See the definition of error below.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Examples: 5
timeout integer required

For how many seconds the circuit breaker will wait before testing again if the backend is healthy. This number of seconds can also be read as the minimum cooldown of the backend interaction.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Examples: 10
valid_status_codes integer[] required

A list of HTTP status codes that will be considered successful responses. Any response with a status code not in this list will be counted as an error by the circuit breaker.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Examples: [200,201,404]
minItems=1uniqueItems=true
log_status_change boolean

Whether to log the changes of state of this circuit breaker or not.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Default: false
name string

A friendly name to follow this circuit breaker's activity in the logs.

See: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/

Examples: "cb-backend-1"
qos/http-cache object

Enable in-memory caching for backend responses for as long as its Cache-Control header permits. Only safe methods are cached (GET or HEAD). The final backend URL and the Vary headers are used to create the caching key.

See: https://www.krakend.io/docs/backends/caching/

One of: variant, variant, variant
3 nested properties
max_items integer

To be released on open source on v2.10. The maximum number of items the LRU cache will store for this cache bucket before starting to do evictions. When max_items is declared, you must declare max_size as well.

See: https://www.krakend.io/docs/backends/caching/

min=1
max_size integer

To be released on open source on v2.10. The maximum number of bytes you allow the LRU cache to store for this cache bucket before starting to do evictions. This is not the total cache you allow to the system, but the number of bytes you reserve to this backend (or its shared neighbours). will store before starting to do evictions. When max_size is declared, you must declare max_items as well.

See: https://www.krakend.io/docs/backends/caching/

Examples: 104857600, 1048576
min=1024
shared boolean

Allows different backend definitions with this flag set to true to reuse the store between them when the request is the same. Otherwise, each backend uses a private cache context that is not accessible by other endpoints. The cache definition is unique for every backend URL + Vary header combination.

See: https://www.krakend.io/docs/backends/caching/

qos/ratelimit/proxy object

Restrict the rate of requests KrakenD makes to your backends.

See: https://www.krakend.io/docs/backends/rate-limit/

3 nested properties
capacity integer required

The capacity according to the token bucket algorithm. Defines the maximum requests you can do in an instant (including the zero moment when you start the gateway), and can be larger or smaller than the max_rate. When unsure, use the same value of max_rate, so the maximum number of requests can be consumed at once.

See: https://www.krakend.io/docs/backends/rate-limit/

Default: 1
max_rate number required

Maximum requests per second you want to accept in this backend.

See: https://www.krakend.io/docs/backends/rate-limit/

Examples: 0.5
every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
security/policies object

Enterprise only. The policies engine allows you to write custom sets of policies that are validated during requests, responses, or token validation.

See: https://www.krakend.io/docs/enterprise/security-policies/

Any of: variant, variant
5 nested properties
auto_join_policies boolean

When true, all policies of the same type concatenate with an AND operation to evaluate a single expression. Performs faster, but its harder the debug.

Default: false
debug boolean

When true, all the inputs and evaluation results are printed in the console.

Default: false
disable_macros boolean

Advanced macros can be disabled in those policies not needing them for a faster evaluation.

Default: false
req object

All the policies applied in the request context.

See: https://www.krakend.io/docs/enterprise/security-policies/

resp object

All the policies applied in the response context.

See: https://www.krakend.io/docs/enterprise/security-policies/

telemetry/logging object

Enterprise only. Add a specific Backend Log. Useful to see status codes, headers, and other information that come from your backends.

See: https://www.krakend.io/docs/enterprise/logging/

1 nested properties
backend object

Enables the Backend Log capabilities.

See: https://www.krakend.io/enterprise/docs/logging/

telemetry/opentelemetry object

Enterprise only. Overrides metrics and traces declared by the OpenTelemetry service.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

1 nested properties
backend object

Reports the activity between KrakenD and each of your backend services. This is the more granular layer.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

validation/cel object[]

The Common Expression Language (CEL) middleware enables expression evaluation, when an expression returns false, KrakenD does not return the content as the condition has failed. Otherwise, if all expressions returned true, the content is served.

See: https://www.krakend.io/docs/endpoints/common-expression-language-cel/

minItems=1
validation/response-json-schema object

Enterprise only. The response schema validator adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

2 nested properties
schema object required

Write your JSON schema directly in this field, with any number of fields or validations you need.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

error object

In case the validation fails, the error definition containing body and status.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

Examples: {"body":"We couldn't process you request, try again later.","status":401}
workflow object
7 nested properties
backend object[] required

List of all the backend objects called within this workflow. Each backend can initiate another workflow if needed.

minItems=1
endpoint string required

An endpoint name for the workflow that will be used in logs. The name will be appended to the string /__workflow/ in the logs, and although it does not receive traffic under this route, it is necessary when you want to pass URL {params} to the nested backends.

See: https://www.krakend.io/docs/endpoints/

Examples: "/workflow-1/{param1}"
concurrent_calls integer

The concurrent requests are an excellent technique to improve the response times and decrease error rates by requesting in parallel the same information multiple times. Yes, you make the same request to several backends instead of asking to just one. When the first backend returns the information, the remaining requests are canceled.

See: https://www.krakend.io/docs/endpoints/concurrent-requests/

Default: 1
min=1max=5
extra_config object
ignore_errors

Allow the workflow to continue with the rest of declared actions when there are errors (like security policies, network errors, etc). The default behavior of KrakenD is to abort an execution that has errors as soon as possible. If you use conditional backends and similar approaches, you might want to allow the gateway to go through all steps.

See: https://www.krakend.io/docs/endpoints/

Default: false
output_encoding enum

The gateway can work with several content types, even allowing your clients to choose how to consume the content. See the supported encodings

Default: "json"
Values: "json" "json-collection" "yaml" "fast-json" "xml" "negotiate" "string" "no-op"
timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
group string

Instead of placing all the response attributes in the root of the response, create a new key and encapsulate the response inside.

See: https://www.krakend.io/docs/backends/data-manipulation/

Default: "backend1"
host string[]

An array with all the available hosts to load balance requests, including the schema (when possible) schema://host:port. E.g.: <https://my.users-ms.com>. If you are in a platform where hosts or services are balanced (e.g., a K8S service), write a single entry in the array with the service name/balancer address. Defaults to the host declaration at the configuration's root level, and the service fails starting when there is none.

input_headers string[]

A second level of header filtering that defines the list of all headers allowed to reach this backend when different than the endpoint. By default, all headers in the endpoint input_headers reach the backend, unless otherwise specified here. An empty list [] is considered a zero-value and allows all headers to pass. Use [""] to explicitly remove all headers. See headers forwarding

Default:
[]
Examples: [""], ["User-Agent","Accept"]
uniqueItems=true
input_query_strings string[]

A second level of query string filtering that defines the list of all query strings allowed to reach this backend when different than the endpoint. By default, all query strings in the endpoint input_query_strings reach the backend, unless otherwise specified here. An empty list [] is considered a zero-value and allows all headers to pass. Use [""] to explicitly remove all query strings. See query strings forwarding

Default:
[]
Examples: [""], ["page","limit"]
uniqueItems=true
is_collection boolean

Set to true when your API does not return an object {} but a collection []

See: https://www.krakend.io/docs/backends/data-manipulation/

Default: true
mapping object

Mapping, or also known as renaming, let you change the name of the fields of the generated responses, so your composed response would be as close to your use case as possible without changing a line on any backend.

See: https://www.krakend.io/docs/backends/data-manipulation/

Examples: {"from":"to"}
method enum

The method sent to this backend in uppercase. The method does not need to match the endpoint's method. When the value is omitted, it uses the same endpoint's method. Some special methods will require you to use no-op encoding (like HEAD or OPTIONS) when these return an empty body.

See: https://www.krakend.io/docs/backends/

Default: "GET"
Values: "GET" "POST" "PUT" "PATCH" "DELETE" "OPTIONS" "HEAD" "CONNECT" "TRACE"
sd enum

The Service Discovery system to resolve your backend services. Defaults to static (no external Service Discovery). Use dns to use DNS SRV records. Use dns-shared to share the DNS resolution between backends using the same hosts.

See: https://www.krakend.io/docs/backends/

Default: "static"
Values: "static" "dns" "dns-shared"
sd_scheme string

The Service Discovery scheme to connect to your backend services.

See: https://www.krakend.io/docs/backends/

Default: "http"
Examples: "http", "https"
target string

Removes the matching object from the reponse and returns only its contents.

See: https://www.krakend.io/docs/backends/data-manipulation/

Examples: "data", "content", "response"
https://www.krakend.io/schema/v2.13/async/amqp.json object

The Async AMQP component enables the AMQP driver for the Async functionality.

See: https://www.krakend.io/docs/async/amqp/

exchange string required

The entity name where messages are retrieved (it will be created, or it must have a topic type if already exists).

See: https://www.krakend.io/docs/async/amqp/

Examples: "some-exchange"
host string required

The connection string, ends in slash. E.g: amqp://user:password@host:5672/.

See: https://www.krakend.io/docs/async/amqp/

name string required
auto_ack boolean

When KrakenD retrieves the messages, regardless of the success or failure of the operation, it marks them as ACK. When auto ACK is not used, only successful backend responses do the ACK, and failing messages are requeued. Defaults to false.

See: https://www.krakend.io/docs/async/amqp/

Default: false
delete boolean

When true, AMQP deletes the queue when there are no remaining connections. This option is not recommended in most of the scenarios. If for instance, the connectivity between KrakenD and AMQP is lost for whatever reason and it's the only client, AMQP will delete the queue no matter the number of messages there are inside, and when KrakenD gets the connection again the queue won't exist and future connections will recreate it again.

See: https://www.krakend.io/docs/async/amqp/

Default: false
durable boolean

Durable queues will survive server restarts and remain when there are no remaining consumers or bindings. Most of the times true is recommended, but depends on the use case.

See: https://www.krakend.io/docs/async/amqp/

Default: false
exclusive boolean

When true, AMQP will allow a single KrakenD client to access the queue. This option is not recommended in environments where the gateway needs high availability and you have several instances running.

See: https://www.krakend.io/docs/async/amqp/

Default: false
nack_discard boolean

When true, messages that cannot be processed are discarded instead of being sent back to the queue. This is useful for scenarios where you want to avoid reprocessing failed messages.

See: https://www.krakend.io/docs/async/amqp/

Default: false
no_local boolean

The no_local flag is not supported by RabbitMQ.

See: https://www.krakend.io/docs/async/amqp/

no_wait boolean

When true, do not wait for the server to confirm the request and immediately begin deliveries. If it is not possible to consume, a channel exception will be raised and the channel will be closed.

See: https://www.krakend.io/docs/async/amqp/

prefetch_count integer

The number of messages you want to prefetch prior to consume them.

See: https://www.krakend.io/docs/async/amqp/

Default: 10
prefetch_size integer

The number of bytes you want to use to prefetch messages.

See: https://www.krakend.io/docs/async/amqp/

Default: 0
https://www.krakend.io/schema/v2.13/messaging/kafka/async_reader.json object

Enterprise only. Defines how to read messages from a Kafka cluster for an async agent

cluster object required

Enterprise only. Defines how to connect to a Kafka cluster

12 nested properties
brokers string[] required
client_tls object

TLS options to connect to upstream services.

See: https://www.krakend.io/docs/service-settings/tls/

8 nested properties
allow_insecure_connections boolean

By default, KrakenD verifies every SSL connection. This option allows you to connect to backends considered insecure, for instance when you are using self-signed certificates

Default: false
ca_certs array

An array with all the CA certificates you would like to validate the server you are connecting to.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[]
Examples: ["ca.pem"]
cipher_suites array

The list of cipher suites as defined in the documentation.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  4865,
  4866,
  4867
]
uniqueItems=true
client_certs object[]

The list of all client certificates available when fetching data from the upstream service.

See: https://www.krakend.io/docs/service-settings/tls/

curve_preferences enum[]

The list of all the identifiers for the curve preferences. Use 23 for CurveP256, 24 for CurveP384 or 25 for CurveP521.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  23,
  24,
  25
]
uniqueItems=true
disable_system_ca_pool boolean

Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the ca_certs list when true.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
max_version enum

Maximum TLS version supported.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
min_version enum

Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the ciphers_list.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
sasl object

Enterprise only. SASL base authentication with broker: there are multiple SASL authentication methods but the current implementation is limited to plaintext (SASL/PLAIN) authentication

7 nested properties
mechanism enum

Name of the enabled SASL mechanism

Default: "PLAIN"
Values: "PLAIN" "OAUTHBEARER"
azure_event_hub boolean

Kafka > 1.x should use SASL V1, except on Azure EventHub which uses V0

Default: false
disable_hanshake boolean

Whether or not to send the Kafka SASL handshake first if enabled. You should only set this to false if you're using a non-Kafka SASL proxy

Default: true
auth_identity string

Auth Identity is an (optional) authorization identity (authzid) to use for SASL/PLAIN authentication (if different from User) when an authenticated user is permitted to act as the presented alternative user. See RFC4616 for details

user string

Authentication identity (authcid) to present for SASL/PLAIN or SASL/SCRAM authentication

password string

Password for SASL/PLAIN authentication

scram_auth_id string

Authz id used for SASL/SCRAM authentication

dial_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
read_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
write_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
keep_alive string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
client_id string

A name to give to the client stablishing the connection

Default: "KrakenD v[X].[Y].[Z]"
rack_id string

A name to identify the rack we are connecting from

Default: ""
channel_buffer_size number

The number of events to buffer in internal and external channels. This permits the producer and consumer to continue processing some messages in the background while user code is working, greatly improving throughput

Default: 256
min=0
metadata_retry_backoff string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
metadata_retry_max number

When a disconnection happens, the client needs to refresh its metadata to know the current state of the kafka cluster (effectively the number of attempts to reconnect)

Default: 3
min=0
group object

Enterprise only. Defines the detaisl for a Kafka consumer group.

8 nested properties
id string

Name of the consumer group to use

session_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
heartbeat_interval string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
rebalance_strategies enum[]

Priority-ordered list of client-side consumer group balancing strategies that will be offered to the coordinator. The first strategy that all group members support will be chosen by the leader. Options are: range, roundrobin, and sticky

Default:
[
  "range"
]
rebalance_timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
instance_id string

Support KIP-345

fetch_default number

The default number of message bytes to fetch from the broker in each request (default 1MB). This should be larger than the majority of your messages, or else the consumer will spend a lot of time negotiating sizes and not actually consuming. Similar to the JVM's fetch.message.max.bytes

isolation_level enum

Supports 2 modes: read_commited to consume and return all messages in message channel, and read_uncommited to hide messages that are part of an aborted transaction

Default: "read_commited"
Values: "read_commited" "read_uncommited"
key_meta string

Name of the header where the kafka message key value is written

https://www.krakend.io/schema/v2.13/async_agent.json object[]

Async agents are routines listening to queues or PubSub systems that react to new events and push data to your backends. Through async agents, you can start a lot of consumers to process your events autonomously.

See: https://www.krakend.io/docs/async/

https://www.krakend.io/schema/v2.13/ai/mcp_endpoint.json object

Enterprise only. Declares the current endpoint as an MCP server entry point.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/

server_name required

The MCP server you want to attach to this endpoint. When you add this namespace, the endpoint becomes the MCP server entry point URL. The name used must match the name in the ai/mcp configuration in the root level.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/

Examples: "stories-tracker"
https://www.krakend.io/schema/v2.13/auth/basic.json object

Enterprise only. The Basic Authentication component protects the access to selected endpoints using basic username and password credentials.

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

htpasswd_path string

Absolute Path to the htpasswd filename (recommended) or relative ./ to the workdir (less secure).

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

Examples: "/path/to/.htpasswd"
users object

Additional users to the htpasswd file can be declared directly inside the configuration. The content of both places will be merged (and this list will overwrite users already defined in the htpasswd file). The key of each entry is the username, and the value the bcrypt.

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

Examples: {"admin":"$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ...","user2":"$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ..."}
https://www.krakend.io/schema/v2.13/auth/signer.json object

creates a wrapper for your login endpoint that signs with your secret key the selected fields of the backend payload right before returning the content to the end-user.

See: https://www.krakend.io/docs/authorization/jwt-signing/

alg enum required

The hashing algorithm used by the issuer. Usually RS256. The algorithm you choose directly affects the CPU consumption.

See: https://www.krakend.io/docs/authorization/jwt-signing/

Values: "EdDSA" "HS256" "HS384" "HS512" "RS256" "RS384" "RS512" "ES256" "ES384" "ES512" "PS256" "PS384" "PS512"
keys_to_sign string[] required

List of all the specific keys that need signing (e.g., refresh_token and access_token).

See: https://www.krakend.io/docs/authorization/jwt-signing/

Examples: ["access_token","refresh_token"]
kid string required

The key ID purpose is to match a specific key, as the jwk_url might contain several keys.

See: https://www.krakend.io/docs/enterprise/authorization/jwt-validation/

Examples: "sim2"
cipher_suites enum[]

Override the default cipher suites (see JWT validation). Unless you have a legacy JWK, you don't need to set this value.

Default:
[
  49199,
  49195,
  49200,
  49196,
  52392,
  52393
]
cypher_key string
disable_jwk_security boolean

Disables HTTP security of the JWK client and allows insecure connections (plain HTTP) to download the keys. The flag should be false when you use HTTPS, and true when using plain HTTP or loading the key from a local file.

See: https://www.krakend.io/docs/enterprise/authorization/jwt-validation/

Default: false
full boolean

Use JSON format instead of the compact form JWT provides.

See: https://www.krakend.io/docs/enterprise/authorization/jwt-validation/

Default: false
jwk_fingerprints string[]

A list of fingerprints (the unique identifier of the certificate) for certificate pinning and avoid man in the middle attacks. Add fingerprints in base64 format.

See: https://www.krakend.io/docs/authorization/jwt-signing/

jwk_local_ca string

Path to the CA’s certificate verifying a secure connection when downloading the JWK. Use when not recognized by the system (e.g., self-signed certificates).

See: https://www.krakend.io/docs/authorization/jwt-validation/

jwk_local_path string

Local path to the JWK public keys, has preference over jwk_url. Instead of pointing to an external URL (with jwk_url), public keys are kept locally, in a plain JWK file (security alert!), or encrypted. When encrypted, also add secret_url and cypher_key.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "./jwk.txt"
jwk_url string

The URL to the JWK endpoint with the private keys used to sign the token.

See: https://www.krakend.io/docs/authorization/jwt-signing/

Examples: "http://your-backend/jwk/symmetric.json"
leeway string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
secret_url string

An URL with a custom scheme using one of the supported providers (e.g.: awskms://keyID) (see providers).

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "base64key://smGbjm71Nxd1Ig5FS0wj9SlbzAIrnolCz9bQQ6uAhl4=", "awskms://keyID", "azurekeyvault://keyID", "gcpkms://projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEY_RING]/cryptoKeys/[KEY]", "hashivault://keyID"
pattern=(base64key|awskms|azurekeyvault|gcpkms|hashivault)://(.*)
https://www.krakend.io/schema/v2.13/auth/validator.json object

Protect endpoints from public usage by validating JWT tokens generated by any industry-standard OpenID Connect (OIDC) integration.

See: https://www.krakend.io/docs/authorization/jwt-validation/

alg enum

The hashing algorithm used by the token issuer.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: "RS256"
Values: "EdDSA" "HS256" "HS384" "HS512" "RS256" "RS384" "RS512" "ES256" "ES384" "ES512" "PS256" "PS384" "PS512"
audience string[]

Reject tokens that do not contain ALL audiences declared in the list.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: ["audience1"]
auth_header_name string

Allows to parse the token from a custom header.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: "Authorization"
Examples: "X-Custom-Auth"
cache boolean

Set this value to true (recommended) to stop downloading keys on every request and store them in memory for the next cache_duration period and avoid hammering the key server, as recommended for performance. Do not use this flag when using jwk_local_ca.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: false
cache_duration integer

The cache duration in seconds when the cache is enabled. 15 minutes when unset.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: 900
cipher_suites enum[]

Override the default cipher suites. Use it if you want to enforce an even higher security standard.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default:
[
  49199,
  49195,
  49200,
  49196,
  52392,
  52393
]
cookie_key string

Add the key name of the cookie containing the token when it is not passed in the headers

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "cookie_jwt"
cypher_key string
disable_jwk_security boolean

When true, disables security of the JWK client and allows insecure connections (plain HTTP) to download the keys. Useful for development environments.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: false
failed_jwk_key_cooldown string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
issuer string

When set, tokens not matching the issuer are rejected.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "issuer"
jwk_fingerprints string[]

A list of fingerprints (the certificate's unique identifier) for certificate pinning and avoid man-in-the-middle attacks. Add fingerprints in base64 format.

See: https://www.krakend.io/docs/authorization/jwt-validation/

jwk_local_ca string

Path to the CA's certificate verifying a secure connection when downloading the JWK. Use when not recognized by the system (e.g., self-signed certificates).

See: https://www.krakend.io/docs/authorization/jwt-validation/

jwk_local_path string

Local path to the JWK public keys, has preference over jwk_url. Instead of pointing to an external URL (with jwk_url), public keys are kept locally, in a plain JWK file (security alert!), or encrypted. When encrypted, also add secret_url and cypher_key.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "./jwk.txt"
jwk_url string

The URL to the JWK endpoint with the public keys used to verify the token's authenticity and integrity. Use with cache to avoid re-downloading the key on every request. Consider enabling shared caching too. The identity server will receive an HTTP(s) request from KrakenD with a KrakenD user agent, and the identity server must reply with a JSON object and a content-type application/jwk-set+json or application/json.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "https://some-domain.auth0.com/.well-known/jwks.json", "http://KEYCLOAK:8080/auth/realms/master/protocol/openid-connect/certs", "https://yourOktaBaseUrl/v1/keys"
key_identify_strategy enum

Allows strategies other than kid to load keys.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Values: "kid" "x5t" "x5t#S256" "kid_x5t"
leeway string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
operation_debug boolean

When true, any JWT validation operation gets printed in the log with a level ERROR. You will see if a client does not have sufficient roles, the allowed claims, scopes, and other useful information.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: false
propagate_claims string[][]

Enables passing claims in the backend's request header. You can pass nested claims using the dot . operator. E.g.: realm_access.roles.

See: https://www.krakend.io/docs/authorization/jwt-validation/

propagate_claims_preserve_array boolean

When set to true, the JWT claims that are propagated to the backend will preserve their array structure as multi-value headers, if applies. If set to false, arrays will be converted to comma-separated strings.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: false
roles string[]

When set, the JWT token not having at least one of the listed roles is rejected.

See: https://www.krakend.io/docs/authorization/jwt-validation/

roles_key string

When validating users through roles, provide the key name inside the JWT payload that lists their roles. If this key is nested inside another object, add roles_key_is_nested and use the dot notation . to traverse each level. E.g.: resource_access.myclient.roles represents the payload {resource_access: { myclient: { roles: ["myrole"] } }. Notice that the roles object you choose is a list, not a map.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "resource_access.myclient.roles"
roles_key_is_nested boolean

If the roles key uses a nested object using the . dot notation, you must set it to true to traverse the object.

See: https://www.krakend.io/docs/authorization/jwt-validation/

scopes string[]

A list of scopes to validate. The token, after decoding it, can have the scopes declared as a space-separated list, e.g.: "my_scopes": "resource1:action1 resource3:action7" or inside a list, e.g.: "my_scopes": ["resource1:action1","resource3:action7"].

See: https://www.krakend.io/docs/authorization/jwt-validation/

scopes_key string

The key name where KrakenD can find the scopes. The key can be a nested object using the . dot notation, e.g.: data.access.my_scopes.

See: https://www.krakend.io/docs/authorization/jwt-validation/

scopes_matcher enum

Defines if the user needs to have in its token at least one of the listed claims (any), or all of them.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: "any"
Values: "any" "all"
secret_url string

An URL with a custom scheme using one of the supported providers (e.g.: awskms://keyID) (see providers).

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "base64key://smGbjm71Nxd1Ig5FS0wj9SlbzAIrnolCz9bQQ6uAhl4=", "awskms://keyID", "azurekeyvault://keyID", "gcpkms://projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEY_RING]/cryptoKeys/[KEY]", "hashivault://keyID"
pattern=(base64key|awskms|azurekeyvault|gcpkms|hashivault)://(.*)
https://www.krakend.io/schema/v2.13/documentation/openapi.json object

Enterprise only. Generates OpenAPI documentation automatically through krakend openapi export command.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

description string

An introductory, optionally verbose, explanation supporting CommonMark syntax. If you'd like to load an external markdown file, you can use flexible configuration, for instance "description": {{include "openapi/intro.md" | toJson }}

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "Hi there, I am [OpenAPI](https://www.krakend.io/docs/enterprise/endpoints/openapi/)"
audience string[]

The list of audiences that will consume this endpoint. These values do not define the gateway logic in any way. They are a way to group endpoints and filter them out when generating the OpenAPI documentation. Use * to indicate an endpoint will be present in any audience generated.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: ["gold","silver","*"]
base_path string

A starting path that is appended to any endpoint.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
components_schemas object

The JSON Schemas you can reuse inside endpoint definitions using ref. You can either pass the JSON Schema object, or a bas64 string.

Examples: {"Pet":{"type":"object","required":["id","name"]}}
contact_email string

Email where users of your API can write to.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
contact_name string
Examples: "/v1"
contact_url string

Contact URL that users of your API can read.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
cookie_name string

When generating an OpenAPI spec, the name of the cookie used under components securitySchemes.

Default: "SESSIONID"
custom_security_schemes object

Allows you to add custom security schemes under components/securitySchemes in the generated OpenAPI spec. This is useful when you want to define your own security schemes, different from the built-in ones (e.g., jwt, apikey, cookie, etc.). When the property is in the service level you must declare the schema (e.g., "OAuth2Security":{...}), and when it is in the endpoint you should only write the object name with not properties inside, e.g, {"OAuth2Security":{}.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: {"OAuth2Security":{"description":"OAuth2 security scheme","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://example.com/oauth/authorize","scopes":{},"tokenUrl":"https://example.com/oauth/token"}}}}
disable_default_response_definitions boolean

By default, KrakenD adds a 500 and a 200 response definition to each endpoint. Set this property to true if you want to avoid this behavior.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Default: false
example object | string

Deprecated in OAS3 (use response_definition instead). A free form JSON object or a string you would like to show as a sample response of the endpoint. The examples assume they are JSON content types except when using the output_encoding=string.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

header_definition object[]

Sets a detailed description for the headers allowed in the endpoint. Make sure to include the same headers in the endpoint's input_headers.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The type of content","name":"Content-Type"}]
host string

The hostname where you will publish your API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "my.api.com"
jwt_key string

When generating an OpenAPI spec, the name of the JWT key used under components securitySchemes.

Default: "KrakenD-JWT"
license_name string

The license name (e.g.: Apache License)

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
license_url string

The URL where the license is hosted

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
operation_id string

A unique string identifying the operation identifier. Usually the method + the endpoint. If provided, these IDs must be unique among all operations described in your API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "GET/foo"
param_definition object[]

Sets a detailed description for the URL parameters (e.g.: /foo/{param}) required in the endpoint. Make sure to include to write the param exactly as in the endpoint definition.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The unique user ID","name":"id_user"}]
query_definition object[]

Sets a detailed description for the query strings allowed in the endpoint. Make sure to include the same strings in the endpoint's input_query_strings.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The number of the page","name":"page"}]
request_definition object[]

Describes the payload needed to consume the endpoint. If a JSON Schema validation exists, it takes precedence when generating the documentation. An example use case is when you need to document a multipart/form-data request body.This property is an array because you can document requests with multiple content types.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"Updates the user","content_type":"application/json","example":{"first_name":"Mary","id_user":33}}]
response_definition object

Describes the different status codes returned by this endpoint. Each key is the definition of the status code, represented by a string. E.g., 200 (success), 500 (internal error), etc.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: {"404":{"description":"Page not found","@comment":"Some comment","content_type":"application/json","example":{"status":"KO"}}}
schemes string[]

The list of schemes supported by the API, e.g. http or https

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Default:
[
  "http"
]
Examples: ["https","http"]
servers object[]

The list of servers where the API is hosted. The server URL can be a relative path, e.g., /v1 or an absolute path. The URL might contain {variables}, although these are only recognized by OpenAPI and to KrakenD they are just literal strings because it does not use them.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"url":"/v1"}], [{"url":"https://example.com:{port}","variables":{"port":{"default":"8443","enum":["8443","443"]}}}]
summary string

A short summary for the endpoint. Use the description field for the longest explanation.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

tag_definition object[]

Sets a detailed description for the tags classifiying endpoints when generating the OpenAPI spec.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"Description of tag1","name":"Tag1"}]
tags string[]

You can assign a list of tags to each API operation. If you declare tags in the tag_definition at the OpenAPI service level, they will have a description in the documentation. Tagged operations may be handled differently by tools and libraries. For example, Swagger UI uses tags to group the displayed operations.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

terms_of_service string

The URL to the terms of service for using this API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
version string

The version numbering you want to apply to this release of API., e.g.: 1.0.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "1.0"
https://www.krakend.io/schema/v2.13/documentation/postman_endpoint.json object

Enterprise only. Generates postman documentation automatically through krakend postman export command.

See: https://www.krakend.io/docs/enterprise/developer/postman/

description string

An introductory, optionally verbose, explanation supporting Markdown syntax. If you'd like to load an external markdown file, you can use flexible configuration, for instance "description": {{include "postman/intro.md" | toJson }}

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "Hi there, I am a [postman endpoint](https://www.krakend.io/docs/enterprise/developer/postman/)"
folder string

The folder name where you want to put this endpoint. If you defined folders at the service level, use the same name to reuse their name and description

Examples: "/Books"
name string

The name of the endpoint you are generating. If you don't set any name the last member path is used.

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "List books", "Create user"
https://www.krakend.io/schema/v2.13/modifier/request-body-extractor.json object

Enterprise only. Extracts fields from the incoming request body and promotes them to request headers or query strings.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

operations object[] required

A list of extraction operations to apply. Each operation extracts a value from the request body and writes it to a header or query string parameter. Operations are evaluated in sequential order.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

https://www.krakend.io/schema/v2.13/qos/ratelimit/router.json object
capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from all users together at any given instant. When the gateway starts, the bucket is full. As requests from users come, the remaining tokens in the bucket decrease. At the same time, the max_rate refills the bucket at the desired rate until its maximum capacity is reached. The default value for the capacity is the max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as max_rate.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
cleanup_period string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
cleanup_threads integer

These are the number of routines that search for and remove outdated rate limit counters. The more routine(s) you add, the faster the memory optimization is completed, but the more CPU it will consume. Generally speaking, a single thread is more than enough because the delete operation is very fast, even with a large number of counters. This is an advanced micro-optimization setting that you should use with caution.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
client_capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from each individual user at any given instant. Works just as capacity, but instead of having one bucket for all users, keeps a counter for every connected client and endpoint, and refills from client_max_rate instead of max_rate. The client is recognized using the strategy field (an IP address, a token, a header, etc.). The default value for the client_capacity is the client_max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as client_max_rate.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
client_max_rate number

Number of tokens you add to the Token Bucket for each individual user (user quota) in the time interval you want (every). The remaining tokens in the bucket are the requests a specific user can do. It keeps a counter for every client and endpoint. Keep in mind that every KrakenD instance keeps its counters in memory for every single client.

See: https://www.krakend.io/docs/endpoints/rate-limit/

every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
key string

Available when using client_max_rate and you have set a strategy equal to header or param. It makes no sense in other contexts. For header it is the header name containing the user identification (e.g., Authorization on tokens, or X-Original-Forwarded-For for IPs). When they contain a list of space-separated IPs, it will take the IP from the client that hit the first trusted proxy. For param it is the name of the placeholder used in the endpoint, like id_user for an endpoint /user/{id_user}.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Examples: "X-Tenant", "Authorization", "id_user"
max_rate number

Sets the maximum number of requests all users can do in the given time frame. Internally uses the Token Bucket algorithm. The absence of max_rate in the configuration or a 0 is the equivalent to no limitation. You can use decimals if needed.

See: https://www.krakend.io/docs/endpoints/rate-limit/

num_shards integer

All rate limit counters are stored in memory in groups (shards). All counters in the same shard share a mutex (which controls that one counter is modified at a time), and this helps with contention. Having, for instance, 2048 shards (default) and 1M users connected concurrently (same instant) means that each user will need to coordinate writes in their counter with an average of under 500 other users (1M/2048=489). Lowering the shards might increase contention and latency but free additional memory. This is an advanced micro-optimization setting that should be used with caution.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 2048
strategy enum

Available when using client_max_rate. Sets the strategy you will use to set client counters. Choose ip when the restrictions apply to the client's IP address, or set it to header when there is a header that identifies a user uniquely. That header must be defined with the key entry.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Values: "ip" "header" "param"
https://www.krakend.io/schema/v2.13/qos/ratelimit/redis.json object

Enterprise only. Redis-backed service ratelimit

capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from all users together at any given instant. When the gateway starts, the bucket is full. As requests from users come, the remaining tokens in the bucket decrease. At the same time, the max_rate refills the bucket at the desired rate until its maximum capacity is reached. The default value for the capacity is the max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as max_rate.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Default: 1
client_capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from each individual user at any given instant. Works just as capacity, but instead of having one bucket for all users, keeps a counter for every connected client and endpoint, and refills from client_max_rate instead of max_rate. The client is recognized using the strategy field (an IP address, a token, a header, etc.). The default value for the client_capacity is the client_max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as client_max_rate.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Default: 1
client_max_rate number

Number of tokens you add to the Token Bucket for each individual user (user quota) in the time interval you want (every). The remaining tokens in the bucket are the requests a specific user can do. It keeps a counter for every client and endpoint. Keep in mind that every KrakenD instance keeps its counters in memory for every single client.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

connection_name string

The connection pool name or cluster name that is used by this ratelimit. The value must match what you configured in the Redis Connection Pool

connection_pool string

The connection pool name that is used by this ratelimit. The value must match what you configured in the Redis Connection Pool

every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
key string

Available when using client_max_rate and you have set a strategy equal to header or param. It makes no sense in other contexts. For header it is the header name containing the user identification (e.g., Authorization on tokens, or X-Original-Forwarded-For for IPs). When they contain a list of space-separated IPs, it will take the IP from the client that hit the first trusted proxy. For param it is the name of the placeholder used in the endpoint, like id_user for an endpoint /user/{id_user}.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Examples: "X-Tenant", "Authorization", "id_user"
max_rate number

Sets the maximum number of requests all users can do in the given time frame. Internally uses the Token Bucket algorithm. The absence of max_rate in the configuration or a 0 is the equivalent to no limitation. You can use decimals if needed.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

on_failure_allow boolean

Whether you want to allow a request to continue when the Redis connection is failing or not. The default behavior blocks the request if Redis is not responding correctly

Default: false
strategy enum

Available when using client_max_rate. Sets the strategy you will use to set client counters. Choose ip when the restrictions apply to the client's IP address, or set it to header when there is a header that identifies a user uniquely. That header must be defined with the key entry.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Values: "ip" "header" "param"
https://www.krakend.io/schema/v2.13/qos/ratelimit/tiered.json object

Enterprise only. Apply ratelimit based on tier match.

tier_key string required

The header name containing the tier name. The string you provide is case-insensitive. If you need to take the value from a place that is not a header (a token, an API key), you must use propagate functions in the components that convert values to internal headers.

See: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/

tiers object[] required

The list of all tier definitions and limits for each. Each item in the list is a tier object.

See: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/

https://www.krakend.io/schema/v2.13/security/bot-detector.json object

The bot detector module checks incoming connections to the gateway to determine if a bot made them, helping you detect and reject bots carrying out scraping, content theft, and form spam.

See: https://www.krakend.io/docs/throttling/botdetector/

allow string[]

An array with EXACT MATCHES of trusted user agents that can connect.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["MyAndroidClient/1.0","Pingdom.com_bot_version_1.1"]
cache_size integer

Size of the LRU cache that helps speed the bot detection. The size is the mumber of users agents that you want to keep in memory.

See: https://www.krakend.io/docs/throttling/botdetector/

Examples: 1000
deny string[]

An array with EXACT MATCHES of undesired bots, to reject immediately.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["facebookexternalhit/1.1"]
empty_user_agent_is_bot boolean

Whether to consider an empty user-agent a bot (and reject it) or not.

See: https://www.krakend.io/docs/throttling/botdetector/

Default: false
patterns string[]

An array with all the regular expressions that define bots. Matching bots are rejected.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["GoogleBot.*","(facebookexternalhit)/.*"]
https://www.krakend.io/schema/v2.13/security/cors.json object

Define Cross-Origin Resource Sharing (CORS) configuration to send additional HTTP headers to tell browsers if they can use resources from a different origin.

See: https://www.krakend.io/docs/service-settings/cors/

allow_credentials boolean

When requests can include user credentials like cookies, HTTP authentication or client side SSL certificates.

See: https://www.krakend.io/docs/service-settings/cors/

Default: false
allow_headers string[]

An array with the headers allowed, but Originis always appended to the list. Requests with headers not in this list are rejected.

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[]
Examples: ["Accept-Language"]
allow_methods enum[]

An array with all the HTTP methods allowed, in uppercase. Possible values are GET, HEAD,POST,PUT,PATCH,DELETE, or OPTIONS

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[
  "GET",
  "HEAD",
  "POST"
]
allow_origins string[]

An array with all the origins allowed, the use of one * is permitted to allow groups of hosts. Examples of values are <https://example.com>, <https://example.*>, <https://*.example.com> or just *` (any origin).

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[
  "*"
]
allow_private_network boolean

Indicates whether to accept cross-origin requests over a private network.

See: https://www.krakend.io/docs/service-settings/cors/

Default: false
debug boolean

Show debugging information in the logger, use it only during development.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
expose_headers string[]

List of headers that are safe to expose to the API of a CORS API specification.

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[
  "Content-Length",
  "Content-Type"
]
max_age string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
options_passthrough boolean

Instructs preflight to let other potential next handlers to process the OPTIONS method. Turn this on when you set the auto_opts flag in the router to true.

See: https://www.krakend.io/docs/service-settings/cors/

Default: false
options_success_status integer

The HTTP status code that is considered a success.

See: https://www.krakend.io/docs/service-settings/cors/

Default: 204
Examples: 200
https://www.krakend.io/schema/v2.13/security/http.json object

Security through HTTP headers, including HSTS, HPKP, MIME-Sniffing prevention, Clickjacking protection, and others.

See: https://www.krakend.io/docs/service-settings/security/

allowed_hosts string[]

When a request hits KrakenD, it will confirm if the value of the Host HTTP header is in the list. If so, it will further process the request. If the host is not in the allowed hosts list, KrakenD will simply reject the request.

See: https://www.krakend.io/docs/service-settings/security/

Default:
[]
allowed_hosts_are_regex boolean

Treat the allowed hosts list as regular expressions.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
browser_xss_filter boolean
Default: false
content_security_policy string

The HTTP Content-Security-Policy (CSP) default-src directive serves as a fallback for the other CSP fetch directives.

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "default-src 'self';"
content_type_nosniff boolean

Enabling this feature will prevent the user's browser from interpreting files as something else than declared by the content type in the HTTP headers.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
custom_frame_options_value string

You can add an X-Frame-Options header using custom_frame_options_value with the value of DENY (default behavior) or even set your custom value.

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "ALLOW-FROM https://example.com"
force_sts_header boolean

Force a STS Header even if using plain HTTP.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
frame_deny boolean

Set to true to enable clickjacking protection, together with custom_frame_options_value.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
host_proxy_headers string[]

A set of header keys that may hold a proxied hostname value for the request.

See: https://www.krakend.io/docs/service-settings/security/

Examples: ["X-Forwarded-Hosts"]
hpkp_public_key string

HTTP Public Key Pinning (HPKP) is a security mechanism which allows HTTPS websites to resist impersonation by attackers using mis-issued or otherwise fraudulent certificates. (For example, sometimes attackers can compromise certificate authorities, and then can mis-issue certificates for a web origin.).

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "pin-sha256="base64=="; max-age=expireTime [; includeSubDomains][; report-uri="reportURI"]"
is_development boolean

This will cause the AllowedHosts, SSLRedirect, and STSSeconds/STSIncludeSubdomains options to be ignored during development. When deploying to production, be sure to set this to false.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
referrer_policy string

Allows the Referrer-Policy header with the value to be set with a custom value.

See: https://www.krakend.io/docs/service-settings/security/

Default: "same-origin"
ssl_host string

When the SSL redirect is true, the host where the request is redirected to.

See: https://www.krakend.io/docs/service-settings/security/

Default: "ssl.host.domain"
Examples: "ssl.host.domain"
ssl_proxy_headers object

Header keys with associated values that would indicate a valid https request. Useful when using Nginx, e.g: "X-Forwarded-Proto": "https"

See: https://www.krakend.io/docs/service-settings/security/

Examples: {"X-Forwarded-Proto":"https"}
ssl_redirect boolean

Redirect any request that is not using HTTPS

See: https://www.krakend.io/docs/service-settings/security/

Default: true
sts_include_subdomains boolean

Set to true when you want the includeSubdomains be appended to the Strict-Transport-Security header.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
sts_seconds integer

Enable this policy by setting the max-age of the Strict-Transport-Security header. Setting to 0 disables HSTS.

See: https://www.krakend.io/docs/service-settings/security/

Default: 0
https://www.krakend.io/schema/v2.13/telemetry/opentelemetry-endpoint.json object

Enterprise only. Overrides metrics and traces declared by the OpenTelemetry service.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

backend object

Enterprise only. Reports the activity between KrakenD and each of your backend services. This is the more granular layer.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

2 nested properties
metrics object
5 nested properties
detailed_connection boolean

Whether you want to enable detailed metrics for the HTTP connection phase or not. Includes times to connect, DNS querying, and the TLS handshake.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
disable_stage boolean

Whether to turn off the metrics or not. Setting this to true means stop reporting any data.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
read_payload boolean

Whether you want to enable metrics for the response reading payload or not (HTTP connection not taken into account).

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
round_trip boolean

Whether you want to enable metrics for the actual HTTP request for the backend or not (manipulation not taken into account). This is the time your backend needs to produce a result.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
static_attributes object[]

A list of tags or labels you want to associate with these metrics.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Examples: [{"key":"my_metric_attr","value":"my_metric_val"}]
traces object
7 nested properties
detailed_connection boolean

Whether you want to add detailed trace attributes for the HTTP connection phase or not. Includes times to connect, DNS querying, and the TLS handshake.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
disable_stage boolean

Whether to turn off the traces or not. Setting this to true means stop reporting any data.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
read_payload boolean

Whether you want to add trace attributes for the response reading payload or not (HTTP connection not taken into account).

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
report_headers boolean

Whether you want to report the final headers that reached the backend.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
round_trip boolean

Whether you want to add trace attributes for the actual HTTP request for the backend or not (manipulation not taken into account). This is the time your backend needs to produce a result.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
skip_headers string[]

A list of headers you want to skip when reporting the headers that reached the backend. This is useful to avoid reporting sensitive data.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Examples: ["X-Backend-Secret","X-All-Secret"]
static_attributes object[]

A list of tags or labels you want to associate to these traces.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Examples: [{"key":"my_trace_attr","value":"my_trace_val"}]
exporters_override object

Enterprise only. Override exporter configuration for this endpoint

4 nested properties
metric_exporters string[]

Overrides the metrics exporters used in this endpoint

Examples: ["local_prometheus"]
metric_reporting_period integer

Override how often you want to report and flush the metrics in seconds.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

trace_exporters string[]

Overrides the trace exporters used in this endpoint

Examples: ["debug_jaeger","newrelic","local_tempo"]
trace_sample_rate number

Overrides the sample rate for traces defines the percentage of reported traces. This option is key to reduce the amount of data generated (and resource usage), while you still can debug and troubleshoot issues. For instance, a number of 0.25 will report a 25% of the traces seen in the system.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

Examples: 0.25
min=0max=1
global object

Overrides the global configuration for this endpoint.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

2 nested properties
metrics_static_attributes object[]

Static attributes you want to pass for metrics. Overrides the metrics_static_attributes defined at the service level.

traces_static_attributes object[]

Static attributes you want to pass for traces. Overrides the traces_static_attributes defined at the service level.

proxy object

Reports the activity at the beginning of the proxy layer, including spawning the required requests to multiple backends, merging, endpoint transformation and any other internals of the proxy between the request processing and the backend communication

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

6 nested properties
disable_metrics boolean

Whether you want to disable all metrics in this endpoint or not.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

Default: false
disable_traces boolean

Whether you want to disable all traces in this endpoint or not.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

Default: false
metrics_static_attributes object[]

Static attributes you want to pass for metrics.

report_headers boolean

Whether you want to report all headers that passed from the request to the proxy layer (input_headers policy in the endpoint plus KrakenD's headers).

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
skip_headers string[]

A list of headers you want to skip when reporting headers passed to the proxy layer. This is useful to avoid reporting sensitive data.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Examples: ["X-Sensitive-Data","X-Signature"]
traces_static_attributes object[]

Static attributes you want to pass for traces.

https://www.krakend.io/schema/v2.13/websocket.json object

Enterprise only. Enables websocket communication.

See: https://www.krakend.io/docs/enterprise/websockets/

backoff_strategy enum

When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the max_retries. The backoff strategy defines the delay in seconds in between consecutive failed retries. Defaults to 'fallback'

See: https://www.krakend.io/docs/enterprise/websockets/

Default: "fallback"
Values: "linear" "linear-jitter" "exponential" "exponential-jitter" "fallback"
connect_event boolean

Whether to send notification events to the backend or not when a user establishes a new Websockets connection.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
disable_otel_metrics boolean

Disables the OpenTelemetry metrics for the websocket connections.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
disconnect_event boolean

Whether to send notification events to the backend or not when users disconnect from their Websockets connection.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
enable_direct_communication boolean

When the value is set to true the communication is set one to one, and disables multiplexing. One client to KrakenD opens one connection to the backend. This mode of operation is sub-optimal in comparison to multiplexing.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
input_headers string[]

Defines which input headers are allowed to pass to the backend. You don't need to declare the input_headers at the endpoint. Use * to pass all headers (not recommended, use explicit values instead). There are a few headers that won't be propagated regardless of your configuration, which are: Upgrade, Connection, Sec-Websocket-Extensions, Sec-Websocket-Version, and Sec-Websocket-Key.

See: https://www.krakend.io/docs/enterprise/websockets/

Default:
[]
Examples: ["Authorization","User-Agent","Accept"], ["*"]
uniqueItems=true
max_message_size integer

Sets the maximum size of messages in bytes sent by or returned to the client. Messages larger than this value are discarded by KrakenD and the client disconnected.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 512
max_retries integer

The maximum number of times you will allow KrakenD to retry reconnecting to a broken websockets server. When the maximum retries are reached, the gateway gives up the connection for good. Minimum value is 1 retry, or use <= 0 for unlimited retries.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 0
message_buffer_size integer

Sets the maximum number of messages each end-user can have in the buffer waiting to be processed. As this is a per-end-user setting, you must forecast how many consumers of KrakenD websockets you will have. The default value may be too high (memory consumption) if you expect thousands of clients consuming simultaneously.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 256
ping_period string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
pong_wait string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
read_buffer_size integer

Connections buffer network input and output to reduce the number of system calls when reading messages. You can set the maximum buffer size for reading in bytes.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 1024
return_error_details boolean

Provides an error {'error':'reason here'} to the client when KrakenD was unable to send the message to the backend.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
subprotocols string[]

The list of subprotocols that the client can use to connect to the websocket.

See: https://www.krakend.io/docs/enterprise/websockets/

Default:
[]
Examples: ["streamlit"]
uniqueItems=true
timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
write_buffer_size integer

Connections buffer network input and output to reduce the number of system calls when writing messages. You can set the maximum buffer size for writing in bytes.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 1024
write_wait string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
https://www.krakend.io/schema/v2.13/endpoint_extra_config.json object
ai/mcp object

Enterprise only. Declares the current endpoint as an MCP server entry point.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/

1 nested properties
server_name required

The MCP server you want to attach to this endpoint. When you add this namespace, the endpoint becomes the MCP server entry point URL. The name used must match the name in the ai/mcp configuration in the root level.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/

Examples: "stories-tracker"
auth/api-keys object

Enterprise only. Validates that users of this endpoint pass a valid API-key containing one of the declared roles.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

4 nested properties
roles string[] required

The list of roles allowed to access the endpoint. Values must match (case sensitive) definitions in the keys section at the service level of auth/api-keys. API Keys not having the right role, or unauthenticated requests, will receive a 401 Unauthorized.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

client_max_rate number

If you want to limit the endpoint usage to this specific user at a number of requests per second. Exceeding the number of requests per second will give the client a 429 Too Many Requests HTTP status code.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

identifier string

The header name or the query string name that contains the API key. By default uses any value declared in the auth/api-keys component in the service level.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

strategy enum

Specifies where to expect the user API key, whether inside a header or as part of the query string. When you change the strategy at the endpoint level, you should also set the identifier, otherwise you could have for instance, a query string strategy expecting to have a URL like /foo?Authorization=YOUR-KEY.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Values: "header" "query_string"
auth/basic object

Enterprise only. The Basic Authentication component protects the access to selected endpoints using basic username and password credentials.

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

2 nested properties
htpasswd_path string

Absolute Path to the htpasswd filename (recommended) or relative ./ to the workdir (less secure).

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

Examples: "/path/to/.htpasswd"
users object

Additional users to the htpasswd file can be declared directly inside the configuration. The content of both places will be merged (and this list will overwrite users already defined in the htpasswd file). The key of each entry is the username, and the value the bcrypt.

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

Examples: {"admin":"$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ...","user2":"$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ..."}
auth/signer object

creates a wrapper for your login endpoint that signs with your secret key the selected fields of the backend payload right before returning the content to the end-user.

See: https://www.krakend.io/docs/authorization/jwt-signing/

One of: variant, variant
13 nested properties
alg enum required

The hashing algorithm used by the issuer. Usually RS256. The algorithm you choose directly affects the CPU consumption.

See: https://www.krakend.io/docs/authorization/jwt-signing/

Values: "EdDSA" "HS256" "HS384" "HS512" "RS256" "RS384" "RS512" "ES256" "ES384" "ES512" "PS256" "PS384" "PS512"
keys_to_sign string[] required

List of all the specific keys that need signing (e.g., refresh_token and access_token).

See: https://www.krakend.io/docs/authorization/jwt-signing/

Examples: ["access_token","refresh_token"]
kid string required

The key ID purpose is to match a specific key, as the jwk_url might contain several keys.

See: https://www.krakend.io/docs/enterprise/authorization/jwt-validation/

Examples: "sim2"
cipher_suites enum[]

Override the default cipher suites (see JWT validation). Unless you have a legacy JWK, you don't need to set this value.

Default:
[
  49199,
  49195,
  49200,
  49196,
  52392,
  52393
]
cypher_key string
disable_jwk_security boolean

Disables HTTP security of the JWK client and allows insecure connections (plain HTTP) to download the keys. The flag should be false when you use HTTPS, and true when using plain HTTP or loading the key from a local file.

See: https://www.krakend.io/docs/enterprise/authorization/jwt-validation/

Default: false
full boolean

Use JSON format instead of the compact form JWT provides.

See: https://www.krakend.io/docs/enterprise/authorization/jwt-validation/

Default: false
jwk_fingerprints string[]

A list of fingerprints (the unique identifier of the certificate) for certificate pinning and avoid man in the middle attacks. Add fingerprints in base64 format.

See: https://www.krakend.io/docs/authorization/jwt-signing/

jwk_local_ca string

Path to the CA’s certificate verifying a secure connection when downloading the JWK. Use when not recognized by the system (e.g., self-signed certificates).

See: https://www.krakend.io/docs/authorization/jwt-validation/

jwk_local_path string

Local path to the JWK public keys, has preference over jwk_url. Instead of pointing to an external URL (with jwk_url), public keys are kept locally, in a plain JWK file (security alert!), or encrypted. When encrypted, also add secret_url and cypher_key.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "./jwk.txt"
jwk_url string

The URL to the JWK endpoint with the private keys used to sign the token.

See: https://www.krakend.io/docs/authorization/jwt-signing/

Examples: "http://your-backend/jwk/symmetric.json"
leeway string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
secret_url string

An URL with a custom scheme using one of the supported providers (e.g.: awskms://keyID) (see providers).

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "base64key://smGbjm71Nxd1Ig5FS0wj9SlbzAIrnolCz9bQQ6uAhl4=", "awskms://keyID", "azurekeyvault://keyID", "gcpkms://projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEY_RING]/cryptoKeys/[KEY]", "hashivault://keyID"
pattern=(base64key|awskms|azurekeyvault|gcpkms|hashivault)://(.*)
auth/validator object

Protect endpoints from public usage by validating JWT tokens generated by any industry-standard OpenID Connect (OIDC) integration.

See: https://www.krakend.io/docs/authorization/jwt-validation/

One of: variant, variant
27 nested properties
alg enum

The hashing algorithm used by the token issuer.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: "RS256"
Values: "EdDSA" "HS256" "HS384" "HS512" "RS256" "RS384" "RS512" "ES256" "ES384" "ES512" "PS256" "PS384" "PS512"
audience string[]

Reject tokens that do not contain ALL audiences declared in the list.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: ["audience1"]
auth_header_name string

Allows to parse the token from a custom header.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: "Authorization"
Examples: "X-Custom-Auth"
cache boolean

Set this value to true (recommended) to stop downloading keys on every request and store them in memory for the next cache_duration period and avoid hammering the key server, as recommended for performance. Do not use this flag when using jwk_local_ca.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: false
cache_duration integer

The cache duration in seconds when the cache is enabled. 15 minutes when unset.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: 900
cipher_suites enum[]

Override the default cipher suites. Use it if you want to enforce an even higher security standard.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default:
[
  49199,
  49195,
  49200,
  49196,
  52392,
  52393
]
cookie_key string

Add the key name of the cookie containing the token when it is not passed in the headers

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "cookie_jwt"
cypher_key string
disable_jwk_security boolean

When true, disables security of the JWK client and allows insecure connections (plain HTTP) to download the keys. Useful for development environments.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: false
failed_jwk_key_cooldown string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
issuer string

When set, tokens not matching the issuer are rejected.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "issuer"
jwk_fingerprints string[]

A list of fingerprints (the certificate's unique identifier) for certificate pinning and avoid man-in-the-middle attacks. Add fingerprints in base64 format.

See: https://www.krakend.io/docs/authorization/jwt-validation/

jwk_local_ca string

Path to the CA's certificate verifying a secure connection when downloading the JWK. Use when not recognized by the system (e.g., self-signed certificates).

See: https://www.krakend.io/docs/authorization/jwt-validation/

jwk_local_path string

Local path to the JWK public keys, has preference over jwk_url. Instead of pointing to an external URL (with jwk_url), public keys are kept locally, in a plain JWK file (security alert!), or encrypted. When encrypted, also add secret_url and cypher_key.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "./jwk.txt"
jwk_url string

The URL to the JWK endpoint with the public keys used to verify the token's authenticity and integrity. Use with cache to avoid re-downloading the key on every request. Consider enabling shared caching too. The identity server will receive an HTTP(s) request from KrakenD with a KrakenD user agent, and the identity server must reply with a JSON object and a content-type application/jwk-set+json or application/json.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "https://some-domain.auth0.com/.well-known/jwks.json", "http://KEYCLOAK:8080/auth/realms/master/protocol/openid-connect/certs", "https://yourOktaBaseUrl/v1/keys"
key_identify_strategy enum

Allows strategies other than kid to load keys.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Values: "kid" "x5t" "x5t#S256" "kid_x5t"
leeway string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
operation_debug boolean

When true, any JWT validation operation gets printed in the log with a level ERROR. You will see if a client does not have sufficient roles, the allowed claims, scopes, and other useful information.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: false
propagate_claims string[][]

Enables passing claims in the backend's request header. You can pass nested claims using the dot . operator. E.g.: realm_access.roles.

See: https://www.krakend.io/docs/authorization/jwt-validation/

propagate_claims_preserve_array boolean

When set to true, the JWT claims that are propagated to the backend will preserve their array structure as multi-value headers, if applies. If set to false, arrays will be converted to comma-separated strings.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: false
roles string[]

When set, the JWT token not having at least one of the listed roles is rejected.

See: https://www.krakend.io/docs/authorization/jwt-validation/

roles_key string

When validating users through roles, provide the key name inside the JWT payload that lists their roles. If this key is nested inside another object, add roles_key_is_nested and use the dot notation . to traverse each level. E.g.: resource_access.myclient.roles represents the payload {resource_access: { myclient: { roles: ["myrole"] } }. Notice that the roles object you choose is a list, not a map.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "resource_access.myclient.roles"
roles_key_is_nested boolean

If the roles key uses a nested object using the . dot notation, you must set it to true to traverse the object.

See: https://www.krakend.io/docs/authorization/jwt-validation/

scopes string[]

A list of scopes to validate. The token, after decoding it, can have the scopes declared as a space-separated list, e.g.: "my_scopes": "resource1:action1 resource3:action7" or inside a list, e.g.: "my_scopes": ["resource1:action1","resource3:action7"].

See: https://www.krakend.io/docs/authorization/jwt-validation/

scopes_key string

The key name where KrakenD can find the scopes. The key can be a nested object using the . dot notation, e.g.: data.access.my_scopes.

See: https://www.krakend.io/docs/authorization/jwt-validation/

scopes_matcher enum

Defines if the user needs to have in its token at least one of the listed claims (any), or all of them.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: "any"
Values: "any" "all"
secret_url string

An URL with a custom scheme using one of the supported providers (e.g.: awskms://keyID) (see providers).

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "base64key://smGbjm71Nxd1Ig5FS0wj9SlbzAIrnolCz9bQQ6uAhl4=", "awskms://keyID", "azurekeyvault://keyID", "gcpkms://projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEY_RING]/cryptoKeys/[KEY]", "hashivault://keyID"
pattern=(base64key|awskms|azurekeyvault|gcpkms|hashivault)://(.*)
documentation/openapi object

Enterprise only. Generates OpenAPI documentation automatically through krakend openapi export command.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

28 nested properties
description string

An introductory, optionally verbose, explanation supporting CommonMark syntax. If you'd like to load an external markdown file, you can use flexible configuration, for instance "description": {{include "openapi/intro.md" | toJson }}

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "Hi there, I am [OpenAPI](https://www.krakend.io/docs/enterprise/endpoints/openapi/)"
audience string[]

The list of audiences that will consume this endpoint. These values do not define the gateway logic in any way. They are a way to group endpoints and filter them out when generating the OpenAPI documentation. Use * to indicate an endpoint will be present in any audience generated.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: ["gold","silver","*"]
base_path string

A starting path that is appended to any endpoint.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
components_schemas object

The JSON Schemas you can reuse inside endpoint definitions using ref. You can either pass the JSON Schema object, or a bas64 string.

Examples: {"Pet":{"type":"object","required":["id","name"]}}
contact_email string

Email where users of your API can write to.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
contact_name string
Examples: "/v1"
contact_url string

Contact URL that users of your API can read.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
cookie_name string

When generating an OpenAPI spec, the name of the cookie used under components securitySchemes.

Default: "SESSIONID"
custom_security_schemes object

Allows you to add custom security schemes under components/securitySchemes in the generated OpenAPI spec. This is useful when you want to define your own security schemes, different from the built-in ones (e.g., jwt, apikey, cookie, etc.). When the property is in the service level you must declare the schema (e.g., "OAuth2Security":{...}), and when it is in the endpoint you should only write the object name with not properties inside, e.g, {"OAuth2Security":{}.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: {"OAuth2Security":{"description":"OAuth2 security scheme","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://example.com/oauth/authorize","scopes":{},"tokenUrl":"https://example.com/oauth/token"}}}}
disable_default_response_definitions boolean

By default, KrakenD adds a 500 and a 200 response definition to each endpoint. Set this property to true if you want to avoid this behavior.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Default: false
example object | string

Deprecated in OAS3 (use response_definition instead). A free form JSON object or a string you would like to show as a sample response of the endpoint. The examples assume they are JSON content types except when using the output_encoding=string.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

header_definition object[]

Sets a detailed description for the headers allowed in the endpoint. Make sure to include the same headers in the endpoint's input_headers.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The type of content","name":"Content-Type"}]
host string

The hostname where you will publish your API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "my.api.com"
jwt_key string

When generating an OpenAPI spec, the name of the JWT key used under components securitySchemes.

Default: "KrakenD-JWT"
license_name string

The license name (e.g.: Apache License)

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
license_url string

The URL where the license is hosted

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
operation_id string

A unique string identifying the operation identifier. Usually the method + the endpoint. If provided, these IDs must be unique among all operations described in your API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "GET/foo"
param_definition object[]

Sets a detailed description for the URL parameters (e.g.: /foo/{param}) required in the endpoint. Make sure to include to write the param exactly as in the endpoint definition.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The unique user ID","name":"id_user"}]
query_definition object[]

Sets a detailed description for the query strings allowed in the endpoint. Make sure to include the same strings in the endpoint's input_query_strings.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The number of the page","name":"page"}]
request_definition object[]

Describes the payload needed to consume the endpoint. If a JSON Schema validation exists, it takes precedence when generating the documentation. An example use case is when you need to document a multipart/form-data request body.This property is an array because you can document requests with multiple content types.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"Updates the user","content_type":"application/json","example":{"first_name":"Mary","id_user":33}}]
response_definition object

Describes the different status codes returned by this endpoint. Each key is the definition of the status code, represented by a string. E.g., 200 (success), 500 (internal error), etc.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: {"404":{"description":"Page not found","@comment":"Some comment","content_type":"application/json","example":{"status":"KO"}}}
schemes string[]

The list of schemes supported by the API, e.g. http or https

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Default:
[
  "http"
]
Examples: ["https","http"]
servers object[]

The list of servers where the API is hosted. The server URL can be a relative path, e.g., /v1 or an absolute path. The URL might contain {variables}, although these are only recognized by OpenAPI and to KrakenD they are just literal strings because it does not use them.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"url":"/v1"}], [{"url":"https://example.com:{port}","variables":{"port":{"default":"8443","enum":["8443","443"]}}}]
summary string

A short summary for the endpoint. Use the description field for the longest explanation.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

tag_definition object[]

Sets a detailed description for the tags classifiying endpoints when generating the OpenAPI spec.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"Description of tag1","name":"Tag1"}]
tags string[]

You can assign a list of tags to each API operation. If you declare tags in the tag_definition at the OpenAPI service level, they will have a description in the documentation. Tagged operations may be handled differently by tools and libraries. For example, Swagger UI uses tags to group the displayed operations.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

terms_of_service string

The URL to the terms of service for using this API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
version string

The version numbering you want to apply to this release of API., e.g.: 1.0.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "1.0"
documentation/postman object

Enterprise only. Generates postman documentation automatically through krakend postman export command.

See: https://www.krakend.io/docs/enterprise/developer/postman/

3 nested properties
description string

An introductory, optionally verbose, explanation supporting Markdown syntax. If you'd like to load an external markdown file, you can use flexible configuration, for instance "description": {{include "postman/intro.md" | toJson }}

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "Hi there, I am a [postman endpoint](https://www.krakend.io/docs/enterprise/developer/postman/)"
folder string

The folder name where you want to put this endpoint. If you defined folders at the service level, use the same name to reuse their name and description

Examples: "/Books"
name string

The name of the endpoint you are generating. If you don't set any name the last member path is used.

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "List books", "Create user"
governance/quota object

Enterprise only. Attach a quota to the endpoint, backend, or service. Needs a governance/processor namespace.

See: https://www.krakend.io/docs/enterprise/governance/quota/

7 nested properties
quota_name string required

Name of the quota you want to reuse, written exactly as declared under the processors list.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "my_quota"
tier_key string required

Header used to determine the tier. Use tier_value and tier_value_as on each tier to determine how to match the value.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "X-User-Tier", "X-User-ID"
tiers object[] required

List of tiers to match against the request. The first tier that matches will be used to determine the quota to consume.

See: https://www.krakend.io/docs/enterprise/governance/quota/

disable_quota_headers boolean

When set to true, the quota headers X-Quota-Limit, X-Quota-Remaining, and Retry-After will not be added to the response. This is useful when you want to hide the quota information from the client.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
on_unmatched_tier_allow boolean

When a tier cannot be infered from the request, whether to allow the request to continue or not. In case a request does not match any of the tiers, the request will be rejected with a 400 error unless you set this to true.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
weight_key string

Instead of incrementing the quota counter by one unit, use the value provided in a field or header with its dynamic value. For instance, an LLM can return how many tokens it consumed, and you can use that value to increment the quota counter. The value must be a parseable number, and the field or header must be present in the backend response. The weight_key is only used in the endpoint and backend scopes, and it is ignored in the service level.

See: https://www.krakend.io/docs/enterprise/governance/quota/

weight_strategy enum

Where to find the key containing the counter value to increment. Use body for any type of encoding different than no-op and header for no-op.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: "body"
Values: "body" "header"
modifier/jmespath object

Enterprise only. The JMESPath query language allows you to select, slice, filter, map, project, flatten, sort, and all sorts of operations on data.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

1 nested properties
expr string required

The JMESPath expression you want to apply to this endpoint.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

modifier/lua-endpoint object

Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.

See: https://www.krakend.io/docs/endpoints/lua/

7 nested properties
allow_open_libs boolean

As an efficiency point the Lua component does not load the standard libraries by default. If you need to import Lua libraries (e.g, the I/O, String, etc.), then you must set this flag to true.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
live boolean

For security and efficiency, the Lua script is loaded once into memory and not reloaded even if the file contents change. Set this flag to true if you want to modify the Lua script while KrakenD is running and apply the changes live (mostly during development to avoid the snippet being cached).

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
md5 object

The md5sum is an extra security feature to make sure that once you have coded the Lua script, the MD5 of what is loaded into memory matches what you expect and has not been tampered by a malicious 3rd party. The key of the object must match exactly the filename under sources, including all the path.

See: https://www.krakend.io/docs/endpoints/lua/

Examples: {"./path/to/file1.lua":"49ae50f58e35f4821ad4550e1a4d1de0"}
post string

The Lua code that is executed after performing the request. Available when used in the backend section. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "local r = response.load(); r:headers('Set-Cookie', 'key1='.. r:data('response'));"
pre string

The Lua code that is executed before performing the request. Unlike post, it's available in all sections. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "print('Backend response, pre-logic:'); local r = request.load(); print(r:body());"
skip_next boolean

Available on the backend section only. Instead of connecting to next backend in the pipe, returns an empty response and executes the post lua function.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
sources string[]

An array with all the Lua files that will be processed. If no path is provided (e.g., myfile.lua) the file loads from the working directory.

See: https://www.krakend.io/docs/endpoints/lua/

modifier/lua-proxy object

Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.

See: https://www.krakend.io/docs/endpoints/lua/

7 nested properties
allow_open_libs boolean

As an efficiency point the Lua component does not load the standard libraries by default. If you need to import Lua libraries (e.g, the I/O, String, etc.), then you must set this flag to true.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
live boolean

For security and efficiency, the Lua script is loaded once into memory and not reloaded even if the file contents change. Set this flag to true if you want to modify the Lua script while KrakenD is running and apply the changes live (mostly during development to avoid the snippet being cached).

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
md5 object

The md5sum is an extra security feature to make sure that once you have coded the Lua script, the MD5 of what is loaded into memory matches what you expect and has not been tampered by a malicious 3rd party. The key of the object must match exactly the filename under sources, including all the path.

See: https://www.krakend.io/docs/endpoints/lua/

Examples: {"./path/to/file1.lua":"49ae50f58e35f4821ad4550e1a4d1de0"}
post string

The Lua code that is executed after performing the request. Available when used in the backend section. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "local r = response.load(); r:headers('Set-Cookie', 'key1='.. r:data('response'));"
pre string

The Lua code that is executed before performing the request. Unlike post, it's available in all sections. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "print('Backend response, pre-logic:'); local r = request.load(); print(r:body());"
skip_next boolean

Available on the backend section only. Instead of connecting to next backend in the pipe, returns an empty response and executes the post lua function.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
sources string[]

An array with all the Lua files that will be processed. If no path is provided (e.g., myfile.lua) the file loads from the working directory.

See: https://www.krakend.io/docs/endpoints/lua/

modifier/request-body-extractor object

Enterprise only. Extracts fields from the incoming request body and promotes them to request headers or query strings.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

1 nested properties
operations object[] required

A list of extraction operations to apply. Each operation extracts a value from the request body and writes it to a header or query string parameter. Operations are evaluated in sequential order.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

modifier/request-body-extractor/early object

Enterprise only. Extracts fields from the incoming request body and promotes them to request headers or query strings.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

1 nested properties
operations object[] required

A list of extraction operations to apply. Each operation extracts a value from the request body and writes it to a header or query string parameter. Operations are evaluated in sequential order.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

modifier/request-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

modifier/response-body object

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

1 nested properties
modifiers object[]

A list of modifiers you would like to apply to specific fields. The modifiers are evaluated and applied in sequential order.

See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

Default:
[]
modifier/response-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

plugin/middleware object
1 nested properties
name string[] required

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/enterprise/extending/middleware-plugins/

plugin/req-resp-modifier object
4 nested properties
content-replacer Record<string, object>

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

ip-filter object

Enterprise only. The IP filtering plugin allows you to restrict the traffic to your API gateway based on the IP address. It works in two different modes (allow or deny) where you define the list of IPs (CIDR blocks) that are authorized to use the API, or that are denied from using the API.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

4 nested properties
CIDR string[] required

The CIDR blocks (list of IPs) you want to allow or deny.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["192.168.0.0/24","172.17.2.56/32"]
allow boolean required

When true, only the matching IPs are able to access the content. When false, all matching IPs are discarded.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Default: false
client_ip_headers string[]

A custom list of all headers that might contain the real IP of the client. The first matching IP in the list will be used. Default headers are (in order of checking): X-Forwarded-For, X-Real-IP, and X-Appengine-Remote-Addr.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["X-Forwarded-For","X-Real-IP","X-Appengine-Remote-Addr"]
trusted_proxies string[]

A custom list of all the recognized machines/balancers that proxy the client to your application. This list is used to avoid spoofing when trying to get the real IP of the client.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["10.0.0.0/16"]
name string[]

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/extending/plugin-modifiers/

Default:
[]
Examples: ["myplugin"]
response-schema-validator object

Enterprise only. The response schema validator plugin adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

2 nested properties
schema object required

Write your JSON schema directly in this field, with any number of fields or validations you need.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

error object

In case the validation fails, the error definition containing body and status.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

Examples: {"body":"We couldn't process you request, try again later.","status":401}
proxy object

Fine tune different options for the proxy phase of the API request/response flow.

7 nested properties
combiner string

For custom builds of KrakenD only

Examples: "combiner_name"
decompress_gzip boolean

Enterprise only. Decompresses any Gzipped content before sending it to the backend when the Content-Encoding has gzip in the first position. You can also set this value globally at the service level.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
flatmap_filter object[]

The flatmap middleware allows you to manipulate collections (or arrays, or lists, you name it) from the backend response. While the basic manipulation operations allow you to work directly with objects, the collections require a different approach: the flatmap component.

See: https://www.krakend.io/docs/backend/flatmap/

Examples: [{"type":"move","args":["a.*.b1.*.c","a.*.b1.*.d"]}]
max_payload integer

Enterprise only. Limits the maximum number of bytes a user can send to the endpoint. 0 means no limit. You can also set this value globally at the service level.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: 0
sequential boolean

When set to true, instead of fetching all backend content in parallel, the calls are made in order (sequentially), allowing you to chain backend requests and making calls dependent one of each other. If any of the calls fail, the remaining ones are aborted.

See: https://www.krakend.io/docs/endpoints/sequential-proxy/

Default: false
sequential_propagated_params string[]

The list of parameters you want to propagate from a previous response to the next request. Parameters are accessible by Lua scripts, CEL, security policies, the body generator, or plugins. When you add a resp-like parameter in this list, the parameter becomes available to the components mentioned in subsequent calls, uppercasing the first letter. For instance, if you add resp0_user, you can access in the second, third, etc. backends in Lua to req:params('Resp0_user').The format of the parameters must start with respX_ or respX, where X is the backend index from which you want to take the parameter. If you don't set the underscore _, you set the whole payload as a parameter. For instance, resp0 sets a parameter Resp0 to use in Lua or a Body generator and contains the entire payload of the backend 0 (as a string). In this extreme case, you must use no-op in the backend's output (even the endpoint has a json output encoding) and you should access the value in Lua or a plugin. Note that access to nested parameters uses a single string with the dot notation inside, e.g.: req_params['Resp0_f1.f2.f3'] (CEL and Security Policies), or {{ index .req_params "Resp0_f1.f2.f3" }} (body generators).

See: https://www.krakend.io/docs/endpoints/sequential-proxy/

Examples: ["resp0"], ["resp1_my_field","resp0_user_id"]
static object

The static proxy injects static data in the final response when the selected strategy matches.

See: https://www.krakend.io/docs/endpoints/static-proxy/

2 nested properties
data object required

The static data (as a JSON object) that you will return.

See: https://www.krakend.io/docs/endpoints/static-proxy/

strategy enum required

One of the supported strategies

See: https://www.krakend.io/docs/endpoints/static-proxy/

Values: "always" "success" "complete" "errored" "incomplete"
qos/ratelimit/router object
Any of: variant, variant
10 nested properties
capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from all users together at any given instant. When the gateway starts, the bucket is full. As requests from users come, the remaining tokens in the bucket decrease. At the same time, the max_rate refills the bucket at the desired rate until its maximum capacity is reached. The default value for the capacity is the max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as max_rate.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
cleanup_period string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
cleanup_threads integer

These are the number of routines that search for and remove outdated rate limit counters. The more routine(s) you add, the faster the memory optimization is completed, but the more CPU it will consume. Generally speaking, a single thread is more than enough because the delete operation is very fast, even with a large number of counters. This is an advanced micro-optimization setting that you should use with caution.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
client_capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from each individual user at any given instant. Works just as capacity, but instead of having one bucket for all users, keeps a counter for every connected client and endpoint, and refills from client_max_rate instead of max_rate. The client is recognized using the strategy field (an IP address, a token, a header, etc.). The default value for the client_capacity is the client_max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as client_max_rate.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
client_max_rate number

Number of tokens you add to the Token Bucket for each individual user (user quota) in the time interval you want (every). The remaining tokens in the bucket are the requests a specific user can do. It keeps a counter for every client and endpoint. Keep in mind that every KrakenD instance keeps its counters in memory for every single client.

See: https://www.krakend.io/docs/endpoints/rate-limit/

every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
key string

Available when using client_max_rate and you have set a strategy equal to header or param. It makes no sense in other contexts. For header it is the header name containing the user identification (e.g., Authorization on tokens, or X-Original-Forwarded-For for IPs). When they contain a list of space-separated IPs, it will take the IP from the client that hit the first trusted proxy. For param it is the name of the placeholder used in the endpoint, like id_user for an endpoint /user/{id_user}.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Examples: "X-Tenant", "Authorization", "id_user"
max_rate number

Sets the maximum number of requests all users can do in the given time frame. Internally uses the Token Bucket algorithm. The absence of max_rate in the configuration or a 0 is the equivalent to no limitation. You can use decimals if needed.

See: https://www.krakend.io/docs/endpoints/rate-limit/

num_shards integer

All rate limit counters are stored in memory in groups (shards). All counters in the same shard share a mutex (which controls that one counter is modified at a time), and this helps with contention. Having, for instance, 2048 shards (default) and 1M users connected concurrently (same instant) means that each user will need to coordinate writes in their counter with an average of under 500 other users (1M/2048=489). Lowering the shards might increase contention and latency but free additional memory. This is an advanced micro-optimization setting that should be used with caution.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 2048
strategy enum

Available when using client_max_rate. Sets the strategy you will use to set client counters. Choose ip when the restrictions apply to the client's IP address, or set it to header when there is a header that identifies a user uniquely. That header must be defined with the key entry.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Values: "ip" "header" "param"
qos/ratelimit/router/redis object

Enterprise only. Redis-backed service ratelimit

Any of: variant, variant, variant, variant
10 nested properties
capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from all users together at any given instant. When the gateway starts, the bucket is full. As requests from users come, the remaining tokens in the bucket decrease. At the same time, the max_rate refills the bucket at the desired rate until its maximum capacity is reached. The default value for the capacity is the max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as max_rate.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Default: 1
client_capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from each individual user at any given instant. Works just as capacity, but instead of having one bucket for all users, keeps a counter for every connected client and endpoint, and refills from client_max_rate instead of max_rate. The client is recognized using the strategy field (an IP address, a token, a header, etc.). The default value for the client_capacity is the client_max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as client_max_rate.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Default: 1
client_max_rate number

Number of tokens you add to the Token Bucket for each individual user (user quota) in the time interval you want (every). The remaining tokens in the bucket are the requests a specific user can do. It keeps a counter for every client and endpoint. Keep in mind that every KrakenD instance keeps its counters in memory for every single client.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

connection_name string

The connection pool name or cluster name that is used by this ratelimit. The value must match what you configured in the Redis Connection Pool

connection_pool string

The connection pool name that is used by this ratelimit. The value must match what you configured in the Redis Connection Pool

every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
key string

Available when using client_max_rate and you have set a strategy equal to header or param. It makes no sense in other contexts. For header it is the header name containing the user identification (e.g., Authorization on tokens, or X-Original-Forwarded-For for IPs). When they contain a list of space-separated IPs, it will take the IP from the client that hit the first trusted proxy. For param it is the name of the placeholder used in the endpoint, like id_user for an endpoint /user/{id_user}.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Examples: "X-Tenant", "Authorization", "id_user"
max_rate number

Sets the maximum number of requests all users can do in the given time frame. Internally uses the Token Bucket algorithm. The absence of max_rate in the configuration or a 0 is the equivalent to no limitation. You can use decimals if needed.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

on_failure_allow boolean

Whether you want to allow a request to continue when the Redis connection is failing or not. The default behavior blocks the request if Redis is not responding correctly

Default: false
strategy enum

Available when using client_max_rate. Sets the strategy you will use to set client counters. Choose ip when the restrictions apply to the client's IP address, or set it to header when there is a header that identifies a user uniquely. That header must be defined with the key entry.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Values: "ip" "header" "param"
qos/ratelimit/tiered object

Enterprise only. Apply ratelimit based on tier match.

2 nested properties
tier_key string required

The header name containing the tier name. The string you provide is case-insensitive. If you need to take the value from a place that is not a header (a token, an API key), you must use propagate functions in the components that convert values to internal headers.

See: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/

tiers object[] required

The list of all tier definitions and limits for each. Each item in the list is a tier object.

See: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/

security/bot-detector object

The bot detector module checks incoming connections to the gateway to determine if a bot made them, helping you detect and reject bots carrying out scraping, content theft, and form spam.

See: https://www.krakend.io/docs/throttling/botdetector/

5 nested properties
allow string[]

An array with EXACT MATCHES of trusted user agents that can connect.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["MyAndroidClient/1.0","Pingdom.com_bot_version_1.1"]
cache_size integer

Size of the LRU cache that helps speed the bot detection. The size is the mumber of users agents that you want to keep in memory.

See: https://www.krakend.io/docs/throttling/botdetector/

Examples: 1000
deny string[]

An array with EXACT MATCHES of undesired bots, to reject immediately.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["facebookexternalhit/1.1"]
empty_user_agent_is_bot boolean

Whether to consider an empty user-agent a bot (and reject it) or not.

See: https://www.krakend.io/docs/throttling/botdetector/

Default: false
patterns string[]

An array with all the regular expressions that define bots. Matching bots are rejected.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["GoogleBot.*","(facebookexternalhit)/.*"]
security/cors object

Define Cross-Origin Resource Sharing (CORS) configuration to send additional HTTP headers to tell browsers if they can use resources from a different origin.

See: https://www.krakend.io/docs/service-settings/cors/

10 nested properties
allow_credentials boolean

When requests can include user credentials like cookies, HTTP authentication or client side SSL certificates.

See: https://www.krakend.io/docs/service-settings/cors/

Default: false
allow_headers string[]

An array with the headers allowed, but Originis always appended to the list. Requests with headers not in this list are rejected.

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[]
Examples: ["Accept-Language"]
allow_methods enum[]

An array with all the HTTP methods allowed, in uppercase. Possible values are GET, HEAD,POST,PUT,PATCH,DELETE, or OPTIONS

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[
  "GET",
  "HEAD",
  "POST"
]
allow_origins string[]

An array with all the origins allowed, the use of one * is permitted to allow groups of hosts. Examples of values are <https://example.com>, <https://example.*>, <https://*.example.com> or just *` (any origin).

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[
  "*"
]
allow_private_network boolean

Indicates whether to accept cross-origin requests over a private network.

See: https://www.krakend.io/docs/service-settings/cors/

Default: false
debug boolean

Show debugging information in the logger, use it only during development.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
expose_headers string[]

List of headers that are safe to expose to the API of a CORS API specification.

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[
  "Content-Length",
  "Content-Type"
]
max_age string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
options_passthrough boolean

Instructs preflight to let other potential next handlers to process the OPTIONS method. Turn this on when you set the auto_opts flag in the router to true.

See: https://www.krakend.io/docs/service-settings/cors/

Default: false
options_success_status integer

The HTTP status code that is considered a success.

See: https://www.krakend.io/docs/service-settings/cors/

Default: 204
Examples: 200
security/http object

Security through HTTP headers, including HSTS, HPKP, MIME-Sniffing prevention, Clickjacking protection, and others.

See: https://www.krakend.io/docs/service-settings/security/

17 nested properties
allowed_hosts string[]

When a request hits KrakenD, it will confirm if the value of the Host HTTP header is in the list. If so, it will further process the request. If the host is not in the allowed hosts list, KrakenD will simply reject the request.

See: https://www.krakend.io/docs/service-settings/security/

Default:
[]
allowed_hosts_are_regex boolean

Treat the allowed hosts list as regular expressions.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
browser_xss_filter boolean
Default: false
content_security_policy string

The HTTP Content-Security-Policy (CSP) default-src directive serves as a fallback for the other CSP fetch directives.

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "default-src 'self';"
content_type_nosniff boolean

Enabling this feature will prevent the user's browser from interpreting files as something else than declared by the content type in the HTTP headers.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
custom_frame_options_value string

You can add an X-Frame-Options header using custom_frame_options_value with the value of DENY (default behavior) or even set your custom value.

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "ALLOW-FROM https://example.com"
force_sts_header boolean

Force a STS Header even if using plain HTTP.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
frame_deny boolean

Set to true to enable clickjacking protection, together with custom_frame_options_value.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
host_proxy_headers string[]

A set of header keys that may hold a proxied hostname value for the request.

See: https://www.krakend.io/docs/service-settings/security/

Examples: ["X-Forwarded-Hosts"]
hpkp_public_key string

HTTP Public Key Pinning (HPKP) is a security mechanism which allows HTTPS websites to resist impersonation by attackers using mis-issued or otherwise fraudulent certificates. (For example, sometimes attackers can compromise certificate authorities, and then can mis-issue certificates for a web origin.).

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "pin-sha256="base64=="; max-age=expireTime [; includeSubDomains][; report-uri="reportURI"]"
is_development boolean

This will cause the AllowedHosts, SSLRedirect, and STSSeconds/STSIncludeSubdomains options to be ignored during development. When deploying to production, be sure to set this to false.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
referrer_policy string

Allows the Referrer-Policy header with the value to be set with a custom value.

See: https://www.krakend.io/docs/service-settings/security/

Default: "same-origin"
ssl_host string

When the SSL redirect is true, the host where the request is redirected to.

See: https://www.krakend.io/docs/service-settings/security/

Default: "ssl.host.domain"
Examples: "ssl.host.domain"
ssl_proxy_headers object

Header keys with associated values that would indicate a valid https request. Useful when using Nginx, e.g: "X-Forwarded-Proto": "https"

See: https://www.krakend.io/docs/service-settings/security/

Examples: {"X-Forwarded-Proto":"https"}
ssl_redirect boolean

Redirect any request that is not using HTTPS

See: https://www.krakend.io/docs/service-settings/security/

Default: true
sts_include_subdomains boolean

Set to true when you want the includeSubdomains be appended to the Strict-Transport-Security header.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
sts_seconds integer

Enable this policy by setting the max-age of the Strict-Transport-Security header. Setting to 0 disables HSTS.

See: https://www.krakend.io/docs/service-settings/security/

Default: 0
security/policies object

Enterprise only. The policies engine allows you to write custom sets of policies that are validated during requests, responses, or token validation.

See: https://www.krakend.io/docs/enterprise/security-policies/

Any of: variant, variant, variant
6 nested properties
auto_join_policies boolean

When true, all policies of the same type concatenate with an AND operation to evaluate a single expression. Performs faster, but its harder the debug.

Default: false
debug boolean

When true, all the inputs and evaluation results are printed in the console.

Default: false
disable_macros boolean

Advanced macros can be disabled in those policies not needing them for a faster evaluation.

Default: false
jwt object

All the policies applied in the JWT context (token validation). You must configure auth/validator for the policies to run, otherwise they will be skipped. Any policy failing will generate a 401 Unauthorized error. Works in the endpoint context only, and is not available under backend.

See: https://www.krakend.io/docs/enterprise/security-policies/

1 nested properties
policies string[] required

An array with all the policies to evaluate. Each policy is represented as a string

See: https://www.krakend.io/docs/enterprise/security-policies/

minItems=1
req object

All the policies applied in the request context.

See: https://www.krakend.io/docs/enterprise/security-policies/

2 nested properties
policies string[] required

An array with all the policies to evaluate. Each policy is represented as a string

See: https://www.krakend.io/docs/enterprise/security-policies/

minItems=1
error object
resp object

All the policies applied in the response context.

See: https://www.krakend.io/docs/enterprise/security-policies/

2 nested properties
policies string[] required

An array with all the policies to evaluate. Each policy is represented as a string

See: https://www.krakend.io/docs/enterprise/security-policies/

minItems=1
error object
telemetry/opentelemetry object

Enterprise only. Overrides metrics and traces declared by the OpenTelemetry service.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

4 nested properties
backend object

Enterprise only. Reports the activity between KrakenD and each of your backend services. This is the more granular layer.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

2 nested properties
metrics object
traces object
exporters_override object

Enterprise only. Override exporter configuration for this endpoint

4 nested properties
metric_exporters string[]

Overrides the metrics exporters used in this endpoint

Examples: ["local_prometheus"]
metric_reporting_period integer

Override how often you want to report and flush the metrics in seconds.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

trace_exporters string[]

Overrides the trace exporters used in this endpoint

Examples: ["debug_jaeger","newrelic","local_tempo"]
trace_sample_rate number

Overrides the sample rate for traces defines the percentage of reported traces. This option is key to reduce the amount of data generated (and resource usage), while you still can debug and troubleshoot issues. For instance, a number of 0.25 will report a 25% of the traces seen in the system.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

Examples: 0.25
min=0max=1
global object

Overrides the global configuration for this endpoint.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

2 nested properties
metrics_static_attributes object[]

Static attributes you want to pass for metrics. Overrides the metrics_static_attributes defined at the service level.

traces_static_attributes object[]

Static attributes you want to pass for traces. Overrides the traces_static_attributes defined at the service level.

proxy object

Reports the activity at the beginning of the proxy layer, including spawning the required requests to multiple backends, merging, endpoint transformation and any other internals of the proxy between the request processing and the backend communication

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

6 nested properties
disable_metrics boolean

Whether you want to disable all metrics in this endpoint or not.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

Default: false
disable_traces boolean

Whether you want to disable all traces in this endpoint or not.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

Default: false
metrics_static_attributes object[]

Static attributes you want to pass for metrics.

report_headers boolean

Whether you want to report all headers that passed from the request to the proxy layer (input_headers policy in the endpoint plus KrakenD's headers).

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
skip_headers string[]

A list of headers you want to skip when reporting headers passed to the proxy layer. This is useful to avoid reporting sensitive data.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Examples: ["X-Sensitive-Data","X-Signature"]
traces_static_attributes object[]

Static attributes you want to pass for traces.

validation/cel object[]

The Common Expression Language (CEL) middleware enables expression evaluation, when an expression returns false, KrakenD does not return the content as the condition has failed. Otherwise, if all expressions returned true, the content is served.

See: https://www.krakend.io/docs/endpoints/common-expression-language-cel/

minItems=1
validation/json-schema object

Apply automatic validations using a JSON Schema definition before the content passes to the backends. The json schema component allows you to define validation rules on the body, type definition, or even validate the fields' values.

validation/response-json-schema object

Enterprise only. The response schema validator adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

2 nested properties
schema object required

Write your JSON schema directly in this field, with any number of fields or validations you need.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

error object

In case the validation fails, the error definition containing body and status.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

Examples: {"body":"We couldn't process you request, try again later.","status":401}
3 nested properties
body string

The error message you want to show when the validation fails. Set it to an empty string "" to show the JSON-schema validation error.

Default: ""
content_type string

The Content-Type header you want to set back in the response when you are setting a custom body

Default: "text/plain"
Examples: "application/json"
status integer

The HTTP status code you want to set back in the response.

Default: 500
websocket object

Enterprise only. Enables websocket communication.

See: https://www.krakend.io/docs/enterprise/websockets/

17 nested properties
backoff_strategy enum

When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the max_retries. The backoff strategy defines the delay in seconds in between consecutive failed retries. Defaults to 'fallback'

See: https://www.krakend.io/docs/enterprise/websockets/

Default: "fallback"
Values: "linear" "linear-jitter" "exponential" "exponential-jitter" "fallback"
connect_event boolean

Whether to send notification events to the backend or not when a user establishes a new Websockets connection.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
disable_otel_metrics boolean

Disables the OpenTelemetry metrics for the websocket connections.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
disconnect_event boolean

Whether to send notification events to the backend or not when users disconnect from their Websockets connection.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
enable_direct_communication boolean

When the value is set to true the communication is set one to one, and disables multiplexing. One client to KrakenD opens one connection to the backend. This mode of operation is sub-optimal in comparison to multiplexing.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
input_headers string[]

Defines which input headers are allowed to pass to the backend. You don't need to declare the input_headers at the endpoint. Use * to pass all headers (not recommended, use explicit values instead). There are a few headers that won't be propagated regardless of your configuration, which are: Upgrade, Connection, Sec-Websocket-Extensions, Sec-Websocket-Version, and Sec-Websocket-Key.

See: https://www.krakend.io/docs/enterprise/websockets/

Default:
[]
Examples: ["Authorization","User-Agent","Accept"], ["*"]
uniqueItems=true
max_message_size integer

Sets the maximum size of messages in bytes sent by or returned to the client. Messages larger than this value are discarded by KrakenD and the client disconnected.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 512
max_retries integer

The maximum number of times you will allow KrakenD to retry reconnecting to a broken websockets server. When the maximum retries are reached, the gateway gives up the connection for good. Minimum value is 1 retry, or use <= 0 for unlimited retries.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 0
message_buffer_size integer

Sets the maximum number of messages each end-user can have in the buffer waiting to be processed. As this is a per-end-user setting, you must forecast how many consumers of KrakenD websockets you will have. The default value may be too high (memory consumption) if you expect thousands of clients consuming simultaneously.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 256
ping_period string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
pong_wait string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
read_buffer_size integer

Connections buffer network input and output to reduce the number of system calls when reading messages. You can set the maximum buffer size for reading in bytes.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 1024
return_error_details boolean

Provides an error {'error':'reason here'} to the client when KrakenD was unable to send the message to the backend.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
subprotocols string[]

The list of subprotocols that the client can use to connect to the websocket.

See: https://www.krakend.io/docs/enterprise/websockets/

Default:
[]
Examples: ["streamlit"]
uniqueItems=true
timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
write_buffer_size integer

Connections buffer network input and output to reduce the number of system calls when writing messages. You can set the maximum buffer size for writing in bytes.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 1024
write_wait string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
https://www.krakend.io/schema/v2.13/endpoint.json object
backend object[] required

An array with all the backend services you want to use in this endpoint. See the backend object documentation to know all the available options, they are omitted here for brevity.

See: https://www.krakend.io/docs/backends/

minItems=1
endpoint string required

The path of the URL you want to expose. The path is case-sensitive and should start with a slash /. You can use {placeholders} to allow dynamic variables. For example: /foo/{var}/baz. You can also add an ending /* in the path to enable wildcards. Enterprise only. The router will try to automatically redirect calls to endpoints with an incorrect case or incorrect trailing slash to its correct version offering a 301. There are no guarantees that it will succeed and the request might even fail completely while trying (and log an ugly error with a trace). The safest option is to disable automatic redirections by setting to true the flags disable_redirect_fixed_path and disable_redirect_trailing_slash in the router options. Limitations: URLs do not support colons : in their definition. All {vars} are meant to be isolated in the path and not to be used to build words, like in /file.{ext} See disable_rest for that usage.

See: https://www.krakend.io/docs/endpoints/

Examples: "/new-endpoint", "/foo/{var}", "/foo/{var1}/{var2}"
pattern=^\/[^\*\?\&\%]*(\/\*)?$
cache_ttl string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
concurrent_calls integer

The concurrent requests are an excellent technique to improve the response times and decrease error rates by requesting in parallel the same information multiple times. Yes, you make the same request to several backends instead of asking to just one. When the first backend returns the information, the remaining requests are canceled.

See: https://www.krakend.io/docs/endpoints/concurrent-requests/

Default: 1
min=1max=5
extra_config object
31 nested properties
ai/mcp object

Enterprise only. Declares the current endpoint as an MCP server entry point.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/

1 nested properties
server_name required

The MCP server you want to attach to this endpoint. When you add this namespace, the endpoint becomes the MCP server entry point URL. The name used must match the name in the ai/mcp configuration in the root level.

See: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/

Examples: "stories-tracker"
auth/api-keys object

Enterprise only. Validates that users of this endpoint pass a valid API-key containing one of the declared roles.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

4 nested properties
roles string[] required

The list of roles allowed to access the endpoint. Values must match (case sensitive) definitions in the keys section at the service level of auth/api-keys. API Keys not having the right role, or unauthenticated requests, will receive a 401 Unauthorized.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

client_max_rate number

If you want to limit the endpoint usage to this specific user at a number of requests per second. Exceeding the number of requests per second will give the client a 429 Too Many Requests HTTP status code.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

identifier string

The header name or the query string name that contains the API key. By default uses any value declared in the auth/api-keys component in the service level.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

strategy enum

Specifies where to expect the user API key, whether inside a header or as part of the query string. When you change the strategy at the endpoint level, you should also set the identifier, otherwise you could have for instance, a query string strategy expecting to have a URL like /foo?Authorization=YOUR-KEY.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Values: "header" "query_string"
auth/basic object

Enterprise only. The Basic Authentication component protects the access to selected endpoints using basic username and password credentials.

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

2 nested properties
htpasswd_path string

Absolute Path to the htpasswd filename (recommended) or relative ./ to the workdir (less secure).

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

Examples: "/path/to/.htpasswd"
users object

Additional users to the htpasswd file can be declared directly inside the configuration. The content of both places will be merged (and this list will overwrite users already defined in the htpasswd file). The key of each entry is the username, and the value the bcrypt.

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

Examples: {"admin":"$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ...","user2":"$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ..."}
auth/signer object

creates a wrapper for your login endpoint that signs with your secret key the selected fields of the backend payload right before returning the content to the end-user.

See: https://www.krakend.io/docs/authorization/jwt-signing/

One of: variant, variant
13 nested properties
alg enum required

The hashing algorithm used by the issuer. Usually RS256. The algorithm you choose directly affects the CPU consumption.

See: https://www.krakend.io/docs/authorization/jwt-signing/

Values: "EdDSA" "HS256" "HS384" "HS512" "RS256" "RS384" "RS512" "ES256" "ES384" "ES512" "PS256" "PS384" "PS512"
keys_to_sign string[] required

List of all the specific keys that need signing (e.g., refresh_token and access_token).

See: https://www.krakend.io/docs/authorization/jwt-signing/

Examples: ["access_token","refresh_token"]
kid string required

The key ID purpose is to match a specific key, as the jwk_url might contain several keys.

See: https://www.krakend.io/docs/enterprise/authorization/jwt-validation/

Examples: "sim2"
cipher_suites enum[]

Override the default cipher suites (see JWT validation). Unless you have a legacy JWK, you don't need to set this value.

Default:
[
  49199,
  49195,
  49200,
  49196,
  52392,
  52393
]
cypher_key string
disable_jwk_security boolean

Disables HTTP security of the JWK client and allows insecure connections (plain HTTP) to download the keys. The flag should be false when you use HTTPS, and true when using plain HTTP or loading the key from a local file.

See: https://www.krakend.io/docs/enterprise/authorization/jwt-validation/

Default: false
full boolean

Use JSON format instead of the compact form JWT provides.

See: https://www.krakend.io/docs/enterprise/authorization/jwt-validation/

Default: false
jwk_fingerprints string[]

A list of fingerprints (the unique identifier of the certificate) for certificate pinning and avoid man in the middle attacks. Add fingerprints in base64 format.

See: https://www.krakend.io/docs/authorization/jwt-signing/

jwk_local_ca string

Path to the CA’s certificate verifying a secure connection when downloading the JWK. Use when not recognized by the system (e.g., self-signed certificates).

See: https://www.krakend.io/docs/authorization/jwt-validation/

jwk_local_path string

Local path to the JWK public keys, has preference over jwk_url. Instead of pointing to an external URL (with jwk_url), public keys are kept locally, in a plain JWK file (security alert!), or encrypted. When encrypted, also add secret_url and cypher_key.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "./jwk.txt"
jwk_url string

The URL to the JWK endpoint with the private keys used to sign the token.

See: https://www.krakend.io/docs/authorization/jwt-signing/

Examples: "http://your-backend/jwk/symmetric.json"
leeway string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
secret_url string

An URL with a custom scheme using one of the supported providers (e.g.: awskms://keyID) (see providers).

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "base64key://smGbjm71Nxd1Ig5FS0wj9SlbzAIrnolCz9bQQ6uAhl4=", "awskms://keyID", "azurekeyvault://keyID", "gcpkms://projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEY_RING]/cryptoKeys/[KEY]", "hashivault://keyID"
pattern=(base64key|awskms|azurekeyvault|gcpkms|hashivault)://(.*)
auth/validator object

Protect endpoints from public usage by validating JWT tokens generated by any industry-standard OpenID Connect (OIDC) integration.

See: https://www.krakend.io/docs/authorization/jwt-validation/

One of: variant, variant
27 nested properties
alg enum

The hashing algorithm used by the token issuer.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: "RS256"
Values: "EdDSA" "HS256" "HS384" "HS512" "RS256" "RS384" "RS512" "ES256" "ES384" "ES512" "PS256" "PS384" "PS512"
audience string[]

Reject tokens that do not contain ALL audiences declared in the list.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: ["audience1"]
auth_header_name string

Allows to parse the token from a custom header.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: "Authorization"
Examples: "X-Custom-Auth"
cache boolean

Set this value to true (recommended) to stop downloading keys on every request and store them in memory for the next cache_duration period and avoid hammering the key server, as recommended for performance. Do not use this flag when using jwk_local_ca.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: false
cache_duration integer

The cache duration in seconds when the cache is enabled. 15 minutes when unset.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: 900
cipher_suites enum[]

Override the default cipher suites. Use it if you want to enforce an even higher security standard.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default:
[
  49199,
  49195,
  49200,
  49196,
  52392,
  52393
]
cookie_key string

Add the key name of the cookie containing the token when it is not passed in the headers

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "cookie_jwt"
cypher_key string
disable_jwk_security boolean

When true, disables security of the JWK client and allows insecure connections (plain HTTP) to download the keys. Useful for development environments.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: false
failed_jwk_key_cooldown string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
issuer string

When set, tokens not matching the issuer are rejected.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "issuer"
jwk_fingerprints string[]

A list of fingerprints (the certificate's unique identifier) for certificate pinning and avoid man-in-the-middle attacks. Add fingerprints in base64 format.

See: https://www.krakend.io/docs/authorization/jwt-validation/

jwk_local_ca string

Path to the CA's certificate verifying a secure connection when downloading the JWK. Use when not recognized by the system (e.g., self-signed certificates).

See: https://www.krakend.io/docs/authorization/jwt-validation/

jwk_local_path string

Local path to the JWK public keys, has preference over jwk_url. Instead of pointing to an external URL (with jwk_url), public keys are kept locally, in a plain JWK file (security alert!), or encrypted. When encrypted, also add secret_url and cypher_key.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "./jwk.txt"
jwk_url string

The URL to the JWK endpoint with the public keys used to verify the token's authenticity and integrity. Use with cache to avoid re-downloading the key on every request. Consider enabling shared caching too. The identity server will receive an HTTP(s) request from KrakenD with a KrakenD user agent, and the identity server must reply with a JSON object and a content-type application/jwk-set+json or application/json.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "https://some-domain.auth0.com/.well-known/jwks.json", "http://KEYCLOAK:8080/auth/realms/master/protocol/openid-connect/certs", "https://yourOktaBaseUrl/v1/keys"
key_identify_strategy enum

Allows strategies other than kid to load keys.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Values: "kid" "x5t" "x5t#S256" "kid_x5t"
leeway string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
operation_debug boolean

When true, any JWT validation operation gets printed in the log with a level ERROR. You will see if a client does not have sufficient roles, the allowed claims, scopes, and other useful information.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: false
propagate_claims string[][]

Enables passing claims in the backend's request header. You can pass nested claims using the dot . operator. E.g.: realm_access.roles.

See: https://www.krakend.io/docs/authorization/jwt-validation/

propagate_claims_preserve_array boolean

When set to true, the JWT claims that are propagated to the backend will preserve their array structure as multi-value headers, if applies. If set to false, arrays will be converted to comma-separated strings.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: false
roles string[]

When set, the JWT token not having at least one of the listed roles is rejected.

See: https://www.krakend.io/docs/authorization/jwt-validation/

roles_key string

When validating users through roles, provide the key name inside the JWT payload that lists their roles. If this key is nested inside another object, add roles_key_is_nested and use the dot notation . to traverse each level. E.g.: resource_access.myclient.roles represents the payload {resource_access: { myclient: { roles: ["myrole"] } }. Notice that the roles object you choose is a list, not a map.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "resource_access.myclient.roles"
roles_key_is_nested boolean

If the roles key uses a nested object using the . dot notation, you must set it to true to traverse the object.

See: https://www.krakend.io/docs/authorization/jwt-validation/

scopes string[]

A list of scopes to validate. The token, after decoding it, can have the scopes declared as a space-separated list, e.g.: "my_scopes": "resource1:action1 resource3:action7" or inside a list, e.g.: "my_scopes": ["resource1:action1","resource3:action7"].

See: https://www.krakend.io/docs/authorization/jwt-validation/

scopes_key string

The key name where KrakenD can find the scopes. The key can be a nested object using the . dot notation, e.g.: data.access.my_scopes.

See: https://www.krakend.io/docs/authorization/jwt-validation/

scopes_matcher enum

Defines if the user needs to have in its token at least one of the listed claims (any), or all of them.

See: https://www.krakend.io/docs/authorization/jwt-validation/

Default: "any"
Values: "any" "all"
secret_url string

An URL with a custom scheme using one of the supported providers (e.g.: awskms://keyID) (see providers).

See: https://www.krakend.io/docs/authorization/jwt-validation/

Examples: "base64key://smGbjm71Nxd1Ig5FS0wj9SlbzAIrnolCz9bQQ6uAhl4=", "awskms://keyID", "azurekeyvault://keyID", "gcpkms://projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEY_RING]/cryptoKeys/[KEY]", "hashivault://keyID"
pattern=(base64key|awskms|azurekeyvault|gcpkms|hashivault)://(.*)
documentation/openapi object

Enterprise only. Generates OpenAPI documentation automatically through krakend openapi export command.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

28 nested properties
description string

An introductory, optionally verbose, explanation supporting CommonMark syntax. If you'd like to load an external markdown file, you can use flexible configuration, for instance "description": {{include "openapi/intro.md" | toJson }}

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "Hi there, I am [OpenAPI](https://www.krakend.io/docs/enterprise/endpoints/openapi/)"
audience string[]

The list of audiences that will consume this endpoint. These values do not define the gateway logic in any way. They are a way to group endpoints and filter them out when generating the OpenAPI documentation. Use * to indicate an endpoint will be present in any audience generated.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: ["gold","silver","*"]
base_path string

A starting path that is appended to any endpoint.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
components_schemas object

The JSON Schemas you can reuse inside endpoint definitions using ref. You can either pass the JSON Schema object, or a bas64 string.

Examples: {"Pet":{"type":"object","required":["id","name"]}}
contact_email string

Email where users of your API can write to.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
contact_name string
Examples: "/v1"
contact_url string

Contact URL that users of your API can read.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
cookie_name string

When generating an OpenAPI spec, the name of the cookie used under components securitySchemes.

Default: "SESSIONID"
custom_security_schemes object

Allows you to add custom security schemes under components/securitySchemes in the generated OpenAPI spec. This is useful when you want to define your own security schemes, different from the built-in ones (e.g., jwt, apikey, cookie, etc.). When the property is in the service level you must declare the schema (e.g., "OAuth2Security":{...}), and when it is in the endpoint you should only write the object name with not properties inside, e.g, {"OAuth2Security":{}.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: {"OAuth2Security":{"description":"OAuth2 security scheme","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://example.com/oauth/authorize","scopes":{},"tokenUrl":"https://example.com/oauth/token"}}}}
disable_default_response_definitions boolean

By default, KrakenD adds a 500 and a 200 response definition to each endpoint. Set this property to true if you want to avoid this behavior.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Default: false
example object | string

Deprecated in OAS3 (use response_definition instead). A free form JSON object or a string you would like to show as a sample response of the endpoint. The examples assume they are JSON content types except when using the output_encoding=string.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

header_definition object[]

Sets a detailed description for the headers allowed in the endpoint. Make sure to include the same headers in the endpoint's input_headers.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The type of content","name":"Content-Type"}]
host string

The hostname where you will publish your API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "my.api.com"
jwt_key string

When generating an OpenAPI spec, the name of the JWT key used under components securitySchemes.

Default: "KrakenD-JWT"
license_name string

The license name (e.g.: Apache License)

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
license_url string

The URL where the license is hosted

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
operation_id string

A unique string identifying the operation identifier. Usually the method + the endpoint. If provided, these IDs must be unique among all operations described in your API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "GET/foo"
param_definition object[]

Sets a detailed description for the URL parameters (e.g.: /foo/{param}) required in the endpoint. Make sure to include to write the param exactly as in the endpoint definition.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The unique user ID","name":"id_user"}]
query_definition object[]

Sets a detailed description for the query strings allowed in the endpoint. Make sure to include the same strings in the endpoint's input_query_strings.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The number of the page","name":"page"}]
request_definition object[]

Describes the payload needed to consume the endpoint. If a JSON Schema validation exists, it takes precedence when generating the documentation. An example use case is when you need to document a multipart/form-data request body.This property is an array because you can document requests with multiple content types.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"Updates the user","content_type":"application/json","example":{"first_name":"Mary","id_user":33}}]
response_definition object

Describes the different status codes returned by this endpoint. Each key is the definition of the status code, represented by a string. E.g., 200 (success), 500 (internal error), etc.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: {"404":{"description":"Page not found","@comment":"Some comment","content_type":"application/json","example":{"status":"KO"}}}
schemes string[]

The list of schemes supported by the API, e.g. http or https

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Default:
[
  "http"
]
Examples: ["https","http"]
servers object[]

The list of servers where the API is hosted. The server URL can be a relative path, e.g., /v1 or an absolute path. The URL might contain {variables}, although these are only recognized by OpenAPI and to KrakenD they are just literal strings because it does not use them.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"url":"/v1"}], [{"url":"https://example.com:{port}","variables":{"port":{"default":"8443","enum":["8443","443"]}}}]
summary string

A short summary for the endpoint. Use the description field for the longest explanation.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

tag_definition object[]

Sets a detailed description for the tags classifiying endpoints when generating the OpenAPI spec.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"Description of tag1","name":"Tag1"}]
tags string[]

You can assign a list of tags to each API operation. If you declare tags in the tag_definition at the OpenAPI service level, they will have a description in the documentation. Tagged operations may be handled differently by tools and libraries. For example, Swagger UI uses tags to group the displayed operations.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

terms_of_service string

The URL to the terms of service for using this API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
version string

The version numbering you want to apply to this release of API., e.g.: 1.0.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "1.0"
documentation/postman object

Enterprise only. Generates postman documentation automatically through krakend postman export command.

See: https://www.krakend.io/docs/enterprise/developer/postman/

3 nested properties
description string

An introductory, optionally verbose, explanation supporting Markdown syntax. If you'd like to load an external markdown file, you can use flexible configuration, for instance "description": {{include "postman/intro.md" | toJson }}

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "Hi there, I am a [postman endpoint](https://www.krakend.io/docs/enterprise/developer/postman/)"
folder string

The folder name where you want to put this endpoint. If you defined folders at the service level, use the same name to reuse their name and description

Examples: "/Books"
name string

The name of the endpoint you are generating. If you don't set any name the last member path is used.

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "List books", "Create user"
governance/quota object

Enterprise only. Attach a quota to the endpoint, backend, or service. Needs a governance/processor namespace.

See: https://www.krakend.io/docs/enterprise/governance/quota/

7 nested properties
quota_name string required

Name of the quota you want to reuse, written exactly as declared under the processors list.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "my_quota"
tier_key string required

Header used to determine the tier. Use tier_value and tier_value_as on each tier to determine how to match the value.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "X-User-Tier", "X-User-ID"
tiers object[] required

List of tiers to match against the request. The first tier that matches will be used to determine the quota to consume.

See: https://www.krakend.io/docs/enterprise/governance/quota/

disable_quota_headers boolean

When set to true, the quota headers X-Quota-Limit, X-Quota-Remaining, and Retry-After will not be added to the response. This is useful when you want to hide the quota information from the client.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
on_unmatched_tier_allow boolean

When a tier cannot be infered from the request, whether to allow the request to continue or not. In case a request does not match any of the tiers, the request will be rejected with a 400 error unless you set this to true.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
weight_key string

Instead of incrementing the quota counter by one unit, use the value provided in a field or header with its dynamic value. For instance, an LLM can return how many tokens it consumed, and you can use that value to increment the quota counter. The value must be a parseable number, and the field or header must be present in the backend response. The weight_key is only used in the endpoint and backend scopes, and it is ignored in the service level.

See: https://www.krakend.io/docs/enterprise/governance/quota/

weight_strategy enum

Where to find the key containing the counter value to increment. Use body for any type of encoding different than no-op and header for no-op.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: "body"
Values: "body" "header"
modifier/jmespath object

Enterprise only. The JMESPath query language allows you to select, slice, filter, map, project, flatten, sort, and all sorts of operations on data.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

1 nested properties
expr string required

The JMESPath expression you want to apply to this endpoint.

See: https://www.krakend.io/docs/enterprise/endpoints/jmespath/

modifier/lua-endpoint object

Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.

See: https://www.krakend.io/docs/endpoints/lua/

7 nested properties
allow_open_libs boolean

As an efficiency point the Lua component does not load the standard libraries by default. If you need to import Lua libraries (e.g, the I/O, String, etc.), then you must set this flag to true.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
live boolean

For security and efficiency, the Lua script is loaded once into memory and not reloaded even if the file contents change. Set this flag to true if you want to modify the Lua script while KrakenD is running and apply the changes live (mostly during development to avoid the snippet being cached).

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
md5 object

The md5sum is an extra security feature to make sure that once you have coded the Lua script, the MD5 of what is loaded into memory matches what you expect and has not been tampered by a malicious 3rd party. The key of the object must match exactly the filename under sources, including all the path.

See: https://www.krakend.io/docs/endpoints/lua/

Examples: {"./path/to/file1.lua":"49ae50f58e35f4821ad4550e1a4d1de0"}
post string

The Lua code that is executed after performing the request. Available when used in the backend section. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "local r = response.load(); r:headers('Set-Cookie', 'key1='.. r:data('response'));"
pre string

The Lua code that is executed before performing the request. Unlike post, it's available in all sections. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "print('Backend response, pre-logic:'); local r = request.load(); print(r:body());"
skip_next boolean

Available on the backend section only. Instead of connecting to next backend in the pipe, returns an empty response and executes the post lua function.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
sources string[]

An array with all the Lua files that will be processed. If no path is provided (e.g., myfile.lua) the file loads from the working directory.

See: https://www.krakend.io/docs/endpoints/lua/

modifier/lua-proxy object

Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.

See: https://www.krakend.io/docs/endpoints/lua/

7 nested properties
allow_open_libs boolean

As an efficiency point the Lua component does not load the standard libraries by default. If you need to import Lua libraries (e.g, the I/O, String, etc.), then you must set this flag to true.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
live boolean

For security and efficiency, the Lua script is loaded once into memory and not reloaded even if the file contents change. Set this flag to true if you want to modify the Lua script while KrakenD is running and apply the changes live (mostly during development to avoid the snippet being cached).

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
md5 object

The md5sum is an extra security feature to make sure that once you have coded the Lua script, the MD5 of what is loaded into memory matches what you expect and has not been tampered by a malicious 3rd party. The key of the object must match exactly the filename under sources, including all the path.

See: https://www.krakend.io/docs/endpoints/lua/

Examples: {"./path/to/file1.lua":"49ae50f58e35f4821ad4550e1a4d1de0"}
post string

The Lua code that is executed after performing the request. Available when used in the backend section. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "local r = response.load(); r:headers('Set-Cookie', 'key1='.. r:data('response'));"
pre string

The Lua code that is executed before performing the request. Unlike post, it's available in all sections. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "print('Backend response, pre-logic:'); local r = request.load(); print(r:body());"
skip_next boolean

Available on the backend section only. Instead of connecting to next backend in the pipe, returns an empty response and executes the post lua function.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
sources string[]

An array with all the Lua files that will be processed. If no path is provided (e.g., myfile.lua) the file loads from the working directory.

See: https://www.krakend.io/docs/endpoints/lua/

modifier/request-body-extractor object

Enterprise only. Extracts fields from the incoming request body and promotes them to request headers or query strings.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

1 nested properties
operations object[] required

A list of extraction operations to apply. Each operation extracts a value from the request body and writes it to a header or query string parameter. Operations are evaluated in sequential order.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

modifier/request-body-extractor/early object

Enterprise only. Extracts fields from the incoming request body and promotes them to request headers or query strings.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

1 nested properties
operations object[] required

A list of extraction operations to apply. Each operation extracts a value from the request body and writes it to a header or query string parameter. Operations are evaluated in sequential order.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

modifier/request-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

modifier/response-body object

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

1 nested properties
modifiers object[]

A list of modifiers you would like to apply to specific fields. The modifiers are evaluated and applied in sequential order.

See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

Default:
[]
modifier/response-body-generator object

Enterprise only. Crafts the body/payload using a templating system.

See: https://www.krakend.io/backends/body-generator/

One of: variant, variant
4 nested properties
content_type string

The Content-Type you are generating in the template, so it can be recognized by whoever is using it.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: "application/json"
Examples: "application/json", "application/xml", "text/xml"
debug boolean

When true, shows useful information in the logs with DEBUG level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Default: false
path string

The path to the Go template file you want to use to craft the body.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

Examples: "./path/to.tmpl"
template string

An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.

See: https://www.krakend.io/docs/enterprise/backends/body-generator/

plugin/middleware object
1 nested properties
name string[] required

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/enterprise/extending/middleware-plugins/

plugin/req-resp-modifier object
4 nested properties
content-replacer Record<string, object>

Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.

See: See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/

ip-filter object

Enterprise only. The IP filtering plugin allows you to restrict the traffic to your API gateway based on the IP address. It works in two different modes (allow or deny) where you define the list of IPs (CIDR blocks) that are authorized to use the API, or that are denied from using the API.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

name string[]

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/extending/plugin-modifiers/

Default:
[]
Examples: ["myplugin"]
response-schema-validator object

Enterprise only. The response schema validator plugin adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

proxy object

Fine tune different options for the proxy phase of the API request/response flow.

7 nested properties
combiner string

For custom builds of KrakenD only

Examples: "combiner_name"
decompress_gzip boolean

Enterprise only. Decompresses any Gzipped content before sending it to the backend when the Content-Encoding has gzip in the first position. You can also set this value globally at the service level.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
flatmap_filter object[]

The flatmap middleware allows you to manipulate collections (or arrays, or lists, you name it) from the backend response. While the basic manipulation operations allow you to work directly with objects, the collections require a different approach: the flatmap component.

See: https://www.krakend.io/docs/backend/flatmap/

Examples: [{"type":"move","args":["a.*.b1.*.c","a.*.b1.*.d"]}]
max_payload integer

Enterprise only. Limits the maximum number of bytes a user can send to the endpoint. 0 means no limit. You can also set this value globally at the service level.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: 0
sequential boolean

When set to true, instead of fetching all backend content in parallel, the calls are made in order (sequentially), allowing you to chain backend requests and making calls dependent one of each other. If any of the calls fail, the remaining ones are aborted.

See: https://www.krakend.io/docs/endpoints/sequential-proxy/

Default: false
sequential_propagated_params string[]

The list of parameters you want to propagate from a previous response to the next request. Parameters are accessible by Lua scripts, CEL, security policies, the body generator, or plugins. When you add a resp-like parameter in this list, the parameter becomes available to the components mentioned in subsequent calls, uppercasing the first letter. For instance, if you add resp0_user, you can access in the second, third, etc. backends in Lua to req:params('Resp0_user').The format of the parameters must start with respX_ or respX, where X is the backend index from which you want to take the parameter. If you don't set the underscore _, you set the whole payload as a parameter. For instance, resp0 sets a parameter Resp0 to use in Lua or a Body generator and contains the entire payload of the backend 0 (as a string). In this extreme case, you must use no-op in the backend's output (even the endpoint has a json output encoding) and you should access the value in Lua or a plugin. Note that access to nested parameters uses a single string with the dot notation inside, e.g.: req_params['Resp0_f1.f2.f3'] (CEL and Security Policies), or {{ index .req_params "Resp0_f1.f2.f3" }} (body generators).

See: https://www.krakend.io/docs/endpoints/sequential-proxy/

Examples: ["resp0"], ["resp1_my_field","resp0_user_id"]
static object

The static proxy injects static data in the final response when the selected strategy matches.

See: https://www.krakend.io/docs/endpoints/static-proxy/

qos/ratelimit/router object
Any of: variant, variant
10 nested properties
capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from all users together at any given instant. When the gateway starts, the bucket is full. As requests from users come, the remaining tokens in the bucket decrease. At the same time, the max_rate refills the bucket at the desired rate until its maximum capacity is reached. The default value for the capacity is the max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as max_rate.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
cleanup_period string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
cleanup_threads integer

These are the number of routines that search for and remove outdated rate limit counters. The more routine(s) you add, the faster the memory optimization is completed, but the more CPU it will consume. Generally speaking, a single thread is more than enough because the delete operation is very fast, even with a large number of counters. This is an advanced micro-optimization setting that you should use with caution.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
client_capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from each individual user at any given instant. Works just as capacity, but instead of having one bucket for all users, keeps a counter for every connected client and endpoint, and refills from client_max_rate instead of max_rate. The client is recognized using the strategy field (an IP address, a token, a header, etc.). The default value for the client_capacity is the client_max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as client_max_rate.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
client_max_rate number

Number of tokens you add to the Token Bucket for each individual user (user quota) in the time interval you want (every). The remaining tokens in the bucket are the requests a specific user can do. It keeps a counter for every client and endpoint. Keep in mind that every KrakenD instance keeps its counters in memory for every single client.

See: https://www.krakend.io/docs/endpoints/rate-limit/

every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
key string

Available when using client_max_rate and you have set a strategy equal to header or param. It makes no sense in other contexts. For header it is the header name containing the user identification (e.g., Authorization on tokens, or X-Original-Forwarded-For for IPs). When they contain a list of space-separated IPs, it will take the IP from the client that hit the first trusted proxy. For param it is the name of the placeholder used in the endpoint, like id_user for an endpoint /user/{id_user}.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Examples: "X-Tenant", "Authorization", "id_user"
max_rate number

Sets the maximum number of requests all users can do in the given time frame. Internally uses the Token Bucket algorithm. The absence of max_rate in the configuration or a 0 is the equivalent to no limitation. You can use decimals if needed.

See: https://www.krakend.io/docs/endpoints/rate-limit/

num_shards integer

All rate limit counters are stored in memory in groups (shards). All counters in the same shard share a mutex (which controls that one counter is modified at a time), and this helps with contention. Having, for instance, 2048 shards (default) and 1M users connected concurrently (same instant) means that each user will need to coordinate writes in their counter with an average of under 500 other users (1M/2048=489). Lowering the shards might increase contention and latency but free additional memory. This is an advanced micro-optimization setting that should be used with caution.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 2048
strategy enum

Available when using client_max_rate. Sets the strategy you will use to set client counters. Choose ip when the restrictions apply to the client's IP address, or set it to header when there is a header that identifies a user uniquely. That header must be defined with the key entry.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Values: "ip" "header" "param"
qos/ratelimit/router/redis object

Enterprise only. Redis-backed service ratelimit

Any of: variant, variant, variant, variant
10 nested properties
capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from all users together at any given instant. When the gateway starts, the bucket is full. As requests from users come, the remaining tokens in the bucket decrease. At the same time, the max_rate refills the bucket at the desired rate until its maximum capacity is reached. The default value for the capacity is the max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as max_rate.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Default: 1
client_capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from each individual user at any given instant. Works just as capacity, but instead of having one bucket for all users, keeps a counter for every connected client and endpoint, and refills from client_max_rate instead of max_rate. The client is recognized using the strategy field (an IP address, a token, a header, etc.). The default value for the client_capacity is the client_max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as client_max_rate.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Default: 1
client_max_rate number

Number of tokens you add to the Token Bucket for each individual user (user quota) in the time interval you want (every). The remaining tokens in the bucket are the requests a specific user can do. It keeps a counter for every client and endpoint. Keep in mind that every KrakenD instance keeps its counters in memory for every single client.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

connection_name string

The connection pool name or cluster name that is used by this ratelimit. The value must match what you configured in the Redis Connection Pool

connection_pool string

The connection pool name that is used by this ratelimit. The value must match what you configured in the Redis Connection Pool

every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
key string

Available when using client_max_rate and you have set a strategy equal to header or param. It makes no sense in other contexts. For header it is the header name containing the user identification (e.g., Authorization on tokens, or X-Original-Forwarded-For for IPs). When they contain a list of space-separated IPs, it will take the IP from the client that hit the first trusted proxy. For param it is the name of the placeholder used in the endpoint, like id_user for an endpoint /user/{id_user}.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Examples: "X-Tenant", "Authorization", "id_user"
max_rate number

Sets the maximum number of requests all users can do in the given time frame. Internally uses the Token Bucket algorithm. The absence of max_rate in the configuration or a 0 is the equivalent to no limitation. You can use decimals if needed.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

on_failure_allow boolean

Whether you want to allow a request to continue when the Redis connection is failing or not. The default behavior blocks the request if Redis is not responding correctly

Default: false
strategy enum

Available when using client_max_rate. Sets the strategy you will use to set client counters. Choose ip when the restrictions apply to the client's IP address, or set it to header when there is a header that identifies a user uniquely. That header must be defined with the key entry.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Values: "ip" "header" "param"
qos/ratelimit/tiered object

Enterprise only. Apply ratelimit based on tier match.

2 nested properties
tier_key string required

The header name containing the tier name. The string you provide is case-insensitive. If you need to take the value from a place that is not a header (a token, an API key), you must use propagate functions in the components that convert values to internal headers.

See: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/

tiers object[] required

The list of all tier definitions and limits for each. Each item in the list is a tier object.

See: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/

security/bot-detector object

The bot detector module checks incoming connections to the gateway to determine if a bot made them, helping you detect and reject bots carrying out scraping, content theft, and form spam.

See: https://www.krakend.io/docs/throttling/botdetector/

5 nested properties
allow string[]

An array with EXACT MATCHES of trusted user agents that can connect.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["MyAndroidClient/1.0","Pingdom.com_bot_version_1.1"]
cache_size integer

Size of the LRU cache that helps speed the bot detection. The size is the mumber of users agents that you want to keep in memory.

See: https://www.krakend.io/docs/throttling/botdetector/

Examples: 1000
deny string[]

An array with EXACT MATCHES of undesired bots, to reject immediately.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["facebookexternalhit/1.1"]
empty_user_agent_is_bot boolean

Whether to consider an empty user-agent a bot (and reject it) or not.

See: https://www.krakend.io/docs/throttling/botdetector/

Default: false
patterns string[]

An array with all the regular expressions that define bots. Matching bots are rejected.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["GoogleBot.*","(facebookexternalhit)/.*"]
security/cors object

Define Cross-Origin Resource Sharing (CORS) configuration to send additional HTTP headers to tell browsers if they can use resources from a different origin.

See: https://www.krakend.io/docs/service-settings/cors/

10 nested properties
allow_credentials boolean

When requests can include user credentials like cookies, HTTP authentication or client side SSL certificates.

See: https://www.krakend.io/docs/service-settings/cors/

Default: false
allow_headers string[]

An array with the headers allowed, but Originis always appended to the list. Requests with headers not in this list are rejected.

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[]
Examples: ["Accept-Language"]
allow_methods enum[]

An array with all the HTTP methods allowed, in uppercase. Possible values are GET, HEAD,POST,PUT,PATCH,DELETE, or OPTIONS

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[
  "GET",
  "HEAD",
  "POST"
]
allow_origins string[]

An array with all the origins allowed, the use of one * is permitted to allow groups of hosts. Examples of values are <https://example.com>, <https://example.*>, <https://*.example.com> or just *` (any origin).

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[
  "*"
]
allow_private_network boolean

Indicates whether to accept cross-origin requests over a private network.

See: https://www.krakend.io/docs/service-settings/cors/

Default: false
debug boolean

Show debugging information in the logger, use it only during development.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
expose_headers string[]

List of headers that are safe to expose to the API of a CORS API specification.

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[
  "Content-Length",
  "Content-Type"
]
max_age string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
options_passthrough boolean

Instructs preflight to let other potential next handlers to process the OPTIONS method. Turn this on when you set the auto_opts flag in the router to true.

See: https://www.krakend.io/docs/service-settings/cors/

Default: false
options_success_status integer

The HTTP status code that is considered a success.

See: https://www.krakend.io/docs/service-settings/cors/

Default: 204
Examples: 200
security/http object

Security through HTTP headers, including HSTS, HPKP, MIME-Sniffing prevention, Clickjacking protection, and others.

See: https://www.krakend.io/docs/service-settings/security/

17 nested properties
allowed_hosts string[]

When a request hits KrakenD, it will confirm if the value of the Host HTTP header is in the list. If so, it will further process the request. If the host is not in the allowed hosts list, KrakenD will simply reject the request.

See: https://www.krakend.io/docs/service-settings/security/

Default:
[]
allowed_hosts_are_regex boolean

Treat the allowed hosts list as regular expressions.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
browser_xss_filter boolean
Default: false
content_security_policy string

The HTTP Content-Security-Policy (CSP) default-src directive serves as a fallback for the other CSP fetch directives.

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "default-src 'self';"
content_type_nosniff boolean

Enabling this feature will prevent the user's browser from interpreting files as something else than declared by the content type in the HTTP headers.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
custom_frame_options_value string

You can add an X-Frame-Options header using custom_frame_options_value with the value of DENY (default behavior) or even set your custom value.

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "ALLOW-FROM https://example.com"
force_sts_header boolean

Force a STS Header even if using plain HTTP.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
frame_deny boolean

Set to true to enable clickjacking protection, together with custom_frame_options_value.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
host_proxy_headers string[]

A set of header keys that may hold a proxied hostname value for the request.

See: https://www.krakend.io/docs/service-settings/security/

Examples: ["X-Forwarded-Hosts"]
hpkp_public_key string

HTTP Public Key Pinning (HPKP) is a security mechanism which allows HTTPS websites to resist impersonation by attackers using mis-issued or otherwise fraudulent certificates. (For example, sometimes attackers can compromise certificate authorities, and then can mis-issue certificates for a web origin.).

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "pin-sha256="base64=="; max-age=expireTime [; includeSubDomains][; report-uri="reportURI"]"
is_development boolean

This will cause the AllowedHosts, SSLRedirect, and STSSeconds/STSIncludeSubdomains options to be ignored during development. When deploying to production, be sure to set this to false.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
referrer_policy string

Allows the Referrer-Policy header with the value to be set with a custom value.

See: https://www.krakend.io/docs/service-settings/security/

Default: "same-origin"
ssl_host string

When the SSL redirect is true, the host where the request is redirected to.

See: https://www.krakend.io/docs/service-settings/security/

Default: "ssl.host.domain"
Examples: "ssl.host.domain"
ssl_proxy_headers object

Header keys with associated values that would indicate a valid https request. Useful when using Nginx, e.g: "X-Forwarded-Proto": "https"

See: https://www.krakend.io/docs/service-settings/security/

Examples: {"X-Forwarded-Proto":"https"}
ssl_redirect boolean

Redirect any request that is not using HTTPS

See: https://www.krakend.io/docs/service-settings/security/

Default: true
sts_include_subdomains boolean

Set to true when you want the includeSubdomains be appended to the Strict-Transport-Security header.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
sts_seconds integer

Enable this policy by setting the max-age of the Strict-Transport-Security header. Setting to 0 disables HSTS.

See: https://www.krakend.io/docs/service-settings/security/

Default: 0
security/policies object

Enterprise only. The policies engine allows you to write custom sets of policies that are validated during requests, responses, or token validation.

See: https://www.krakend.io/docs/enterprise/security-policies/

Any of: variant, variant, variant
6 nested properties
auto_join_policies boolean

When true, all policies of the same type concatenate with an AND operation to evaluate a single expression. Performs faster, but its harder the debug.

Default: false
debug boolean

When true, all the inputs and evaluation results are printed in the console.

Default: false
disable_macros boolean

Advanced macros can be disabled in those policies not needing them for a faster evaluation.

Default: false
jwt object

All the policies applied in the JWT context (token validation). You must configure auth/validator for the policies to run, otherwise they will be skipped. Any policy failing will generate a 401 Unauthorized error. Works in the endpoint context only, and is not available under backend.

See: https://www.krakend.io/docs/enterprise/security-policies/

req object

All the policies applied in the request context.

See: https://www.krakend.io/docs/enterprise/security-policies/

resp object

All the policies applied in the response context.

See: https://www.krakend.io/docs/enterprise/security-policies/

telemetry/opentelemetry object

Enterprise only. Overrides metrics and traces declared by the OpenTelemetry service.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

4 nested properties
backend object

Enterprise only. Reports the activity between KrakenD and each of your backend services. This is the more granular layer.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

exporters_override object

Enterprise only. Override exporter configuration for this endpoint

global object

Overrides the global configuration for this endpoint.

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

proxy object

Reports the activity at the beginning of the proxy layer, including spawning the required requests to multiple backends, merging, endpoint transformation and any other internals of the proxy between the request processing and the backend communication

See: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/

validation/cel object[]

The Common Expression Language (CEL) middleware enables expression evaluation, when an expression returns false, KrakenD does not return the content as the condition has failed. Otherwise, if all expressions returned true, the content is served.

See: https://www.krakend.io/docs/endpoints/common-expression-language-cel/

minItems=1
validation/json-schema object

Apply automatic validations using a JSON Schema definition before the content passes to the backends. The json schema component allows you to define validation rules on the body, type definition, or even validate the fields' values.

validation/response-json-schema object

Enterprise only. The response schema validator adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

2 nested properties
schema object required

Write your JSON schema directly in this field, with any number of fields or validations you need.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

error object

In case the validation fails, the error definition containing body and status.

See: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/

Examples: {"body":"We couldn't process you request, try again later.","status":401}
websocket object

Enterprise only. Enables websocket communication.

See: https://www.krakend.io/docs/enterprise/websockets/

17 nested properties
backoff_strategy enum

When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the max_retries. The backoff strategy defines the delay in seconds in between consecutive failed retries. Defaults to 'fallback'

See: https://www.krakend.io/docs/enterprise/websockets/

Default: "fallback"
Values: "linear" "linear-jitter" "exponential" "exponential-jitter" "fallback"
connect_event boolean

Whether to send notification events to the backend or not when a user establishes a new Websockets connection.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
disable_otel_metrics boolean

Disables the OpenTelemetry metrics for the websocket connections.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
disconnect_event boolean

Whether to send notification events to the backend or not when users disconnect from their Websockets connection.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
enable_direct_communication boolean

When the value is set to true the communication is set one to one, and disables multiplexing. One client to KrakenD opens one connection to the backend. This mode of operation is sub-optimal in comparison to multiplexing.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
input_headers string[]

Defines which input headers are allowed to pass to the backend. You don't need to declare the input_headers at the endpoint. Use * to pass all headers (not recommended, use explicit values instead). There are a few headers that won't be propagated regardless of your configuration, which are: Upgrade, Connection, Sec-Websocket-Extensions, Sec-Websocket-Version, and Sec-Websocket-Key.

See: https://www.krakend.io/docs/enterprise/websockets/

Default:
[]
Examples: ["Authorization","User-Agent","Accept"], ["*"]
uniqueItems=true
max_message_size integer

Sets the maximum size of messages in bytes sent by or returned to the client. Messages larger than this value are discarded by KrakenD and the client disconnected.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 512
max_retries integer

The maximum number of times you will allow KrakenD to retry reconnecting to a broken websockets server. When the maximum retries are reached, the gateway gives up the connection for good. Minimum value is 1 retry, or use <= 0 for unlimited retries.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 0
message_buffer_size integer

Sets the maximum number of messages each end-user can have in the buffer waiting to be processed. As this is a per-end-user setting, you must forecast how many consumers of KrakenD websockets you will have. The default value may be too high (memory consumption) if you expect thousands of clients consuming simultaneously.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 256
ping_period string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
pong_wait string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
read_buffer_size integer

Connections buffer network input and output to reduce the number of system calls when reading messages. You can set the maximum buffer size for reading in bytes.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 1024
return_error_details boolean

Provides an error {'error':'reason here'} to the client when KrakenD was unable to send the message to the backend.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: false
subprotocols string[]

The list of subprotocols that the client can use to connect to the websocket.

See: https://www.krakend.io/docs/enterprise/websockets/

Default:
[]
Examples: ["streamlit"]
uniqueItems=true
timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
write_buffer_size integer

Connections buffer network input and output to reduce the number of system calls when writing messages. You can set the maximum buffer size for writing in bytes.

See: https://www.krakend.io/docs/enterprise/websockets/

Default: 1024
write_wait string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
input_headers string[]

Defines the list of all headers allowed to reach the backend when passed. By default, KrakenD won't pass any header from the client to the backend. This list is case-insensitive. You can declare headers in lowercase, uppercase, or mixed. An entry ["Cookie"] forwards all cookies, and a single star element ["*"] as value forwards everything to the backend (it's safer to avoid this option), including cookies. See headers forwarding

Default:
[]
uniqueItems=true
input_query_strings string[]

Defines the exact list of quey strings parameters that are allowed to reach the backend. This list is case-sensitive. By default, KrakenD won't pass any query string to the backend. A single star element ["*"] as value forwards everything to the backend (it's safer to avoid this option)

See: https://www.krakend.io/docs/endpoints/parameter-forwarding/

Default:
[]
uniqueItems=true
method enum

The method supported by this endpoint. Create multiple endpoint entries if you need different methods.

See: https://www.krakend.io/docs/endpoints/

Default: "GET"
Values: "GET" "POST" "PUT" "PATCH" "DELETE"
output_encoding enum

The gateway can work with several content types, even allowing your clients to choose how to consume the content. See the supported encodings

Default: "json"
Values: "json" "json-collection" "yaml" "fast-json" "xml" "negotiate" "string" "no-op"
timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
https://www.krakend.io/schema/v2.13/ai/mcp.json object
servers object[] required

The array of MCP servers available for linking to endpoints. Each object represents a different MCP server. The entry is only the definition of the server. You must create an endpoint that serves as the entrypoint to each server.

https://www.krakend.io/schema/v2.13/auth/api-keys.json object

Enterprise only. Enables a Role-Based Access Control (RBAC) mechanism by reading the Authorization header of incoming requests.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

keys object[] required

A list of objects defining each API Key.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

hash enum

The hashing function used to store the value of the key. When you use plain the API key is written as it will passed by the user. The rest of the hashes require you to save the API key after applying the desired function.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: "plain"
Values: "plain" "fnv128" "sha256" "sha1"
identifier string

The header name or the query string name that contains the API key. Defaults to key when using the query_string strategy and to Authorization when using the header strategy. The identifier set here is used across all endpoints with API key authentication enabled, but they can override this entry individually.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: "Authorization"
Examples: "Authorization", "X-Key"
propagate_role string

The name of a header that will propagate to the backend containing the matching role. The backend receives no header when the string is empty, or the attribute is not declared. Otherwise, the backend receives the declared header name containing the first matching role of the user. The header value will be ANY when the endpoint does not require roles. For instance, if an API key has roles [A, B], and the endpoint demands roles [B, C], the backend will receive a header with the value B.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: ""
Examples: "X-Krakend-Role"
salt string

A salt string for the desired hashing function. When provided, the API key is concatenated after the salt string and both hashed together.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: ""
Examples: "mySalt"
strategy enum

Specifies where to expect the user API key, whether inside a header or as part of the query string. The strategy set here is used across all endpoints with API key authentication enabled, but they can override this entry individually.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: "header"
Values: "header" "query_string"
https://www.krakend.io/schema/v2.13/auth/revoker.json object

The API Gateway authorizes users that provide valid tokens according to your criteria, but at some point, you might want to change your mind and decide to revoke JWT tokens that are still valid.

N integer required

The maximum Number of elements you want to keep in the bloom filter. Tens of millions work fine on machines with low resources.

See: https://www.krakend.io/docs/authorization/revoking-tokens/

Examples: 10000000
P number required

The Probability of returning a false positive. E.g.,1e-7 for one false positive every 10 million different tokens. The values N and P determine the size of the resulting bloom filter to fulfill your expectations. E.g: 0.0000001

See: https://www.krakend.io/docs/authorization/revoking-tokens/

Examples: 1e-7
TTL integer required

The lifespan of the JWT you are generating in seconds. The value must match the expiration you are setting in the identity provider when creating the tokens.

See: https://www.krakend.io/docs/authorization/revoking-tokens/

hash_name enum required

Either optimal (recommended) or default. The optimal consumes less CPU but has less entropy when generating the hash, although the loss is negligible.

See: https://www.krakend.io/docs/authorization/revoking-tokens/

Values: "optimal" "default"
port integer required

The port number exposed on each KrakenD instance for the RPC service to interact with the bloomfilter. This port is allocated only to the clients (running KrakenDs).

See: https://www.krakend.io/docs/authorization/revoking-tokens/

token_keys string[] required

The list with all the claims in your JWT payload that need watching. These fields establish the criteria to revoke accesses in the future. The Revoker does not use this value, only the clients.

See: https://www.krakend.io/docs/authorization/revoking-tokens/

Examples: ["jti"]
revoke_server_api_key string

A string used as an exchange API key to secure the communication between the Revoke Server and the KrakenD instances and to consume the REST API of the Revoker Server as well. E.g., a string generated with uuidgen.

See: https://www.krakend.io/docs/enterprise/authentication/revoke-server/

Examples: "639ee23f-f4c5-40c4-855c-912bf01fae87"
revoke_server_max_retries integer

Maximum number of retries after a connection fails. When the value is less than zero it is changed automatically to zero.

See: https://www.krakend.io/docs/enterprise/authentication/revoke-server/

Default: 0
revoke_server_max_workers integer

How many workers are used concurrently to execute an action (e.g., push a token) to all registered instances, allowing you to limit the amount of memory consumed by the server. For example, if you have 100 KrakenD servers and need to push 5MB of data each, you need to send 500MB in total. A max_workers=5 will consume a maximum of 5MB x 5 workers = 25MB of memory in a given instant. Defaults to the same number of CPUs available.

See: https://www.krakend.io/docs/enterprise/authentication/revoke-server/

Default: 5
revoke_server_ping_interval string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
revoke_server_ping_url string

The address to the /instances endpoint in the Revoke Server.

See: https://www.krakend.io/docs/enterprise/authentication/revoke-server/

https://www.krakend.io/schema/v2.13/auth/jose.json object

Enables global configurations for the HTTP client responsible of downloading and caching the JWK URLs for token validation and signing.

shared_cache_duration integer required

The cache duration in seconds for the JWK client retrieving the jwk_url. The endpoint must enable the cache option in order to use this second level cache.

See: https://www.krakend.io/docs/authorization/jwk-caching/

https://www.krakend.io/schema/v2.13/documentation/postman.json object

Enterprise only. Generates postman documentation automatically through krakend postman export command.

See: https://www.krakend.io/docs/enterprise/developer/postman/

description string

An introductory, optionally verbose, explanation supporting Markdown syntax. If you'd like to load an external markdown file, you can use flexible configuration, for instance "description": {{include "postman/intro.md" | toJson }}

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "Hi there, I am a [postman collection](https://www.krakend.io/docs/enterprise/developer/postman/)"
folder object[]

The folder definition where you will add endpoints

name string

The name of the Postman collection you are generating.

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "KrakenD Config v1"
version string

The version you assign to this Postman collection you are generating using semantic versioning.

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "1.2.3", "0.7.9"
pattern=^[0-9].[0-9].[0-9]+$
https://www.krakend.io/schema/v2.13/governance/processors.json object

Declares rules and limits to be enforced.

quotas object[] required

The list of quota processors available for attachment. You can have multiple processors with different configurations.

See: https://www.krakend.io/docs/enterprise/governance/quota/

https://www.krakend.io/schema/v2.13/grpc.json object

Enterprise only. gRPC server integration

catalog string[] required

The paths to the different .pb files you want to load, or the paths to directories containing .pb files. All content is scanned in the order of the list, and after fetching all files it resolves the dependencies of their imports. The order you use here is not important to resolve imports, but it matters when there are conflicts (different files using the same namespace and package type).

See: https://www.krakend.io/docs/enterprise/grpc/server/

Examples: ["./grpc/flights.pb","./grpc/definitions","/etc/krakend/grpc"]
server object

Defines the gRPC server properties.

See: https://www.krakend.io/docs/enterprise/grpc/server/

2 nested properties
opentelemetry object

Overrides OpenTelemetry settings for the gRPC server.

2 nested properties
disable_metrics boolean

Whether you want to disable all metrics happening in the gRPC server.

See: https://www.krakend.io/docs/enterprise/grpc/server/

Default: false
disable_traces boolean

Whether you want to disable all traces happening in the gRPC server.

See: https://www.krakend.io/docs/enterprise/grpc/server/

Default: false
services object[]

Defines one object per available gRPC service.

See: https://www.krakend.io/docs/enterprise/grpc/server/

https://www.krakend.io/schema/v2.13/modifier/response-headers.json object

Enterprise only. Allows you to transform response headers declaratively.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

add object

The headers you want to add. Every key under add is the header name, and the values are declared in an array with all those you want to set. If the header didn't exist previously, it is created with the values you passed. If the header existed, then the new values are appended.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

Examples: {"X-Hello":["World"]}
delete string[]

The list of headers you want to delete. All headers listed will be missing in the response.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

Examples: ["X-Krakend","X-Krakend-Completed"]
minItems=1
rename object

The headers you want to rename. The key used under rename is the original header name, and the value the new header name. This operation is destructive, meaning that if you rename to a header name that already existed it will be replaced with the new header and value.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

Examples: {"Header-A":"Header-A-New-Name"}
replace object

The headers you want to replace. The key used under replace is the header name, and the value an array with all the header values you want to set. The replacement overwrites any other value that could exist in this header.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

Examples: {"Cache-Control":["no-store"],"Vary":["foo","bar","foobar"]}
https://www.krakend.io/schema/v2.13/plugin/geoip.json object

Enterprise only. The GeoIP integration allows you load Maxmind's GeoIP2 City database (payment and free versions) and enrich all KrakenD calls to your backends with geo data.

See: https://www.krakend.io/docs/enterprise/endpoints/geoip/

citydb_path string required

The path in the filesystem containing the database in GeoIP2 Binary (.mmdb) format. Relative to the working dir or absolute path.

See: https://www.krakend.io/docs/enterprise/endpoints/geoip/

Examples: "path/to/GeoIP2-City.mmdb"
https://www.krakend.io/schema/v2.13/plugin/jwk-aggregator.json object

Enterprise only. The JWK aggregator plugin allows KrakenD to validate tokens issued by multiple Identity Providers.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

origins string[] required

The list of all JWK URLs recognized as valid Identity Providers by the gateway.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

port integer required

The port of the local server doing the aggregation. The port is only accessible within the gateway machine using localhost, and it's never exposed to the external network. Choose any port that is free in the system.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

Examples: 9876
cache boolean

When true, it stores the response of the Identity provider for the time specified in its Cache-Control header.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

https://www.krakend.io/schema/v2.13/plugin/redis-ratelimit.json object

Enterprise only. The global rate limit functionality enables a Redis database store to centralize all KrakenD node counters. Instead of having each KrakenD node count its hits, the counters are global and stored in the database.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

burst integer required

How many requests a client can make above the rate specified during a peak.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

host string required

The URL to the Redis instance that stores the counters using the format host:port.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

Examples: "redis", "redis:6379"
period string required

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
rate integer required

Number of allowed requests during the observed period.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

tokenizer enum required

One of the preselected strategies to rate-limit users.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

Values: "jwt" "ip" "url" "path" "header" "param" "cookie"
tokenizer_field string

The field used to set a custom field for the tokenizer (e.g., extracting the token from a custom header other than Authorization or using a claim from a JWT other than the jti).

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

https://www.krakend.io/schema/v2.13/plugin/static-filesystem.json object

Enterprise only. Allows you to fetch and serve static content in two different use cases. When the plugin is used as an http server handler, the static content is for your end-users, giving them CSS, JS, images, or JSON files, to name a few examples. On the other side, when the plugin is used as an http client executor, the KrakenD endpoints use static content as if it were a backend.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

path string required

The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: ./assets) or absolute (e.g.: /var/www/assets).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "./static/"
prefix string required

This is the beginning (prefix) of all URLs that are resolved using this plugin. All matching URLs won't be passed to the router, meaning that they are not considered endpoints. Make sure you are not overwriting valid endpoints. When the prefix is /, then all traffic is served as static and you must declare a prefix under skip (e.g.: /api) to match endpoints.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "/media/assets"
skip string[]

An array with all the prefix URLs that despite they could match with the prefix, you don't want to treat them as static content and pass them to the router.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: ["/media/ignore/this/directory","/media/file.json"]
https://www.krakend.io/schema/v2.13/plugin/url-rewrite.json object

Enterprise only. Allows you to declare additional URLs other than the ones defined under the endpoints configuration, used as aliases of existing endpoints.

See: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/

literal object

A map with the exact desired url and its mapping to an endpoint. If the endpoint has {placeholders} you need to write them, but the literal value {placeholders} is passed.

See: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/

Examples: {"/hi-there":"/hello","/whatsup":"/hello"}
regexp string[][]

A list of lists, containing the regular expression that defines the URL to be rewritten, and its endpoint destination. You can use the capturing groups with the syntax ${1}, ${2}, etc.

See: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/

https://www.krakend.io/schema/v2.13/plugin/virtualhost.json object

Enterprise only. The Virtual Host plugin allows you to run different configurations of KrakenD endpoints based on the host accessing the server.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

hosts string[] required

All recognized virtual hosts by KrakenD must be listed here. The values declared here must match the content of the Host header when passed by the client.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

Examples: ["api-a.host.com","api-b.host.com"]
https://www.krakend.io/schema/v2.13/plugin/wildcard.json object

Enterprise only. Enables wildcard processing of requests without declaring all endpoint subresrouces.

See: https://www.krakend.io/docs/enterprise/endpoints/wildcard/

endpoints object required

The key of the map is the KrakenD endpoint that receives all the wildcard traffic. The value is an array with all the user paths that match this wildcard (you don't need to declare the subresources).

See: https://www.krakend.io/docs/enterprise/endpoints/wildcard/

Examples: {"/__wildcard/foo":["/foo","/aliasfoo"]}
https://www.krakend.io/schema/v2.13/plugin/http-server.json object
name string[] required

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/extending/http-server-plugins/

Default:
[]
Examples: ["myplugin"]
geoip object

Enterprise only. The GeoIP integration allows you load Maxmind's GeoIP2 City database (payment and free versions) and enrich all KrakenD calls to your backends with geo data.

See: https://www.krakend.io/docs/enterprise/endpoints/geoip/

1 nested properties
citydb_path string required

The path in the filesystem containing the database in GeoIP2 Binary (.mmdb) format. Relative to the working dir or absolute path.

See: https://www.krakend.io/docs/enterprise/endpoints/geoip/

Examples: "path/to/GeoIP2-City.mmdb"
ip-filter object

Enterprise only. The IP filtering plugin allows you to restrict the traffic to your API gateway based on the IP address. It works in two different modes (allow or deny) where you define the list of IPs (CIDR blocks) that are authorized to use the API, or that are denied from using the API.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

4 nested properties
CIDR string[] required

The CIDR blocks (list of IPs) you want to allow or deny.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["192.168.0.0/24","172.17.2.56/32"]
allow boolean required

When true, only the matching IPs are able to access the content. When false, all matching IPs are discarded.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Default: false
client_ip_headers string[]

A custom list of all headers that might contain the real IP of the client. The first matching IP in the list will be used. Default headers are (in order of checking): X-Forwarded-For, X-Real-IP, and X-Appengine-Remote-Addr.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["X-Forwarded-For","X-Real-IP","X-Appengine-Remote-Addr"]
trusted_proxies string[]

A custom list of all the recognized machines/balancers that proxy the client to your application. This list is used to avoid spoofing when trying to get the real IP of the client.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["10.0.0.0/16"]
jwk-aggregator object

Enterprise only. The JWK aggregator plugin allows KrakenD to validate tokens issued by multiple Identity Providers.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

3 nested properties
origins string[] required

The list of all JWK URLs recognized as valid Identity Providers by the gateway.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

port integer required

The port of the local server doing the aggregation. The port is only accessible within the gateway machine using localhost, and it's never exposed to the external network. Choose any port that is free in the system.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

Examples: 9876
cache boolean

When true, it stores the response of the Identity provider for the time specified in its Cache-Control header.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

redis-ratelimit object

Enterprise only. The global rate limit functionality enables a Redis database store to centralize all KrakenD node counters. Instead of having each KrakenD node count its hits, the counters are global and stored in the database.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

6 nested properties
burst integer required

How many requests a client can make above the rate specified during a peak.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

host string required

The URL to the Redis instance that stores the counters using the format host:port.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

Examples: "redis", "redis:6379"
period string required

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
rate integer required

Number of allowed requests during the observed period.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

tokenizer enum required

One of the preselected strategies to rate-limit users.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

Values: "jwt" "ip" "url" "path" "header" "param" "cookie"
tokenizer_field string

The field used to set a custom field for the tokenizer (e.g., extracting the token from a custom header other than Authorization or using a claim from a JWT other than the jti).

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

static-filesystem object

Enterprise only. Allows you to fetch and serve static content in two different use cases. When the plugin is used as an http server handler, the static content is for your end-users, giving them CSS, JS, images, or JSON files, to name a few examples. On the other side, when the plugin is used as an http client executor, the KrakenD endpoints use static content as if it were a backend.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

3 nested properties
path string required

The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: ./assets) or absolute (e.g.: /var/www/assets).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "./static/"
prefix string required

This is the beginning (prefix) of all URLs that are resolved using this plugin. All matching URLs won't be passed to the router, meaning that they are not considered endpoints. Make sure you are not overwriting valid endpoints. When the prefix is /, then all traffic is served as static and you must declare a prefix under skip (e.g.: /api) to match endpoints.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "/media/assets"
skip string[]

An array with all the prefix URLs that despite they could match with the prefix, you don't want to treat them as static content and pass them to the router.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: ["/media/ignore/this/directory","/media/file.json"]
url-rewrite object

Enterprise only. Allows you to declare additional URLs other than the ones defined under the endpoints configuration, used as aliases of existing endpoints.

See: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/

Any of: variant, variant
2 nested properties
literal object

A map with the exact desired url and its mapping to an endpoint. If the endpoint has {placeholders} you need to write them, but the literal value {placeholders} is passed.

See: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/

Examples: {"/hi-there":"/hello","/whatsup":"/hello"}
regexp string[][]

A list of lists, containing the regular expression that defines the URL to be rewritten, and its endpoint destination. You can use the capturing groups with the syntax ${1}, ${2}, etc.

See: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/

virtualhost object

Enterprise only. The Virtual Host plugin allows you to run different configurations of KrakenD endpoints based on the host accessing the server.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

1 nested properties
hosts string[] required

All recognized virtual hosts by KrakenD must be listed here. The values declared here must match the content of the Host header when passed by the client.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

Examples: ["api-a.host.com","api-b.host.com"]
wildcard object

Enterprise only. Enables wildcard processing of requests without declaring all endpoint subresrouces.

See: https://www.krakend.io/docs/enterprise/endpoints/wildcard/

1 nested properties
endpoints object required

The key of the map is the KrakenD endpoint that receives all the wildcard traffic. The value is an array with all the user paths that match this wildcard (you don't need to declare the subresources).

See: https://www.krakend.io/docs/enterprise/endpoints/wildcard/

Examples: {"/__wildcard/foo":["/foo","/aliasfoo"]}
https://www.krakend.io/schema/v2.13/redis.json object

Defines the Redis connection pools available to any functionality requiring Redis.

See: /docs/enterprise/throttling/global-rate-limit/

clusters object[]

Defines all the clusters available to Redis functionality. The different components requiring Redis will access the pool based on its name

connection_pools object[]

Defines all the connetion pools available to Redis functionality. The different components requiring Redis will access the pool based on its name

https://www.krakend.io/schema/v2.13/router.json object

The optional router configuration allows you to set global flags that change the way KrakenD processes the requests at the router layer.

See: https://www.krakend.io/docs/service-settings/router-options/

app_engine boolean

The app_engine boolean trusts headers starting with X-AppEngine... for better integration with that PaaS.

See: https://www.krakend.io/docs/service-settings/router-options/

auto_options boolean

When true, enables the autogenerated OPTIONS endpoint for all the registered paths

See: https://www.krakend.io/docs/service-settings/router-options/

decompress_gzip integer

Enterprise only. Decompresses any Gzipped content before sending it to the backend when the Content-Encoding has gzip in the first position. You can also set this value per endpoint.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: 0
disable_access_log boolean

Stops registering access requests to KrakenD in the logs. You can still have a Backend Log if needed.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
disable_gzip boolean

Enterprise only. All the output to the end user on the Enterprise Edition uses gzip when accepted by the client. Use this flag to remove gzip compression.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
disable_handle_method_not_allowed boolean

Whether to checks if another method is allowed for the current route, if the current request can not be routed. If this is the case, the request is answered with Method Not Allowed and HTTP status code 405. If no other Method is allowed, the request is a 404.

See: https://www.krakend.io/docs/service-settings/router-options/

disable_health boolean

When true you don't have any exposed health endpoint. You can still use a TCP checker or build an endpoint yourself.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
disable_path_decoding boolean

Disables automatic validation of the url params looking for url encoded ones.

See: https://www.krakend.io/docs/service-settings/router-options/

disable_redirect_fixed_path boolean

If true, the router tries to fix the current request path, if no handle is registered for it

See: https://www.krakend.io/docs/service-settings/router-options/

disable_redirect_trailing_slash boolean

Disables automatic redirection if the current route can't be matched but a handler for the path with (without) the trailing slash exists. Only works if disable_redirect_fixed_path is also set to true.

See: https://www.krakend.io/docs/service-settings/router-options/

error_body object

Sets custom error bodies for 404 and 405 errors.

See: https://www.krakend.io/docs/service-settings/router-options/

2 nested properties
404 object

Write any JSON object structure you would like to return to users when they request an endpoint not known by KrakenD. 404 Not Found errors.

405 object

Write any JSON object structure you would like to return to users

forwarded_by_client_ip boolean

When set to true, the client IP will be parsed from the default request's headers, or the custom ones (remote_ip_headers). If the IP has passed through a trusted proxy (e.g.: a proxy, load balancer, or a third party application) it will be extracted. If no IP can be fetched, it falls back to the IP obtained from the request's remote address. When declared you must configure trusted_proxies too.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
health_path string

The path where you'd like to expose the health endpoint.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: "/__health"
hide_version_header boolean

Removes the version of KrakenD used in the X-KrakenD-version headers.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
logger_skip_paths string[]

Defines the set of paths that are removed from the logging.

See: https://www.krakend.io/docs/service-settings/router-options/

max_multipart_memory integer

Sets the maxMemory param that is given to http.Request's Multipart Form method call.

See: https://www.krakend.io/docs/service-settings/router-options/

max_payload integer

Enterprise only. Limits the maximum number of bytes a user can send to the gateway. 0 means no limit. You can also set this value per endpoint.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: 0
remote_ip_headers string[]

List of headers used to obtain the client IP when forwarded_by_client_ip is set to true and the remote address is matched by at least one of the network origins of trusted_proxies.

See: https://www.krakend.io/docs/service-settings/router-options/

remove_extra_slash boolean

A parameter can be parsed from the URL even with extra slashes.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
return_error_msg boolean

When there is an error in the gateway (such as a timeout, a non-200 status code, etc.) it returns to the client the reason for the failure. The error is written in the body as is.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
trusted_proxies string[]

List of network origins (IPv4 addresses, IPv4 CIDRs, IPv6 addresses or IPv6 CIDRs) from which to trust request's headers that contain alternative client IP when forwarded_by_client_ip is true. When declared you must configure forwarded_by_client_ip set to true, and optionally remote_ip_headers.

See: https://www.krakend.io/docs/service-settings/router-options/

https://www.krakend.io/schema/v2.13/server/static-filesystem.json object

Enterprise only. Allows you to fetch and serve static content by registering a static web server for a set of defined paths (the prefixes).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

path string required

The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: ./assets) or absolute (e.g.: /var/www/assets).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "./static/"
prefix string required

This is the beginning (prefix) of all URLs that are resolved using this plugin. All matching URLs won't be passed to the router, meaning that they are not considered endpoints. Make sure you are not overwriting valid endpoints. When the prefix is /, then all traffic is served as static and you must declare a prefix under skip (e.g.: /api) to match endpoints.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "/media/assets"
directory_listing boolean

Whether to allow directory listings or not

Default: false
skip string[]

An array with all the prefix URLs that despite they could match with the prefix, you don't want to treat them as static content and pass them to the router.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: ["/media/ignore/this/directory","/media/file.json"]
https://www.krakend.io/schema/v2.13/server/virtualhost.json object

Enterprise only. The Virtual Host server allows you to run different configurations of KrakenD endpoints based on the host accessing the server.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

aliased_hosts object

A map of all recognized virtual hosts where the key is the alias and the value the host name, including the port if it's not 443 or 80. The values declared here must match the content of the Host header passed by the client. The alias must be an alphanumeric string.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

Examples: {"user_api":"users.svc.example.com:9000"}
1 nested properties
[a-z0-9_]+ string

The key of this map must compile with the regexp a-z0-9_ and the host name is the string that matches the value sent by the user in the Host header.

hosts string[]

All recognized virtual hosts by KrakenD must be listed here. The values declared here must match the content of the Host header when passed by the client.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

Examples: ["api-a.example.com","api-b.example.com"]
https://www.krakend.io/schema/v2.13/telemetry/gelf.json object

Send structured events in GELF format to your Graylog Cluster.

See: https://www.krakend.io/docs/logging/graylog-gelf/

address string required

The address (including the port) of your Graylog cluster (or any other service that receives GELF inputs). E.g., myGraylogInstance:12201

See: https://www.krakend.io/docs/logging/graylog-gelf/

enable_tcp boolean required

Set to false (recommended) to use UDP, or true to use TCP. TCP performance is worst than UDP under heavy load.

See: https://www.krakend.io/docs/logging/graylog-gelf/

https://www.krakend.io/schema/v2.13/telemetry/influx.json object

Enables the extended logging capabilities.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

address string required

The complete url of the influxdb including the port if different from defaults in http/https.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

ttl string required

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
buffer_size integer

The buffer size is a protection mechanism that allows you to temporarily store datapoints for later reporting when Influx is unavailable. If the buffer is 0, reported metrics that fail are discarded immediately. If the buffer is a positive number, KrakenD creates a buffer with the number of datapoints set. When the buffer is full because the Influx server keeps failing, newer datapoints replace older ones in the buffer.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

min=0
db string

Name of the InfluxDB database (Influx v1) or the bucket name (Influx v2).

See: https://www.krakend.io/docs/telemetry/influxdb-native/

Default: "krakend"
password string

Password to authenticate to InfluxDB. In Influx v2, you also need to add grant access with influx v1 auth.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

username string

Username to authenticate to InfluxDB.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

https://www.krakend.io/schema/v2.13/telemetry/logging.json object

Enables the extended logging capabilities.

See: https://www.krakend.io/docs/logging/

level enum required

What type of reporting level do you expect from the application? The options below go from more verbose to least. Use the DEBUG level in the development stages but not in production. Some components can add extra verbosity while in DEBUG mode and send multiline content, which is not always suitable for automated log parsing.

See: https://www.krakend.io/docs/logging/

Values: "DEBUG" "INFO" "WARNING" "ERROR" "CRITICAL"
format string

Specify the format of the application logs: default, logstash, or custom. The custom format needs an additional key "custom_format".

See: https://www.krakend.io/docs/logging/

Default: "default"
Examples: "default", "logstash", "custom"
access_log_custom_format string

Enterprise only. You can write the access log pattern you would like to use. Add a newline \n at the end of the pattern. See the variables you can use.

See: https://www.krakend.io/docs/logging/

Default: ""
Examples: "%{prefix} %{time} [AccessLog] |%{statusCode}| %{latencyMs} | %{clientIP} | %{method} %{path} "
access_log_format enum

Enterprise only. Enable a formatter for the access log. You can write your own pattern using the custom value, or you can use one of the predefined ones.

See: https://www.krakend.io/docs/logging/

Default: ""
Values: "" "default" "httpdCommon" "httpdCombine" "json" "custom"
access_log_missing_key_marker string

Enterprise only. When you use a custom access log format, the variable you are trying to print could be empty. For instance, you have added in the format %{header.Authorization} but the header is missing in the request. In this case, the printed value is what you configure here. If the string is set to an empty value, a dash - is printed.

See: https://www.krakend.io/docs/logging/

Default: "-"
Examples: "%{default}", "%{httpdCommon}", "%{prefix} %{time} [AccessLog] |%{statusCode}| %{latencyMs} | %{clientIP} | %{method} %{path} "
backend object

Enables the Backend Log capabilities.

See: https://www.krakend.io/enterprise/docs/logging/

4 nested properties
custom_format string

Specify the custom format of the Backend Logs.

See: https://www.krakend.io/enterprise/docs/logging/

Default: "%{prefix}%{time} |%{statusCode}| %{latencyMs} | %{method} %{host} %{path} "
Examples: "%{time:kitchen} | (╯°□°)╯( ┻━┻ %{statusCode} | %{method} %{host} %{path} "
log_with_level enum

What type of reporting level do you want to set at the backends? The options below go from more verbose to least. Use the DEBUG level in the development stages but not in production. Some components can add extra verbosity while in DEBUG mode and send multiline content, which is not always suitable for automated log parsing.

See: https://www.krakend.io/enterprise/docs/logging/

Values: "DEBUG" "INFO" "WARNING" "ERROR" "CRITICAL"
no_value string

When the variable does not resolve to any value, the string you want to write in the log. If the string is set to an empty value, a dash - is printed.

See: https://www.krakend.io/enterprise/docs/logging/

Default: "-"
Examples: "-", "null", "no_value", "<empty>"
prefix string

Adds the defined string at the beginning of every logged line, so you can quickly filter messages with external tools later on.

See: https://www.krakend.io/enterprise/docs/logging/

Default: ""
Examples: ">>> "
custom_format string

Lets you write a custom logging pattern using variables, e.g: %{message}.

See: https://www.krakend.io/docs/logging/

prefix string

Adds the defined string at the beginning of every logged line, so you can quickly filter messages with external tools later on. It's recommended to always add a prefix [INSIDE BRACKETS] to make use of predefined dashboards.

See: https://www.krakend.io/docs/logging/

stdout boolean

Set to true to send logs to stdout.

See: https://www.krakend.io/docs/logging/

Default: false
syslog boolean

Set to true to send logs to syslog.

See: https://www.krakend.io/docs/logging/

Default: false
syslog_facility enum

When using syslog, the facility tells KrakenD where to send the messages as set by the locals of the syslog standard.

See: https://www.krakend.io/docs/logging/

Default: "local3"
Values: "local0" "local1" "local2" "local3" "local4" "local5" "local6" "local7"
https://www.krakend.io/schema/v2.13/telemetry/logstash.json object

Enables logstash when the extra_config "telemetry/logging" is also present.

See: https://www.krakend.io/docs/logging/logstash/

enabled boolean required
Default: true
https://www.krakend.io/schema/v2.13/telemetry/metrics.json object

Collects extended metrics to push to InfluxDB or expose them in the /__stats/ endpoint.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

backend_disabled boolean

Skip any metrics happening in the backend layer. Disabling layers saves memory consumption but reduces visibility.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: false
collection_time string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
endpoint_disabled boolean

When true do not publish the /__stats/ endpoint. Metrics won't be accessible via the endpoint but still collected (and you can send them to Influx for instance).

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: false
listen_address string

Change the listening address where the metrics endpoint is exposed.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: ":8090"
pattern=^:[0-9]+$
proxy_disabled boolean

Skip any metrics happening in the proxy layer (traffic against your backends). Disabling layers saves memory consumption but reduces visibility.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: false
router_disabled boolean

Skip any metrics happening in the router layer (activity in KrakenD endpoints). Disabling layers saves memory consumption but reduces visibility.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: false
https://www.krakend.io/schema/v2.13/telemetry/moesif.json object

The Moesif integration helps you understand and monetize API usage with a robust analytics and billing platform.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

application_id string required

The Collector Application ID is used to send events, actions, users, and companies to Moesif's Collector API. Moesif provides it under the 'API Keys' section.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

user_id_headers string[] required

Defines the list of possible headers that can identify a user uniquely. When the header is Authorization, it automatically extracts the username if it contains an Authorization: Basic value with no additional configuration. If, on the other hand, you use tokens and pass an Authorization: Bearer, it will extract the user ID from the JWT claim defined under user_id_jwt_claim. If there are multiple headers in the list, all of them are tested in the given order, and the first existing header in the list is used to extract the user ID (successfully or not).

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["X-User-ID","Authorization"]
batch_size integer

Number of events you will send on every batch reporting asynchronously to Moesif. For high throughput you will need to increase this value.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: 200
debug boolean

Set to true when configuring Moesif for the first time while in development, to see the activity in the logs. Set to false in production.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: false
event_queue_size integer

Sends the number of events you can hold in-memory to send them asynchronously to Moesif. If the throughput of your API generates more events than the size of the queue, the exceeding events will be discarded and not reported.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: 1000000
identify_company object

It sets which strategy you want to use to identify the company. Identifying the company helps you efficiently govern your API. Choose the system you wish to apply (declare only one property). The claim value you access must be of type string. You can access nested structured using the dot . separator. When using dots, literals with an exact match containing the dot are checked first.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

3 nested properties
header string

The company is identified using a header. Provide the header name.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: "X-Tenant"
jwt_claim string

The company is stored in a claim inside the JWT. The claim must return a string.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: "company_id"
query_string string

The company is always passed inside a query string when calling any URL. Provide the query string name.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: "company"
log_body boolean

Send the body of all endpoints and requests to Moesif.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: true
metadata object

A free-form object that allows you to push custom metadata along with events. The custom metadata appears in Moesif under a key krakend, you can use nesting if needed.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: {"instance_id":"1234abcd","region":"us-west-1"}
request_body_masks string[]

The list of fields in the request body that you want to mask before sending them to Moesif. You can set log_body to false to prevent any body being sent.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["password","credit_card"]
request_header_masks string[]

The list of request headers that you want to mask their values before sending them to Moesif.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["Authorization"]
response_body_masks string[]

The list of fields in the response body that you want to mask before sending them to Moesif. You can set log_body to false to prevent any body being sent.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["password","credit_card"]
response_header_masks string[]

The list of response headers that you want to mask their values before sending them to Moesif.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["Cookie"]
should_skip string

Defines an expression expressed as Security Policy that avoids reporting to Moesif when the result of the evaluation is true.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: "( req_method=='GET' || req_path.startsWith('/bar/')) && hasHeader('X-Something')"
timer_wake_up_seconds integer

Specifies how often a background thread runs to send events to Moesif. Value in seconds.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: 2
user_id_jwt_claim string

When using JWT tokens, it defines which claim contains the user ID. The claim value you access must be of type string. You can access nested structured using the dot . separator. When using dots, literals with an exact match containing the dot are checked first.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: "sub"
Examples: "sub", "user.id"
https://www.krakend.io/schema/v2.13/telemetry/newrelic.json object

The New Relic integration lets you push KrakenD metrics and distributed traces to your New Relic dashboard. It uses internally the official New Relic SDK and brings its features to your APM dashboard.

See: https://www.krakend.io/docs/enterprise/telemetry/newrelic/

license string required

The API key provided by New Relic to push data into your account.

See: https://www.krakend.io/docs/enterprise/telemetry/newrelic/

debug boolean

Set to true when configuring New Relic for the first time while in development, to see the activity in the logs. Set to false in production.

See: https://www.krakend.io/docs/enterprise/telemetry/newrelic/

Default: false
headers_to_pass string[]

Defines an explicit list of headers sent during the client request that will be reported to NewRelic, in addition to the default headers NewRelic sets. Setting the ["*"] value will send all headers sent by the client to NewRelic. Whether you declare this setting or not, you will usually receive from the NewRelic SDK the Accept, Content-Type, User-Agent, and Referer headers.

See: https://www.krakend.io/docs/enterprise/telemetry/newrelic/

Examples: ["*"]
https://www.krakend.io/schema/v2.13/telemetry/opencensus.json object

Enables the extended logging capabilities.

See: https://www.krakend.io/docs/telemetry/opencensus/

exporters object required

The exporter(s) you would like to enable. See each exporter configuration in its own section.

9 nested properties
datadog object

Datadog is a monitoring and security platform for developers, IT operations teams and business in the cloud.

See: https://www.krakend.io/docs/telemetry/datadog/

7 nested properties
disable_count_per_buckets boolean required

Specifies whether to emit count_per_bucket metrics.

See: https://www.krakend.io/docs/telemetry/datadog/

Default: false
global_tags object required

A set of tags (key/value) that will automatically be applied to all exported spans.

See: https://www.krakend.io/docs/telemetry/datadog/

Examples: {"env":"prod"}
namespace string required

The namespace to which metric keys are appended.

See: https://www.krakend.io/docs/telemetry/datadog/

service string required

Service specifies the service name used for tracing

See: https://www.krakend.io/docs/telemetry/datadog/

Examples: "gateway"
stats_address string required

Specifies the host[:port] address for DogStatsD. To enable ingestion using Unix Domain Socket (UDS) mount your UDS path and reference it in the stats_address using a path like unix:///var/run/datadog/dsd.socket.

See: https://www.krakend.io/docs/telemetry/datadog/

Default: "localhost:8125"
Examples: "localhost:8125"
tags string[] required

Specifies a set of global tags to attach to each metric.

See: https://www.krakend.io/docs/telemetry/datadog/

trace_address string required

Specifies the host[:port] address of the Datadog Trace Agent.

See: https://www.krakend.io/docs/telemetry/datadog/

Default: "localhost:8126"
influxdb object

Exports data to InfluxDB: A time series database designed to handle high write and query loads.

See: https://www.krakend.io/docs/telemetry/influxdb/

5 nested properties
address string required

The URL (including port) where your InfluxDB is installed.

See: https://www.krakend.io/docs/telemetry/influxdb/

Examples: "http://192.168.99.100:8086"
db string required
Examples: "krakend"
password string

The password to access the database

See: https://www.krakend.io/docs/telemetry/influxdb/

Examples: "kr4k3nd"
timeout string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
username string

The influxdb username to access the database

See: https://www.krakend.io/docs/telemetry/influxdb/

Examples: "krakend"
jaeger object

Submit spans to a Jaeger Collector (HTTP) with endpoint or to a Jaeger Agent (UDP) with agent_endpoint.

See https://www.krakend.io/docs/telemetry/jaeger/

One of: variant, variant
4 nested properties
agent_endpoint string

The address where the Jaeger Agent is (Thrift over UDP), e.g., jaeger:6831

See: https://www.krakend.io/docs/telemetry/jaeger/

Examples: "http://192.168.99.100:14268/api/traces"
buffer_max_count integer

Total number of traces to buffer in memory

See: https://www.krakend.io/docs/telemetry/jaeger/

endpoint string

The full URL including port indicating where your Jaeger Collector is (Thrift over HTTP/S), e.g., <http://jaeger:14268/api/traces>

See: https://www.krakend.io/docs/telemetry/jaeger/

Examples: "http://192.168.99.100:14268/api/traces"
service_name string

The service name registered in Jaeger

See: https://www.krakend.io/docs/telemetry/jaeger/

Examples: "krakend"
logger object

Opencensus can export data to the system logger as another exporter. Recommended to use telemetry/logging instead.

See: https://www.krakend.io/docs/telemetry/logger/

2 nested properties
spans boolean

Whether to log the spans or not

Default: false
stats boolean

Whether to log the statistics or not

Default: false
ocagent object

Exporting metrics, logs, and events to the OpenCensus Agent.

See: https://www.krakend.io/docs/telemetry/ocagent/

6 nested properties
address string required

The address of your Azure Monitor collector.

See: https://www.krakend.io/docs/telemetry/ocagent/

Examples: "localhost:55678"
service_name string required

An identifier of your service, e.g, krakend.

See: https://www.krakend.io/docs/telemetry/ocagent/

enable_compression boolean

Whether to send data compressed or not.

See: https://www.krakend.io/docs/telemetry/ocagent/

Default: false
headers object

List of keys and values for the headers sent. Keys and values must be of type string.

See: https://www.krakend.io/docs/telemetry/ocagent/

Examples: {"header1":"value1"}
insecure boolean

Whether the connection can be established in plain (insecure) or not.

See: https://www.krakend.io/docs/telemetry/ocagent/

Default: false
reconnection string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
prometheus object

Prometheus is an open-source systems monitoring and alerting toolkit.

6 nested properties
port integer required

Port on which the Prometheus exporter should listen

See: https://www.krakend.io/docs/telemetry/prometheus/

Examples: 9091
namespace string

Sets the domain the metric belongs to.

See: https://www.krakend.io/docs/telemetry/prometheus/

tag_host boolean

Whether to send the host as a metric or not.

See: https://www.krakend.io/docs/telemetry/prometheus/

Default: false
tag_method boolean

Whether to send the HTTP method as a metric or not.

See: https://www.krakend.io/docs/telemetry/prometheus/

Default: true
tag_path boolean

Whether to send the path as a metric or not.

See: https://www.krakend.io/docs/telemetry/prometheus/

Default: false
tag_statuscode boolean

Whether to send the status code as a metric or not.

See: https://www.krakend.io/docs/telemetry/prometheus/

Default: false
stackdriver object

Export metrics and traces to Google Cloud

3 nested properties
default_labels object required

A map object. Enter here any label that will be assigned by default to the reported metric so you can filter later on Stack Driver.

See: https://www.krakend.io/docs/telemetry/stackdriver/

Examples: {"env":"production"}
project_id string required

The identifier of your Google Cloud project. The project_id is not the project name. You can omit this value from the configuration if you have an application credential file for Google.

See: https://www.krakend.io/docs/telemetry/stackdriver/

Default: ""
Examples: "ID"
pattern=^.*$
metric_prefix string

A prefix that you can add to all your metrics for better organization.

See: https://www.krakend.io/docs/telemetry/stackdriver/

xray object

AWS X-Ray is a service offered by Amazon that provides an end-to-end view of requests as they travel through your application, and shows a map of your application's underlying components.

One of: variant, variant
5 nested properties
region string required

The AWS geographical region, e.g, us-east-1.

See: https://www.krakend.io/docs/telemetry/xray/

Examples: "eu-west-1"
version string required

The version of the AWS X-Ray service to use.

See: https://www.krakend.io/docs/telemetry/xray/

Default: "KrakenD-opencensus"
access_key_id string

Your access key ID provided by Amazon. Needed when use_env is unset or set to false.

See: https://www.krakend.io/docs/telemetry/xray/

secret_access_key string

Your secret access key provided by Amazon. Needed when use_env is unset or set to false.

See: https://www.krakend.io

use_env boolean

When true the AWS credentials (access_key_id and secret_access_key) are taken from environment vars. Don't specify them then.

See: https://www.krakend.io/docs/telemetry/xray/

Default: false
zipkin object

Export telemetry data to a Zipkin collector

2 nested properties
collector_url string required

The URL (including port and path) where your Zipkin is accepting the spans, e.g., <http://zipkin:9411/api/v2/spans>

See: https://www.krakend.io/docs/telemetry/zipkin/

Examples: "http://192.168.99.100:9411/api/v2/spans"
service_name string required

The service name registered in Zipkin.

See: https://www.krakend.io/docs/telemetry/zipkin/

Examples: "krakend"
enabled_layers object

Lets you specify what data you want to export. All layers are enabled by default unless you declare this section.

3 nested properties
backend boolean

Reports the activity between KrakenD and your services

Default: false
pipe boolean

Reports the activity at the beginning of the proxy layer. It gives a more detailed view of the internals of the pipe between end-users and KrakenD, having into account merging of different backends.

Default: false
router boolean

Reports the activity between end-users and KrakenD

Default: false
reporting_period integer

The number of seconds passing between reports. If duration is less than or equal to zero, it enables the default behavior of each exporter.

See: https://www.krakend.io/docs/telemetry/opencensus/

Default: 0
sample_rate integer

A number between 0 (no requests at all) and 100 (all requests) representing the percentage of sampled requests you want to send to the exporter. Sampling the 100% of the requests is generally discouraged when the relationship between traffic and dedicated resources is sparse.

See: https://www.krakend.io/docs/telemetry/opencensus/

Default: 0
min=0max=100
https://www.krakend.io/schema/v2.13/telemetry/opentelemetry.json object

Enables metrics and traces using OpenTelemetry.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

exporters object required

The places where you will send telemetry data. You can declare multiple exporters even when they are of the same type. For instance, when you have a self-hosted Grafana and would like to migrate to its cloud version and check the double reporting during the transition. There are two families of exporters: otlp or prometheus.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

2 nested properties
otlp object[]

The list of OTLP exporters you want to use. Set at least one object to push metrics and traces to an external collector using OTLP.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

minItems=1
prometheus object[]

Set here at least the settings for one Prometheus exporter. Each exporter will start a local port that offers metrics to be pulled from KrakenD.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

minItems=1
deploy_env string

The environment you are deploying, this can be useful for deployment tracking. The string can have any value that makes sense to you to identify the running environment.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: ""
Examples: "development", "testing", "staging", "production"
histograms object

Use an histogram bucket configuration different from the defaults to define the detail of histogram metrics (decrease or increase their size). You don't need to set this attribute unless you want full control of the histogram definition.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

2 nested properties
size_buckets number[]

The size of the buckets in bytes you want to use for the histograms.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default:
[
  128,
  256,
  512,
  1024,
  4096,
  8192,
  16384,
  32768,
  65536,
  262144,
  524288,
  1048576,
  4194304,
  16777216,
  67108864
]
time_buckets number[]

The duration of buckets in seconds you want to use for the histograms.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default:
[
  0.01,
  0.02,
  0.05,
  0.075,
  0.1,
  0.125,
  0.15,
  0.175,
  0.2,
  0.25,
  0.3,
  0.35,
  0.5,
  0.75,
  1.0,
  1.5,
  2.0,
  3.5,
  5.0,
  10.0
]
layers object

A request and response flow passes through three different layers. This attribute lets you specify what data you want to export in each layer. All layers are enabled by default unless you declare this section.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

3 nested properties
backend object

Reports the activity between KrakenD and each of your backend services. This is the more granular layer.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

2 nested properties
metrics object
traces object
global object

Reports the activity between end-users and KrakenD

See: https://www.krakend.io/docs/telemetry/opentelemetry/

8 nested properties
disable_metrics boolean

Whether you want to disable all metrics happening in the global layer or not.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
disable_propagation boolean

Whether you want to ignore previous propagation headers to KrakenD. When the flag is set to true, spans from a previous layer will never be linked to the KrakenD trace.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
disable_traces boolean

Whether you want to disable all traces happening in the global layer or not.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
metrics_static_attributes object[]

Static attributes you want to pass for metrics.

report_headers boolean

Whether you want to send all headers that the consumer passed in the request or not.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
skip_headers string[]

A list of headers you want to skip when reporting the headers from the request. This is useful to avoid reporting sensitive data.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Examples: ["X-Request-Api-Key","X-Signature"]
semantic_convention enum

The semantic convention naming you want to use. The default is an empty string which uses the original naming convention prior to 1.27. For the semantic convention of 1.27 and higher, use 1.27

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Values: "" "1.27"
traces_static_attributes object[]

Static attributes you want to pass for traces.

proxy object

Reports the activity at the beginning of the proxy layer, including spawning the required requests to multiple backends, merging, endpoint transformation and any other internals of the proxy between the request processing and the backend communication

See: https://www.krakend.io/docs/telemetry/opentelemetry/

6 nested properties
disable_metrics boolean

Whether you want to disable all metrics happening in the proxy layer or not.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
disable_traces boolean

Whether you want to disable all traces happening in the proxy layer or not.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
metrics_static_attributes object[]

Static attributes you want to pass for metrics.

report_headers boolean

Whether you want to report all headers that passed from the request to the proxy layer (input_headers policy in the endpoint plus KrakenD's headers).

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: false
skip_headers string[]

A list of headers you want to skip when reporting headers passed to the proxy layer. This is useful to avoid reporting sensitive data.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Examples: ["X-Sensitive-Data","X-Signature"]
traces_static_attributes object[]

Static attributes you want to pass for traces.

metric_reporting_period integer

How often you want to report and flush the metrics in seconds. This setting is only used by otlp exporters.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: 30
service_name string

A friendly name identifying metrics reported by this installation. When unset, it uses the name attribute in the root level of the configuration.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

service_version string

The version you are deploying, this can be useful for deployment tracking.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

skip_paths string[]

The paths you don't want to report. Use the literal value used in the endpoint definition, including any {placeholders}. In the global layer, this attribute works only on metrics, because traces are initiated before there is an endpoint to match against. If you do not want any path skipped, just add an array with an empty string [""].

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default:
[
  "/__health",
  "/__debug/",
  "/__echo/",
  "/__stats/"
]
Examples: ["/foo/{bar}"]
trace_sample_rate number

The sample rate for traces defines the percentage of reported traces. This option is key to reduce the amount of data generated (and resource usage), while you still can debug and troubleshoot issues. For instance, a number of 0.25 will report a 25% of the traces seen in the system.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: 1
Examples: 0.25
min=0max=1
https://www.krakend.io/schema/v2.13/telemetry/opentelemetry-security.json object

Enables the security layer needed to use OpenTelemetry through the Internet, like pushing data to a SaaS provider.

See: https://www.krakend.io/docs/telemetry/opentelemetry-security/

otlp object[] required

The list of OTLP exporters that require authentication. Set at least one object to push metrics and traces to an external collector using OTLP.

See: https://www.krakend.io/docs/telemetry/opentelemetry-security/

minItems=1
https://www.krakend.io/schema/v2.13/service_extra_config.json object
ai/mcp object
1 nested properties
servers object[] required

The array of MCP servers available for linking to endpoints. Each object represents a different MCP server. The entry is only the definition of the server. You must create an endpoint that serves as the entrypoint to each server.

auth/api-keys object

Enterprise only. Enables a Role-Based Access Control (RBAC) mechanism by reading the Authorization header of incoming requests.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

6 nested properties
keys object[] required

A list of objects defining each API Key.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

hash enum

The hashing function used to store the value of the key. When you use plain the API key is written as it will passed by the user. The rest of the hashes require you to save the API key after applying the desired function.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: "plain"
Values: "plain" "fnv128" "sha256" "sha1"
identifier string

The header name or the query string name that contains the API key. Defaults to key when using the query_string strategy and to Authorization when using the header strategy. The identifier set here is used across all endpoints with API key authentication enabled, but they can override this entry individually.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: "Authorization"
Examples: "Authorization", "X-Key"
propagate_role string

The name of a header that will propagate to the backend containing the matching role. The backend receives no header when the string is empty, or the attribute is not declared. Otherwise, the backend receives the declared header name containing the first matching role of the user. The header value will be ANY when the endpoint does not require roles. For instance, if an API key has roles [A, B], and the endpoint demands roles [B, C], the backend will receive a header with the value B.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: ""
Examples: "X-Krakend-Role"
salt string

A salt string for the desired hashing function. When provided, the API key is concatenated after the salt string and both hashed together.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: ""
Examples: "mySalt"
strategy enum

Specifies where to expect the user API key, whether inside a header or as part of the query string. The strategy set here is used across all endpoints with API key authentication enabled, but they can override this entry individually.

See: https://www.krakend.io/docs/enterprise/authentication/api-keys/

Default: "header"
Values: "header" "query_string"
auth/basic object

Enterprise only. The Basic Authentication component protects the access to selected endpoints using basic username and password credentials.

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

2 nested properties
htpasswd_path string

Absolute Path to the htpasswd filename (recommended) or relative ./ to the workdir (less secure).

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

Examples: "/path/to/.htpasswd"
users object

Additional users to the htpasswd file can be declared directly inside the configuration. The content of both places will be merged (and this list will overwrite users already defined in the htpasswd file). The key of each entry is the username, and the value the bcrypt.

See: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/

Examples: {"admin":"$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ...","user2":"$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ..."}
auth/revoker object

The API Gateway authorizes users that provide valid tokens according to your criteria, but at some point, you might want to change your mind and decide to revoke JWT tokens that are still valid.

11 nested properties
N integer required

The maximum Number of elements you want to keep in the bloom filter. Tens of millions work fine on machines with low resources.

See: https://www.krakend.io/docs/authorization/revoking-tokens/

Examples: 10000000
P number required

The Probability of returning a false positive. E.g.,1e-7 for one false positive every 10 million different tokens. The values N and P determine the size of the resulting bloom filter to fulfill your expectations. E.g: 0.0000001

See: https://www.krakend.io/docs/authorization/revoking-tokens/

Examples: 1e-7
TTL integer required

The lifespan of the JWT you are generating in seconds. The value must match the expiration you are setting in the identity provider when creating the tokens.

See: https://www.krakend.io/docs/authorization/revoking-tokens/

hash_name enum required

Either optimal (recommended) or default. The optimal consumes less CPU but has less entropy when generating the hash, although the loss is negligible.

See: https://www.krakend.io/docs/authorization/revoking-tokens/

Values: "optimal" "default"
port integer required

The port number exposed on each KrakenD instance for the RPC service to interact with the bloomfilter. This port is allocated only to the clients (running KrakenDs).

See: https://www.krakend.io/docs/authorization/revoking-tokens/

token_keys string[] required

The list with all the claims in your JWT payload that need watching. These fields establish the criteria to revoke accesses in the future. The Revoker does not use this value, only the clients.

See: https://www.krakend.io/docs/authorization/revoking-tokens/

Examples: ["jti"]
revoke_server_api_key string

A string used as an exchange API key to secure the communication between the Revoke Server and the KrakenD instances and to consume the REST API of the Revoker Server as well. E.g., a string generated with uuidgen.

See: https://www.krakend.io/docs/enterprise/authentication/revoke-server/

Examples: "639ee23f-f4c5-40c4-855c-912bf01fae87"
revoke_server_max_retries integer

Maximum number of retries after a connection fails. When the value is less than zero it is changed automatically to zero.

See: https://www.krakend.io/docs/enterprise/authentication/revoke-server/

Default: 0
revoke_server_max_workers integer

How many workers are used concurrently to execute an action (e.g., push a token) to all registered instances, allowing you to limit the amount of memory consumed by the server. For example, if you have 100 KrakenD servers and need to push 5MB of data each, you need to send 500MB in total. A max_workers=5 will consume a maximum of 5MB x 5 workers = 25MB of memory in a given instant. Defaults to the same number of CPUs available.

See: https://www.krakend.io/docs/enterprise/authentication/revoke-server/

Default: 5
revoke_server_ping_interval string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
revoke_server_ping_url string

The address to the /instances endpoint in the Revoke Server.

See: https://www.krakend.io/docs/enterprise/authentication/revoke-server/

auth/validator object

Enables global configurations for the HTTP client responsible of downloading and caching the JWK URLs for token validation and signing.

1 nested properties
shared_cache_duration integer required

The cache duration in seconds for the JWK client retrieving the jwk_url. The endpoint must enable the cache option in order to use this second level cache.

See: https://www.krakend.io/docs/authorization/jwk-caching/

documentation/openapi object

Enterprise only. Generates OpenAPI documentation automatically through krakend openapi export command.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

28 nested properties
description string

An introductory, optionally verbose, explanation supporting CommonMark syntax. If you'd like to load an external markdown file, you can use flexible configuration, for instance "description": {{include "openapi/intro.md" | toJson }}

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "Hi there, I am [OpenAPI](https://www.krakend.io/docs/enterprise/endpoints/openapi/)"
audience string[]

The list of audiences that will consume this endpoint. These values do not define the gateway logic in any way. They are a way to group endpoints and filter them out when generating the OpenAPI documentation. Use * to indicate an endpoint will be present in any audience generated.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: ["gold","silver","*"]
base_path string

A starting path that is appended to any endpoint.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
components_schemas object

The JSON Schemas you can reuse inside endpoint definitions using ref. You can either pass the JSON Schema object, or a bas64 string.

Examples: {"Pet":{"type":"object","required":["id","name"]}}
contact_email string

Email where users of your API can write to.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
contact_name string
Examples: "/v1"
contact_url string

Contact URL that users of your API can read.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
cookie_name string

When generating an OpenAPI spec, the name of the cookie used under components securitySchemes.

Default: "SESSIONID"
custom_security_schemes object

Allows you to add custom security schemes under components/securitySchemes in the generated OpenAPI spec. This is useful when you want to define your own security schemes, different from the built-in ones (e.g., jwt, apikey, cookie, etc.). When the property is in the service level you must declare the schema (e.g., "OAuth2Security":{...}), and when it is in the endpoint you should only write the object name with not properties inside, e.g, {"OAuth2Security":{}.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: {"OAuth2Security":{"description":"OAuth2 security scheme","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://example.com/oauth/authorize","scopes":{},"tokenUrl":"https://example.com/oauth/token"}}}}
disable_default_response_definitions boolean

By default, KrakenD adds a 500 and a 200 response definition to each endpoint. Set this property to true if you want to avoid this behavior.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Default: false
example object | string

Deprecated in OAS3 (use response_definition instead). A free form JSON object or a string you would like to show as a sample response of the endpoint. The examples assume they are JSON content types except when using the output_encoding=string.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

header_definition object[]

Sets a detailed description for the headers allowed in the endpoint. Make sure to include the same headers in the endpoint's input_headers.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The type of content","name":"Content-Type"}]
host string

The hostname where you will publish your API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "my.api.com"
jwt_key string

When generating an OpenAPI spec, the name of the JWT key used under components securitySchemes.

Default: "KrakenD-JWT"
license_name string

The license name (e.g.: Apache License)

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
license_url string

The URL where the license is hosted

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
operation_id string

A unique string identifying the operation identifier. Usually the method + the endpoint. If provided, these IDs must be unique among all operations described in your API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "GET/foo"
param_definition object[]

Sets a detailed description for the URL parameters (e.g.: /foo/{param}) required in the endpoint. Make sure to include to write the param exactly as in the endpoint definition.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The unique user ID","name":"id_user"}]
query_definition object[]

Sets a detailed description for the query strings allowed in the endpoint. Make sure to include the same strings in the endpoint's input_query_strings.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"The number of the page","name":"page"}]
request_definition object[]

Describes the payload needed to consume the endpoint. If a JSON Schema validation exists, it takes precedence when generating the documentation. An example use case is when you need to document a multipart/form-data request body.This property is an array because you can document requests with multiple content types.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"Updates the user","content_type":"application/json","example":{"first_name":"Mary","id_user":33}}]
response_definition object

Describes the different status codes returned by this endpoint. Each key is the definition of the status code, represented by a string. E.g., 200 (success), 500 (internal error), etc.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: {"404":{"description":"Page not found","@comment":"Some comment","content_type":"application/json","example":{"status":"KO"}}}
schemes string[]

The list of schemes supported by the API, e.g. http or https

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Default:
[
  "http"
]
Examples: ["https","http"]
servers object[]

The list of servers where the API is hosted. The server URL can be a relative path, e.g., /v1 or an absolute path. The URL might contain {variables}, although these are only recognized by OpenAPI and to KrakenD they are just literal strings because it does not use them.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"url":"/v1"}], [{"url":"https://example.com:{port}","variables":{"port":{"default":"8443","enum":["8443","443"]}}}]
summary string

A short summary for the endpoint. Use the description field for the longest explanation.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

tag_definition object[]

Sets a detailed description for the tags classifiying endpoints when generating the OpenAPI spec.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: [{"description":"Description of tag1","name":"Tag1"}]
tags string[]

You can assign a list of tags to each API operation. If you declare tags in the tag_definition at the OpenAPI service level, they will have a description in the documentation. Tagged operations may be handled differently by tools and libraries. For example, Swagger UI uses tags to group the displayed operations.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

terms_of_service string

The URL to the terms of service for using this API.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "/v1"
version string

The version numbering you want to apply to this release of API., e.g.: 1.0.

See: https://www.krakend.io/docs/enterprise/developer/openapi/

Examples: "1.0"
documentation/postman object

Enterprise only. Generates postman documentation automatically through krakend postman export command.

See: https://www.krakend.io/docs/enterprise/developer/postman/

4 nested properties
description string

An introductory, optionally verbose, explanation supporting Markdown syntax. If you'd like to load an external markdown file, you can use flexible configuration, for instance "description": {{include "postman/intro.md" | toJson }}

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "Hi there, I am a [postman collection](https://www.krakend.io/docs/enterprise/developer/postman/)"
folder object[]

The folder definition where you will add endpoints

name string

The name of the Postman collection you are generating.

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "KrakenD Config v1"
version string

The version you assign to this Postman collection you are generating using semantic versioning.

See: https://www.krakend.io/docs/enterprise/developer/postman/

Examples: "1.2.3", "0.7.9"
pattern=^[0-9].[0-9].[0-9]+$
governance/processors object

Declares rules and limits to be enforced.

1 nested properties
quotas object[] required

The list of quota processors available for attachment. You can have multiple processors with different configurations.

See: https://www.krakend.io/docs/enterprise/governance/quota/

governance/quota object

Enterprise only. Attach a quota to the endpoint, backend, or service. Needs a governance/processor namespace.

See: https://www.krakend.io/docs/enterprise/governance/quota/

7 nested properties
quota_name string required

Name of the quota you want to reuse, written exactly as declared under the processors list.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "my_quota"
tier_key string required

Header used to determine the tier. Use tier_value and tier_value_as on each tier to determine how to match the value.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Examples: "X-User-Tier", "X-User-ID"
tiers object[] required

List of tiers to match against the request. The first tier that matches will be used to determine the quota to consume.

See: https://www.krakend.io/docs/enterprise/governance/quota/

disable_quota_headers boolean

When set to true, the quota headers X-Quota-Limit, X-Quota-Remaining, and Retry-After will not be added to the response. This is useful when you want to hide the quota information from the client.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
on_unmatched_tier_allow boolean

When a tier cannot be infered from the request, whether to allow the request to continue or not. In case a request does not match any of the tiers, the request will be rejected with a 400 error unless you set this to true.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: false
weight_key string

Instead of incrementing the quota counter by one unit, use the value provided in a field or header with its dynamic value. For instance, an LLM can return how many tokens it consumed, and you can use that value to increment the quota counter. The value must be a parseable number, and the field or header must be present in the backend response. The weight_key is only used in the endpoint and backend scopes, and it is ignored in the service level.

See: https://www.krakend.io/docs/enterprise/governance/quota/

weight_strategy enum

Where to find the key containing the counter value to increment. Use body for any type of encoding different than no-op and header for no-op.

See: https://www.krakend.io/docs/enterprise/governance/quota/

Default: "body"
Values: "body" "header"
grpc object

Enterprise only. gRPC server integration

2 nested properties
catalog string[] required

The paths to the different .pb files you want to load, or the paths to directories containing .pb files. All content is scanned in the order of the list, and after fetching all files it resolves the dependencies of their imports. The order you use here is not important to resolve imports, but it matters when there are conflicts (different files using the same namespace and package type).

See: https://www.krakend.io/docs/enterprise/grpc/server/

Examples: ["./grpc/flights.pb","./grpc/definitions","/etc/krakend/grpc"]
server object

Defines the gRPC server properties.

See: https://www.krakend.io/docs/enterprise/grpc/server/

2 nested properties
opentelemetry object

Overrides OpenTelemetry settings for the gRPC server.

services object[]

Defines one object per available gRPC service.

See: https://www.krakend.io/docs/enterprise/grpc/server/

modifier/lua-endpoint object

Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.

See: https://www.krakend.io/docs/endpoints/lua/

7 nested properties
allow_open_libs boolean

As an efficiency point the Lua component does not load the standard libraries by default. If you need to import Lua libraries (e.g, the I/O, String, etc.), then you must set this flag to true.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
live boolean

For security and efficiency, the Lua script is loaded once into memory and not reloaded even if the file contents change. Set this flag to true if you want to modify the Lua script while KrakenD is running and apply the changes live (mostly during development to avoid the snippet being cached).

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
md5 object

The md5sum is an extra security feature to make sure that once you have coded the Lua script, the MD5 of what is loaded into memory matches what you expect and has not been tampered by a malicious 3rd party. The key of the object must match exactly the filename under sources, including all the path.

See: https://www.krakend.io/docs/endpoints/lua/

Examples: {"./path/to/file1.lua":"49ae50f58e35f4821ad4550e1a4d1de0"}
post string

The Lua code that is executed after performing the request. Available when used in the backend section. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "local r = response.load(); r:headers('Set-Cookie', 'key1='.. r:data('response'));"
pre string

The Lua code that is executed before performing the request. Unlike post, it's available in all sections. You can write all the Lua code inline (e.g., print('Hi'); print('there!') but you can also call functions that live inside one of the files under sources (e.g., my_function()).

See: https://www.krakend.io/docs/endpoints/lua/

Examples: "print('Backend response, pre-logic:'); local r = request.load(); print(r:body());"
skip_next boolean

Available on the backend section only. Instead of connecting to next backend in the pipe, returns an empty response and executes the post lua function.

See: https://www.krakend.io/docs/endpoints/lua/

Default: false
sources string[]

An array with all the Lua files that will be processed. If no path is provided (e.g., myfile.lua) the file loads from the working directory.

See: https://www.krakend.io/docs/endpoints/lua/

modifier/request-body-extractor object

Enterprise only. Extracts fields from the incoming request body and promotes them to request headers or query strings.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

1 nested properties
operations object[] required

A list of extraction operations to apply. Each operation extracts a value from the request body and writes it to a header or query string parameter. Operations are evaluated in sequential order.

See: https://www.krakend.io/docs/enterprise/endpoints/request-body-extractor/

modifier/response-headers object

Enterprise only. Allows you to transform response headers declaratively.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

4 nested properties
add object

The headers you want to add. Every key under add is the header name, and the values are declared in an array with all those you want to set. If the header didn't exist previously, it is created with the values you passed. If the header existed, then the new values are appended.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

Examples: {"X-Hello":["World"]}
delete string[]

The list of headers you want to delete. All headers listed will be missing in the response.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

Examples: ["X-Krakend","X-Krakend-Completed"]
minItems=1
rename object

The headers you want to rename. The key used under rename is the original header name, and the value the new header name. This operation is destructive, meaning that if you rename to a header name that already existed it will be replaced with the new header and value.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

Examples: {"Header-A":"Header-A-New-Name"}
replace object

The headers you want to replace. The key used under replace is the header name, and the value an array with all the header values you want to set. The replacement overwrites any other value that could exist in this header.

See: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/

Examples: {"Cache-Control":["no-store"],"Vary":["foo","bar","foobar"]}
plugin/http-server object
9 nested properties
name string[] required

An array with the names of plugins to load. The names are defined inside your plugin.

See: https://www.krakend.io/docs/extending/http-server-plugins/

Default:
[]
Examples: ["myplugin"]
geoip object

Enterprise only. The GeoIP integration allows you load Maxmind's GeoIP2 City database (payment and free versions) and enrich all KrakenD calls to your backends with geo data.

See: https://www.krakend.io/docs/enterprise/endpoints/geoip/

1 nested properties
citydb_path string required

The path in the filesystem containing the database in GeoIP2 Binary (.mmdb) format. Relative to the working dir or absolute path.

See: https://www.krakend.io/docs/enterprise/endpoints/geoip/

Examples: "path/to/GeoIP2-City.mmdb"
ip-filter object

Enterprise only. The IP filtering plugin allows you to restrict the traffic to your API gateway based on the IP address. It works in two different modes (allow or deny) where you define the list of IPs (CIDR blocks) that are authorized to use the API, or that are denied from using the API.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

4 nested properties
CIDR string[] required

The CIDR blocks (list of IPs) you want to allow or deny.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["192.168.0.0/24","172.17.2.56/32"]
allow boolean required

When true, only the matching IPs are able to access the content. When false, all matching IPs are discarded.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Default: false
client_ip_headers string[]

A custom list of all headers that might contain the real IP of the client. The first matching IP in the list will be used. Default headers are (in order of checking): X-Forwarded-For, X-Real-IP, and X-Appengine-Remote-Addr.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["X-Forwarded-For","X-Real-IP","X-Appengine-Remote-Addr"]
trusted_proxies string[]

A custom list of all the recognized machines/balancers that proxy the client to your application. This list is used to avoid spoofing when trying to get the real IP of the client.

See: https://www.krakend.io/docs/enterprise/throttling/ipfilter/

Examples: ["10.0.0.0/16"]
jwk-aggregator object

Enterprise only. The JWK aggregator plugin allows KrakenD to validate tokens issued by multiple Identity Providers.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

3 nested properties
origins string[] required

The list of all JWK URLs recognized as valid Identity Providers by the gateway.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

port integer required

The port of the local server doing the aggregation. The port is only accessible within the gateway machine using localhost, and it's never exposed to the external network. Choose any port that is free in the system.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

Examples: 9876
cache boolean

When true, it stores the response of the Identity provider for the time specified in its Cache-Control header.

See: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/

redis-ratelimit object

Enterprise only. The global rate limit functionality enables a Redis database store to centralize all KrakenD node counters. Instead of having each KrakenD node count its hits, the counters are global and stored in the database.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

6 nested properties
burst integer required

How many requests a client can make above the rate specified during a peak.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

host string required

The URL to the Redis instance that stores the counters using the format host:port.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

Examples: "redis", "redis:6379"
period string required

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
rate integer required

Number of allowed requests during the observed period.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

tokenizer enum required

One of the preselected strategies to rate-limit users.

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

Values: "jwt" "ip" "url" "path" "header" "param" "cookie"
tokenizer_field string

The field used to set a custom field for the tokenizer (e.g., extracting the token from a custom header other than Authorization or using a claim from a JWT other than the jti).

See: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/

static-filesystem object

Enterprise only. Allows you to fetch and serve static content in two different use cases. When the plugin is used as an http server handler, the static content is for your end-users, giving them CSS, JS, images, or JSON files, to name a few examples. On the other side, when the plugin is used as an http client executor, the KrakenD endpoints use static content as if it were a backend.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

3 nested properties
path string required

The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: ./assets) or absolute (e.g.: /var/www/assets).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "./static/"
prefix string required

This is the beginning (prefix) of all URLs that are resolved using this plugin. All matching URLs won't be passed to the router, meaning that they are not considered endpoints. Make sure you are not overwriting valid endpoints. When the prefix is /, then all traffic is served as static and you must declare a prefix under skip (e.g.: /api) to match endpoints.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "/media/assets"
skip string[]

An array with all the prefix URLs that despite they could match with the prefix, you don't want to treat them as static content and pass them to the router.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: ["/media/ignore/this/directory","/media/file.json"]
url-rewrite object

Enterprise only. Allows you to declare additional URLs other than the ones defined under the endpoints configuration, used as aliases of existing endpoints.

See: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/

Any of: variant, variant
2 nested properties
literal object

A map with the exact desired url and its mapping to an endpoint. If the endpoint has {placeholders} you need to write them, but the literal value {placeholders} is passed.

See: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/

Examples: {"/hi-there":"/hello","/whatsup":"/hello"}
regexp string[][]

A list of lists, containing the regular expression that defines the URL to be rewritten, and its endpoint destination. You can use the capturing groups with the syntax ${1}, ${2}, etc.

See: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/

virtualhost object

Enterprise only. The Virtual Host plugin allows you to run different configurations of KrakenD endpoints based on the host accessing the server.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

1 nested properties
hosts string[] required

All recognized virtual hosts by KrakenD must be listed here. The values declared here must match the content of the Host header when passed by the client.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

Examples: ["api-a.host.com","api-b.host.com"]
wildcard object

Enterprise only. Enables wildcard processing of requests without declaring all endpoint subresrouces.

See: https://www.krakend.io/docs/enterprise/endpoints/wildcard/

1 nested properties
endpoints object required

The key of the map is the KrakenD endpoint that receives all the wildcard traffic. The value is an array with all the user paths that match this wildcard (you don't need to declare the subresources).

See: https://www.krakend.io/docs/enterprise/endpoints/wildcard/

Examples: {"/__wildcard/foo":["/foo","/aliasfoo"]}
qos/ratelimit/service object
Any of: variant, variant
10 nested properties
capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from all users together at any given instant. When the gateway starts, the bucket is full. As requests from users come, the remaining tokens in the bucket decrease. At the same time, the max_rate refills the bucket at the desired rate until its maximum capacity is reached. The default value for the capacity is the max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as max_rate.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
cleanup_period string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
cleanup_threads integer

These are the number of routines that search for and remove outdated rate limit counters. The more routine(s) you add, the faster the memory optimization is completed, but the more CPU it will consume. Generally speaking, a single thread is more than enough because the delete operation is very fast, even with a large number of counters. This is an advanced micro-optimization setting that you should use with caution.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
client_capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from each individual user at any given instant. Works just as capacity, but instead of having one bucket for all users, keeps a counter for every connected client and endpoint, and refills from client_max_rate instead of max_rate. The client is recognized using the strategy field (an IP address, a token, a header, etc.). The default value for the client_capacity is the client_max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as client_max_rate.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 1
client_max_rate number

Number of tokens you add to the Token Bucket for each individual user (user quota) in the time interval you want (every). The remaining tokens in the bucket are the requests a specific user can do. It keeps a counter for every client and endpoint. Keep in mind that every KrakenD instance keeps its counters in memory for every single client.

See: https://www.krakend.io/docs/endpoints/rate-limit/

every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
key string

Available when using client_max_rate and you have set a strategy equal to header or param. It makes no sense in other contexts. For header it is the header name containing the user identification (e.g., Authorization on tokens, or X-Original-Forwarded-For for IPs). When they contain a list of space-separated IPs, it will take the IP from the client that hit the first trusted proxy. For param it is the name of the placeholder used in the endpoint, like id_user for an endpoint /user/{id_user}.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Examples: "X-Tenant", "Authorization", "id_user"
max_rate number

Sets the maximum number of requests all users can do in the given time frame. Internally uses the Token Bucket algorithm. The absence of max_rate in the configuration or a 0 is the equivalent to no limitation. You can use decimals if needed.

See: https://www.krakend.io/docs/endpoints/rate-limit/

num_shards integer

All rate limit counters are stored in memory in groups (shards). All counters in the same shard share a mutex (which controls that one counter is modified at a time), and this helps with contention. Having, for instance, 2048 shards (default) and 1M users connected concurrently (same instant) means that each user will need to coordinate writes in their counter with an average of under 500 other users (1M/2048=489). Lowering the shards might increase contention and latency but free additional memory. This is an advanced micro-optimization setting that should be used with caution.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Default: 2048
strategy enum

Available when using client_max_rate. Sets the strategy you will use to set client counters. Choose ip when the restrictions apply to the client's IP address, or set it to header when there is a header that identifies a user uniquely. That header must be defined with the key entry.

See: https://www.krakend.io/docs/endpoints/rate-limit/

Values: "ip" "header" "param"
qos/ratelimit/service/redis object

Enterprise only. Redis-backed service ratelimit

Any of: variant, variant, variant, variant
10 nested properties
capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from all users together at any given instant. When the gateway starts, the bucket is full. As requests from users come, the remaining tokens in the bucket decrease. At the same time, the max_rate refills the bucket at the desired rate until its maximum capacity is reached. The default value for the capacity is the max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as max_rate.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Default: 1
client_capacity integer

Defines the maximum number of tokens a bucket can hold, or said otherwise, how many requests will you accept from each individual user at any given instant. Works just as capacity, but instead of having one bucket for all users, keeps a counter for every connected client and endpoint, and refills from client_max_rate instead of max_rate. The client is recognized using the strategy field (an IP address, a token, a header, etc.). The default value for the client_capacity is the client_max_rate value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as client_max_rate.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Default: 1
client_max_rate number

Number of tokens you add to the Token Bucket for each individual user (user quota) in the time interval you want (every). The remaining tokens in the bucket are the requests a specific user can do. It keeps a counter for every client and endpoint. Keep in mind that every KrakenD instance keeps its counters in memory for every single client.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

connection_name string

The connection pool name or cluster name that is used by this ratelimit. The value must match what you configured in the Redis Connection Pool

connection_pool string

The connection pool name that is used by this ratelimit. The value must match what you configured in the Redis Connection Pool

every string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
key string

Available when using client_max_rate and you have set a strategy equal to header or param. It makes no sense in other contexts. For header it is the header name containing the user identification (e.g., Authorization on tokens, or X-Original-Forwarded-For for IPs). When they contain a list of space-separated IPs, it will take the IP from the client that hit the first trusted proxy. For param it is the name of the placeholder used in the endpoint, like id_user for an endpoint /user/{id_user}.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Examples: "X-Tenant", "Authorization", "id_user"
max_rate number

Sets the maximum number of requests all users can do in the given time frame. Internally uses the Token Bucket algorithm. The absence of max_rate in the configuration or a 0 is the equivalent to no limitation. You can use decimals if needed.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

on_failure_allow boolean

Whether you want to allow a request to continue when the Redis connection is failing or not. The default behavior blocks the request if Redis is not responding correctly

Default: false
strategy enum

Available when using client_max_rate. Sets the strategy you will use to set client counters. Choose ip when the restrictions apply to the client's IP address, or set it to header when there is a header that identifies a user uniquely. That header must be defined with the key entry.

See: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/

Values: "ip" "header" "param"
qos/ratelimit/tiered object

Enterprise only. Apply ratelimit based on tier match.

2 nested properties
tier_key string required

The header name containing the tier name. The string you provide is case-insensitive. If you need to take the value from a place that is not a header (a token, an API key), you must use propagate functions in the components that convert values to internal headers.

See: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/

tiers object[] required

The list of all tier definitions and limits for each. Each item in the list is a tier object.

See: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/

redis object

Defines the Redis connection pools available to any functionality requiring Redis.

See: /docs/enterprise/throttling/global-rate-limit/

2 nested properties
clusters object[]

Defines all the clusters available to Redis functionality. The different components requiring Redis will access the pool based on its name

connection_pools object[]

Defines all the connetion pools available to Redis functionality. The different components requiring Redis will access the pool based on its name

router object

The optional router configuration allows you to set global flags that change the way KrakenD processes the requests at the router layer.

See: https://www.krakend.io/docs/service-settings/router-options/

21 nested properties
app_engine boolean

The app_engine boolean trusts headers starting with X-AppEngine... for better integration with that PaaS.

See: https://www.krakend.io/docs/service-settings/router-options/

auto_options boolean

When true, enables the autogenerated OPTIONS endpoint for all the registered paths

See: https://www.krakend.io/docs/service-settings/router-options/

decompress_gzip integer

Enterprise only. Decompresses any Gzipped content before sending it to the backend when the Content-Encoding has gzip in the first position. You can also set this value per endpoint.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: 0
disable_access_log boolean

Stops registering access requests to KrakenD in the logs. You can still have a Backend Log if needed.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
disable_gzip boolean

Enterprise only. All the output to the end user on the Enterprise Edition uses gzip when accepted by the client. Use this flag to remove gzip compression.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
disable_handle_method_not_allowed boolean

Whether to checks if another method is allowed for the current route, if the current request can not be routed. If this is the case, the request is answered with Method Not Allowed and HTTP status code 405. If no other Method is allowed, the request is a 404.

See: https://www.krakend.io/docs/service-settings/router-options/

disable_health boolean

When true you don't have any exposed health endpoint. You can still use a TCP checker or build an endpoint yourself.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
disable_path_decoding boolean

Disables automatic validation of the url params looking for url encoded ones.

See: https://www.krakend.io/docs/service-settings/router-options/

disable_redirect_fixed_path boolean

If true, the router tries to fix the current request path, if no handle is registered for it

See: https://www.krakend.io/docs/service-settings/router-options/

disable_redirect_trailing_slash boolean

Disables automatic redirection if the current route can't be matched but a handler for the path with (without) the trailing slash exists. Only works if disable_redirect_fixed_path is also set to true.

See: https://www.krakend.io/docs/service-settings/router-options/

error_body object

Sets custom error bodies for 404 and 405 errors.

See: https://www.krakend.io/docs/service-settings/router-options/

2 nested properties
404 object

Write any JSON object structure you would like to return to users when they request an endpoint not known by KrakenD. 404 Not Found errors.

405 object

Write any JSON object structure you would like to return to users

forwarded_by_client_ip boolean

When set to true, the client IP will be parsed from the default request's headers, or the custom ones (remote_ip_headers). If the IP has passed through a trusted proxy (e.g.: a proxy, load balancer, or a third party application) it will be extracted. If no IP can be fetched, it falls back to the IP obtained from the request's remote address. When declared you must configure trusted_proxies too.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
health_path string

The path where you'd like to expose the health endpoint.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: "/__health"
hide_version_header boolean

Removes the version of KrakenD used in the X-KrakenD-version headers.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
logger_skip_paths string[]

Defines the set of paths that are removed from the logging.

See: https://www.krakend.io/docs/service-settings/router-options/

max_multipart_memory integer

Sets the maxMemory param that is given to http.Request's Multipart Form method call.

See: https://www.krakend.io/docs/service-settings/router-options/

max_payload integer

Enterprise only. Limits the maximum number of bytes a user can send to the gateway. 0 means no limit. You can also set this value per endpoint.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: 0
remote_ip_headers string[]

List of headers used to obtain the client IP when forwarded_by_client_ip is set to true and the remote address is matched by at least one of the network origins of trusted_proxies.

See: https://www.krakend.io/docs/service-settings/router-options/

remove_extra_slash boolean

A parameter can be parsed from the URL even with extra slashes.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
return_error_msg boolean

When there is an error in the gateway (such as a timeout, a non-200 status code, etc.) it returns to the client the reason for the failure. The error is written in the body as is.

See: https://www.krakend.io/docs/service-settings/router-options/

Default: false
trusted_proxies string[]

List of network origins (IPv4 addresses, IPv4 CIDRs, IPv6 addresses or IPv6 CIDRs) from which to trust request's headers that contain alternative client IP when forwarded_by_client_ip is true. When declared you must configure forwarded_by_client_ip set to true, and optionally remote_ip_headers.

See: https://www.krakend.io/docs/service-settings/router-options/

security/bot-detector object

The bot detector module checks incoming connections to the gateway to determine if a bot made them, helping you detect and reject bots carrying out scraping, content theft, and form spam.

See: https://www.krakend.io/docs/throttling/botdetector/

5 nested properties
allow string[]

An array with EXACT MATCHES of trusted user agents that can connect.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["MyAndroidClient/1.0","Pingdom.com_bot_version_1.1"]
cache_size integer

Size of the LRU cache that helps speed the bot detection. The size is the mumber of users agents that you want to keep in memory.

See: https://www.krakend.io/docs/throttling/botdetector/

Examples: 1000
deny string[]

An array with EXACT MATCHES of undesired bots, to reject immediately.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["facebookexternalhit/1.1"]
empty_user_agent_is_bot boolean

Whether to consider an empty user-agent a bot (and reject it) or not.

See: https://www.krakend.io/docs/throttling/botdetector/

Default: false
patterns string[]

An array with all the regular expressions that define bots. Matching bots are rejected.

See: https://www.krakend.io/docs/throttling/botdetector/

Default:
[]
Examples: ["GoogleBot.*","(facebookexternalhit)/.*"]
security/cors object

When KrakenD endpoints are consumed from a browser, you might need to enable the Cross-Origin Resource Sharing (CORS) module as browsers restrict cross-origin HTTP requests initiated from scripts.

See: https://www.krakend.io/docs/service-settings/cors/

Default:
{
  "allow_methods": [
    "POST",
    "GET"
  ],
  "allow_origins": [
    "http://foobar.com"
  ],
  "max_age": "12h"
}
7 nested properties
allow_origins string[] required

An array with all the origins allowed, examples of values are https://example.com, or * (any origin).

See: https://www.krakend.io/docs/service-settings/cors/

allow_credentials boolean

When requests can include user credentials like cookies, HTTP authentication or client side SSL certificates

See: https://www.krakend.io/docs/service-settings/cors/

Default: true
allow_headers string[]
Default:
[]
allow_methods enum[]

The array of all HTTP methods accepted, in uppercase.

See: https://www.krakend.io/docs/service-settings/cors/

uniqueItems=true
debug boolean

Show debugging information in the logger, to be used only during development.

See: https://www.krakend.io/docs/service-settings/cors/

Default: true
expose_headers string[]

Headers that are safe to expose to the API of a CORS API specification-

See: https://www.krakend.io/docs/service-settings/cors/

Default:
[]
max_age string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
security/http object

Security through HTTP headers, including HSTS, HPKP, MIME-Sniffing prevention, Clickjacking protection, and others.

See: https://www.krakend.io/docs/service-settings/security/

17 nested properties
allowed_hosts string[]

When a request hits KrakenD, it will confirm if the value of the Host HTTP header is in the list. If so, it will further process the request. If the host is not in the allowed hosts list, KrakenD will simply reject the request.

See: https://www.krakend.io/docs/service-settings/security/

Default:
[]
allowed_hosts_are_regex boolean

Treat the allowed hosts list as regular expressions.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
browser_xss_filter boolean
Default: false
content_security_policy string

The HTTP Content-Security-Policy (CSP) default-src directive serves as a fallback for the other CSP fetch directives.

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "default-src 'self';"
content_type_nosniff boolean

Enabling this feature will prevent the user's browser from interpreting files as something else than declared by the content type in the HTTP headers.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
custom_frame_options_value string

You can add an X-Frame-Options header using custom_frame_options_value with the value of DENY (default behavior) or even set your custom value.

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "ALLOW-FROM https://example.com"
force_sts_header boolean

Force a STS Header even if using plain HTTP.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
frame_deny boolean

Set to true to enable clickjacking protection, together with custom_frame_options_value.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
host_proxy_headers string[]

A set of header keys that may hold a proxied hostname value for the request.

See: https://www.krakend.io/docs/service-settings/security/

Examples: ["X-Forwarded-Hosts"]
hpkp_public_key string

HTTP Public Key Pinning (HPKP) is a security mechanism which allows HTTPS websites to resist impersonation by attackers using mis-issued or otherwise fraudulent certificates. (For example, sometimes attackers can compromise certificate authorities, and then can mis-issue certificates for a web origin.).

See: https://www.krakend.io/docs/service-settings/security/

Default: ""
Examples: "pin-sha256="base64=="; max-age=expireTime [; includeSubDomains][; report-uri="reportURI"]"
is_development boolean

This will cause the AllowedHosts, SSLRedirect, and STSSeconds/STSIncludeSubdomains options to be ignored during development. When deploying to production, be sure to set this to false.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
referrer_policy string

Allows the Referrer-Policy header with the value to be set with a custom value.

See: https://www.krakend.io/docs/service-settings/security/

Default: "same-origin"
ssl_host string

When the SSL redirect is true, the host where the request is redirected to.

See: https://www.krakend.io/docs/service-settings/security/

Default: "ssl.host.domain"
Examples: "ssl.host.domain"
ssl_proxy_headers object

Header keys with associated values that would indicate a valid https request. Useful when using Nginx, e.g: "X-Forwarded-Proto": "https"

See: https://www.krakend.io/docs/service-settings/security/

Examples: {"X-Forwarded-Proto":"https"}
ssl_redirect boolean

Redirect any request that is not using HTTPS

See: https://www.krakend.io/docs/service-settings/security/

Default: true
sts_include_subdomains boolean

Set to true when you want the includeSubdomains be appended to the Strict-Transport-Security header.

See: https://www.krakend.io/docs/service-settings/security/

Default: false
sts_seconds integer

Enable this policy by setting the max-age of the Strict-Transport-Security header. Setting to 0 disables HSTS.

See: https://www.krakend.io/docs/service-settings/security/

Default: 0
server/static-filesystem object

Enterprise only. Allows you to fetch and serve static content by registering a static web server for a set of defined paths (the prefixes).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

4 nested properties
path string required

The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: ./assets) or absolute (e.g.: /var/www/assets).

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "./static/"
prefix string required

This is the beginning (prefix) of all URLs that are resolved using this plugin. All matching URLs won't be passed to the router, meaning that they are not considered endpoints. Make sure you are not overwriting valid endpoints. When the prefix is /, then all traffic is served as static and you must declare a prefix under skip (e.g.: /api) to match endpoints.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: "/media/assets"
directory_listing boolean

Whether to allow directory listings or not

Default: false
skip string[]

An array with all the prefix URLs that despite they could match with the prefix, you don't want to treat them as static content and pass them to the router.

See: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/

Examples: ["/media/ignore/this/directory","/media/file.json"]
server/virtualhost object

Enterprise only. The Virtual Host server allows you to run different configurations of KrakenD endpoints based on the host accessing the server.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

One of: variant, variant
2 nested properties
aliased_hosts object

A map of all recognized virtual hosts where the key is the alias and the value the host name, including the port if it's not 443 or 80. The values declared here must match the content of the Host header passed by the client. The alias must be an alphanumeric string.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

Examples: {"user_api":"users.svc.example.com:9000"}
1 nested properties
[a-z0-9_]+ string

The key of this map must compile with the regexp a-z0-9_ and the host name is the string that matches the value sent by the user in the Host header.

hosts string[]

All recognized virtual hosts by KrakenD must be listed here. The values declared here must match the content of the Host header when passed by the client.

See: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/

Examples: ["api-a.example.com","api-b.example.com"]
telemetry/gelf object

Send structured events in GELF format to your Graylog Cluster.

See: https://www.krakend.io/docs/logging/graylog-gelf/

2 nested properties
address string required

The address (including the port) of your Graylog cluster (or any other service that receives GELF inputs). E.g., myGraylogInstance:12201

See: https://www.krakend.io/docs/logging/graylog-gelf/

enable_tcp boolean required

Set to false (recommended) to use UDP, or true to use TCP. TCP performance is worst than UDP under heavy load.

See: https://www.krakend.io/docs/logging/graylog-gelf/

telemetry/influx object

Enables the extended logging capabilities.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

6 nested properties
address string required

The complete url of the influxdb including the port if different from defaults in http/https.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

ttl string required

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
buffer_size integer

The buffer size is a protection mechanism that allows you to temporarily store datapoints for later reporting when Influx is unavailable. If the buffer is 0, reported metrics that fail are discarded immediately. If the buffer is a positive number, KrakenD creates a buffer with the number of datapoints set. When the buffer is full because the Influx server keeps failing, newer datapoints replace older ones in the buffer.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

min=0
db string

Name of the InfluxDB database (Influx v1) or the bucket name (Influx v2).

See: https://www.krakend.io/docs/telemetry/influxdb-native/

Default: "krakend"
password string

Password to authenticate to InfluxDB. In Influx v2, you also need to add grant access with influx v1 auth.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

username string

Username to authenticate to InfluxDB.

See: https://www.krakend.io/docs/telemetry/influxdb-native/

telemetry/logging object

Enables the extended logging capabilities.

See: https://www.krakend.io/docs/logging/

11 nested properties
level enum required

What type of reporting level do you expect from the application? The options below go from more verbose to least. Use the DEBUG level in the development stages but not in production. Some components can add extra verbosity while in DEBUG mode and send multiline content, which is not always suitable for automated log parsing.

See: https://www.krakend.io/docs/logging/

Values: "DEBUG" "INFO" "WARNING" "ERROR" "CRITICAL"
format string

Specify the format of the application logs: default, logstash, or custom. The custom format needs an additional key "custom_format".

See: https://www.krakend.io/docs/logging/

Default: "default"
Examples: "default", "logstash", "custom"
access_log_custom_format string

Enterprise only. You can write the access log pattern you would like to use. Add a newline \n at the end of the pattern. See the variables you can use.

See: https://www.krakend.io/docs/logging/

Default: ""
Examples: "%{prefix} %{time} [AccessLog] |%{statusCode}| %{latencyMs} | %{clientIP} | %{method} %{path} "
access_log_format enum

Enterprise only. Enable a formatter for the access log. You can write your own pattern using the custom value, or you can use one of the predefined ones.

See: https://www.krakend.io/docs/logging/

Default: ""
Values: "" "default" "httpdCommon" "httpdCombine" "json" "custom"
access_log_missing_key_marker string

Enterprise only. When you use a custom access log format, the variable you are trying to print could be empty. For instance, you have added in the format %{header.Authorization} but the header is missing in the request. In this case, the printed value is what you configure here. If the string is set to an empty value, a dash - is printed.

See: https://www.krakend.io/docs/logging/

Default: "-"
Examples: "%{default}", "%{httpdCommon}", "%{prefix} %{time} [AccessLog] |%{statusCode}| %{latencyMs} | %{clientIP} | %{method} %{path} "
backend object

Enables the Backend Log capabilities.

See: https://www.krakend.io/enterprise/docs/logging/

4 nested properties
custom_format string

Specify the custom format of the Backend Logs.

See: https://www.krakend.io/enterprise/docs/logging/

Default: "%{prefix}%{time} |%{statusCode}| %{latencyMs} | %{method} %{host} %{path} "
Examples: "%{time:kitchen} | (╯°□°)╯( ┻━┻ %{statusCode} | %{method} %{host} %{path} "
log_with_level enum

What type of reporting level do you want to set at the backends? The options below go from more verbose to least. Use the DEBUG level in the development stages but not in production. Some components can add extra verbosity while in DEBUG mode and send multiline content, which is not always suitable for automated log parsing.

See: https://www.krakend.io/enterprise/docs/logging/

Values: "DEBUG" "INFO" "WARNING" "ERROR" "CRITICAL"
no_value string

When the variable does not resolve to any value, the string you want to write in the log. If the string is set to an empty value, a dash - is printed.

See: https://www.krakend.io/enterprise/docs/logging/

Default: "-"
Examples: "-", "null", "no_value", "<empty>"
prefix string

Adds the defined string at the beginning of every logged line, so you can quickly filter messages with external tools later on.

See: https://www.krakend.io/enterprise/docs/logging/

Default: ""
Examples: ">>> "
custom_format string

Lets you write a custom logging pattern using variables, e.g: %{message}.

See: https://www.krakend.io/docs/logging/

prefix string

Adds the defined string at the beginning of every logged line, so you can quickly filter messages with external tools later on. It's recommended to always add a prefix [INSIDE BRACKETS] to make use of predefined dashboards.

See: https://www.krakend.io/docs/logging/

stdout boolean

Set to true to send logs to stdout.

See: https://www.krakend.io/docs/logging/

Default: false
syslog boolean

Set to true to send logs to syslog.

See: https://www.krakend.io/docs/logging/

Default: false
syslog_facility enum

When using syslog, the facility tells KrakenD where to send the messages as set by the locals of the syslog standard.

See: https://www.krakend.io/docs/logging/

Default: "local3"
Values: "local0" "local1" "local2" "local3" "local4" "local5" "local6" "local7"
telemetry/logstash object

Enables logstash when the extra_config "telemetry/logging" is also present.

See: https://www.krakend.io/docs/logging/logstash/

1 nested properties
enabled boolean required
Default: true
telemetry/metrics object

Collects extended metrics to push to InfluxDB or expose them in the /__stats/ endpoint.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

6 nested properties
backend_disabled boolean

Skip any metrics happening in the backend layer. Disabling layers saves memory consumption but reduces visibility.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: false
collection_time string

The amount of time you want to assign followed by its unit (e.g.: 2s, 200ms). Valid time units are: ns, us, (or µs), ms, s, m, h.

pattern=^[0-9]+(ns|ms|us|µs|s|m|h)$
endpoint_disabled boolean

When true do not publish the /__stats/ endpoint. Metrics won't be accessible via the endpoint but still collected (and you can send them to Influx for instance).

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: false
listen_address string

Change the listening address where the metrics endpoint is exposed.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: ":8090"
pattern=^:[0-9]+$
proxy_disabled boolean

Skip any metrics happening in the proxy layer (traffic against your backends). Disabling layers saves memory consumption but reduces visibility.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: false
router_disabled boolean

Skip any metrics happening in the router layer (activity in KrakenD endpoints). Disabling layers saves memory consumption but reduces visibility.

See: https://www.krakend.io/docs/telemetry/extended-metrics/

Default: false
telemetry/moesif object

The Moesif integration helps you understand and monetize API usage with a robust analytics and billing platform.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

15 nested properties
application_id string required

The Collector Application ID is used to send events, actions, users, and companies to Moesif's Collector API. Moesif provides it under the 'API Keys' section.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

user_id_headers string[] required

Defines the list of possible headers that can identify a user uniquely. When the header is Authorization, it automatically extracts the username if it contains an Authorization: Basic value with no additional configuration. If, on the other hand, you use tokens and pass an Authorization: Bearer, it will extract the user ID from the JWT claim defined under user_id_jwt_claim. If there are multiple headers in the list, all of them are tested in the given order, and the first existing header in the list is used to extract the user ID (successfully or not).

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["X-User-ID","Authorization"]
batch_size integer

Number of events you will send on every batch reporting asynchronously to Moesif. For high throughput you will need to increase this value.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: 200
debug boolean

Set to true when configuring Moesif for the first time while in development, to see the activity in the logs. Set to false in production.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: false
event_queue_size integer

Sends the number of events you can hold in-memory to send them asynchronously to Moesif. If the throughput of your API generates more events than the size of the queue, the exceeding events will be discarded and not reported.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: 1000000
identify_company object

It sets which strategy you want to use to identify the company. Identifying the company helps you efficiently govern your API. Choose the system you wish to apply (declare only one property). The claim value you access must be of type string. You can access nested structured using the dot . separator. When using dots, literals with an exact match containing the dot are checked first.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

3 nested properties
header string

The company is identified using a header. Provide the header name.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: "X-Tenant"
jwt_claim string

The company is stored in a claim inside the JWT. The claim must return a string.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: "company_id"
query_string string

The company is always passed inside a query string when calling any URL. Provide the query string name.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: "company"
log_body boolean

Send the body of all endpoints and requests to Moesif.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: true
metadata object

A free-form object that allows you to push custom metadata along with events. The custom metadata appears in Moesif under a key krakend, you can use nesting if needed.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: {"instance_id":"1234abcd","region":"us-west-1"}
request_body_masks string[]

The list of fields in the request body that you want to mask before sending them to Moesif. You can set log_body to false to prevent any body being sent.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["password","credit_card"]
request_header_masks string[]

The list of request headers that you want to mask their values before sending them to Moesif.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["Authorization"]
response_body_masks string[]

The list of fields in the response body that you want to mask before sending them to Moesif. You can set log_body to false to prevent any body being sent.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["password","credit_card"]
response_header_masks string[]

The list of response headers that you want to mask their values before sending them to Moesif.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: ["Cookie"]
should_skip string

Defines an expression expressed as Security Policy that avoids reporting to Moesif when the result of the evaluation is true.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Examples: "( req_method=='GET' || req_path.startsWith('/bar/')) && hasHeader('X-Something')"
timer_wake_up_seconds integer

Specifies how often a background thread runs to send events to Moesif. Value in seconds.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: 2
user_id_jwt_claim string

When using JWT tokens, it defines which claim contains the user ID. The claim value you access must be of type string. You can access nested structured using the dot . separator. When using dots, literals with an exact match containing the dot are checked first.

See: https://www.krakend.io/docs/enterprise/governance/moesif/

Default: "sub"
Examples: "sub", "user.id"
telemetry/newrelic object

The New Relic integration lets you push KrakenD metrics and distributed traces to your New Relic dashboard. It uses internally the official New Relic SDK and brings its features to your APM dashboard.

See: https://www.krakend.io/docs/enterprise/telemetry/newrelic/

3 nested properties
license string required

The API key provided by New Relic to push data into your account.

See: https://www.krakend.io/docs/enterprise/telemetry/newrelic/

debug boolean

Set to true when configuring New Relic for the first time while in development, to see the activity in the logs. Set to false in production.

See: https://www.krakend.io/docs/enterprise/telemetry/newrelic/

Default: false
headers_to_pass string[]

Defines an explicit list of headers sent during the client request that will be reported to NewRelic, in addition to the default headers NewRelic sets. Setting the ["*"] value will send all headers sent by the client to NewRelic. Whether you declare this setting or not, you will usually receive from the NewRelic SDK the Accept, Content-Type, User-Agent, and Referer headers.

See: https://www.krakend.io/docs/enterprise/telemetry/newrelic/

Examples: ["*"]
telemetry/opencensus object

Enables the extended logging capabilities.

See: https://www.krakend.io/docs/telemetry/opencensus/

4 nested properties
exporters object required

The exporter(s) you would like to enable. See each exporter configuration in its own section.

9 nested properties
datadog object

Datadog is a monitoring and security platform for developers, IT operations teams and business in the cloud.

See: https://www.krakend.io/docs/telemetry/datadog/

influxdb object

Exports data to InfluxDB: A time series database designed to handle high write and query loads.

See: https://www.krakend.io/docs/telemetry/influxdb/

jaeger object

Submit spans to a Jaeger Collector (HTTP) with endpoint or to a Jaeger Agent (UDP) with agent_endpoint.

See https://www.krakend.io/docs/telemetry/jaeger/

One of: variant, variant
logger object

Opencensus can export data to the system logger as another exporter. Recommended to use telemetry/logging instead.

See: https://www.krakend.io/docs/telemetry/logger/

ocagent object

Exporting metrics, logs, and events to the OpenCensus Agent.

See: https://www.krakend.io/docs/telemetry/ocagent/

prometheus object

Prometheus is an open-source systems monitoring and alerting toolkit.

stackdriver object

Export metrics and traces to Google Cloud

xray object

AWS X-Ray is a service offered by Amazon that provides an end-to-end view of requests as they travel through your application, and shows a map of your application's underlying components.

One of: variant, variant
zipkin object

Export telemetry data to a Zipkin collector

enabled_layers object

Lets you specify what data you want to export. All layers are enabled by default unless you declare this section.

3 nested properties
backend boolean

Reports the activity between KrakenD and your services

Default: false
pipe boolean

Reports the activity at the beginning of the proxy layer. It gives a more detailed view of the internals of the pipe between end-users and KrakenD, having into account merging of different backends.

Default: false
router boolean

Reports the activity between end-users and KrakenD

Default: false
reporting_period integer

The number of seconds passing between reports. If duration is less than or equal to zero, it enables the default behavior of each exporter.

See: https://www.krakend.io/docs/telemetry/opencensus/

Default: 0
sample_rate integer

A number between 0 (no requests at all) and 100 (all requests) representing the percentage of sampled requests you want to send to the exporter. Sampling the 100% of the requests is generally discouraged when the relationship between traffic and dedicated resources is sparse.

See: https://www.krakend.io/docs/telemetry/opencensus/

Default: 0
min=0max=100
telemetry/opentelemetry object

Enables metrics and traces using OpenTelemetry.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

9 nested properties
exporters object required

The places where you will send telemetry data. You can declare multiple exporters even when they are of the same type. For instance, when you have a self-hosted Grafana and would like to migrate to its cloud version and check the double reporting during the transition. There are two families of exporters: otlp or prometheus.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

2 nested properties
otlp object[]

The list of OTLP exporters you want to use. Set at least one object to push metrics and traces to an external collector using OTLP.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

minItems=1
prometheus object[]

Set here at least the settings for one Prometheus exporter. Each exporter will start a local port that offers metrics to be pulled from KrakenD.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

minItems=1
deploy_env string

The environment you are deploying, this can be useful for deployment tracking. The string can have any value that makes sense to you to identify the running environment.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: ""
Examples: "development", "testing", "staging", "production"
histograms object

Use an histogram bucket configuration different from the defaults to define the detail of histogram metrics (decrease or increase their size). You don't need to set this attribute unless you want full control of the histogram definition.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

2 nested properties
size_buckets number[]

The size of the buckets in bytes you want to use for the histograms.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default:
[
  128,
  256,
  512,
  1024,
  4096,
  8192,
  16384,
  32768,
  65536,
  262144,
  524288,
  1048576,
  4194304,
  16777216,
  67108864
]
time_buckets number[]

The duration of buckets in seconds you want to use for the histograms.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default:
[
  0.01,
  0.02,
  0.05,
  0.075,
  0.1,
  0.125,
  0.15,
  0.175,
  0.2,
  0.25,
  0.3,
  0.35,
  0.5,
  0.75,
  1.0,
  1.5,
  2.0,
  3.5,
  5.0,
  10.0
]
layers object

A request and response flow passes through three different layers. This attribute lets you specify what data you want to export in each layer. All layers are enabled by default unless you declare this section.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

3 nested properties
backend object

Reports the activity between KrakenD and each of your backend services. This is the more granular layer.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

global object

Reports the activity between end-users and KrakenD

See: https://www.krakend.io/docs/telemetry/opentelemetry/

proxy object

Reports the activity at the beginning of the proxy layer, including spawning the required requests to multiple backends, merging, endpoint transformation and any other internals of the proxy between the request processing and the backend communication

See: https://www.krakend.io/docs/telemetry/opentelemetry/

metric_reporting_period integer

How often you want to report and flush the metrics in seconds. This setting is only used by otlp exporters.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: 30
service_name string

A friendly name identifying metrics reported by this installation. When unset, it uses the name attribute in the root level of the configuration.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

service_version string

The version you are deploying, this can be useful for deployment tracking.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

skip_paths string[]

The paths you don't want to report. Use the literal value used in the endpoint definition, including any {placeholders}. In the global layer, this attribute works only on metrics, because traces are initiated before there is an endpoint to match against. If you do not want any path skipped, just add an array with an empty string [""].

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default:
[
  "/__health",
  "/__debug/",
  "/__echo/",
  "/__stats/"
]
Examples: ["/foo/{bar}"]
trace_sample_rate number

The sample rate for traces defines the percentage of reported traces. This option is key to reduce the amount of data generated (and resource usage), while you still can debug and troubleshoot issues. For instance, a number of 0.25 will report a 25% of the traces seen in the system.

See: https://www.krakend.io/docs/telemetry/opentelemetry/

Default: 1
Examples: 0.25
min=0max=1
telemetry/opentelemetry-security object

Enables the security layer needed to use OpenTelemetry through the Internet, like pushing data to a SaaS provider.

See: https://www.krakend.io/docs/telemetry/opentelemetry-security/

1 nested properties
otlp object[] required

The list of OTLP exporters that require authentication. Set at least one object to push metrics and traces to an external collector using OTLP.

See: https://www.krakend.io/docs/telemetry/opentelemetry-security/

minItems=1
https://www.krakend.io/schema/v2.13/tls.json object

Enabling TLS for HTTPS and HTTP/2.

See: https://www.krakend.io/docs/service-settings/tls/

ca_certs string[]

An array with all the CA certificates you would like to load to KrakenD when using mTLS, in addition to the certificates present in the system's CA. Each certificate in the list is a relative or absolute path to the PEM file. If you have a format other than PEM, you must convert the certificate to PEM using a conversion tool. See also disable_system_ca_pool to avoid system's CA.

See: https://www.krakend.io/docs/authorization/mutual-authentication/

Default:
[]
Examples: ["ca.pem"]
cipher_suites integer[]

The list of cipher suites as defined in the documentation.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  4865,
  4866,
  4867
]
uniqueItems=true
curve_preferences enum[]

The list of all the identifiers for the curve preferences. Use 23 for CurveP256, 24 for CurveP384 or 25 for CurveP521.

See: https://www.krakend.io/docs/service-settings/tls/

Default:
[
  23,
  24,
  25
]
uniqueItems=true
disable_system_ca_pool boolean

Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the ca_certs list when true.

See: https://www.krakend.io/docs/service-settings/http-server-settings/

Default: false
disabled boolean

A flag to disable TLS (useful while in development).

See: https://www.krakend.io/docs/service-settings/tls/

Default: false
enable_mtls boolean

Whether to enable or not Mutual Authentication. When mTLS is enabled, all KrakenD endpoints require clients to provide a known client-side X.509 authentication certificate. KrakenD relies on the system’s CA to validate certificates.

See: https://www.krakend.io/docs/authorization/mutual-authentication/

Default: false
keys array

An array with all the key pairs you want the TLS to work with. You can support multiple and unrelated domains in a single process.

minItems=1
max_version enum

Maximum TLS version supported.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"
min_version enum

Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the ciphers_list.

See: https://www.krakend.io/docs/service-settings/tls/

Default: "TLS13"
Values: "SSL3.0" "TLS10" "TLS11" "TLS12" "TLS13"