diff --git a/data/referenceable_fields/3.4.x.json b/data/referenceable_fields/3.4.x.json index 9922651b..ed1c3d41 100644 --- a/data/referenceable_fields/3.4.x.json +++ b/data/referenceable_fields/3.4.x.json @@ -1,4 +1,24 @@ { + "acme": [ + "config.account_email", + "config.eab_kid", + "config.eab_hmac_key", + "config.storage_config.redis.auth", + "config.storage_config.consul.token", + "config.storage_config.vault.token" + ], + "aws-lambda": [ + "config.aws_key", + "config.aws_secret", + "config.aws_assume_role_arn" + ], + "azure-functions": [ + "config.apikey", + "config.clientid" + ], + "datadog": [ + "config.host" + ], "forward-proxy": [ "config.auth_username", "config.auth_password" @@ -9,6 +29,10 @@ "config.redis.sentinel_username", "config.redis.sentinel_password" ], + "http-log": [ + "config.http_endpoint", + "config.headers" + ], "kafka-log": [ "config.authentication.user", "config.authentication.password" @@ -21,6 +45,9 @@ "config.ldap_password", "config.bind_dn" ], + "loggly": [ + "config.key" + ], "openid-connect": [ "config.client_id", "config.client_secret", @@ -38,12 +65,20 @@ "config.session_redis_username", "config.session_redis_password" ], + "opentelemetry": [ + "config.endpoint", + "config.headers" + ], "proxy-cache-advanced": [ "config.redis.username", "config.redis.password", "config.redis.sentinel_username", "config.redis.sentinel_password" ], + "rate-limiting": [ + "config.redis_password", + "config.redis_username" + ], "rate-limiting-advanced": [ "config.redis.username", "config.redis.password", @@ -64,6 +99,10 @@ "config.append.headers", "config.append.querystring" ], + "response-ratelimiting": [ + "config.redis_password", + "config.redis_username" + ], "saml": [ "config.idp_certificate", "config.response_encryption_key", @@ -73,44 +112,6 @@ "config.session_redis_username", "config.session_redis_password" ], - "acme": [ - "config.account_email", - "config.eab_kid", - "config.eab_hmac_key", - "config.storage_config.redis.auth", - "config.storage_config.consul.token", - "config.storage_config.vault.token" - ], - "aws-lambda": [ - "config.aws_key", - "config.aws_secret", - "config.aws_assume_role_arn" - ], - "azure-functions": [ - "config.apikey", - "config.clientid" - ], - "datadog": [ - "config.host" - ], - "http-log": [ - "config.http_endpoint", - "config.headers" - ], - "loggly": [ - "config.key" - ], - "opentelemetry": [ - "config.headers" - ], - "rate-limiting": [ - "config.redis_password", - "config.redis_username" - ], - "response-ratelimiting": [ - "config.redis_password", - "config.redis_username" - ], "session": [ "config.secret" ] diff --git a/schemas/acl/3.4.x.json b/schemas/acl/3.4.x.json index b3c90235..df9038ef 100644 --- a/schemas/acl/3.4.x.json +++ b/schemas/acl/3.4.x.json @@ -1,10 +1,33 @@ { + "entity_checks": [ + { + "only_one_of": [ + "config.allow", + "config.deny" + ] + }, + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { @@ -24,13 +47,13 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true } }, { "config": { - "required": true, "fields": [ { "allow": { @@ -51,11 +74,12 @@ { "hide_groups_header": { "default": false, - "type": "boolean", - "required": true + "required": true, + "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/acme/3.4.x.json b/schemas/acme/3.4.x.json index 81602de5..b75508d3 100644 --- a/schemas/acme/3.4.x.json +++ b/schemas/acme/3.4.x.json @@ -1,24 +1,60 @@ { + "entity_checks": [ + { + "conditional": { + "then_match": { + "eq": true + }, + "then_err": "terms of service must be accepted, see https://letsencrypt.org/repository/", + "if_match": { + "one_of": [ + "https://acme-v02.api.letsencrypt.org", + "https://acme-staging-v02.api.letsencrypt.org" + ] + }, + "then_field": "config.tos_accepted", + "if_field": "config.api_uri" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.storage" + ] + } + } + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "service": { + "type": "foreign", + "description": "A reference to the 'services' table with a null value allowed.", "eq": null, - "reference": "services", - "type": "foreign" + "reference": "services" } }, { "route": { + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null, + "reference": "routes" + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "routes", - "type": "foreign" + "reference": "consumer_groups" } }, { @@ -38,97 +74,109 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true } }, { "config": { - "required": true, "fields": [ { "account_email": { + "referenceable": true, "match": "%w*%p*@+%w*%.?%w*", - "encrypted": true, "type": "string", - "required": true, - "referenceable": true + "description": "The account identifier. Can be reused in a different plugin instance.", + "encrypted": true, + "required": true } }, { "account_key": { - "required": false, "fields": [ { "key_id": { - "type": "string", - "required": true + "description": "The Key ID.", + "required": true, + "type": "string" } }, { "key_set": { + "description": "The ID of the key set to associate the Key ID with.", "type": "string" } } ], + "description": "The private key associated with the account.", + "required": false, "type": "record" } }, { "api_uri": { - "type": "string", - "default": "https://acme-v02.api.letsencrypt.org/directory" + "default": "https://acme-v02.api.letsencrypt.org/directory", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" } }, { "tos_accepted": { - "type": "boolean", - "default": false + "default": false, + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "type": "boolean" } }, { "eab_kid": { - "encrypted": true, "referenceable": true, + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.", + "encrypted": true, "type": "string" } }, { "eab_hmac_key": { - "encrypted": true, "referenceable": true, + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.", + "encrypted": true, "type": "string" } }, { "cert_type": { + "description": "The certificate type to create. The possible values are `'rsa'` for RSA certificate or `'ecc'` for EC certificate.", "default": "rsa", - "type": "string", "one_of": [ "rsa", "ecc" - ] + ], + "type": "string" } }, { "rsa_key_size": { + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", "default": 4096, - "type": "number", "one_of": [ 2048, 3072, 4096 - ] + ], + "type": "number" } }, { "renew_threshold_days": { - "type": "number", - "default": 14 + "description": "Days remaining to renew the certificate before it expires.", + "default": 14, + "type": "number" } }, { "domains": { + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", "elements": { "match_any": { "err": "invalid wildcard: must be placed at leftmost or rightmost label", @@ -140,8 +188,8 @@ }, "match_all": [ { - "err": "invalid wildcard: must have at most one wildcard", - "pattern": "^[^*]*%*?[^*]*$" + "pattern": "^[^*]*%*?[^*]*$", + "err": "invalid wildcard: must have at most one wildcard" } ], "type": "string" @@ -151,63 +199,66 @@ }, { "allow_any_domain": { - "type": "boolean", - "default": false + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "default": false, + "type": "boolean" } }, { "fail_backoff_minutes": { - "type": "number", - "default": 5 + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "default": 5, + "type": "number" } }, { "storage": { + "description": "The backend storage type to use. The possible values are `'kong'`, `'shm'`, `'redis'`, `'consul'`, or `'vault'`. In DB-less mode, `'kong'` storage is unavailable. Note that `'shm'` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `'kong'`, `'redis'`, `'consul'`, or `'vault'` in production. Please refer to the Hybrid Mode sections below as well.", "default": "shm", - "type": "string", "one_of": [ "kong", "shm", "redis", "consul", "vault" - ] + ], + "type": "string" } }, { "storage_config": { - "required": true, "fields": [ { "shm": { - "required": true, "fields": [ { "shm_name": { + "description": "Name of shared memory zone used for Kong API gateway storage", "default": "kong", "type": "string" } } ], + "required": true, "type": "record" } }, { "kong": { - "required": true, "fields": [ ], + "required": true, "type": "record" } }, { "redis": { - "required": true, "fields": [ { "host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -216,65 +267,74 @@ 0, 65535 ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", "type": "integer" } }, { "database": { + "description": "The index of the Redis database to use.", "type": "number" } }, { "auth": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "The Redis password to use for authentication. ", + "type": "string" } }, { "ssl": { - "required": true, "default": false, + "description": "Whether to use SSL/TLS encryption when connecting to the Redis server.", + "required": true, "type": "boolean" } }, { "ssl_verify": { - "required": true, "default": false, + "description": "Whether to verify the SSL/TLS certificate presented by the Redis server. This should be a boolean value.", + "required": true, "type": "boolean" } }, { "ssl_server_name": { - "type": "string", - "required": false + "description": "The expected server name for the SSL/TLS certificate presented by the Redis server.", + "required": false, + "type": "string" } }, { "namespace": { + "default": "", "type": "string", "len_min": 0, - "required": true, - "default": "" + "description": "A namespace to prepend to all keys stored in Redis.", + "required": true } } ], + "required": true, "type": "record" } }, { "consul": { - "required": true, "fields": [ { "https": { - "type": "boolean", - "default": false + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" } }, { "host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -283,42 +343,48 @@ 0, 65535 ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", "type": "integer" } }, { "kv_path": { + "description": "KV prefix path.", "type": "string" } }, { "timeout": { + "description": "Timeout in milliseconds.", "type": "number" } }, { "token": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "Consul ACL token.", + "type": "string" } } ], + "required": true, "type": "record" } }, { "vault": { - "required": true, "fields": [ { "https": { - "type": "boolean", - "default": false + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" } }, { "host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -327,81 +393,96 @@ 0, 65535 ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", "type": "integer" } }, { "kv_path": { + "description": "KV prefix path.", "type": "string" } }, { "timeout": { + "description": "Timeout in milliseconds.", "type": "number" } }, { "token": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "Consul ACL token.", + "type": "string" } }, { "tls_verify": { - "type": "boolean", - "default": true + "default": true, + "description": "Turn on TLS verification.", + "type": "boolean" } }, { "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", "type": "string" } }, { "auth_method": { + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", "default": "token", - "type": "string", "one_of": [ "token", "kubernetes" - ] + ], + "type": "string" } }, { "auth_path": { + "description": "Vault's authentication path to use.", "type": "string" } }, { "auth_role": { + "description": "The role to try and assign.", "type": "string" } }, { "jwt_path": { + "description": "The path to the JWT.", "type": "string" } } ], + "required": true, "type": "record" } } ], + "required": true, "type": "record" } }, { "preferred_chain": { - "type": "string" + "type": "string", + "description": "A string value that specifies the preferred certificate chain to use when generating certificates." } }, { "enable_ipv4_common_name": { - "type": "boolean", - "default": true + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "default": true, + "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/application-registration/3.4.x.json b/schemas/application-registration/3.4.x.json index c9b1ab9b..75633de9 100644 --- a/schemas/application-registration/3.4.x.json +++ b/schemas/application-registration/3.4.x.json @@ -1,25 +1,30 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "service": { - "on_delete": "cascade", "ne": null, - "reference": "services", - "type": "foreign" + "on_delete": "cascade", + "type": "foreign", + "reference": "services" } }, { "route": { + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed.", "eq": null, - "reference": "routes", - "type": "foreign" + "reference": "routes" } }, { @@ -39,42 +44,55 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "display_name": { - "type": "string", "unique": true, - "required": true + "description": "Unique display name used for a Service in the Developer Portal.", + "required": true, + "type": "string" } }, { "description": { "unique": true, + "description": "Unique description displayed in information about a Service in the Developer Portal.", "type": "string" } }, { "auto_approve": { + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "default": false, "required": true, - "type": "boolean", - "default": false + "type": "boolean" } }, { "show_issuer": { + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "default": false, "required": true, - "type": "boolean", - "default": false + "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/aws-lambda/3.4.x.json b/schemas/aws-lambda/3.4.x.json index c97dbde1..4fe184c0 100644 --- a/schemas/aws-lambda/3.4.x.json +++ b/schemas/aws-lambda/3.4.x.json @@ -1,4 +1,19 @@ { + "entity_checks": [ + { + "mutually_required": [ + "config.aws_key", + "config.aws_secret" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "config.proxy_url" + ] + } + } + ], "fields": [ { "protocols": { @@ -17,97 +32,117 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "timeout": { "default": 60000, - "type": "number", - "required": true + "description": "An optional timeout in milliseconds when invoking the function.", + "required": true, + "type": "number" } }, { "keepalive": { "default": 60000, - "type": "number", - "required": true + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "required": true, + "type": "number" } }, { "aws_key": { "referenceable": true, - "type": "string", - "encrypted": true + "description": "The AWS key credential to be used when invoking the function.", + "encrypted": true, + "type": "string" } }, { "aws_secret": { "referenceable": true, - "type": "string", - "encrypted": true + "description": "The AWS secret credential to be used when invoking the function. ", + "encrypted": true, + "type": "string" } }, { "aws_assume_role_arn": { "referenceable": true, - "type": "string", - "encrypted": true + "description": "The target AWS IAM role ARN used to invoke the Lambda function.", + "encrypted": true, + "type": "string" } }, { "aws_role_session_name": { "default": "kong", + "description": "The identifier of the assumed role session.", "type": "string" } }, { "aws_region": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { "function_name": { + "description": "The AWS Lambda function name to invoke.", "required": false, "type": "string" } }, { "qualifier": { - "type": "string" + "type": "string", + "description": "The qualifier to use when invoking the function." } }, { "invocation_type": { + "default": "RequestResponse", + "type": "string", + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", "required": true, "one_of": [ "RequestResponse", "Event", "DryRun" - ], - "type": "string", - "default": "RequestResponse" + ] } }, { "log_type": { + "default": "Tail", + "type": "string", + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", "required": true, "one_of": [ "Tail", "None" - ], - "type": "string", - "default": "Tail" + ] } }, { "host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -116,14 +151,15 @@ 0, 65535 ], - "type": "integer", - "default": 443 + "default": 443, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" } }, { "disable_https": { - "default": false, - "type": "boolean" + "type": "boolean", + "default": false } }, { @@ -132,74 +168,86 @@ 100, 999 ], + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", "type": "integer" } }, { "forward_request_method": { "default": false, + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", "type": "boolean" } }, { "forward_request_uri": { "default": false, + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", "type": "boolean" } }, { "forward_request_headers": { "default": false, + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", "type": "boolean" } }, { "forward_request_body": { "default": false, + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", "type": "boolean" } }, { "is_proxy_integration": { "default": false, + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", "type": "boolean" } }, { "awsgateway_compatible": { "default": false, + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", "type": "boolean" } }, { "proxy_url": { - "type": "string" + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." } }, { "skip_large_bodies": { "default": true, + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", "type": "boolean" } }, { "base64_encode_body": { "default": true, + "description": "An optional value that Base64-encodes the request body.", "type": "boolean" } }, { "aws_imds_protocol_version": { + "default": "v1", + "type": "string", + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", "required": true, "one_of": [ "v1", "v2" - ], - "type": "string", - "default": "v1" + ] } } ], + "required": true, "type": "record" } } diff --git a/schemas/azure-functions/3.4.x.json b/schemas/azure-functions/3.4.x.json index 12e39094..e3b309e8 100644 --- a/schemas/azure-functions/3.4.x.json +++ b/schemas/azure-functions/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,78 +27,97 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "timeout": { - "type": "number", - "default": 600000 + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "default": 600000, + "type": "number" } }, { "keepalive": { - "type": "number", - "default": 60000 + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "default": 60000, + "type": "number" } }, { "https": { - "type": "boolean", - "default": true + "description": "Use of HTTPS to connect with the Azure Functions server.", + "default": true, + "type": "boolean" } }, { "https_verify": { - "type": "boolean", - "default": false + "description": "Set to `true` to authenticate the Azure Functions server.", + "default": false, + "type": "boolean" } }, { "apikey": { - "type": "string", "referenceable": true, - "encrypted": true + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.", + "encrypted": true, + "type": "string" } }, { "clientid": { - "type": "string", "referenceable": true, - "encrypted": true + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.", + "encrypted": true, + "type": "string" } }, { "appname": { - "type": "string", - "required": true + "description": "The Azure app name.", + "required": true, + "type": "string" } }, { "hostdomain": { - "type": "string", + "description": "The domain where the function resides.", + "default": "azurewebsites.net", "required": true, - "default": "azurewebsites.net" + "type": "string" } }, { "routeprefix": { - "type": "string", - "default": "api" + "description": "Route prefix to use.", + "default": "api", + "type": "string" } }, { "functionname": { - "type": "string", - "required": true + "description": "Name of the Azure function to invoke.", + "required": true, + "type": "string" } } ], + "required": true, "type": "record" } } diff --git a/schemas/basic-auth/3.4.x.json b/schemas/basic-auth/3.4.x.json index 5764aedf..2350db1e 100644 --- a/schemas/basic-auth/3.4.x.json +++ b/schemas/basic-auth/3.4.x.json @@ -1,14 +1,19 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "protocols": { + "required": true, "default": [ "grpc", "grpcs", @@ -28,27 +33,36 @@ ], "type": "string" }, - "required": true, "type": "set" } }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" + } + }, { "config": { - "required": true, "fields": [ { "anonymous": { - "type": "string" + "type": "string", + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`." } }, { "hide_credentials": { - "required": true, "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "required": true, "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/bot-detection/3.4.x.json b/schemas/bot-detection/3.4.x.json index 1aa68467..ea26e4ef 100644 --- a/schemas/bot-detection/3.4.x.json +++ b/schemas/bot-detection/3.4.x.json @@ -1,10 +1,14 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { @@ -24,39 +28,50 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "allow": { - "type": "array", - "elements": { - "type": "string", - "is_regex": true - }, "default": [ - ] + ], + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "elements": { + "is_regex": true, + "type": "string" + }, + "type": "array" } }, { "deny": { - "type": "array", - "elements": { - "type": "string", - "is_regex": true - }, "default": [ - ] + ], + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "elements": { + "is_regex": true, + "type": "string" + }, + "type": "array" } } ], + "required": true, "type": "record" } } diff --git a/schemas/canary/3.4.x.json b/schemas/canary/3.4.x.json index 49a4a71e..f62cc202 100644 --- a/schemas/canary/3.4.x.json +++ b/schemas/canary/3.4.x.json @@ -1,10 +1,52 @@ { + "entity_checks": [ + { + "at_least_one_of": [ + "config.upstream_uri", + "config.upstream_host", + "config.upstream_port" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "header" + }, + "then_field": "config.hash_header", + "if_field": "config.hash" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "config.upstream_host", + "if_field": "config.upstream_fallback" + } + } + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers" + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumer_groups" } }, { @@ -24,30 +66,24 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true } }, { "config": { - "shorthand_fields": [ - { - "hash": { - "type": "string" - } - } - ], - "required": true, "fields": [ { "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", "type": "number" } }, { "hash": { - "type": "string", "default": "consumer", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", "one_of": [ "consumer", "ip", @@ -55,17 +91,20 @@ "allow", "deny", "header" - ] + ], + "type": "string" } }, { "hash_header": { - "type": "string" + "type": "string", + "description": "A string representing an HTTP header name." } }, { "duration": { "default": 3600, + "description": "The duration of the canary release in seconds.", "gt": 0, "type": "number" } @@ -73,6 +112,7 @@ { "steps": { "default": 1000, + "description": "The number of steps for the canary release.", "gt": 1, "type": "number" } @@ -83,12 +123,14 @@ 0, 100 ], + "description": "The percentage of traffic to be routed to the canary release.", "type": "number" } }, { "upstream_host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -97,24 +139,28 @@ 0, 65535 ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", "type": "integer" } }, { "upstream_uri": { "len_min": 1, + "description": "The URI of the upstream server to be used for the canary release.", "type": "string" } }, { "upstream_fallback": { - "type": "boolean", + "default": false, + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", "required": true, - "default": false + "type": "boolean" } }, { "groups": { + "description": "The groups allowed to access the canary release.", "elements": { "type": "string" }, @@ -123,10 +169,20 @@ }, { "canary_by_header_name": { - "type": "string" + "type": "string", + "description": "A string representing an HTTP header name." + } + } + ], + "shorthand_fields": [ + { + "hash": { + "type": "string", + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead." } } ], + "required": true, "type": "record" } } diff --git a/schemas/correlation-id/3.4.x.json b/schemas/correlation-id/3.4.x.json index 6a46c126..cb7448d7 100644 --- a/schemas/correlation-id/3.4.x.json +++ b/schemas/correlation-id/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,39 +20,51 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "header_name": { - "type": "string", - "default": "Kong-Request-ID" + "description": "The HTTP header name to use for the correlation ID.", + "default": "Kong-Request-ID", + "type": "string" } }, { "generator": { + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", "default": "uuid#counter", - "type": "string", "one_of": [ "uuid", "uuid#counter", "tracker" - ] + ], + "type": "string" } }, { "echo_downstream": { - "type": "boolean", + "description": "Whether to echo the header back to downstream (the client).", + "default": false, "required": true, - "default": false + "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/cors/3.4.x.json b/schemas/cors/3.4.x.json index 8f3e05ea..59100eea 100644 --- a/schemas/cors/3.4.x.json +++ b/schemas/cors/3.4.x.json @@ -1,10 +1,14 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { @@ -16,7 +20,6 @@ "https" ], "elements": { - "type": "string", "len_min": 1, "one_of": [ "grpc", @@ -24,18 +27,28 @@ "http", "https" ], - "required": true + "required": true, + "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", "elements": { "type": "string" }, @@ -44,6 +57,7 @@ }, { "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", "elements": { "type": "string" }, @@ -52,6 +66,7 @@ }, { "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", "elements": { "type": "string" }, @@ -60,7 +75,6 @@ }, { "methods": { - "type": "array", "default": [ "GET", "HEAD", @@ -72,6 +86,7 @@ "TRACE", "CONNECT" ], + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", "elements": { "one_of": [ "GET", @@ -85,29 +100,34 @@ "CONNECT" ], "type": "string" - } + }, + "type": "array" } }, { "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", "type": "number" } }, { "credentials": { - "type": "boolean", + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", "required": true, - "default": false + "type": "boolean" } }, { "preflight_continue": { - "type": "boolean", + "default": false, + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", "required": true, - "default": false + "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/datadog/3.4.x.json b/schemas/datadog/3.4.x.json index d8251ec0..1b5914de 100644 --- a/schemas/datadog/3.4.x.json +++ b/schemas/datadog/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,30 +27,28 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "retry_count", - "queue_size", - "flush_timeout" - ] - } - } - ], "fields": [ { "host": { - "type": "string", "referenceable": true, - "default": "localhost" + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" } }, { @@ -55,52 +57,59 @@ 0, 65535 ], - "type": "integer", - "default": 8125 + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" } }, { "prefix": { + "description": "String to be attached as a prefix to a metric's name.", "default": "kong", "type": "string" } }, { "service_name_tag": { + "description": "String to be attached as the name of the service.", "default": "name", "type": "string" } }, { "status_tag": { + "description": "String to be attached as the tag of the HTTP status.", "default": "status", "type": "string" } }, { "consumer_tag": { + "description": "String to be attached as tag of the consumer.", "default": "consumer", "type": "string" } }, { "retry_count": { - "type": "integer" + "type": "integer", + "description": "Number of times to retry when sending data to the upstream server." } }, { "queue_size": { - "type": "integer" + "type": "integer", + "description": "Maximum number of log entries to be sent on each message to the upstream server." } }, { "flush_timeout": { - "type": "number" + "type": "number", + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records." } }, { "queue": { - "required": true, "fields": [ { "max_batch_size": { @@ -108,8 +117,9 @@ 1, 1000000 ], - "type": "number", - "default": 1 + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer" } }, { @@ -118,8 +128,9 @@ 0, 3600 ], - "type": "number", - "default": 1 + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number" } }, { @@ -128,34 +139,48 @@ 1, 1000000 ], - "type": "number", - "default": 10000 + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer" } }, { "max_bytes": { - "type": "number" + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." } }, { "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", "default": 60, "type": "number" } }, { "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", "type": "number" } }, { "max_retry_delay": { + "between": [ + 0.001, + 1000000 + ], "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", "type": "number" } } ], + "required": true, "type": "record" } }, @@ -163,78 +188,61 @@ "metrics": { "default": [ { - "stat_type": "counter", "tags": [ "app:kong" ], - "consumer_identifier": "custom_id", + "sample_rate": 1, + "stat_type": "counter", "name": "request_count", - "sample_rate": 1 + "consumer_identifier": "custom_id" }, { "stat_type": "timer", - "consumer_identifier": "custom_id", "name": "latency", "tags": [ "app:kong" - ] + ], + "consumer_identifier": "custom_id" }, { "stat_type": "timer", - "consumer_identifier": "custom_id", "name": "request_size", "tags": [ "app:kong" - ] + ], + "consumer_identifier": "custom_id" }, { "stat_type": "timer", - "consumer_identifier": "custom_id", "name": "response_size", "tags": [ "app:kong" - ] + ], + "consumer_identifier": "custom_id" }, { "stat_type": "timer", - "consumer_identifier": "custom_id", "name": "upstream_latency", "tags": [ "app:kong" - ] + ], + "consumer_identifier": "custom_id" }, { "stat_type": "timer", - "consumer_identifier": "custom_id", "name": "kong_latency", "tags": [ "app:kong" - ] + ], + "consumer_identifier": "custom_id" } ], "elements": { - "entity_checks": [ - { - "conditional": { - "if_match": { - "one_of": [ - "counter", - "gauge" - ] - }, - "then_field": "sample_rate", - "if_field": "stat_type", - "then_match": { - "required": true - } - } - } - ], "fields": [ { "name": { - "type": "string", "required": true, + "description": "Datadog metric’s name", "one_of": [ "kong_latency", "latency", @@ -242,13 +250,14 @@ "request_size", "response_size", "upstream_latency" - ] + ], + "type": "string" } }, { "stat_type": { - "type": "string", "required": true, + "description": "Determines what sort of event the metric represents", "one_of": [ "counter", "gauge", @@ -257,14 +266,16 @@ "set", "timer", "distribution" - ] + ], + "type": "string" } }, { "tags": { + "description": "List of tags", "elements": { - "match": "^.*[^:]$", - "type": "string" + "type": "string", + "match": "^.*[^:]$" }, "type": "array" } @@ -275,11 +286,13 @@ 0, 1 ], + "description": "Sampling rate", "type": "number" } }, { "consumer_identifier": { + "description": "Authenticated user detail", "one_of": [ "consumer_id", "custom_id", @@ -289,13 +302,43 @@ } } ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type" + } + } + ], "type": "record" }, - "required": true, - "type": "array" + "type": "array", + "description": "List of metrics to be logged.", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "retry_count", + "queue_size", + "flush_timeout" + ] } } ], + "required": true, "type": "record" } } diff --git a/schemas/degraphql/3.4.x.json b/schemas/degraphql/3.4.x.json index 53c9616a..66b1a91e 100644 --- a/schemas/degraphql/3.4.x.json +++ b/schemas/degraphql/3.4.x.json @@ -1,10 +1,14 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { @@ -24,29 +28,39 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "graphql_server_path": { + "default": "/graphql", + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/", + "required": true, "match_none": [ { - "err": "must not have empty segments", - "pattern": "//" + "pattern": "//", + "err": "must not have empty segments" } - ], - "starts_with": "/", - "required": true, - "default": "/graphql", - "type": "string" + ] } } ], + "required": true, "type": "record" } } diff --git a/schemas/exit-transformer/3.4.x.json b/schemas/exit-transformer/3.4.x.json index eb0f4934..98fba6ef 100644 --- a/schemas/exit-transformer/3.4.x.json +++ b/schemas/exit-transformer/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,36 +20,47 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "functions": { "required": true, - "type": "array", "elements": { "type": "string" - } + }, + "type": "array" } }, { "handle_unknown": { "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses.", "type": "boolean" } }, { "handle_unexpected": { "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses.", "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/file-log/3.4.x.json b/schemas/file-log/3.4.x.json index 785e02e3..0bf904fe 100644 --- a/schemas/file-log/3.4.x.json +++ b/schemas/file-log/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,43 +27,55 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "path": { - "match": "^[^*&%%\\`]+$", - "required": true, + "type": "string", "err": "not a valid filename", - "type": "string" + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "required": true, + "match": "^[^*&%%\\`]+$" } }, { "reopen": { + "description": "Determines whether the log file is closed and reopened on every request.", "default": false, - "type": "boolean", - "required": true + "required": true, + "type": "boolean" } }, { "custom_fields_by_lua": { - "type": "map", "keys": { "len_min": 1, "type": "string" }, + "description": "Lua code as a key-value map", "values": { - "type": "string", - "len_min": 1 - } + "len_min": 1, + "type": "string" + }, + "type": "map" } } ], + "required": true, "type": "record" } } diff --git a/schemas/forward-proxy/3.4.x.json b/schemas/forward-proxy/3.4.x.json index 54692ed8..ac1a8ce9 100644 --- a/schemas/forward-proxy/3.4.x.json +++ b/schemas/forward-proxy/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,66 +20,39 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "shorthand_fields": [ - { - "proxy_host": { - "type": "string" - } - }, - { - "proxy_port": { - "type": "integer" - } - } - ], - "entity_checks": [ - { - "at_least_one_of": [ - "http_proxy_host", - "https_proxy_host" - ] - }, - { - "at_least_one_of": [ - "http_proxy_port", - "https_proxy_port" - ] - }, - { - "mutually_required": [ - "http_proxy_host", - "http_proxy_port" - ] - }, - { - "mutually_required": [ - "https_proxy_host", - "https_proxy_port" - ] - } - ], "fields": [ { "x_headers": { + "default": "append", "type": "string", + "description": "Determines how to handle headers when forwarding the request.", + "required": true, "one_of": [ "append", "transparent", "delete" - ], - "required": true, - "default": "append" + ] } }, { "http_proxy_host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -85,12 +61,14 @@ 0, 65535 ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", "type": "integer" } }, { "https_proxy_host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -99,43 +77,86 @@ 0, 65535 ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", "type": "integer" } }, { "proxy_scheme": { + "default": "http", "type": "string", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "required": true, "one_of": [ "http" - ], - "required": true, - "default": "http" + ] } }, { "auth_username": { - "type": "string", "referenceable": true, - "required": false + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.", + "required": false, + "type": "string" } }, { "auth_password": { - "type": "string", "referenceable": true, - "required": false + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.", + "required": false, + "type": "string" } }, { "https_verify": { - "type": "boolean", + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", "default": false, - "required": true + "required": true, + "type": "boolean" } } ], + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "http_proxy_host", + "https_proxy_host" + ] + }, + { + "at_least_one_of": [ + "http_proxy_port", + "https_proxy_port" + ] + }, + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], "required": true, - "type": "record" + "shorthand_fields": [ + { + "proxy_host": { + "type": "string" + } + }, + { + "proxy_port": { + "type": "integer" + } + } + ] } } ] diff --git a/schemas/graphql-proxy-cache-advanced/3.4.x.json b/schemas/graphql-proxy-cache-advanced/3.4.x.json index e0c56352..c96124b0 100644 --- a/schemas/graphql-proxy-cache-advanced/3.4.x.json +++ b/schemas/graphql-proxy-cache-advanced/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,48 +20,60 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "strategy": { + "default": "memory", + "type": "string", + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", "required": true, "one_of": [ "memory" - ], - "type": "string", - "default": "memory" + ] } }, { "cache_ttl": { "default": 300, "gt": 0, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", "type": "integer" } }, { "memory": { - "required": true, "fields": [ { "dictionary_name": { "default": "kong_db_cache", - "type": "string", - "required": true + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "required": true, + "type": "string" } } ], + "required": true, "type": "record" } }, { "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", "elements": { "type": "string" }, @@ -66,6 +81,7 @@ } } ], + "required": true, "type": "record" } } diff --git a/schemas/graphql-rate-limiting-advanced/3.4.x.json b/schemas/graphql-rate-limiting-advanced/3.4.x.json index 26020240..cd9e1338 100644 --- a/schemas/graphql-rate-limiting-advanced/3.4.x.json +++ b/schemas/graphql-rate-limiting-advanced/3.4.x.json @@ -1,4 +1,13 @@ { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], "fields": [ { "protocols": { @@ -17,180 +26,142 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "identifier": { + "default": "consumer", + "type": "string", + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", "required": true, "one_of": [ "ip", "credential", "consumer" - ], - "type": "string", - "default": "consumer" + ] } }, { "window_size": { - "type": "array", "required": true, + "description": "One or more window sizes to apply a limit to (defined in seconds).", "elements": { "type": "number" - } + }, + "type": "array" } }, { "window_type": { - "type": "string", "default": "sliding", + "description": "Sets the time window to either `sliding` or `fixed`.", "one_of": [ "fixed", "sliding" - ] + ], + "type": "string" } }, { "limit": { - "type": "array", "required": true, + "description": "One or more requests-per-window limits to apply.", "elements": { "type": "number" - } + }, + "type": "array" } }, { "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", "required": true, "type": "number" } }, { "namespace": { - "auto": true, - "type": "string" + "description": "The rate limiting library namespace to use for this plugin instance.", + "type": "string", + "auto": true } }, { "strategy": { + "default": "cluster", + "type": "string", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", "required": true, "one_of": [ "cluster", "redis" - ], - "type": "string", - "default": "cluster" + ] } }, { "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", "required": true, - "type": "string", - "default": "kong_rate_limiting_counters" + "type": "string" } }, { "hide_client_headers": { "default": false, + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", "type": "boolean" } }, { "cost_strategy": { - "type": "string", "default": "default", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", "one_of": [ "default", "node_quantifier" - ] + ], + "type": "string" } }, { "score_factor": { - "required": false, + "default": 1, "type": "number", - "gt": 0, - "default": 1 + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "required": false, + "gt": 0 } }, { "max_cost": { + "default": 0, + "description": "A defined maximum cost per query. 0 means unlimited.", "required": false, - "type": "number", - "default": 0 + "type": "number" } }, { "redis": { - "required": true, - "entity_checks": [ - { - "mutually_exclusive_sets": { - "set1": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ], - "set2": [ - "host", - "port" - ] - } - }, - { - "mutually_exclusive_sets": { - "set1": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ], - "set2": [ - "cluster_addresses" - ] - } - }, - { - "mutually_exclusive_sets": { - "set1": [ - "cluster_addresses" - ], - "set2": [ - "host", - "port" - ] - } - }, - { - "mutually_required": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ] - }, - { - "mutually_required": [ - "host", - "port" - ] - }, - { - "mutually_required": [ - "connect_timeout", - "send_timeout", - "read_timeout" - ] - } - ], "fields": [ { "host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -199,6 +170,7 @@ 0, 65535 ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", "type": "integer" } }, @@ -208,8 +180,9 @@ 0, 2147483646 ], - "type": "integer", - "default": 2000 + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" } }, { @@ -218,6 +191,7 @@ 0, 2147483646 ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "type": "integer" } }, @@ -227,6 +201,7 @@ 0, 2147483646 ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "type": "integer" } }, @@ -236,39 +211,45 @@ 0, 2147483646 ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "type": "integer" } }, { "username": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" } }, { "password": { "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", "encrypted": true, "type": "string" } }, { "sentinel_username": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" } }, { "sentinel_password": { "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", "encrypted": true, "type": "string" } }, { "database": { - "type": "integer", - "default": 0 + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" } }, { @@ -278,6 +259,7 @@ 2147483646 ], "default": 30, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value.", "type": "integer" } }, @@ -287,16 +269,19 @@ 0, 2147483646 ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, all connection queues beyond the maximum limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued connect operations resume once the number of connections in the pool is less than `keepalive_pool_size`. Note that queued connect operations are subject to set timeouts.", "type": "integer" } }, { "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", "type": "string" } }, { "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", "one_of": [ "master", "slave", @@ -308,6 +293,7 @@ { "sentinel_addresses": { "len_min": 1, + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", "elements": { "type": "string" }, @@ -317,6 +303,7 @@ { "cluster_addresses": { "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", "elements": { "type": "string" }, @@ -325,6 +312,7 @@ }, { "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", "default": false, "required": false, "type": "boolean" @@ -332,6 +320,7 @@ }, { "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", "default": false, "required": false, "type": "boolean" @@ -339,15 +328,76 @@ }, { "server_name": { - "type": "string", - "required": false + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_addresses" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_addresses" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] } ], + "required": true, "type": "record" } } ], + "required": true, "type": "record" } } diff --git a/schemas/grpc-gateway/3.4.x.json b/schemas/grpc-gateway/3.4.x.json index 37de613e..352b5b76 100644 --- a/schemas/grpc-gateway/3.4.x.json +++ b/schemas/grpc-gateway/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,21 +27,31 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "proto": { - "type": "string", - "required": false + "description": "Describes the gRPC types and methods.", + "required": false, + "type": "string" } } ], + "required": true, "type": "record" } } diff --git a/schemas/grpc-web/3.4.x.json b/schemas/grpc-web/3.4.x.json index 0f63fb40..22523665 100644 --- a/schemas/grpc-web/3.4.x.json +++ b/schemas/grpc-web/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,34 +27,46 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "proto": { + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", "required": false, "type": "string" } }, { "pass_stripped_path": { - "type": "boolean", - "required": false + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "required": false, + "type": "boolean" } }, { "allow_origin_header": { - "type": "string", "default": "*", - "required": false + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "required": false, + "type": "string" } } ], + "required": true, "type": "record" } } diff --git a/schemas/hmac-auth/3.4.x.json b/schemas/hmac-auth/3.4.x.json index 4d4976dd..0adb9e80 100644 --- a/schemas/hmac-auth/3.4.x.json +++ b/schemas/hmac-auth/3.4.x.json @@ -1,14 +1,25 @@ { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.algorithms" + ] + } + } + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "protocols": { + "required": true, "default": [ "grpc", "grpcs", @@ -28,54 +39,71 @@ ], "type": "string" }, - "required": true, "type": "set" } }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" + } + }, { "config": { - "required": true, "fields": [ { "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", "required": true, - "type": "boolean", - "default": false + "type": "boolean" } }, { "clock_skew": { - "type": "number", "gt": 0, - "default": 300 + "description": "Clock skew in seconds to prevent replay attacks.", + "default": 300, + "type": "number" } }, { "anonymous": { - "type": "string" + "type": "string", + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails." } }, { "validate_request_body": { + "default": false, + "description": "A boolean value telling the plugin to enable body validation.", "required": true, - "type": "boolean", - "default": false + "type": "boolean" } }, { "enforce_headers": { - "type": "array", + "default": [ + + ], + "description": "A list of headers that the client should at least use for HTTP signature creation.", "elements": { "type": "string" }, - "default": [ - - ] + "type": "array" } }, { "algorithms": { - "type": "array", + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", "elements": { "one_of": [ "hmac-sha1", @@ -85,15 +113,11 @@ ], "type": "string" }, - "default": [ - "hmac-sha1", - "hmac-sha256", - "hmac-sha384", - "hmac-sha512" - ] + "type": "array" } } ], + "required": true, "type": "record" } } diff --git a/schemas/http-log/3.4.x.json b/schemas/http-log/3.4.x.json index b8877735..9bb62862 100644 --- a/schemas/http-log/3.4.x.json +++ b/schemas/http-log/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,85 +27,90 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "type": "record", - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "retry_count", - "queue_size", - "flush_timeout" - ] - } - } - ], "fields": [ { "http_endpoint": { + "referenceable": true, "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", "required": true, - "encrypted": true, - "referenceable": true + "encrypted": true } }, { "method": { - "type": "string", "default": "POST", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", "one_of": [ "POST", "PUT", "PATCH" - ] + ], + "type": "string" } }, { "content_type": { - "type": "string", "default": "application/json", + "description": "Indicates the type of data sent. The only available option is `application/json`.", "one_of": [ "application/json", "application/json; charset=utf-8" - ] + ], + "type": "string" } }, { "timeout": { "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", "type": "number" } }, { "keepalive": { "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", "type": "number" } }, { "retry_count": { - "type": "integer" + "type": "integer", + "description": "Number of times to retry when sending data to the upstream server." } }, { "queue_size": { - "type": "integer" + "type": "integer", + "description": "Maximum number of log entries to be sent on each message to the upstream server." } }, { "flush_timeout": { - "type": "number" + "type": "number", + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records." } }, { "headers": { - "type": "map", "keys": { + "description": "A string representing an HTTP header name.", "match_none": [ { "err": "cannot contain 'Host' header", @@ -118,15 +127,16 @@ ], "type": "string" }, + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", "values": { "referenceable": true, "type": "string" - } + }, + "type": "map" } }, { "queue": { - "required": true, "fields": [ { "max_batch_size": { @@ -134,8 +144,9 @@ 1, 1000000 ], - "type": "number", - "default": 1 + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer" } }, { @@ -144,8 +155,9 @@ 0, 3600 ], - "type": "number", - "default": 1 + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number" } }, { @@ -154,52 +166,79 @@ 1, 1000000 ], - "type": "number", - "default": 10000 + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer" } }, { "max_bytes": { - "type": "number" + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." } }, { "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", "default": 60, "type": "number" } }, { "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", "type": "number" } }, { "max_retry_delay": { + "between": [ + 0.001, + 1000000 + ], "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", "type": "number" } } ], + "required": true, "type": "record" } }, { "custom_fields_by_lua": { - "type": "map", "keys": { "len_min": 1, "type": "string" }, + "description": "Lua code as a key-value map", "values": { - "type": "string", - "len_min": 1 - } + "len_min": 1, + "type": "string" + }, + "type": "map" } } ], - "required": true + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "retry_count", + "queue_size", + "flush_timeout" + ] + } + } + ], + "required": true, + "type": "record" } } ] diff --git a/schemas/ip-restriction/3.4.x.json b/schemas/ip-restriction/3.4.x.json index e1992b07..7a3635e6 100644 --- a/schemas/ip-restriction/3.4.x.json +++ b/schemas/ip-restriction/3.4.x.json @@ -1,59 +1,91 @@ { + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ], "fields": [ { "protocols": { "default": [ - "grpc", - "grpcs", "http", - "https" + "https", + "tcp", + "tls", + "grpc", + "grpcs" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", "http", - "https" + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", "elements": { - "type": "string" + "type": "string", + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16." }, "type": "array" } }, { "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", "elements": { - "type": "string" + "type": "string", + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16." }, "type": "array" } }, { "status": { - "type": "number", - "required": false + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "required": false, + "type": "number" } }, { "message": { - "type": "string", - "required": false + "description": "The message to send as a response body to rejected requests.", + "required": false, + "type": "string" } } ], + "required": true, "type": "record" } } diff --git a/schemas/jq/3.4.x.json b/schemas/jq/3.4.x.json index dbbb2971..55ff9351 100644 --- a/schemas/jq/3.4.x.json +++ b/schemas/jq/3.4.x.json @@ -1,5 +1,16 @@ { + "entity_checks": [ + + ], "fields": [ + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" + } + }, { "protocols": { "default": [ @@ -17,21 +28,13 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true } }, { "config": { - "required": true, - "entity_checks": [ - { - "at_least_one_of": [ - "request_jq_program", - "response_jq_program" - ] - } - ], "fields": [ { "request_jq_program": { @@ -41,59 +44,59 @@ }, { "request_jq_program_options": { - "default": [ - - ], - "required": false, "fields": [ { "compact_output": { + "default": true, "required": true, - "type": "boolean", - "default": true + "type": "boolean" } }, { "raw_output": { + "default": false, "required": true, - "type": "boolean", - "default": false + "type": "boolean" } }, { "join_output": { + "default": false, "required": true, - "type": "boolean", - "default": false + "type": "boolean" } }, { "ascii_output": { + "default": false, "required": true, - "type": "boolean", - "default": false + "type": "boolean" } }, { "sort_keys": { + "default": false, "required": true, - "type": "boolean", - "default": false + "type": "boolean" } } ], + "default": [ + + ], + "required": false, "type": "record" } }, { "request_if_media_type": { - "elements": { - "type": "string" - }, + "required": false, "default": [ "application/json" ], - "required": false, + "elements": { + "type": "string" + }, "type": "array" } }, @@ -105,64 +108,68 @@ }, { "response_jq_program_options": { - "default": [ - - ], - "required": false, "fields": [ { "compact_output": { + "default": true, "required": true, - "type": "boolean", - "default": true + "type": "boolean" } }, { "raw_output": { + "default": false, "required": true, - "type": "boolean", - "default": false + "type": "boolean" } }, { "join_output": { + "default": false, "required": true, - "type": "boolean", - "default": false + "type": "boolean" } }, { "ascii_output": { + "default": false, "required": true, - "type": "boolean", - "default": false + "type": "boolean" } }, { "sort_keys": { + "default": false, "required": true, - "type": "boolean", - "default": false + "type": "boolean" } } ], + "default": [ + + ], + "required": false, "type": "record" } }, { "response_if_media_type": { - "elements": { - "type": "string" - }, + "required": false, "default": [ "application/json" ], - "required": false, + "elements": { + "type": "string" + }, "type": "array" } }, { "response_if_status_code": { + "required": false, + "default": [ + 200 + ], "elements": { "between": [ 100, @@ -170,14 +177,19 @@ ], "type": "integer" }, - "default": [ - 200 - ], - "required": false, "type": "array" } } ], + "entity_checks": [ + { + "at_least_one_of": [ + "request_jq_program", + "response_jq_program" + ] + } + ], + "required": true, "type": "record" } } diff --git a/schemas/jwe-decrypt/3.4.x.json b/schemas/jwe-decrypt/3.4.x.json index 7a9eaac7..9ababf9d 100644 --- a/schemas/jwe-decrypt/3.4.x.json +++ b/schemas/jwe-decrypt/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,51 +20,65 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "config": { - "required": true, "fields": [ { "lookup_header_name": { - "required": true, "default": "Authorization", + "description": "The name of the header to look for the JWE token.", + "required": true, "type": "string" } }, { "forward_header_name": { - "required": true, "default": "Authorization", + "description": "The name of the header that is used to set the decrypted value.", + "required": true, "type": "string" } }, { "key_sets": { "required": true, - "type": "array", + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "strict": { - "type": "boolean", - "default": true + "default": true, + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/jwt-signer/3.4.x.json b/schemas/jwt-signer/3.4.x.json index 7e889bba..46e468eb 100644 --- a/schemas/jwt-signer/3.4.x.json +++ b/schemas/jwt-signer/3.4.x.json @@ -1,10 +1,14 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { @@ -24,23 +28,33 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "realm": { - "type": "string", - "required": false + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "required": false, + "type": "string" } }, { "enable_hs_signatures": { "default": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", "required": false, "type": "boolean" } @@ -48,6 +62,7 @@ { "enable_instrumentation": { "default": false, + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", "required": false, "type": "boolean" } @@ -55,6 +70,7 @@ { "access_token_issuer": { "default": "kong", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", "required": false, "type": "string" } @@ -62,19 +78,22 @@ { "access_token_keyset": { "default": "kong", + "description": "The name of the keyset containing signing keys.", "required": false, "type": "string" } }, { "access_token_jwks_uri": { - "type": "string", - "required": false + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "required": false, + "type": "string" } }, { "access_token_request_header": { "default": "Authorization", + "description": "This parameter tells the name of the header where to look for the access token.", "required": false, "type": "string" } @@ -82,6 +101,7 @@ { "access_token_leeway": { "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", "required": false, "type": "number" } @@ -89,35 +109,42 @@ { "access_token_scopes_required": { "required": false, - "type": "array", + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "access_token_scopes_claim": { - "elements": { - "type": "string" - }, "default": [ "scope" ], + "elements": { + "type": "string" + }, "type": "array", + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", "required": false } }, { "access_token_consumer_claim": { "required": false, - "type": "array", + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "access_token_consumer_by": { + "default": [ + "username", + "custom_id" + ], "elements": { "one_of": [ "id", @@ -126,17 +153,15 @@ ], "type": "string" }, - "default": [ - "username", - "custom_id" - ], "type": "array", + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", "required": false } }, { "access_token_upstream_header": { "default": "Authorization:Bearer", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", "required": false, "type": "string" } @@ -144,31 +169,36 @@ { "access_token_upstream_leeway": { "default": 0, + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", "required": false, "type": "number" } }, { "access_token_introspection_endpoint": { - "type": "string", - "required": false + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "required": false, + "type": "string" } }, { "access_token_introspection_authorization": { - "type": "string", - "required": false + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "required": false, + "type": "string" } }, { "access_token_introspection_body_args": { - "type": "string", - "required": false + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "required": false, + "type": "string" } }, { "access_token_introspection_hint": { "default": "access_token", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", "required": false, "type": "string" } @@ -176,44 +206,52 @@ { "access_token_introspection_jwt_claim": { "required": false, - "type": "array", + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "access_token_introspection_scopes_required": { "required": false, - "type": "array", + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "access_token_introspection_scopes_claim": { - "elements": { - "type": "string" - }, "default": [ "scope" ], + "elements": { + "type": "string" + }, "type": "array", + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", "required": true } }, { "access_token_introspection_consumer_claim": { "required": false, - "type": "array", + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "access_token_introspection_consumer_by": { + "default": [ + "username", + "custom_id" + ], "elements": { "one_of": [ "id", @@ -222,30 +260,32 @@ ], "type": "string" }, - "default": [ - "username", - "custom_id" - ], "type": "array", + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", "required": false } }, { "access_token_introspection_leeway": { "default": 0, + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", "required": false, "type": "number" } }, { "access_token_introspection_timeout": { - "type": "number", - "required": false + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "required": false, + "type": "number" } }, { "access_token_signing_algorithm": { + "default": "RS256", "type": "string", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "required": true, "one_of": [ "HS256", "HS384", @@ -259,14 +299,13 @@ "PS384", "PS512", "EdDSA" - ], - "default": "RS256", - "required": true + ] } }, { "access_token_optional": { "default": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", "required": false, "type": "boolean" } @@ -274,6 +313,7 @@ { "verify_access_token_signature": { "default": true, + "description": "Quickly turn access token signature verification off and on as needed.", "required": false, "type": "boolean" } @@ -281,6 +321,7 @@ { "verify_access_token_expiry": { "default": true, + "description": "Quickly turn access token expiry verification off and on as needed.", "required": false, "type": "boolean" } @@ -288,6 +329,7 @@ { "verify_access_token_scopes": { "default": true, + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", "required": false, "type": "boolean" } @@ -295,6 +337,7 @@ { "verify_access_token_introspection_expiry": { "default": true, + "description": "Quickly turn access token introspection expiry verification off and on as needed.", "required": false, "type": "boolean" } @@ -302,6 +345,7 @@ { "verify_access_token_introspection_scopes": { "default": true, + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", "required": false, "type": "boolean" } @@ -309,6 +353,7 @@ { "cache_access_token_introspection": { "default": true, + "description": "Whether to cache access token introspection results.", "required": false, "type": "boolean" } @@ -316,6 +361,7 @@ { "trust_access_token_introspection": { "default": true, + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", "required": false, "type": "boolean" } @@ -323,6 +369,7 @@ { "enable_access_token_introspection": { "default": true, + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", "required": false, "type": "boolean" } @@ -330,6 +377,7 @@ { "channel_token_issuer": { "default": "kong", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", "required": false, "type": "string" } @@ -337,25 +385,29 @@ { "channel_token_keyset": { "default": "kong", + "description": "The name of the keyset containing signing keys.", "required": false, "type": "string" } }, { "channel_token_jwks_uri": { - "type": "string", - "required": false + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "required": false, + "type": "string" } }, { "channel_token_request_header": { - "type": "string", - "required": false + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "required": false, + "type": "string" } }, { "channel_token_leeway": { "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", "required": false, "type": "number" } @@ -363,36 +415,43 @@ { "channel_token_scopes_required": { "required": false, - "type": "array", + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "channel_token_scopes_claim": { - "elements": { - "type": "string" - }, "default": [ "scope" ], + "elements": { + "type": "string" + }, "type": "array", + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", "required": false } }, { "channel_token_consumer_claim": { "required": false, - "type": "array", + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "channel_token_consumer_by": { - "type": "array", + "default": [ + "username", + "custom_id" + ], + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", "elements": { "one_of": [ "id", @@ -401,99 +460,110 @@ ], "type": "string" }, - "default": [ - "username", - "custom_id" - ] + "type": "array" } }, { "channel_token_upstream_header": { - "type": "string", - "required": false + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "required": false, + "type": "string" } }, { "channel_token_upstream_leeway": { "default": 0, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", "required": false, "type": "number" } }, { "channel_token_introspection_endpoint": { - "type": "string", - "required": false + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "required": false, + "type": "string" } }, { "channel_token_introspection_authorization": { "required": false, - "type": "string", + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", "elements": { "type": "string" - } + }, + "type": "string" } }, { "channel_token_introspection_body_args": { "required": false, - "type": "string", + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", "elements": { "type": "string" - } + }, + "type": "string" } }, { "channel_token_introspection_hint": { "required": false, - "type": "string", + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", "elements": { "type": "string" - } + }, + "type": "string" } }, { "channel_token_introspection_jwt_claim": { "required": false, - "type": "array", + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "channel_token_introspection_scopes_required": { "required": false, - "type": "array", + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "channel_token_introspection_scopes_claim": { - "elements": { - "type": "string" - }, "default": [ "scope" ], + "elements": { + "type": "string" + }, "type": "array", + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", "required": false } }, { "channel_token_introspection_consumer_claim": { "required": false, - "type": "array", + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", "elements": { "type": "string" - } + }, + "type": "array" } }, { "channel_token_introspection_consumer_by": { + "default": [ + "username", + "custom_id" + ], "elements": { "one_of": [ "id", @@ -502,30 +572,32 @@ ], "type": "string" }, - "default": [ - "username", - "custom_id" - ], "type": "array", + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", "required": false } }, { "channel_token_introspection_leeway": { "default": 0, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", "required": false, "type": "number" } }, { "channel_token_introspection_timeout": { - "type": "number", - "required": false + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "required": false, + "type": "number" } }, { "channel_token_signing_algorithm": { + "default": "RS256", "type": "string", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "required": true, "one_of": [ "HS256", "HS384", @@ -539,14 +611,13 @@ "PS384", "PS512", "EdDSA" - ], - "default": "RS256", - "required": true + ] } }, { "channel_token_optional": { "default": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", "required": false, "type": "boolean" } @@ -554,6 +625,7 @@ { "verify_channel_token_signature": { "default": true, + "description": "Quickly turn on/off the channel token signature verification.", "required": false, "type": "boolean" } @@ -568,6 +640,7 @@ { "verify_channel_token_scopes": { "default": true, + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", "required": false, "type": "boolean" } @@ -575,6 +648,7 @@ { "verify_channel_token_introspection_expiry": { "default": true, + "description": "Quickly turn on/off the channel token introspection expiry verification.", "required": false, "type": "boolean" } @@ -582,6 +656,7 @@ { "verify_channel_token_introspection_scopes": { "default": true, + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", "required": false, "type": "boolean" } @@ -589,6 +664,7 @@ { "cache_channel_token_introspection": { "default": true, + "description": "Whether to cache channel token introspection results.", "required": false, "type": "boolean" } @@ -596,6 +672,7 @@ { "trust_channel_token_introspection": { "default": true, + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", "required": false, "type": "boolean" } @@ -603,41 +680,45 @@ { "enable_channel_token_introspection": { "default": true, + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", "required": false, "type": "boolean" } }, { "add_claims": { - "values": { - "type": "string" - }, "default": [ ], + "values": { + "type": "string" + }, + "type": "map", + "description": "Add customized claims if they are not present yet.", "keys": { "type": "string" }, - "required": false, - "type": "map" + "required": false } }, { "set_claims": { - "values": { - "type": "string" - }, "default": [ ], + "values": { + "type": "string" + }, + "type": "map", + "description": "Set customized claims. If a claim is already present, it will be overwritten.", "keys": { "type": "string" }, - "required": false, - "type": "map" + "required": false } } ], + "required": true, "type": "record" } } diff --git a/schemas/jwt/3.4.x.json b/schemas/jwt/3.4.x.json index 63d063a7..96388cfa 100644 --- a/schemas/jwt/3.4.x.json +++ b/schemas/jwt/3.4.x.json @@ -1,10 +1,25 @@ { + "entity_checks": [ + { + "conditional": { + "then_match": { + "contains": "exp" + }, + "if_match": { + "gt": 0 + }, + "then_field": "config.claims_to_verify", + "if_field": "config.maximum_expiration" + } + } + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { @@ -24,51 +39,64 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "uri_param_names": { - "type": "set", + "default": [ + "jwt" + ], + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", "elements": { "type": "string" }, - "default": [ - "jwt" - ] + "type": "set" } }, { "cookie_names": { - "type": "set", + "default": [ + + ], + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", "elements": { "type": "string" }, - "default": [ - - ] + "type": "set" } }, { "key_claim_name": { "default": "iss", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", "type": "string" } }, { "secret_is_base64": { "default": false, + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", "required": true, "type": "boolean" } }, { "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", "elements": { "one_of": [ "exp", @@ -81,12 +109,14 @@ }, { "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", "type": "string" } }, { "run_on_preflight": { "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", "required": true, "type": "boolean" } @@ -97,22 +127,25 @@ 0, 31536000 ], - "type": "number", - "default": 0 + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "default": 0, + "type": "number" } }, { "header_names": { - "type": "set", + "default": [ + "authorization" + ], + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", "elements": { "type": "string" }, - "default": [ - "authorization" - ] + "type": "set" } } ], + "required": true, "type": "record" } } diff --git a/schemas/kafka-log/3.4.x.json b/schemas/kafka-log/3.4.x.json index 2b8e5c19..a7b21bb3 100644 --- a/schemas/kafka-log/3.4.x.json +++ b/schemas/kafka-log/3.4.x.json @@ -1,7 +1,11 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { + "required": true, "default": [ "grpc", "grpcs", @@ -21,31 +25,30 @@ ], "type": "string" }, - "required": true, "type": "set" } }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" + } + }, { "config": { - "required": true, - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "authentication" - ] - } - } - ], "fields": [ { "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", "elements": { "fields": [ { "host": { - "type": "string", - "required": true + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" } }, { @@ -54,8 +57,9 @@ 0, 65535 ], - "type": "integer", - "required": true + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "type": "integer" } } ], @@ -66,166 +70,209 @@ }, { "topic": { + "description": "The Kafka topic to publish to.", "required": true, "type": "string" } }, { "timeout": { + "description": "Socket timeout in milliseconds.", "default": 10000, "type": "integer" } }, { "keepalive": { - "default": 60000, - "type": "integer" + "type": "integer", + "default": 60000 } }, { "keepalive_enabled": { - "default": false, - "type": "boolean" + "type": "boolean", + "default": false } }, { "authentication": { - "required": true, "fields": [ { "strategy": { "required": false, - "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", "one_of": [ "sasl" - ] + ], + "type": "string" } }, { "mechanism": { "required": false, - "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", "one_of": [ "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" - ] + ], + "type": "string" } }, { "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", "required": false, "type": "boolean" } }, { "user": { + "referenceable": true, "type": "string", + "description": "Username for SASL authentication.", "encrypted": true, - "referenceable": true, "required": false } }, { "password": { + "referenceable": true, "type": "string", + "description": "Password for SASL authentication.", "encrypted": true, - "referenceable": true, "required": false } } ], + "required": true, "type": "record" } }, { "security": { - "required": true, "fields": [ { "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", "uuid": true, - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "ssl": { + "description": "Enables TLS.", "required": false, "type": "boolean" } } ], + "required": true, "type": "record" } }, { "cluster_name": { - "required": false, "auto": true, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "required": false, "type": "string" } }, { "producer_request_acks": { + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", "default": 1, - "type": "integer", "one_of": [ -1, 0, 1 - ] + ], + "type": "integer" } }, { "producer_request_timeout": { + "description": "Time to wait for a Produce response in milliseconds", "default": 2000, "type": "integer" } }, { "producer_request_limits_messages_per_request": { + "description": "Maximum number of messages to include into a single Produce request.", "default": 200, "type": "integer" } }, { "producer_request_limits_bytes_per_request": { + "description": "Maximum size of a Produce request in bytes.", "default": 1048576, "type": "integer" } }, { "producer_request_retries_max_attempts": { + "description": "Maximum number of retry attempts per single Produce request.", "default": 10, "type": "integer" } }, { "producer_request_retries_backoff_timeout": { + "description": "Backoff interval between retry attempts in milliseconds.", "default": 100, "type": "integer" } }, { "producer_async": { + "description": "Flag to enable asynchronous mode.", "default": true, "type": "boolean" } }, { "producer_async_flush_timeout": { + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", "default": 1000, "type": "integer" } }, { "producer_async_buffering_limits_messages_in_memory": { + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", "default": 50000, "type": "integer" } + }, + { + "custom_fields_by_lua": { + "keys": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + }, + "type": "map" + } } ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "required": true, "type": "record" } } diff --git a/schemas/kafka-upstream/3.4.x.json b/schemas/kafka-upstream/3.4.x.json index e06ee2d2..377f73f6 100644 --- a/schemas/kafka-upstream/3.4.x.json +++ b/schemas/kafka-upstream/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,41 +20,32 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "forward_method", - "forward_uri", - "forward_headers", - "forward_body" - ] - } - }, - { - "custom_entity_check": { - "field_sources": [ - "authentication" - ] - } - } - ], "fields": [ { "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", "elements": { "fields": [ { "host": { - "type": "string", - "required": true + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" } }, { @@ -60,8 +54,9 @@ 0, 65535 ], - "type": "integer", - "required": true + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "type": "integer" } } ], @@ -72,20 +67,23 @@ }, { "topic": { - "type": "string", - "required": true + "description": "The Kafka topic to publish to.", + "required": true, + "type": "string" } }, { "timeout": { - "type": "integer", - "default": 10000 + "description": "Socket timeout in milliseconds.", + "default": 10000, + "type": "integer" } }, { "keepalive": { - "type": "integer", - "default": 60000 + "description": "Keepalive timeout in milliseconds.", + "default": 60000, + "type": "integer" } }, { @@ -96,38 +94,41 @@ }, { "authentication": { - "required": true, "fields": [ { "strategy": { "required": false, - "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", "one_of": [ "sasl" - ] + ], + "type": "string" } }, { "mechanism": { "required": false, - "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", "one_of": [ "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" - ] + ], + "type": "string" } }, { "tokenauth": { - "type": "boolean", - "required": false + "description": "Enable this to indicate `DelegationToken` authentication.", + "required": false, + "type": "boolean" } }, { "user": { "referenceable": true, "type": "string", + "description": "Username for SASL authentication.", "encrypted": true, "required": false } @@ -136,126 +137,164 @@ "password": { "referenceable": true, "type": "string", + "description": "Password for SASL authentication.", "encrypted": true, "required": false } } ], + "required": true, "type": "record" } }, { "security": { - "required": true, "fields": [ { "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", "uuid": true, - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "ssl": { - "type": "boolean", - "required": false + "description": "Enables TLS.", + "required": false, + "type": "boolean" } } ], + "required": true, "type": "record" } }, { "forward_method": { - "type": "boolean", - "default": false + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": false, + "type": "boolean" } }, { "forward_uri": { - "type": "boolean", - "default": false + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": false, + "type": "boolean" } }, { "forward_headers": { - "type": "boolean", - "default": false + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": false, + "type": "boolean" } }, { "forward_body": { - "type": "boolean", - "default": true + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": true, + "type": "boolean" } }, { "cluster_name": { - "required": false, "auto": true, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "required": false, "type": "string" } }, { "producer_request_acks": { + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", "default": 1, - "type": "integer", "one_of": [ -1, 0, 1 - ] + ], + "type": "integer" } }, { "producer_request_timeout": { - "type": "integer", - "default": 2000 + "description": "Time to wait for a Produce response in milliseconds.", + "default": 2000, + "type": "integer" } }, { "producer_request_limits_messages_per_request": { - "type": "integer", - "default": 200 + "description": "Maximum number of messages to include into a single producer request.", + "default": 200, + "type": "integer" } }, { "producer_request_limits_bytes_per_request": { - "type": "integer", - "default": 1048576 + "description": "Maximum size of a Produce request in bytes.", + "default": 1048576, + "type": "integer" } }, { "producer_request_retries_max_attempts": { - "type": "integer", - "default": 10 + "description": "Maximum number of retry attempts per single Produce request.", + "default": 10, + "type": "integer" } }, { "producer_request_retries_backoff_timeout": { - "type": "integer", - "default": 100 + "description": "Backoff interval between retry attempts in milliseconds.", + "default": 100, + "type": "integer" } }, { "producer_async": { - "type": "boolean", - "default": true + "description": "Flag to enable asynchronous mode.", + "default": true, + "type": "boolean" } }, { "producer_async_flush_timeout": { - "type": "integer", - "default": 1000 + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "default": 1000, + "type": "integer" } }, { "producer_async_buffering_limits_messages_in_memory": { - "type": "integer", - "default": 50000 + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "default": 50000, + "type": "integer" } } ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "required": true, "type": "record" } } diff --git a/schemas/key-auth-enc/3.4.x.json b/schemas/key-auth-enc/3.4.x.json index 4c92373b..5e24d162 100644 --- a/schemas/key-auth-enc/3.4.x.json +++ b/schemas/key-auth-enc/3.4.x.json @@ -1,14 +1,19 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "protocols": { + "required": true, "default": [ "grpc", "grpcs", @@ -28,62 +33,77 @@ ], "type": "string" }, - "required": true, "type": "set" } }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" + } + }, { "config": { - "required": true, "fields": [ { "key_names": { - "elements": { - "type": "string" - }, "default": [ "apikey" ], - "required": true, - "type": "array" + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "type": "array", + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "required": true } }, { "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", "default": false, "type": "boolean" } }, { "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", "type": "string" } }, { "key_in_header": { + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", "default": true, "type": "boolean" } }, { "key_in_query": { + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", "default": true, "type": "boolean" } }, { "key_in_body": { + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", "default": false, "type": "boolean" } }, { "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", "default": true, "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/key-auth/3.4.x.json b/schemas/key-auth/3.4.x.json index 4c8e5f56..a906f991 100644 --- a/schemas/key-auth/3.4.x.json +++ b/schemas/key-auth/3.4.x.json @@ -1,14 +1,19 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "protocols": { + "required": true, "default": [ "grpc", "grpcs", @@ -28,67 +33,82 @@ ], "type": "string" }, - "required": true, "type": "set" } }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" + } + }, { "config": { - "required": true, "fields": [ { "key_names": { - "elements": { - "type": "string" - }, "default": [ "apikey" ], - "required": true, - "type": "array" + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "type": "array", + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "required": true } }, { "hide_credentials": { - "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", "default": false, - "required": true + "required": true, + "type": "boolean" } }, { "anonymous": { - "type": "string" + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`." } }, { "key_in_header": { - "type": "boolean", + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", "default": true, - "required": true + "required": true, + "type": "boolean" } }, { "key_in_query": { - "type": "boolean", + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", "default": true, - "required": true + "required": true, + "type": "boolean" } }, { "key_in_body": { - "type": "boolean", + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", "default": false, - "required": true + "required": true, + "type": "boolean" } }, { "run_on_preflight": { - "type": "boolean", + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", "default": true, - "required": true + "required": true, + "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/konnect-application-auth/3.4.x.json b/schemas/konnect-application-auth/3.4.x.json index b02fdd98..0d88c352 100644 --- a/schemas/konnect-application-auth/3.4.x.json +++ b/schemas/konnect-application-auth/3.4.x.json @@ -1,17 +1,22 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "route": { + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed.", "eq": null, - "reference": "routes", - "type": "foreign" + "reference": "routes" } }, { @@ -31,48 +36,61 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, - "entity_checks": [ - - ], "fields": [ { "key_names": { - "elements": { - "type": "string" - }, "default": [ "apikey" ], - "required": true, - "type": "array" + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "type": "array", + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "required": true } }, { "auth_type": { "default": "openid-connect", + "type": "string", + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth'.", + "required": true, "one_of": [ "openid-connect", "key-auth" - ], - "type": "string", - "required": true + ] } }, { "scope": { - "required": true, "unique": true, + "description": "The unique scope identifier for the plugin configuration.", + "required": true, "type": "string" } } ], + "entity_checks": [ + + ], + "required": true, "type": "record" } } diff --git a/schemas/ldap-auth-advanced/3.4.x.json b/schemas/ldap-auth-advanced/3.4.x.json index cb36db07..e19d447e 100644 --- a/schemas/ldap-auth-advanced/3.4.x.json +++ b/schemas/ldap-auth-advanced/3.4.x.json @@ -1,7 +1,17 @@ { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], "fields": [ { "protocols": { + "required": true, "default": [ "grpc", "grpcs", @@ -21,48 +31,60 @@ ], "type": "string" }, - "required": true, "type": "set" } }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" + } + }, { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "config": { - "required": true, "fields": [ { "ldap_host": { - "type": "string", - "required": true + "description": "Host on which the LDAP server is running.", + "required": true, + "type": "string" } }, { "ldap_password": { - "encrypted": true, "referenceable": true, + "description": "The password to the LDAP server.", + "encrypted": true, "type": "string" } }, { "ldap_port": { - "type": "number", - "default": 389 + "default": 389, + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number" } }, { "bind_dn": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.", + "type": "string" } }, { "ldaps": { + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", "default": false, "required": true, "type": "boolean" @@ -70,6 +92,7 @@ }, { "start_tls": { + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", "default": false, "required": true, "type": "boolean" @@ -77,6 +100,7 @@ }, { "verify_ldap_host": { + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", "default": false, "required": true, "type": "boolean" @@ -84,18 +108,21 @@ }, { "base_dn": { - "type": "string", - "required": true + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "required": true, + "type": "string" } }, { "attribute": { - "type": "string", - "required": true + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "required": true, + "type": "string" } }, { "cache_ttl": { + "description": "Cache expiry time in seconds.", "default": 60, "required": true, "type": "number" @@ -103,37 +130,43 @@ }, { "hide_credentials": { - "type": "boolean", - "default": false + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" } }, { "timeout": { - "type": "number", - "default": 10000 + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" } }, { "keepalive": { - "type": "number", - "default": 60000 + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" } }, { "anonymous": { "len_min": 0, - "type": "string", - "default": "" + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" } }, { "header_type": { - "type": "string", - "default": "ldap" + "default": "ldap", + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string" } }, { "consumer_optional": { + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", "default": false, "required": false, "type": "boolean" @@ -141,6 +174,10 @@ }, { "consumer_by": { + "default": [ + "username", + "custom_id" + ], "elements": { "one_of": [ "username", @@ -148,32 +185,33 @@ ], "type": "string" }, - "default": [ - "username", - "custom_id" - ], "type": "array", + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", "required": false } }, { "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", "type": "string" } }, { "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", "type": "string" } }, { "group_member_attribute": { - "type": "string", - "default": "memberOf" + "default": "memberOf", + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string" } }, { "log_search_results": { + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", "default": false, "required": false, "type": "boolean" @@ -181,14 +219,16 @@ }, { "groups_required": { - "type": "array", "required": false, + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", "elements": { "type": "string" - } + }, + "type": "array" } } ], + "required": true, "type": "record" } } diff --git a/schemas/ldap-auth/3.4.x.json b/schemas/ldap-auth/3.4.x.json index 41b527b8..9cce316e 100644 --- a/schemas/ldap-auth/3.4.x.json +++ b/schemas/ldap-auth/3.4.x.json @@ -1,14 +1,19 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "protocols": { + "required": true, "default": [ "grpc", "grpcs", @@ -28,49 +33,43 @@ ], "type": "string" }, - "required": true, "type": "set" } }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" + } + }, { "config": { - "required": true, - "entity_checks": [ - { - "conditional": { - "then_err": "'ldaps' and 'start_tls' cannot be enabled simultaneously", - "if_match": { - "eq": true - }, - "then_field": "start_tls", - "if_field": "ldaps", - "then_match": { - "eq": false - } - } - } - ], "fields": [ { "ldap_host": { - "type": "string", - "required": true + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" } }, { "ldap_port": { + "default": 389, "type": "integer", "between": [ 0, 65535 ], - "required": true, - "default": 389 + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true } }, { "ldaps": { "default": false, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", "required": true, "type": "boolean" } @@ -78,6 +77,7 @@ { "start_tls": { "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", "required": true, "type": "boolean" } @@ -85,18 +85,21 @@ { "verify_ldap_host": { "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", "required": true, "type": "boolean" } }, { "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", "required": true, "type": "string" } }, { "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", "required": true, "type": "string" } @@ -104,6 +107,7 @@ { "cache_ttl": { "default": 60, + "description": "Cache expiry time in seconds.", "required": true, "type": "number" } @@ -111,6 +115,7 @@ { "hide_credentials": { "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", "required": true, "type": "boolean" } @@ -118,27 +123,47 @@ { "timeout": { "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", "type": "number" } }, { "keepalive": { "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", "type": "number" } }, { "anonymous": { - "type": "string" + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`." } }, { "header_type": { "default": "ldap", + "description": "An optional string to use as part of the Authorization header", "type": "string" } } ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "eq": false + }, + "then_err": "'ldaps' and 'start_tls' cannot be enabled simultaneously", + "if_match": { + "eq": true + }, + "then_field": "start_tls", + "if_field": "ldaps" + } + } + ], + "required": true, "type": "record" } } diff --git a/schemas/loggly/3.4.x.json b/schemas/loggly/3.4.x.json index ed600985..be9fe1b5 100644 --- a/schemas/loggly/3.4.x.json +++ b/schemas/loggly/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,18 +27,27 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "host": { - "type": "string", - "default": "logs-01.loggly.com" + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com.", + "type": "string" } }, { @@ -43,32 +56,32 @@ 0, 65535 ], - "type": "integer", - "default": 514 + "default": 514, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" } }, { "key": { - "type": "string", - "required": true, + "referenceable": true, "encrypted": true, - "referenceable": true + "required": true, + "type": "string" } }, { "tags": { - "type": "set", "default": [ "kong" ], "elements": { "type": "string" - } + }, + "type": "set" } }, { "log_level": { - "type": "string", "default": "info", "one_of": [ "debug", @@ -79,12 +92,12 @@ "crit", "alert", "emerg" - ] + ], + "type": "string" } }, { "successful_severity": { - "type": "string", "default": "info", "one_of": [ "debug", @@ -95,12 +108,12 @@ "crit", "alert", "emerg" - ] + ], + "type": "string" } }, { "client_errors_severity": { - "type": "string", "default": "info", "one_of": [ "debug", @@ -111,12 +124,12 @@ "crit", "alert", "emerg" - ] + ], + "type": "string" } }, { "server_errors_severity": { - "type": "string", "default": "info", "one_of": [ "debug", @@ -127,29 +140,32 @@ "crit", "alert", "emerg" - ] + ], + "type": "string" } }, { "timeout": { - "default": 10000, - "type": "number" + "type": "number", + "default": 10000 } }, { "custom_fields_by_lua": { - "type": "map", "keys": { "len_min": 1, "type": "string" }, + "description": "Lua code as a key-value map", "values": { - "type": "string", - "len_min": 1 - } + "len_min": 1, + "type": "string" + }, + "type": "map" } } ], + "required": true, "type": "record" } } diff --git a/schemas/mocking/3.4.x.json b/schemas/mocking/3.4.x.json index 6c2bfd09..ad536361 100644 --- a/schemas/mocking/3.4.x.json +++ b/schemas/mocking/3.4.x.json @@ -1,4 +1,12 @@ { + "entity_checks": [ + { + "at_least_one_of": [ + "config.api_specification_filename", + "config.api_specification" + ] + } + ], "fields": [ { "protocols": { @@ -17,52 +25,67 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "api_specification_filename": { - "type": "string", - "required": false + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "required": false, + "type": "string" } }, { "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", "required": false, "type": "string" } }, { "random_delay": { - "type": "boolean", - "default": false + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "default": false, + "type": "boolean" } }, { "max_delay_time": { - "type": "number", - "default": 1 + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "default": 1, + "type": "number" } }, { "min_delay_time": { - "type": "number", - "default": 0.001 + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "default": 0.001, + "type": "number" } }, { "random_examples": { - "type": "boolean", - "default": false + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "default": false, + "type": "boolean" } }, { "included_status_codes": { + "description": "A global list of the HTTP status codes that can only be selected and returned.", "elements": { "type": "integer" }, @@ -71,12 +94,14 @@ }, { "random_status_code": { - "required": true, + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", "default": false, + "required": true, "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/mtls-auth/3.4.x.json b/schemas/mtls-auth/3.4.x.json index 369d2ebd..32d7171e 100644 --- a/schemas/mtls-auth/3.4.x.json +++ b/schemas/mtls-auth/3.4.x.json @@ -1,10 +1,14 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { @@ -24,35 +28,34 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, - "entity_checks": [ - { - "mutually_required": [ - "http_proxy_host", - "http_proxy_port" - ] - }, - { - "mutually_required": [ - "https_proxy_host", - "https_proxy_port" - ] - } - ], "fields": [ { "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", "type": "string" } }, { "consumer_by": { + "default": [ + "username", + "custom_id" + ], "elements": { "one_of": [ "username", @@ -60,89 +63,96 @@ ], "type": "string" }, - "default": [ - "username", - "custom_id" - ], - "required": false, - "type": "array" + "type": "array", + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "required": false } }, { "ca_certificates": { "required": true, - "type": "array", + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", "elements": { "uuid": true, "type": "string" - } + }, + "type": "array" } }, { "cache_ttl": { - "type": "number", + "default": 60, + "description": "Cache expiry time in seconds.", "required": true, - "default": 60 + "type": "number" } }, { "skip_consumer_lookup": { - "type": "boolean", + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", "required": true, - "default": false + "type": "boolean" } }, { "allow_partial_chain": { - "type": "boolean", + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", "required": true, - "default": false + "type": "boolean" } }, { "authenticated_group_by": { "default": "CN", + "type": "string", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "required": false, "one_of": [ "CN", "DN" - ], - "type": "string", - "required": false + ] } }, { "revocation_check_mode": { "default": "IGNORE_CA_ERROR", + "type": "string", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "required": false, "one_of": [ "SKIP", "IGNORE_CA_ERROR", "STRICT" - ], - "type": "string", - "required": false + ] } }, { "http_timeout": { "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", "type": "number" } }, { "cert_cache_ttl": { "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", "type": "number" } }, { "send_ca_dn": { "default": false, + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", "type": "boolean" } }, { "http_proxy_host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -151,12 +161,14 @@ 0, 65535 ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", "type": "integer" } }, { "https_proxy_host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -165,10 +177,26 @@ 0, 65535 ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", "type": "integer" } } ], + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "required": true, "type": "record" } } diff --git a/schemas/oas-validation/3.4.x.json b/schemas/oas-validation/3.4.x.json index 97a7361e..7641383b 100644 --- a/schemas/oas-validation/3.4.x.json +++ b/schemas/oas-validation/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,98 +20,119 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "api_spec": { - "type": "string", - "required": true + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URL encoded to preserve the YAML format.", + "required": true, + "type": "string" } }, { "verbose_response": { + "default": false, + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "validate_request_body": { + "default": true, + "description": "If set to true, validates the request body content against the API specification.", "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "notify_only_request_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "validate_request_header_params": { + "default": true, + "description": "If set to true, validates HTTP header parameters against the API specification.", "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "validate_request_query_params": { + "default": true, + "description": "If set to true, validates query parameters against the API specification.", "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "validate_request_uri_params": { + "default": true, + "description": "If set to true, validates URI parameters in the request against the API specification.", "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "validate_response_body": { + "default": false, + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "notify_only_response_body_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "query_parameter_check": { + "default": false, + "description": "If set to true, checks if query parameters in the request exist in the API specification.", "required": true, - "type": "boolean", - "default": false + "type": "boolean" } }, { "header_parameter_check": { + "default": false, + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", "required": true, - "type": "boolean", - "default": false + "type": "boolean" } }, { "allowed_header_parameters": { + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", "required": false, - "type": "string", - "default": "Host,Content-Type,User-Agent,Accept,Content-Length" + "type": "string" } } ], + "required": true, "type": "record" } } diff --git a/schemas/oauth2-introspection/3.4.x.json b/schemas/oauth2-introspection/3.4.x.json index 3157912f..b7fc57b9 100644 --- a/schemas/oauth2-introspection/3.4.x.json +++ b/schemas/oauth2-introspection/3.4.x.json @@ -1,10 +1,14 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { @@ -24,114 +28,136 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "introspection_url": { - "type": "string", - "required": true + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" } }, { "ttl": { - "type": "number", - "default": 30 + "default": 30, + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number" } }, { "token_type_hint": { - "type": "string" + "type": "string", + "description": "The `token_type_hint` value to associate to introspection requests." } }, { "authorization_value": { - "type": "string", - "required": true + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).", + "required": true, + "type": "string" } }, { "timeout": { - "type": "integer", - "default": 10000 + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer" } }, { "keepalive": { - "type": "integer", - "default": 60000 + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer" } }, { "introspect_request": { - "required": true, "default": false, + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "required": true, "type": "boolean" } }, { "hide_credentials": { - "type": "boolean", - "default": false + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean" } }, { "run_on_preflight": { - "type": "boolean", - "default": true + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" } }, { "anonymous": { "len_min": 0, - "type": "string", - "default": "" + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "default": "", + "type": "string" } }, { "consumer_by": { "default": "username", + "type": "string", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "required": true, "one_of": [ "username", "client_id" - ], - "type": "string", - "required": true + ] } }, { "custom_introspection_headers": { - "values": { - "type": "string" - }, "default": [ ], + "values": { + "type": "string" + }, + "type": "map", + "description": "A list of custom headers to be added in the introspection request.", "keys": { "type": "string" }, - "required": true, - "type": "map" + "required": true } }, { "custom_claims_forward": { - "elements": { - "type": "string" - }, "default": [ ], + "elements": { + "type": "string" + }, "type": "set", + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", "required": true } } ], + "required": true, "type": "record" } } diff --git a/schemas/oauth2/3.4.x.json b/schemas/oauth2/3.4.x.json index 92284103..e6d76411 100644 --- a/schemas/oauth2/3.4.x.json +++ b/schemas/oauth2/3.4.x.json @@ -1,14 +1,19 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "protocols": { + "required": true, "default": [ "grpc", "grpcs", @@ -28,30 +33,23 @@ ], "type": "string" }, - "required": true, "type": "set" } }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" + } + }, { "config": { - "type": "record", - "entity_checks": [ - { - "conditional": { - "if_match": { - "eq": true - }, - "then_field": "scopes", - "if_field": "mandatory_scope", - "then_match": { - "required": true - } - } - } - ], "fields": [ { "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", "elements": { "type": "string" }, @@ -60,126 +58,156 @@ }, { "mandatory_scope": { - "type": "boolean", + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", "default": false, - "required": true + "required": true, + "type": "boolean" } }, { "provision_key": { + "required": true, + "type": "string", "unique": true, + "description": "The unique key the plugin has generated when it has been added to the Service.", "encrypted": true, - "required": true, - "auto": true, - "type": "string" + "auto": true } }, { "token_expiration": { - "type": "number", + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", "default": 7200, - "required": true + "required": true, + "type": "number" } }, { "enable_authorization_code": { - "type": "boolean", + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", "default": false, - "required": true + "required": true, + "type": "boolean" } }, { "enable_implicit_grant": { - "type": "boolean", + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", "default": false, - "required": true + "required": true, + "type": "boolean" } }, { "enable_client_credentials": { - "type": "boolean", + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", "default": false, - "required": true + "required": true, + "type": "boolean" } }, { "enable_password_grant": { - "type": "boolean", + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", "default": false, - "required": true + "required": true, + "type": "boolean" } }, { "hide_credentials": { - "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", "default": false, - "required": true + "required": true, + "type": "boolean" } }, { "accept_http_if_already_terminated": { - "type": "boolean", + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", "default": false, - "required": true + "required": true, + "type": "boolean" } }, { "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", "type": "string" } }, { "global_credentials": { - "type": "boolean", + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", "default": false, - "required": true + "required": true, + "type": "boolean" } }, { "auth_header_name": { + "description": "The name of the header that is supposed to carry the access token.", "default": "authorization", "type": "string" } }, { "refresh_token_ttl": { + "default": 1209600, "type": "number", "between": [ 0, 100000000 ], - "default": 1209600, + "description": "Time-to-live value for data", "required": true } }, { "reuse_refresh_token": { - "type": "boolean", + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", "default": false, - "required": true + "required": true, + "type": "boolean" } }, { "persistent_refresh_token": { - "type": "boolean", "default": false, - "required": true + "required": true, + "type": "boolean" } }, { "pkce": { + "default": "lax", + "type": "string", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", "required": false, "one_of": [ "none", "lax", "strict" - ], - "default": "lax", - "type": "string" + ] + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "scopes", + "if_field": "mandatory_scope" } } ], - "required": true + "required": true, + "type": "record" } } ] diff --git a/schemas/opa/3.4.x.json b/schemas/opa/3.4.x.json index b80c5381..7fdf5f5d 100644 --- a/schemas/opa/3.4.x.json +++ b/schemas/opa/3.4.x.json @@ -1,10 +1,14 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { @@ -24,99 +28,118 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "opa_protocol": { - "type": "string", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", "default": "http", "one_of": [ "http", "https" - ] + ], + "type": "string" } }, { "opa_host": { - "type": "string", + "description": "A string representing a host name, such as example.com.", + "default": "localhost", "required": true, - "default": "localhost" + "type": "string" } }, { "opa_port": { + "default": 8181, "type": "integer", "between": [ 0, 65535 ], - "default": 8181, + "description": "An integer representing a port number between 0 and 65535, inclusive.", "required": true } }, { "opa_path": { + "type": "string", "match_none": [ { - "err": "must not have empty segments", - "pattern": "//" + "pattern": "//", + "err": "must not have empty segments" } ], - "type": "string", "starts_with": "/", - "required": true + "required": true, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." } }, { "include_service_in_opa_input": { - "type": "boolean", - "default": false + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "default": false, + "type": "boolean" } }, { "include_route_in_opa_input": { - "type": "boolean", - "default": false + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "default": false, + "type": "boolean" } }, { "include_consumer_in_opa_input": { - "type": "boolean", - "default": false + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "default": false, + "type": "boolean" } }, { "include_body_in_opa_input": { - "type": "boolean", - "default": false + "default": false, + "type": "boolean" } }, { "include_parsed_json_body_in_opa_input": { - "type": "boolean", - "default": false + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "default": false, + "type": "boolean" } }, { "include_uri_captures_in_opa_input": { - "type": "boolean", - "default": false + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "default": false, + "type": "boolean" } }, { "ssl_verify": { - "type": "boolean", + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "default": true, "required": true, - "default": true + "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/openid-connect/3.4.x.json b/schemas/openid-connect/3.4.x.json index 5d6749fb..5e98becc 100644 --- a/schemas/openid-connect/3.4.x.json +++ b/schemas/openid-connect/3.4.x.json @@ -1,10 +1,14 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { @@ -24,134 +28,66 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "shorthand_fields": [ - { - "authorization_cookie_lifetime": { - "type": "number" - } - }, - { - "authorization_cookie_samesite": { - "type": "string" - } - }, - { - "authorization_cookie_httponly": { - "type": "boolean" - } - }, - { - "session_cookie_lifetime": { - "type": "number" - } - }, - { - "session_cookie_idletime": { - "type": "number" - } - }, - { - "session_cookie_samesite": { - "type": "string" - } - }, - { - "session_cookie_httponly": { - "type": "boolean" - } - }, - { - "session_memcache_prefix": { - "type": "string" - } - }, - { - "session_memcache_socket": { - "type": "string" - } - }, - { - "session_memcache_host": { - "type": "string" - } - }, - { - "session_memcache_port": { - "type": "integer" - } - }, - { - "session_redis_cluster_maxredirections": { - "type": "integer" - } - }, - { - "session_cookie_renew": { - "type": "number" - } - }, - { - "session_cookie_maxsize": { - "type": "integer" - } - }, - { - "session_strategy": { - "type": "string" - } - }, - { - "session_compressor": { - "type": "string" - } - } - ], - "type": "record", "fields": [ { "issuer": { - "type": "string", - "required": true + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" } }, { "discovery_headers_names": { - "type": "array", "required": false, + "description": "Extra header names passed to the discovery endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "discovery_headers_values": { - "type": "array", "required": false, + "description": "Extra header values passed to the discovery endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "extra_jwks_uris": { - "type": "set", "required": false, + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", "elements": { - "type": "string" - } + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "set" } }, { "rediscovery_lifetime": { + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "default": 30, "required": false, - "type": "number", - "default": 30 + "type": "number" } }, { @@ -181,36 +117,39 @@ ], "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "Types of credentials/grants to enable.", + "required": false } }, { "client_id": { - "encrypted": true, "elements": { - "type": "string", - "referenceable": true + "referenceable": true, + "type": "string" }, "type": "array", - "required": false + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "required": false, + "encrypted": true } }, { "client_secret": { - "encrypted": true, "elements": { - "type": "string", - "referenceable": true + "referenceable": true, + "type": "string" }, "type": "array", - "required": false + "description": "The client secret.", + "required": false, + "encrypted": true } }, { "client_auth": { - "type": "array", "required": false, + "description": "The authentication method used by the client (plugin) when calling the endpoint.", "elements": { "one_of": [ "client_secret_basic", @@ -220,202 +159,202 @@ "none" ], "type": "string" - } + }, + "type": "array" } }, { "client_jwk": { - "type": "array", "required": false, "elements": { - "required": false, "fields": [ { "issuer": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "kty": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "use": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "key_ops": { "required": false, - "type": "array", "elements": { - "type": "string", - "required": false - } + "required": false, + "type": "string" + }, + "type": "array" } }, { "alg": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "kid": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "x5u": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "x5c": { "required": false, - "type": "array", "elements": { - "type": "string", - "required": false - } + "required": false, + "type": "string" + }, + "type": "array" } }, { "x5t": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "x5t#S256": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "k": { + "referenceable": true, "required": false, - "type": "string", "encrypted": true, - "referenceable": true + "type": "string" } }, { "x": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "y": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "crv": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "n": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "e": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "d": { + "referenceable": true, "required": false, - "type": "string", "encrypted": true, - "referenceable": true + "type": "string" } }, { "p": { + "referenceable": true, "required": false, - "type": "string", "encrypted": true, - "referenceable": true + "type": "string" } }, { "q": { + "referenceable": true, "required": false, - "type": "string", "encrypted": true, - "referenceable": true + "type": "string" } }, { "dp": { + "referenceable": true, "required": false, - "type": "string", "encrypted": true, - "referenceable": true + "type": "string" } }, { "dq": { + "referenceable": true, "required": false, - "type": "string", "encrypted": true, - "referenceable": true + "type": "string" } }, { "qi": { + "referenceable": true, "required": false, - "type": "string", "encrypted": true, - "referenceable": true + "type": "string" } }, { "oth": { + "referenceable": true, "required": false, - "type": "string", "encrypted": true, - "referenceable": true + "type": "string" } }, { "r": { + "referenceable": true, "required": false, - "type": "string", "encrypted": true, - "referenceable": true + "type": "string" } }, { "t": { + "referenceable": true, "required": false, - "type": "string", "encrypted": true, - "referenceable": true + "type": "string" } } ], + "required": false, "type": "record" - } + }, + "type": "array" } }, { "client_alg": { - "type": "array", "required": false, "elements": { "one_of": [ @@ -434,101 +373,127 @@ "EdDSA" ], "type": "string" - } + }, + "type": "array" } }, { "client_arg": { + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "default": "client_id", "required": false, - "type": "string", - "default": "client_id" + "type": "string" } }, { "redirect_uri": { - "type": "array", "required": false, + "description": "The redirect URI passed to the authorization and token endpoints.", "elements": { - "type": "string" - } + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array" } }, { "login_redirect_uri": { - "type": "array", "required": false, + "description": "Where to redirect the client when `login_action` is set to `redirect`.", "elements": { - "type": "string" - } + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array" } }, { "logout_redirect_uri": { - "type": "array", "required": false, + "description": "Where to redirect the client after the logout.", "elements": { - "type": "string" - } + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array" } }, { "forbidden_redirect_uri": { - "type": "array", "required": false, + "description": "Where to redirect the client on forbidden requests.", "elements": { - "type": "string" - } + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array" } }, { "forbidden_error_message": { + "description": "The error message for the forbidden requests (when not using the redirection).", + "default": "Forbidden", "required": false, - "type": "string", - "default": "Forbidden" + "type": "string" } }, { "forbidden_destroy_session": { + "description": "Destroy any active session for the forbidden requests.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" + } + }, + { + "unauthorized_destroy_session": { + "description": "Destroy any active session for the unauthorized requests.", + "default": true, + "required": false, + "type": "boolean" } }, { "unauthorized_redirect_uri": { - "type": "array", "required": false, + "description": "Where to redirect the client on unauthorized requests.", "elements": { - "type": "string" - } + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array" } }, { "unauthorized_error_message": { + "description": "The error message for the unauthorized requests (when not using the redirection).", + "default": "Unauthorized", "required": false, - "type": "string", - "default": "Unauthorized" + "type": "string" } }, { "unexpected_redirect_uri": { - "type": "array", "required": false, + "description": "Where to redirect the client when unexpected errors happen with the requests.", "elements": { - "type": "string" - } + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array" } }, { "response_mode": { "default": "query", + "type": "string", + "description": "The response mode passed to the authorization endpoint: - `query`: Instructs the identity provider to pass parameters in query string - `form_post`: Instructs the identity provider to pass parameters in request body - `fragment`: Instructs the identity provider to pass parameters in uri fragment (rarely useful as the plugin itself cannot read it)", + "required": false, "one_of": [ "query", "form_post", "fragment" - ], - "type": "string", - "required": false + ] } }, { @@ -539,8 +504,9 @@ "elements": { "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "The response type passed to the authorization endpoint.", + "required": false } }, { @@ -551,35 +517,39 @@ "elements": { "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "The scopes passed to the authorization and token endpoints.", + "required": false } }, { "audience": { - "type": "array", "required": false, + "description": "The audience passed to the authorization endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "issuers_allowed": { - "type": "array", "required": false, + "description": "The issuers allowed to be present in the tokens (`iss` claim).", "elements": { "type": "string" - } + }, + "type": "array" } }, { "scopes_required": { - "type": "array", "required": false, + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", "elements": { "type": "string" - } + }, + "type": "array" } }, { @@ -590,17 +560,19 @@ "elements": { "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "The claim that contains the scopes.", + "required": false } }, { "audience_required": { - "type": "array", "required": false, + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", "elements": { "type": "string" - } + }, + "type": "array" } }, { @@ -611,17 +583,19 @@ "elements": { "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "The claim that contains the audience.", + "required": false } }, { "groups_required": { - "type": "array", "required": false, + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", "elements": { "type": "string" - } + }, + "type": "array" } }, { @@ -632,17 +606,19 @@ "elements": { "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "The claim that contains the groups.", + "required": false } }, { "roles_required": { - "type": "array", "required": false, + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", "elements": { "type": "string" - } + }, + "type": "array" } }, { @@ -653,199 +629,222 @@ "elements": { "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "The claim that contains the roles.", + "required": false } }, { "domains": { - "type": "array", "required": false, + "description": "The allowed values for the `hd` claim.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "max_age": { - "type": "number", - "required": false + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "required": false, + "type": "number" } }, { "authenticated_groups_claim": { - "type": "array", "required": false, + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "authorization_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "authorization_query_args_names": { - "type": "array", "required": false, + "description": "Extra query argument names passed to the authorization endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "authorization_query_args_values": { - "type": "array", "required": false, + "description": "Extra query argument values passed to the authorization endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "authorization_query_args_client": { - "type": "array", "required": false, + "description": "Extra query arguments passed from the client to the authorization endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "authorization_rolling_timeout": { + "description": "Network IO timeout in milliseconds.", + "default": 600, "required": false, - "type": "number", - "default": 600 + "type": "number" } }, { "authorization_cookie_name": { + "description": "The authorization cookie name.", + "default": "authorization", "required": false, - "type": "string", - "default": "authorization" + "type": "string" } }, { "authorization_cookie_path": { + "default": "/", + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/", + "required": false, "match_none": [ { - "err": "must not have empty segments", - "pattern": "//" + "pattern": "//", + "err": "must not have empty segments" } - ], - "starts_with": "/", - "default": "/", - "required": false, - "type": "string" + ] } }, { "authorization_cookie_domain": { - "type": "string", - "required": false + "description": "The authorization cookie Domain flag.", + "required": false, + "type": "string" } }, { "authorization_cookie_same_site": { "default": "Default", + "type": "string", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "required": false, "one_of": [ "Strict", "Lax", "None", "Default" - ], - "type": "string", - "required": false + ] } }, { "authorization_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "authorization_cookie_secure": { - "type": "boolean", - "required": false + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false, + "type": "boolean" } }, { "preserve_query_args": { + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "token_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "token_endpoint_auth_method": { - "type": "string", "required": false, + "description": "The token endpoint authentication method: - `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header - `client_secret_post`: send `client_id` and `client_secret` as part of the body - `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body - `private_key_jwt`: send client assertion signed with the `private key` as part of the body - `none`: do not authenticate", "one_of": [ "client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt", "none" - ] + ], + "type": "string" } }, { "token_headers_names": { - "type": "array", "required": false, + "description": "Extra header names passed to the token endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "token_headers_values": { - "type": "array", "required": false, + "description": "Extra header values passed to the token endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "token_headers_client": { - "type": "array", "required": false, + "description": "Extra headers passed from the client to the token endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "token_headers_replay": { - "type": "array", "required": false, + "description": "The names of token endpoint response headers to forward to the downstream client.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "token_headers_prefix": { - "type": "string", - "required": false + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "required": false, + "type": "string" } }, { "token_headers_grants": { - "type": "array", "required": false, + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant", "elements": { "one_of": [ "password", @@ -854,359 +853,402 @@ "refresh_token" ], "type": "string" - } + }, + "type": "array" } }, { "token_post_args_names": { - "type": "array", "required": false, + "description": "Extra post argument names passed to the token endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "token_post_args_values": { - "type": "array", "required": false, + "description": "Extra post argument values passed to the token endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "token_post_args_client": { - "type": "array", "required": false, + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Request Body - Query parameters This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body and send it to the token endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "introspection_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "introspection_endpoint_auth_method": { - "type": "string", "required": false, + "description": "The introspection endpoint authentication method: - `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header - `client_secret_post`: send `client_id` and `client_secret` as part of the body - `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body - `private_key_jwt`: send client assertion signed with the `private key` as part of the body - `none`: do not authenticate", "one_of": [ "client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt", "none" - ] + ], + "type": "string" } }, { "introspection_hint": { + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "default": "access_token", "required": false, - "type": "string", - "default": "access_token" + "type": "string" } }, { "introspection_check_active": { + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "introspection_accept": { "default": "application/json", + "type": "string", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document)", + "required": false, "one_of": [ "application/json", "application/token-introspection+jwt", "application/jwt" - ], - "type": "string", - "required": false + ] } }, { "introspection_headers_names": { - "type": "array", "required": false, + "description": "Extra header names passed to the introspection endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "introspection_headers_values": { - "type": "array", "required": false, + "description": "Extra header values passed to the introspection endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "introspection_headers_client": { - "type": "array", "required": false, + "description": "Extra headers passed from the client to the introspection endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "introspection_post_args_names": { - "type": "array", "required": false, + "description": "Extra post argument names passed to the introspection endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "introspection_post_args_values": { - "type": "array", "required": false, + "description": "Extra post argument values passed to the introspection endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "introspection_post_args_client": { - "type": "array", "required": false, + "description": "Extra post arguments passed from the client to the introspection endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "introspect_jwt_tokens": { + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "revocation_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "revocation_endpoint_auth_method": { - "type": "string", "required": false, + "description": "The revocation endpoint authentication method: - `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header - `client_secret_post`: send `client_id` and `client_secret` as part of the body - `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body - `private_key_jwt`: send client assertion signed with the `private key` as part of the body - `none`: do not authenticate", "one_of": [ "client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt", "none" - ] + ], + "type": "string" } }, { "end_session_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "userinfo_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "userinfo_accept": { "default": "application/json", + "type": "string", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document)", + "required": false, "one_of": [ "application/json", "application/jwt" - ], - "type": "string", - "required": false + ] } }, { "userinfo_headers_names": { - "type": "array", "required": false, + "description": "Extra header names passed to the user info endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "userinfo_headers_values": { - "type": "array", "required": false, + "description": "Extra header values passed to the user info endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "userinfo_headers_client": { - "type": "array", "required": false, + "description": "Extra headers passed from the client to the user info endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "userinfo_query_args_names": { - "type": "array", "required": false, + "description": "Extra query argument names passed to the user info endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "userinfo_query_args_values": { - "type": "array", "required": false, + "description": "Extra query argument values passed to the user info endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "userinfo_query_args_client": { - "type": "array", "required": false, + "description": "Extra query arguments passed from the client to the user info endpoint.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "token_exchange_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "session_secret": { - "required": false, - "encrypted": true, "referenceable": true, - "type": "string" + "type": "string", + "description": "The session secret.", + "encrypted": true, + "required": false } }, { "session_audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "default": "default", "required": false, - "type": "string", - "default": "default" + "type": "string" } }, { "session_cookie_name": { + "description": "The session cookie name.", + "default": "session", "required": false, - "type": "string", - "default": "session" + "type": "string" } }, { "session_remember": { + "description": "Enables or disables persistent sessions.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "session_remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "default": "remember", "required": false, - "type": "string", - "default": "remember" + "type": "string" } }, { "session_remember_rolling_timeout": { + "description": "Network IO timeout in milliseconds.", + "default": 604800, "required": false, - "type": "number", - "default": 604800 + "type": "number" } }, { "session_remember_absolute_timeout": { + "description": "Network IO timeout in milliseconds.", + "default": 2592000, "required": false, - "type": "number", - "default": 2592000 + "type": "number" } }, { "session_idling_timeout": { + "description": "Network IO timeout in milliseconds.", + "default": 900, "required": false, - "type": "number", - "default": 900 + "type": "number" } }, { "session_rolling_timeout": { + "description": "Network IO timeout in milliseconds.", + "default": 3600, "required": false, - "type": "number", - "default": 3600 + "type": "number" } }, { "session_absolute_timeout": { + "description": "Network IO timeout in milliseconds.", + "default": 86400, "required": false, - "type": "number", - "default": 86400 + "type": "number" } }, { "session_cookie_path": { + "default": "/", + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/", + "required": false, "match_none": [ { - "err": "must not have empty segments", - "pattern": "//" + "pattern": "//", + "err": "must not have empty segments" } - ], - "starts_with": "/", - "default": "/", - "required": false, - "type": "string" + ] } }, { "session_cookie_domain": { - "type": "string", - "required": false + "description": "The session cookie Domain flag.", + "required": false, + "type": "string" } }, { "session_cookie_same_site": { "default": "Lax", + "type": "string", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "required": false, "one_of": [ "Strict", "Lax", "None", "Default" - ], - "type": "string", - "required": false + ] } }, { "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "session_cookie_secure": { - "type": "boolean", - "required": false + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false, + "type": "boolean" } }, { @@ -1246,168 +1288,190 @@ { "session_storage": { "default": "cookie", + "type": "string", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis", + "required": false, "one_of": [ "cookie", "memcache", "memcached", "redis" - ], - "type": "string", - "required": false + ] } }, { "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "session_memcached_prefix": { - "type": "string", - "required": false + "description": "The memcached session key prefix.", + "required": false, + "type": "string" } }, { "session_memcached_socket": { - "type": "string", - "required": false + "description": "The memcached unix socket path.", + "required": false, + "type": "string" } }, { "session_memcached_host": { + "description": "The memcached host.", + "default": "127.0.0.1", "required": false, - "type": "string", - "default": "127.0.0.1" + "type": "string" } }, { "session_memcached_port": { + "default": 11211, "type": "integer", "between": [ 0, 65535 ], - "required": false, - "default": 11211 + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": false } }, { "session_redis_prefix": { - "type": "string", - "required": false + "description": "The Redis session key prefix.", + "required": false, + "type": "string" } }, { "session_redis_socket": { - "type": "string", - "required": false + "description": "The Redis unix socket path.", + "required": false, + "type": "string" } }, { "session_redis_host": { + "description": "The Redis host", + "default": "127.0.0.1", "required": false, - "type": "string", - "default": "127.0.0.1" + "type": "string" } }, { "session_redis_port": { + "default": 6379, "type": "integer", "between": [ 0, 65535 ], - "required": false, - "default": 6379 + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": false } }, { "session_redis_username": { - "type": "string", "referenceable": true, - "required": false + "description": "Username to use for Redis connection when the `redis` session storage is defined and ACL authentication is desired. If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "required": false, + "type": "string" } }, { "session_redis_password": { - "required": false, - "encrypted": true, "referenceable": true, - "type": "string" + "type": "string", + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "required": false } }, { "session_redis_connect_timeout": { - "type": "integer", - "required": false + "description": "Network IO timeout in milliseconds.", + "required": false, + "type": "integer" } }, { "session_redis_read_timeout": { - "type": "integer", - "required": false + "description": "Network IO timeout in milliseconds.", + "required": false, + "type": "integer" } }, { "session_redis_send_timeout": { - "type": "integer", - "required": false + "description": "Network IO timeout in milliseconds.", + "required": false, + "type": "integer" } }, { "session_redis_ssl": { + "description": "Use SSL/TLS for Redis connection.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "session_redis_ssl_verify": { + "description": "Verify identity provider server certificate.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "session_redis_server_name": { - "type": "string", - "required": false + "description": "The SNI used for connecting the Redis server.", + "required": false, + "type": "string" } }, { "session_redis_cluster_nodes": { - "type": "array", "required": false, + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", "elements": { "fields": [ { "ip": { - "type": "string", + "description": "A string representing a host name, such as example.com.", "default": "127.0.0.1", - "required": true + "required": true, + "type": "string" } }, { @@ -1416,39 +1480,45 @@ 0, 65535 ], - "type": "integer", - "default": 6379 + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" } } ], "type": "record" - } + }, + "type": "array" } }, { "session_redis_cluster_max_redirections": { - "type": "integer", - "required": false + "description": "The Redis cluster maximum redirects.", + "required": false, + "type": "integer" } }, { "reverify": { + "description": "Specifies whether to always verify tokens stored in the session.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "jwt_session_claim": { + "description": "The claim to match against the JWT session cookie.", + "default": "sid", "required": false, - "type": "string", - "default": "sid" + "type": "string" } }, { "jwt_session_cookie": { - "type": "string", - "required": false + "description": "The name of the JWT session cookie.", + "required": false, + "type": "string" } }, { @@ -1467,14 +1537,16 @@ ], "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`", + "required": false } }, { "bearer_token_cookie_name": { - "type": "string", - "required": false + "description": "The name of the cookie in which the bearer token is passed.", + "required": false, + "type": "string" } }, { @@ -1492,8 +1564,9 @@ ], "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body", + "required": false } }, { @@ -1511,8 +1584,9 @@ ], "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body", + "required": false } }, { @@ -1530,14 +1604,16 @@ ], "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body", + "required": false } }, { "id_token_param_name": { - "type": "string", - "required": false + "description": "The name of the parameter used to pass the id token.", + "required": false, + "type": "string" } }, { @@ -1555,178 +1631,203 @@ ], "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body", + "required": false } }, { "refresh_token_param_name": { - "type": "string", - "required": false + "description": "The name of the parameter used to pass the refresh token.", + "required": false, + "type": "string" } }, { "refresh_tokens": { + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "upstream_headers_claims": { - "type": "array", "required": false, + "description": "The upstream header claims.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "upstream_headers_names": { - "type": "array", "required": false, + "description": "The upstream header names for the claim values.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "upstream_access_token_header": { + "description": "The upstream access token header.", + "default": "authorization:bearer", "required": false, - "type": "string", - "default": "authorization:bearer" + "type": "string" } }, { "upstream_access_token_jwk_header": { - "type": "string", - "required": false + "description": "The upstream access token JWK header.", + "required": false, + "type": "string" } }, { "upstream_id_token_header": { - "type": "string", - "required": false + "description": "The upstream id token header.", + "required": false, + "type": "string" } }, { "upstream_id_token_jwk_header": { - "type": "string", - "required": false + "description": "The upstream id token JWK header.", + "required": false, + "type": "string" } }, { "upstream_refresh_token_header": { - "type": "string", - "required": false + "description": "The upstream refresh token header.", + "required": false, + "type": "string" } }, { "upstream_user_info_header": { - "type": "string", - "required": false + "description": "The upstream user info header.", + "required": false, + "type": "string" } }, { "upstream_user_info_jwt_header": { - "type": "string", - "required": false + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "required": false, + "type": "string" } }, { "upstream_introspection_header": { - "type": "string", - "required": false + "description": "The upstream introspection header.", + "required": false, + "type": "string" } }, { "upstream_introspection_jwt_header": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "upstream_session_id_header": { - "type": "string", - "required": false + "description": "The upstream session id header.", + "required": false, + "type": "string" } }, { "downstream_headers_claims": { - "type": "array", "required": false, + "description": "The downstream header claims.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "downstream_headers_names": { - "type": "array", "required": false, + "description": "The downstream header names for the claim values.", "elements": { "type": "string" - } + }, + "type": "array" } }, { "downstream_access_token_header": { - "type": "string", - "required": false + "description": "The downstream access token header.", + "required": false, + "type": "string" } }, { "downstream_access_token_jwk_header": { - "type": "string", - "required": false + "description": "The downstream access token JWK header.", + "required": false, + "type": "string" } }, { "downstream_id_token_header": { - "type": "string", - "required": false + "description": "The downstream id token header.", + "required": false, + "type": "string" } }, { "downstream_id_token_jwk_header": { - "type": "string", - "required": false + "description": "The downstream id token JWK header.", + "required": false, + "type": "string" } }, { "downstream_refresh_token_header": { - "type": "string", - "required": false + "description": "The downstream refresh token header.", + "required": false, + "type": "string" } }, { "downstream_user_info_header": { - "type": "string", - "required": false + "description": "The downstream user info header.", + "required": false, + "type": "string" } }, { "downstream_user_info_jwt_header": { - "type": "string", - "required": false + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "required": false, + "type": "string" } }, { "downstream_introspection_header": { - "type": "string", - "required": false + "description": "The downstream introspection header.", + "required": false, + "type": "string" } }, { "downstream_introspection_jwt_header": { - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "downstream_session_id_header": { - "type": "string", - "required": false + "description": "The downstream session id header.", + "required": false, + "type": "string" } }, { @@ -1748,20 +1849,22 @@ ], "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "Enable login functionality with specified grants.", + "required": false } }, { "login_action": { "default": "upstream", + "type": "string", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location", + "required": false, "one_of": [ "upstream", "response", "redirect" - ], - "type": "string", - "required": false + ] } }, { @@ -1779,37 +1882,42 @@ ], "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response", + "required": false } }, { "login_redirect_mode": { "default": "fragment", + "type": "string", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers)", + "required": false, "one_of": [ "query", "fragment" - ], - "type": "string", - "required": false + ] } }, { "logout_query_arg": { - "type": "string", - "required": false + "description": "The request query argument that activates the logout.", + "required": false, + "type": "string" } }, { "logout_post_arg": { - "type": "string", - "required": false + "description": "The request body argument that activates the logout.", + "required": false, + "type": "string" } }, { "logout_uri_suffix": { - "type": "string", - "required": false + "description": "The request URI suffix that activates the logout.", + "required": false, + "type": "string" } }, { @@ -1826,38 +1934,43 @@ ], "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method", + "required": false } }, { "logout_revoke": { + "description": "Revoke tokens as part of the logout.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "logout_revoke_access_token": { + "description": "Revoke the access token as part of the logout.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "logout_revoke_refresh_token": { + "description": "Revoke the refresh token as part of the logout.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "consumer_claim": { - "type": "array", "required": false, + "description": "The claim used for consumer mapping.", "elements": { "type": "string" - } + }, + "type": "array" } }, { @@ -1874,15 +1987,17 @@ ], "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`", + "required": false } }, { "consumer_optional": { + "description": "Do not terminate the request if consumer mapping fails.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { @@ -1893,56 +2008,64 @@ "elements": { "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used.", + "required": false } }, { "anonymous": { - "type": "string", - "required": false + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "required": false, + "type": "string" } }, { "run_on_preflight": { + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "leeway": { + "description": "Allow some leeway (in seconds) on the ttl / expiry verification.", + "default": 0, "required": false, - "type": "number", - "default": 0 + "type": "number" } }, { "verify_parameters": { + "description": "Verify plugin configuration against discovery.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "verify_nonce": { + "description": "Verify nonce on authorization code flow.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "verify_claims": { + "description": "Verify tokens for standard claims.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "verify_signature": { + "description": "Verify signature of tokens.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { @@ -1962,21 +2085,23 @@ ], "type": "string" }, - "required": false, - "type": "array" + "type": "array", + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication", + "required": false } }, { "enable_hs_signatures": { + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "disable_session": { - "type": "array", "required": false, + "description": "Disable issuing the session cookie with the specified grants.", "elements": { "one_of": [ "password", @@ -1990,170 +2115,298 @@ "session" ], "type": "string" - } + }, + "type": "array" } }, { "cache_ttl": { + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "default": 3600, "required": false, - "type": "number", - "default": 3600 + "type": "number" } }, { "cache_ttl_max": { - "type": "number", - "required": false + "description": "The maximum cache ttl in seconds (enforced).", + "required": false, + "type": "number" } }, { "cache_ttl_min": { - "type": "number", - "required": false + "description": "The minimum cache ttl in seconds (enforced).", + "required": false, + "type": "number" } }, { "cache_ttl_neg": { - "type": "number", - "required": false + "description": "The negative cache ttl in seconds.", + "required": false, + "type": "number" } }, { "cache_ttl_resurrect": { - "type": "number", - "required": false + "description": "The resurrection ttl in seconds.", + "required": false, + "type": "number" } }, { "cache_tokens": { + "description": "Cache the token endpoint requests.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "cache_tokens_salt": { - "type": "string", "auto": true, - "required": false + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "required": false, + "type": "string" } }, { "cache_introspection": { + "description": "Cache the introspection endpoint requests.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "cache_token_exchange": { + "description": "Cache the token exchange endpoint requests.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "cache_user_info": { + "description": "Cache the user info requests.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "search_user_info": { + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "hide_credentials": { + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "http_version": { + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0", "default": 1.1, - "type": "number", - "required": false + "required": false, + "type": "number" } }, { "http_proxy": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "http_proxy_authorization": { - "type": "string", - "required": false + "description": "The HTTP proxy authorization.", + "required": false, + "type": "string" } }, { "https_proxy": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "https_proxy_authorization": { - "type": "string", - "required": false + "description": "The HTTPS proxy authorization.", + "required": false, + "type": "string" } }, { "no_proxy": { - "type": "string", - "required": false + "description": "Do not use proxy with these hosts.", + "required": false, + "type": "string" } }, { "keepalive": { + "description": "Use keepalive with the HTTP client.", + "default": true, "required": false, - "type": "boolean", - "default": true + "type": "boolean" } }, { "ssl_verify": { + "description": "Verify identity provider server certificate.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "timeout": { + "description": "Network IO timeout in milliseconds.", + "default": 10000, "required": false, - "type": "number", - "default": 10000 + "type": "number" } }, { "display_errors": { + "description": "Display errors on failure responses.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "by_username_ignore_case": { + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "default": false, "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "resolve_distributed_claims": { + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "default": false, "required": false, + "type": "boolean" + } + }, + { + "expose_error_code": { "type": "boolean", - "default": false + "default": true + } + }, + { + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + } + }, + { + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL.", + "type": "boolean" } } ], - "required": true + "shorthand_fields": [ + { + "authorization_cookie_lifetime": { + "type": "number" + } + }, + { + "authorization_cookie_samesite": { + "type": "string" + } + }, + { + "authorization_cookie_httponly": { + "type": "boolean" + } + }, + { + "session_cookie_lifetime": { + "type": "number" + } + }, + { + "session_cookie_idletime": { + "type": "number" + } + }, + { + "session_cookie_samesite": { + "type": "string" + } + }, + { + "session_cookie_httponly": { + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "type": "string" + } + }, + { + "session_memcache_socket": { + "type": "string" + } + }, + { + "session_memcache_host": { + "type": "string" + } + }, + { + "session_memcache_port": { + "type": "integer" + } + }, + { + "session_redis_cluster_maxredirections": { + "type": "integer" + } + }, + { + "session_cookie_renew": { + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "type": "integer" + } + }, + { + "session_strategy": { + "type": "string" + } + }, + { + "session_compressor": { + "type": "string" + } + } + ], + "required": true, + "type": "record" } } ] diff --git a/schemas/opentelemetry/3.4.x.json b/schemas/opentelemetry/3.4.x.json index 9d455e42..a7cbaae4 100644 --- a/schemas/opentelemetry/3.4.x.json +++ b/schemas/opentelemetry/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,68 +20,59 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "batch_span_count", - "batch_flush_delay" - ] - } - } - ], "fields": [ { "endpoint": { - "type": "string", - "required": true + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" } }, { "headers": { - "type": "map", "keys": { - "type": "string" + "type": "string", + "description": "A string representing an HTTP header name." }, + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", "values": { - "type": "string", - "referenceable": true - } + "referenceable": true, + "type": "string" + }, + "type": "map" } }, { "resource_attributes": { - "values": { - "type": "string", - "required": true - }, "keys": { - "type": "string", - "required": true + "required": true, + "type": "string" + }, + "values": { + "required": true, + "type": "string" }, "type": "map" } }, - { - "batch_span_count": { - "type": "integer" - } - }, - { - "batch_flush_delay": { - "type": "integer" - } - }, { "queue": { - "required": true, "fields": [ { "max_batch_size": { @@ -86,8 +80,9 @@ 1, 1000000 ], - "type": "number", - "default": 1 + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer" } }, { @@ -96,8 +91,9 @@ 0, 3600 ], - "type": "number", - "default": 1 + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number" } }, { @@ -106,45 +102,72 @@ 1, 1000000 ], - "type": "number", - "default": 10000 + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer" } }, { "max_bytes": { - "type": "number" + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." } }, { "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", "default": 60, "type": "number" } }, { "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", "type": "number" } }, { "max_retry_delay": { + "between": [ + 0.001, + 1000000 + ], "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", "type": "number" } } ], + "required": true, "type": "record" } }, + { + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer" + } + }, + { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer" + } + }, { "connect_timeout": { "between": [ 0, 2147483646 ], - "type": "integer", - "default": 1000 + "default": 1000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" } }, { @@ -153,8 +176,9 @@ 0, 2147483646 ], - "type": "integer", - "default": 5000 + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" } }, { @@ -163,8 +187,9 @@ 0, 2147483646 ], - "type": "integer", - "default": 5000 + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" } }, { @@ -174,7 +199,8 @@ }, { "header_type": { - "type": "string", + "required": false, + "default": "preserve", "one_of": [ "preserve", "ignore", @@ -182,13 +208,25 @@ "b3-single", "w3c", "jaeger", - "ot" + "ot", + "aws", + "datadog" ], - "required": false, - "default": "preserve" + "type": "string" } } ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "batch_span_count", + "batch_flush_delay" + ] + } + } + ], + "required": true, "type": "record" } } diff --git a/schemas/post-function/3.4.x.json b/schemas/post-function/3.4.x.json index 35c001df..1c071e1d 100644 --- a/schemas/post-function/3.4.x.json +++ b/schemas/post-function/3.4.x.json @@ -1,7 +1,24 @@ { + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ], "fields": [ { "protocols": { + "required": false, "default": [ "grpc", "grpcs", @@ -10,7 +27,6 @@ "ws", "wss" ], - "type": "set", "elements": { "one_of": [ "grpc", @@ -22,14 +38,23 @@ ], "type": "string" }, - "required": false + "type": "set" } }, { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { @@ -41,6 +66,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -55,145 +81,146 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true } }, { "config": { - "required": true, "fields": [ { "certificate": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "rewrite": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "access": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "header_filter": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "body_filter": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "log": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "ws_handshake": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "ws_client_frame": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "ws_upstream_frame": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "ws_close": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } } ], + "required": true, "type": "record" } } diff --git a/schemas/pre-function/3.4.x.json b/schemas/pre-function/3.4.x.json index 35c001df..1c071e1d 100644 --- a/schemas/pre-function/3.4.x.json +++ b/schemas/pre-function/3.4.x.json @@ -1,7 +1,24 @@ { + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ], "fields": [ { "protocols": { + "required": false, "default": [ "grpc", "grpcs", @@ -10,7 +27,6 @@ "ws", "wss" ], - "type": "set", "elements": { "one_of": [ "grpc", @@ -22,14 +38,23 @@ ], "type": "string" }, - "required": false + "type": "set" } }, { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { @@ -41,6 +66,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -55,145 +81,146 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true } }, { "config": { - "required": true, "fields": [ { "certificate": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "rewrite": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "access": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "header_filter": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "body_filter": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "log": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "ws_handshake": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "ws_client_frame": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "ws_upstream_frame": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } }, { "ws_close": { + "required": true, "default": [ ], "elements": { - "type": "string", - "required": false + "required": false, + "type": "string" }, - "required": true, "type": "array" } } ], + "required": true, "type": "record" } } diff --git a/schemas/prometheus/3.4.x.json b/schemas/prometheus/3.4.x.json index 91f590bb..a851036d 100644 --- a/schemas/prometheus/3.4.x.json +++ b/schemas/prometheus/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,45 +27,59 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "per_consumer": { - "type": "boolean", - "default": false + "default": false, + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean" } }, { "status_code_metrics": { - "type": "boolean", - "default": false + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean" } }, { "latency_metrics": { - "type": "boolean", - "default": false + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean" } }, { "bandwidth_metrics": { - "type": "boolean", - "default": false + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean" } }, { "upstream_health_metrics": { - "type": "boolean", - "default": false + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/proxy-cache-advanced/3.4.x.json b/schemas/proxy-cache-advanced/3.4.x.json index 95a4e988..45409c1a 100644 --- a/schemas/proxy-cache-advanced/3.4.x.json +++ b/schemas/proxy-cache-advanced/3.4.x.json @@ -1,4 +1,13 @@ { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], "fields": [ { "protocols": { @@ -17,17 +26,24 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "response_code": { - "len_min": 1, "default": [ 200, 301, @@ -40,8 +56,10 @@ ], "type": "integer" }, - "required": true, - "type": "array" + "type": "array", + "len_min": 1, + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "required": true } }, { @@ -60,8 +78,9 @@ ], "type": "string" }, - "required": true, - "type": "array" + "type": "array", + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "required": true } }, { @@ -73,63 +92,71 @@ "elements": { "type": "string" }, - "required": true, - "type": "array" + "type": "array", + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "required": true } }, { "cache_ttl": { - "default": 300, "gt": 0, + "description": "TTL in seconds of cache entities.", + "default": 300, "type": "integer" } }, { "strategy": { "required": true, - "type": "string", + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", "one_of": [ "memory", "redis" - ] + ], + "type": "string" } }, { "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", "required": true, - "type": "boolean", - "default": false + "type": "boolean" } }, { "ignore_uri_case": { + "default": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", "required": false, - "type": "boolean", - "default": false + "type": "boolean" } }, { "storage_ttl": { - "type": "integer" + "type": "integer", + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors." } }, { "memory": { - "required": true, "fields": [ { "dictionary_name": { - "required": true, "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "required": true, "type": "string" } } ], + "required": true, "type": "record" } }, { "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", "elements": { "type": "string" }, @@ -138,6 +165,7 @@ }, { "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", "elements": { "type": "string" }, @@ -146,69 +174,11 @@ }, { "redis": { - "required": true, - "entity_checks": [ - { - "mutually_exclusive_sets": { - "set1": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ], - "set2": [ - "host", - "port" - ] - } - }, - { - "mutually_exclusive_sets": { - "set1": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ], - "set2": [ - "cluster_addresses" - ] - } - }, - { - "mutually_exclusive_sets": { - "set1": [ - "cluster_addresses" - ], - "set2": [ - "host", - "port" - ] - } - }, - { - "mutually_required": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ] - }, - { - "mutually_required": [ - "host", - "port" - ] - }, - { - "mutually_required": [ - "connect_timeout", - "send_timeout", - "read_timeout" - ] - } - ], "fields": [ { "host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -217,6 +187,7 @@ 0, 65535 ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", "type": "integer" } }, @@ -226,8 +197,9 @@ 0, 2147483646 ], - "type": "integer", - "default": 2000 + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" } }, { @@ -236,6 +208,7 @@ 0, 2147483646 ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "type": "integer" } }, @@ -245,6 +218,7 @@ 0, 2147483646 ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "type": "integer" } }, @@ -254,39 +228,45 @@ 0, 2147483646 ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "type": "integer" } }, { "username": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" } }, { "password": { "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", "encrypted": true, "type": "string" } }, { "sentinel_username": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" } }, { "sentinel_password": { "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", "encrypted": true, "type": "string" } }, { "database": { - "type": "integer", - "default": 0 + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" } }, { @@ -296,6 +276,7 @@ 2147483646 ], "default": 30, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value.", "type": "integer" } }, @@ -305,16 +286,19 @@ 0, 2147483646 ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, all connection queues beyond the maximum limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued connect operations resume once the number of connections in the pool is less than `keepalive_pool_size`. Note that queued connect operations are subject to set timeouts.", "type": "integer" } }, { "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", "type": "string" } }, { "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", "one_of": [ "master", "slave", @@ -326,6 +310,7 @@ { "sentinel_addresses": { "len_min": 1, + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", "elements": { "type": "string" }, @@ -335,6 +320,7 @@ { "cluster_addresses": { "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", "elements": { "type": "string" }, @@ -343,6 +329,7 @@ }, { "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", "default": false, "required": false, "type": "boolean" @@ -350,6 +337,7 @@ }, { "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", "default": false, "required": false, "type": "boolean" @@ -357,21 +345,83 @@ }, { "server_name": { - "type": "string", - "required": false + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_addresses" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_addresses" + ] } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] } ], + "required": true, "type": "record" } }, { "bypass_on_err": { "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/proxy-cache/3.4.x.json b/schemas/proxy-cache/3.4.x.json index 47930b69..cb1dfc18 100644 --- a/schemas/proxy-cache/3.4.x.json +++ b/schemas/proxy-cache/3.4.x.json @@ -1,4 +1,13 @@ { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], "fields": [ { "protocols": { @@ -9,6 +18,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,17 +33,24 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "response_code": { - "len_min": 1, "default": [ 200, 301, @@ -46,8 +63,10 @@ ], "type": "integer" }, - "required": true, - "type": "array" + "type": "array", + "len_min": 1, + "description": "Upstream response status code considered cacheable.", + "required": true } }, { @@ -67,6 +86,7 @@ "type": "string" }, "type": "array", + "description": "Downstream request methods considered cacheable.", "required": true } }, @@ -80,61 +100,68 @@ "type": "string" }, "type": "array", + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", "required": true } }, { "cache_ttl": { - "default": 300, "gt": 0, + "description": "TTL, in seconds, of cache entities.", + "default": 300, "type": "integer" } }, { "strategy": { - "type": "string", "required": true, + "description": "The backing data store in which to hold cache entities.", "one_of": [ "memory" - ] + ], + "type": "string" } }, { "cache_control": { - "type": "boolean", + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", "required": true, - "default": false + "type": "boolean" } }, { "ignore_uri_case": { - "type": "boolean", + "default": false, "required": false, - "default": false + "type": "boolean" } }, { "storage_ttl": { - "type": "integer" + "type": "integer", + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors." } }, { "memory": { - "required": true, "fields": [ { "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", "required": true, - "type": "string", - "default": "kong_db_cache" + "type": "string" } } ], + "required": true, "type": "record" } }, { "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", "elements": { "type": "string" }, @@ -143,6 +170,7 @@ }, { "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", "elements": { "type": "string" }, @@ -150,6 +178,7 @@ } } ], + "required": true, "type": "record" } } diff --git a/schemas/rate-limiting-advanced/3.4.x.json b/schemas/rate-limiting-advanced/3.4.x.json index c203bdb4..fdcd78cd 100644 --- a/schemas/rate-limiting-advanced/3.4.x.json +++ b/schemas/rate-limiting-advanced/3.4.x.json @@ -1,4 +1,13 @@ { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], "fields": [ { "protocols": { @@ -17,17 +26,20 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true } }, { "config": { - "required": true, "fields": [ { "identifier": { + "default": "consumer", "type": "string", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, or `path`.", + "required": true, "one_of": [ "ip", "credential", @@ -35,164 +47,115 @@ "service", "header", "path" - ], - "default": "consumer", - "required": true + ] } }, { "window_size": { "required": true, - "type": "array", + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", "elements": { "type": "number" - } + }, + "type": "array" } }, { "window_type": { "default": "sliding", - "type": "string", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", "one_of": [ "fixed", "sliding" - ] + ], + "type": "string" } }, { "limit": { "required": true, - "type": "array", + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", "elements": { "type": "number" - } + }, + "type": "array" } }, { "sync_rate": { - "type": "number" + "type": "number", + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms)." } }, { "namespace": { - "required": true, "auto": true, + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace.", + "required": true, "type": "string" } }, { "strategy": { + "default": "local", "type": "string", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "required": true, "one_of": [ "cluster", "redis", "local" - ], - "default": "local", - "required": true + ] } }, { "dictionary_name": { - "required": true, "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "required": true, "type": "string" } }, { "hide_client_headers": { - "type": "boolean", - "default": false + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" } }, { "retry_after_jitter_max": { - "type": "number", - "default": 0 + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" } }, { "header_name": { - "type": "string" + "type": "string", + "description": "A string representing an HTTP header name." } }, { "path": { + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/", "match_none": [ { - "err": "must not have empty segments", - "pattern": "//" + "pattern": "//", + "err": "must not have empty segments" } - ], - "starts_with": "/", - "type": "string" + ] } }, { "redis": { - "required": true, - "entity_checks": [ - { - "mutually_exclusive_sets": { - "set1": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ], - "set2": [ - "host", - "port" - ] - } - }, - { - "mutually_exclusive_sets": { - "set1": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ], - "set2": [ - "cluster_addresses" - ] - } - }, - { - "mutually_exclusive_sets": { - "set1": [ - "cluster_addresses" - ], - "set2": [ - "host", - "port" - ] - } - }, - { - "mutually_required": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ] - }, - { - "mutually_required": [ - "host", - "port" - ] - }, - { - "mutually_required": [ - "connect_timeout", - "send_timeout", - "read_timeout" - ] - } - ], "fields": [ { "host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -201,6 +164,7 @@ 0, 65535 ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", "type": "integer" } }, @@ -210,8 +174,9 @@ 0, 2147483646 ], - "type": "integer", - "default": 2000 + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" } }, { @@ -220,6 +185,7 @@ 0, 2147483646 ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "type": "integer" } }, @@ -229,6 +195,7 @@ 0, 2147483646 ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "type": "integer" } }, @@ -238,39 +205,45 @@ 0, 2147483646 ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "type": "integer" } }, { "username": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" } }, { "password": { "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", "encrypted": true, "type": "string" } }, { "sentinel_username": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" } }, { "sentinel_password": { "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", "encrypted": true, "type": "string" } }, { "database": { - "type": "integer", - "default": 0 + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" } }, { @@ -280,6 +253,7 @@ 2147483646 ], "default": 30, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value.", "type": "integer" } }, @@ -289,16 +263,19 @@ 0, 2147483646 ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, all connection queues beyond the maximum limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued connect operations resume once the number of connections in the pool is less than `keepalive_pool_size`. Note that queued connect operations are subject to set timeouts.", "type": "integer" } }, { "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", "type": "string" } }, { "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", "one_of": [ "master", "slave", @@ -310,6 +287,7 @@ { "sentinel_addresses": { "len_min": 1, + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", "elements": { "type": "string" }, @@ -319,6 +297,7 @@ { "cluster_addresses": { "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", "elements": { "type": "string" }, @@ -327,6 +306,7 @@ }, { "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", "default": false, "required": false, "type": "boolean" @@ -334,6 +314,7 @@ }, { "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", "default": false, "required": false, "type": "boolean" @@ -341,22 +322,84 @@ }, { "server_name": { - "type": "string", - "required": false + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" } } ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_addresses" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_addresses" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "required": true, "type": "record" } }, { "enforce_consumer_groups": { - "type": "boolean", - "default": false + "default": false, + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean" } }, { "consumer_groups": { + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", "elements": { "type": "string" }, @@ -365,24 +408,28 @@ }, { "disable_penalty": { - "type": "boolean", - "default": false + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" } }, { "error_code": { - "type": "number", + "description": "Set a custom error code to return when the rate limit is exceeded.", "gt": 0, - "default": 429 + "default": 429, + "type": "number" } }, { "error_message": { - "type": "string", - "default": "API rate limit exceeded" + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" } } ], + "required": true, "type": "record" } } diff --git a/schemas/rate-limiting/3.4.x.json b/schemas/rate-limiting/3.4.x.json index 001e7790..973af9b7 100644 --- a/schemas/rate-limiting/3.4.x.json +++ b/schemas/rate-limiting/3.4.x.json @@ -1,4 +1,76 @@ { + "entity_checks": [ + { + "at_least_one_of": [ + "config.second", + "config.minute", + "config.hour", + "config.day", + "config.month", + "config.year" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis_host", + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis_port", + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "header" + }, + "then_field": "config.header_name", + "if_field": "config.limit_by" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "path" + }, + "then_field": "config.path", + "if_field": "config.limit_by" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis_timeout", + "if_field": "config.policy" + } + } + ], "fields": [ { "protocols": { @@ -17,54 +89,68 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "second": { "gt": 0, + "description": "The number of HTTP requests that can be made per second.", "type": "number" } }, { "minute": { "gt": 0, + "description": "The number of HTTP requests that can be made per minute.", "type": "number" } }, { "hour": { "gt": 0, + "description": "The number of HTTP requests that can be made per hour.", "type": "number" } }, { "day": { "gt": 0, + "description": "The number of HTTP requests that can be made per day.", "type": "number" } }, { "month": { "gt": 0, + "description": "The number of HTTP requests that can be made per month.", "type": "number" } }, { "year": { "gt": 0, + "description": "The number of HTTP requests that can be made per year.", "type": "number" } }, { "limit_by": { "default": "consumer", - "type": "string", + "description": "The entity that is used when aggregating the limits.", "one_of": [ "consumer", "credential", @@ -72,48 +158,54 @@ "service", "header", "path" - ] + ], + "type": "string" } }, { "header_name": { - "type": "string" + "type": "string", + "description": "A string representing an HTTP header name." } }, { "path": { + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/", "match_none": [ { - "err": "must not have empty segments", - "pattern": "//" + "pattern": "//", + "err": "must not have empty segments" } - ], - "starts_with": "/", - "type": "string" + ] } }, { "policy": { + "default": "local", + "type": "string", + "len_min": 0, + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", "one_of": [ "local", "cluster", "redis" - ], - "len_min": 0, - "type": "string", - "default": "local" + ] } }, { "fault_tolerant": { "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", "required": true, "type": "boolean" } }, { "redis_host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -122,26 +214,30 @@ 0, 65535 ], - "type": "integer", - "default": 6379 + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" } }, { "redis_password": { "len_min": 0, - "type": "string", - "referenceable": true + "description": "When using the `redis` policy, this property specifies the password to connect to the Redis server.", + "referenceable": true, + "type": "string" } }, { "redis_username": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "When using the `redis` policy, this property specifies the username to connect to the Redis server when ACL authentication is desired.", + "type": "string" } }, { "redis_ssl": { "default": false, + "description": "When using the `redis` policy, this property specifies if SSL is used to connect to the Redis server.", "required": true, "type": "boolean" } @@ -149,48 +245,64 @@ { "redis_ssl_verify": { "default": false, + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies it server SSL certificate is validated. Note that you need to configure the lua_ssl_trusted_certificate to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly.", "required": true, "type": "boolean" } }, { "redis_server_name": { - "type": "string" + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS." } }, { "redis_timeout": { - "type": "number", - "default": 2000 + "default": 2000, + "description": "When using the `redis` policy, this property specifies the timeout in milliseconds of any command submitted to the Redis server.", + "type": "number" } }, { "redis_database": { - "type": "integer", - "default": 0 + "default": 0, + "description": "When using the `redis` policy, this property specifies the Redis database to use.", + "type": "integer" } }, { "hide_client_headers": { "default": false, + "description": "Optionally hide informative response headers.", "required": true, "type": "boolean" } }, { "error_code": { - "type": "number", "gt": 0, - "default": 429 + "description": "Set a custom error code to return when the rate limit is exceeded.", + "default": 429, + "type": "number" } }, { "error_message": { - "type": "string", - "default": "API rate limit exceeded" + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + } + }, + { + "sync_rate": { + "default": -1, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "required": true, + "type": "number" } } ], + "required": true, "type": "record" } } diff --git a/schemas/request-size-limiting/3.4.x.json b/schemas/request-size-limiting/3.4.x.json index 92de1580..3c96984a 100644 --- a/schemas/request-size-limiting/3.4.x.json +++ b/schemas/request-size-limiting/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,40 +20,52 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "allowed_payload_size": { "default": 128, + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", "type": "integer" } }, { "size_unit": { "default": "megabytes", + "type": "string", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "required": true, "one_of": [ "megabytes", "kilobytes", "bytes" - ], - "required": true, - "type": "string" + ] } }, { "require_content_length": { "default": false, - "type": "boolean", - "required": true + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "required": true, + "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/request-termination/3.4.x.json b/schemas/request-termination/3.4.x.json index 0f7ce4c5..59d914f3 100644 --- a/schemas/request-termination/3.4.x.json +++ b/schemas/request-termination/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,53 +20,68 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "status_code": { + "default": 503, "type": "integer", "between": [ 100, 599 ], - "default": 503, + "description": "The response code to send. Must be an integer between 100 and 599.", "required": true } }, { "message": { + "description": "The message to send, if using the default response generator.", "type": "string" } }, { "content_type": { + "description": "Content type of the raw response configured with `config.body`.", "type": "string" } }, { "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", "type": "string" } }, { "echo": { "default": false, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", "required": true, "type": "boolean" } }, { "trigger": { - "type": "string" + "type": "string", + "description": "A string representing an HTTP header name." } } ], + "required": true, "type": "record" } } diff --git a/schemas/request-transformer-advanced/3.4.x.json b/schemas/request-transformer-advanced/3.4.x.json index 2f158aed..040f5998 100644 --- a/schemas/request-transformer-advanced/3.4.x.json +++ b/schemas/request-transformer-advanced/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,108 +20,108 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true } }, { "config": { - "required": true, "fields": [ { "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", "match": "^%u+$", "type": "string" } }, { "remove": { - "required": true, "fields": [ { "body": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "headers": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "querystring": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } } ], + "required": true, "type": "record" } }, { "rename": { - "required": true, "fields": [ { "body": { - "type": "array", "default": [ ], "elements": { "referenceable": true, "type": "string" - } + }, + "type": "array" } }, { "headers": { - "type": "array", "default": [ ], "elements": { "referenceable": true, "type": "string" - } + }, + "type": "array" } }, { "querystring": { - "type": "array", "default": [ ], "elements": { "referenceable": true, "type": "string" - } + }, + "type": "array" } } ], + "required": true, "type": "record" } }, { "replace": { - "required": true, "fields": [ { "body": { @@ -158,18 +161,18 @@ }, { "json_types": { + "default": [ + + ], "elements": { - "type": "string", "one_of": [ "boolean", "number", "string" - ] + ], + "type": "string" }, - "type": "array", - "default": [ - - ] + "type": "array" } }, { @@ -178,52 +181,51 @@ } } ], + "required": true, "type": "record" } }, { "add": { - "required": true, "fields": [ { "body": { - "elements": { - "type": "string", - "referenceable": true - }, - "type": "array", "default": [ - ] + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" } }, { "headers": { - "elements": { - "type": "string", - "referenceable": true - }, - "type": "array", "default": [ - ] + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" } }, { "querystring": { - "elements": { - "type": "string", - "referenceable": true - }, - "type": "array", "default": [ - ] + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" } }, { "json_types": { - "type": "array", "default": [ ], @@ -234,56 +236,56 @@ "string" ], "type": "string" - } + }, + "type": "array" } } ], + "required": true, "type": "record" } }, { "append": { - "required": true, "fields": [ { "body": { - "elements": { - "type": "string", - "referenceable": true - }, - "type": "array", "default": [ - ] + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" } }, { "headers": { - "elements": { - "type": "string", - "referenceable": true - }, - "type": "array", "default": [ - ] + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" } }, { "querystring": { - "elements": { - "type": "string", - "referenceable": true - }, - "type": "array", "default": [ - ] + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" } }, { "json_types": { - "type": "array", "default": [ ], @@ -294,16 +296,17 @@ "string" ], "type": "string" - } + }, + "type": "array" } } ], + "required": true, "type": "record" } }, { "allow": { - "required": true, "fields": [ { "body": { @@ -314,16 +317,19 @@ } } ], + "required": true, "type": "record" } }, { "dots_in_keys": { + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", "default": true, "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/request-transformer/3.4.x.json b/schemas/request-transformer/3.4.x.json index 00b0097d..be151262 100644 --- a/schemas/request-transformer/3.4.x.json +++ b/schemas/request-transformer/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,148 +27,148 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true } }, { "config": { - "required": true, "fields": [ { "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", "match": "^%u+$", "type": "string" } }, { "remove": { - "required": true, "fields": [ { "body": { + "required": true, "default": [ ], "elements": { "type": "string" }, - "type": "array", - "required": true + "type": "array" } }, { "headers": { + "required": true, "default": [ ], "elements": { "type": "string" }, - "type": "array", - "required": true + "type": "array" } }, { "querystring": { + "required": true, "default": [ ], "elements": { "type": "string" }, - "type": "array", - "required": true + "type": "array" } } ], + "required": true, "type": "record" } }, { "rename": { - "required": true, "fields": [ { "body": { + "required": true, "default": [ ], "elements": { "type": "string" }, - "type": "array", - "required": true + "type": "array" } }, { "headers": { + "required": true, "default": [ ], "elements": { - "match": "^[^:]+:.*$", - "type": "string" + "type": "string", + "match": "^[^:]+:.*$" }, - "type": "array", - "required": true + "type": "array" } }, { "querystring": { + "required": true, "default": [ ], "elements": { "type": "string" }, - "type": "array", - "required": true + "type": "array" } } ], + "required": true, "type": "record" } }, { "replace": { - "required": true, "fields": [ { "body": { "required": true, - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "headers": { "required": true, - "type": "array", "default": [ ], "elements": { - "match": "^[^:]+:.*$", - "type": "string" - } + "type": "string", + "match": "^[^:]+:.*$" + }, + "type": "array" } }, { "querystring": { "required": true, - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { @@ -173,100 +177,102 @@ } } ], + "required": true, "type": "record" } }, { "add": { - "required": true, "fields": [ { "body": { + "required": true, "default": [ ], "elements": { "type": "string" }, - "type": "array", - "required": true + "type": "array" } }, { "headers": { + "required": true, "default": [ ], "elements": { - "match": "^[^:]+:.*$", - "type": "string" + "type": "string", + "match": "^[^:]+:.*$" }, - "type": "array", - "required": true + "type": "array" } }, { "querystring": { + "required": true, "default": [ ], "elements": { "type": "string" }, - "type": "array", - "required": true + "type": "array" } } ], + "required": true, "type": "record" } }, { "append": { - "required": true, "fields": [ { "body": { + "required": true, "default": [ ], "elements": { "type": "string" }, - "type": "array", - "required": true + "type": "array" } }, { "headers": { + "required": true, "default": [ ], "elements": { - "match": "^[^:]+:.*$", - "type": "string" + "type": "string", + "match": "^[^:]+:.*$" }, - "type": "array", - "required": true + "type": "array" } }, { "querystring": { + "required": true, "default": [ ], "elements": { "type": "string" }, - "type": "array", - "required": true + "type": "array" } } ], + "required": true, "type": "record" } } ], + "required": true, "type": "record" } } diff --git a/schemas/request-validator/3.4.x.json b/schemas/request-validator/3.4.x.json index e3e314b2..1f717922 100644 --- a/schemas/request-validator/3.4.x.json +++ b/schemas/request-validator/3.4.x.json @@ -1,4 +1,13 @@ { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], "fields": [ { "protocols": { @@ -17,83 +26,69 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, - "entity_checks": [ - { - "at_least_one_of": [ - "body_schema", - "parameter_schema" - ] - } - ], "fields": [ { "body_schema": { + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", "required": false, "type": "string" } }, { "allowed_content_types": { - "type": "set", "default": [ "application/json" ], + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", "elements": { - "type": "string", - "required": true - } + "required": true, + "type": "string" + }, + "type": "set" } }, { "version": { + "default": "kong", + "type": "string", + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", "one_of": [ "kong", "draft4" ], - "default": "kong", - "type": "string", "required": true } }, { "parameter_schema": { - "type": "array", "required": false, + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", "elements": { - "entity_checks": [ - { - "mutually_required": [ - "style", - "explode", - "schema" - ] - }, - { - "custom_entity_check": { - "field_sources": [ - "style", - "in" - ] - } - } - ], "fields": [ { "in": { "required": true, - "type": "string", "one_of": [ "query", "header", "path" - ] + ], + "type": "string" } }, { @@ -133,18 +128,46 @@ } } ], + "entity_checks": [ + { + "mutually_required": [ + "style", + "explode", + "schema" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "style", + "in" + ] + } + } + ], "type": "record" - } + }, + "type": "array" } }, { "verbose_response": { - "type": "boolean", + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "default": false, "required": true, - "default": false + "type": "boolean" } } ], + "entity_checks": [ + { + "at_least_one_of": [ + "body_schema", + "parameter_schema" + ] + } + ], + "required": true, "type": "record" } } diff --git a/schemas/response-ratelimiting/3.4.x.json b/schemas/response-ratelimiting/3.4.x.json index 3dbf1716..04f8a2cc 100644 --- a/schemas/response-ratelimiting/3.4.x.json +++ b/schemas/response-ratelimiting/3.4.x.json @@ -1,4 +1,42 @@ { + "entity_checks": [ + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis_host", + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis_port", + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis_timeout", + "if_field": "config.policy" + } + } + ], "fields": [ { "protocols": { @@ -17,52 +55,65 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "header_name": { - "type": "string", - "default": "x-kong-limit" + "description": "The name of the response header used to increment the counters.", + "default": "x-kong-limit", + "type": "string" } }, { "limit_by": { + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", "default": "consumer", - "type": "string", "one_of": [ "consumer", "credential", "ip" - ] + ], + "type": "string" } }, { "policy": { + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", "default": "local", - "type": "string", "one_of": [ "local", "cluster", "redis" - ] + ], + "type": "string" } }, { "fault_tolerant": { - "type": "boolean", + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "default": true, "required": true, - "default": true + "type": "boolean" } }, { "redis_host": { - "type": "string" + "type": "string", + "description": "When using the `redis` policy, this property specifies the address to the Redis server." } }, { @@ -71,88 +122,81 @@ 0, 65535 ], - "type": "integer", - "default": 6379 + "default": 6379, + "description": "When using the `redis` policy, this property specifies the port of the Redis server.", + "type": "integer" } }, { "redis_password": { + "referenceable": true, + "description": "When using the `redis` policy, this property specifies the password to connect to the Redis server.", "len_min": 0, - "type": "string", - "referenceable": true + "type": "string" } }, { "redis_username": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "When using the `redis` policy, this property specifies the username to connect to the Redis server when ACL authentication is desired.\nThis requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" } }, { "redis_ssl": { - "type": "boolean", + "description": "When using the `redis` policy, this property specifies if SSL is used to connect to the Redis server.", + "default": false, "required": true, - "default": false + "type": "boolean" } }, { "redis_ssl_verify": { - "type": "boolean", + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies if the server SSL certificate is validated. Note that you need to configure the `lua_ssl_trusted_certificate` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, "required": true, - "default": false + "type": "boolean" } }, { "redis_server_name": { - "type": "string" + "type": "string", + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies the server name for the TLS extension Server Name Indication (SNI)." } }, { "redis_timeout": { - "type": "number", - "default": 2000 + "description": "When using the `redis` policy, this property specifies the timeout in milliseconds of any command submitted to the Redis server.", + "default": 2000, + "type": "number" } }, { "redis_database": { - "type": "number", - "default": 0 + "description": "When using the `redis` policy, this property specifies Redis database to use.", + "default": 0, + "type": "number" } }, { "block_on_first_violation": { - "type": "boolean", + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "default": false, "required": true, - "default": false + "type": "boolean" } }, { "hide_client_headers": { - "type": "boolean", + "description": "Optionally hide informative response headers.", + "default": false, "required": true, - "default": false + "type": "boolean" } }, { "limits": { - "len_min": 1, - "keys": { - "type": "string" - }, "values": { - "type": "record", - "entity_checks": [ - { - "at_least_one_of": [ - "second", - "minute", - "hour", - "day", - "month", - "year" - ] - } - ], "fields": [ { "second": { @@ -191,13 +235,32 @@ } } ], - "required": true + "entity_checks": [ + { + "at_least_one_of": [ + "second", + "minute", + "hour", + "day", + "month", + "year" + ] + } + ], + "required": true, + "type": "record" }, + "type": "map", + "len_min": 1, + "description": "A map that defines rate limits for the plugin.", "required": true, - "type": "map" + "keys": { + "type": "string" + } } } ], + "required": true, "type": "record" } } diff --git a/schemas/response-transformer-advanced/3.4.x.json b/schemas/response-transformer-advanced/3.4.x.json index 48a5b19c..ddfe3a2a 100644 --- a/schemas/response-transformer-advanced/3.4.x.json +++ b/schemas/response-transformer-advanced/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,109 +20,108 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true } }, { "config": { - "required": true, "fields": [ { "remove": { - "required": true, "fields": [ { "json": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "headers": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "if_status": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } } ], + "required": true, "type": "record" } }, { "rename": { - "required": true, "fields": [ { "headers": { - "type": "array", "default": [ ], "elements": { - "match": "^[^:]+:.*$", - "type": "string" - } + "type": "string", + "match": "^[^:]+:.*$" + }, + "type": "array" } }, { "if_status": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } } ], + "required": true, "type": "record" } }, { "replace": { - "required": true, "fields": [ { "body": { - "type": "string" + "type": "string", + "description": "String with which to replace the entire response body." } }, { "json": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "json_types": { - "type": "array", "default": [ ], @@ -130,53 +132,53 @@ "string" ], "type": "string" - } + }, + "type": "array" } }, { "headers": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "if_status": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } } ], + "required": true, "type": "record" } }, { "add": { - "required": true, "fields": [ { "json": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "json_types": { - "type": "array", "default": [ ], @@ -187,53 +189,53 @@ "string" ], "type": "string" - } + }, + "type": "array" } }, { "headers": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "if_status": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } } ], + "required": true, "type": "record" } }, { "append": { - "required": true, "fields": [ { "json": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "json_types": { - "type": "array", "default": [ ], @@ -244,38 +246,39 @@ "string" ], "type": "string" - } + }, + "type": "array" } }, { "headers": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "if_status": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } } ], + "required": true, "type": "record" } }, { "allow": { - "required": true, "fields": [ { "json": { @@ -286,57 +289,60 @@ } } ], + "required": true, "type": "record" } }, { "transform": { - "required": true, "fields": [ { "functions": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "if_status": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } }, { "json": { - "type": "array", "default": [ ], "elements": { "type": "string" - } + }, + "type": "array" } } ], + "required": true, "type": "record" } }, { "dots_in_keys": { "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/response-transformer/3.4.x.json b/schemas/response-transformer/3.4.x.json index 58468539..6e3a84ee 100644 --- a/schemas/response-transformer/3.4.x.json +++ b/schemas/response-transformer/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,52 +20,52 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true } }, { "config": { - "required": true, "fields": [ { "remove": { - "required": true, "fields": [ { "json": { + "required": true, "default": [ ], "elements": { "type": "string" }, - "required": true, "type": "array" } }, { "headers": { + "required": true, "default": [ ], "elements": { "type": "string" }, - "required": true, "type": "array" } } ], + "required": true, "type": "record" } }, { "rename": { - "required": true, "fields": [ { "headers": { + "required": true, "default": [ ], @@ -70,28 +73,27 @@ "match": "^[^:]+:.*$", "type": "string" }, - "required": true, "type": "array" } } ], + "required": true, "type": "record" } }, { "replace": { - "required": true, "fields": [ { "json": { + "required": true, "default": [ ], "elements": { - "match": "^[^:]+:.*$", - "type": "string" + "type": "string", + "match": "^[^:]+:.*$" }, - "required": true, "type": "array" } }, @@ -108,41 +110,42 @@ ], "type": "string" }, - "required": true, - "type": "array" + "type": "array", + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "required": true } }, { "headers": { + "required": true, "default": [ ], "elements": { - "match": "^[^:]+:.*$", - "type": "string" + "type": "string", + "match": "^[^:]+:.*$" }, - "required": true, "type": "array" } } ], + "required": true, "type": "record" } }, { "add": { - "required": true, "fields": [ { "json": { + "required": true, "default": [ ], "elements": { - "match": "^[^:]+:.*$", - "type": "string" + "type": "string", + "match": "^[^:]+:.*$" }, - "required": true, "type": "array" } }, @@ -159,41 +162,42 @@ ], "type": "string" }, - "required": true, - "type": "array" + "type": "array", + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "required": true } }, { "headers": { + "required": true, "default": [ ], "elements": { - "match": "^[^:]+:.*$", - "type": "string" + "type": "string", + "match": "^[^:]+:.*$" }, - "required": true, "type": "array" } } ], + "required": true, "type": "record" } }, { "append": { - "required": true, "fields": [ { "json": { + "required": true, "default": [ ], "elements": { - "match": "^[^:]+:.*$", - "type": "string" + "type": "string", + "match": "^[^:]+:.*$" }, - "required": true, "type": "array" } }, @@ -210,28 +214,31 @@ ], "type": "string" }, - "required": true, - "type": "array" + "type": "array", + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "required": true } }, { "headers": { + "required": true, "default": [ ], "elements": { - "match": "^[^:]+:.*$", - "type": "string" + "type": "string", + "match": "^[^:]+:.*$" }, - "required": true, "type": "array" } } ], + "required": true, "type": "record" } } ], + "required": true, "type": "record" } } diff --git a/schemas/route-by-header/3.4.x.json b/schemas/route-by-header/3.4.x.json index dc8a336b..28fec8bc 100644 --- a/schemas/route-by-header/3.4.x.json +++ b/schemas/route-by-header/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,47 +20,57 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "rules": { - "type": "array", "default": [ ], + "description": "Route by header rules.", "elements": { "fields": [ { "upstream_name": { - "type": "string", - "required": true + "required": true, + "type": "string" } }, { "condition": { - "len_min": 1, - "keys": { + "values": { "type": "string" }, - "values": { + "type": "map", + "len_min": 1, + "keys": { "type": "string" }, - "required": true, - "type": "map" + "required": true } } ], "type": "record" - } + }, + "type": "array" } } ], + "required": true, "type": "record" } } diff --git a/schemas/route-transformer-advanced/3.4.x.json b/schemas/route-transformer-advanced/3.4.x.json index f743be94..8b34c46e 100644 --- a/schemas/route-transformer-advanced/3.4.x.json +++ b/schemas/route-transformer-advanced/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,22 +20,21 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, - "entity_checks": [ - { - "at_least_one_of": [ - "path", - "port", - "host" - ] - } - ], "fields": [ { "path": { @@ -51,11 +53,21 @@ }, { "escape_path": { - "default": false, - "type": "boolean" + "type": "boolean", + "default": false } } ], + "entity_checks": [ + { + "at_least_one_of": [ + "path", + "port", + "host" + ] + } + ], + "required": true, "type": "record" } } diff --git a/schemas/saml/3.4.x.json b/schemas/saml/3.4.x.json index 60c0881c..ab70c14d 100644 --- a/schemas/saml/3.4.x.json +++ b/schemas/saml/3.4.x.json @@ -1,10 +1,14 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { @@ -24,222 +28,173 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "shorthand_fields": [ - { - "session_cookie_lifetime": { - "type": "number" - } - }, - { - "session_cookie_idletime": { - "type": "number" - } - }, - { - "session_cookie_samesite": { - "type": "string" - } - }, - { - "session_cookie_httponly": { - "type": "boolean" - } - }, - { - "session_memcache_prefix": { - "type": "string" - } - }, - { - "session_memcache_socket": { - "type": "string" - } - }, - { - "session_memcache_host": { - "type": "string" - } - }, - { - "session_memcache_port": { - "type": "integer" - } - }, - { - "session_redis_cluster_maxredirections": { - "type": "integer" - } - }, - { - "session_cookie_renew": { - "type": "number" - } - }, - { - "session_cookie_maxsize": { - "type": "integer" - } - }, - { - "session_strategy": { - "type": "string" - } - }, - { - "session_compressor": { - "type": "string" - } - }, - { - "session_auth_ttl": { - "type": "number" - } - } - ], - "type": "record", "fields": [ { "assertion_consumer_path": { + "type": "string", "match_none": [ { - "err": "must not have empty segments", - "pattern": "//" + "pattern": "//", + "err": "must not have empty segments" } ], - "type": "string", "starts_with": "/", - "required": true + "required": true, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." } }, { "idp_sso_url": { - "type": "string", - "required": true + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" } }, { "idp_certificate": { - "required": false, - "encrypted": true, + "referenceable": true, "type": "string", - "referenceable": true + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.", + "required": false, + "encrypted": true } }, { "response_encryption_key": { - "required": false, - "encrypted": true, + "referenceable": true, "type": "string", - "referenceable": true + "description": "The private encryption key required to decrypt encrypted assertions.", + "required": false, + "encrypted": true } }, { "request_signing_key": { - "required": false, - "encrypted": true, + "referenceable": true, "type": "string", - "referenceable": true + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.", + "required": false, + "encrypted": true } }, { "request_signing_certificate": { - "required": false, - "encrypted": true, + "referenceable": true, "type": "string", - "referenceable": true + "description": "The certificate for signing requests.", + "required": false, + "encrypted": true } }, { "request_signature_algorithm": { + "default": "SHA256", + "type": "string", + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", "required": false, "one_of": [ "SHA256", "SHA384", "SHA512" - ], - "type": "string", - "default": "SHA256" + ] } }, { "request_digest_algorithm": { + "default": "SHA256", + "type": "string", + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", "required": false, "one_of": [ "SHA256", "SHA1" - ], - "type": "string", - "default": "SHA256" + ] } }, { "response_signature_algorithm": { + "default": "SHA256", + "type": "string", + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", "required": false, "one_of": [ "SHA256", "SHA384", "SHA512" - ], - "type": "string", - "default": "SHA256" + ] } }, { "response_digest_algorithm": { + "default": "SHA256", + "type": "string", + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", "required": false, "one_of": [ "SHA256", "SHA1" - ], - "type": "string", - "default": "SHA256" + ] } }, { "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", "required": true, "type": "string" } }, { "nameid_format": { + "default": "EmailAddress", + "type": "string", + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", "required": false, "one_of": [ "Unspecified", "EmailAddress", "Persistent", "Transient" - ], - "type": "string", - "default": "EmailAddress" + ] } }, { "validate_assertion_signature": { "default": true, - "type": "boolean", - "required": false + "description": "Enable signature validation for SAML responses.", + "required": false, + "type": "boolean" } }, { "anonymous": { - "type": "string", - "required": false + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "required": false, + "type": "string" } }, { "session_secret": { + "referenceable": true, + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.", + "required": true, "match": "^[0-9a-zA-Z/_+]+$", "len_min": 32, "len_max": 32, - "required": true, - "referenceable": true, "encrypted": true, "type": "string" } @@ -247,110 +202,124 @@ { "session_audience": { "default": "default", - "type": "string", - "required": false + "description": "The session audience, for example \"my-application\"", + "required": false, + "type": "string" } }, { "session_cookie_name": { "default": "session", - "type": "string", - "required": false + "description": "The session cookie name.", + "required": false, + "type": "string" } }, { "session_remember": { "default": false, - "type": "boolean", - "required": false + "description": "Enables or disables persistent sessions", + "required": false, + "type": "boolean" } }, { "session_remember_cookie_name": { "default": "remember", - "type": "string", - "required": false + "description": "Persistent session cookie name", + "required": false, + "type": "string" } }, { "session_remember_rolling_timeout": { "default": 604800, - "type": "number", - "required": false + "description": "Persistent session rolling timeout in seconds.", + "required": false, + "type": "number" } }, { "session_remember_absolute_timeout": { "default": 2592000, - "type": "number", - "required": false + "description": "Persistent session absolute timeout in seconds.", + "required": false, + "type": "number" } }, { "session_idling_timeout": { "default": 900, - "type": "number", - "required": false + "description": "The session cookie idle time in seconds.", + "required": false, + "type": "number" } }, { "session_rolling_timeout": { "default": 3600, - "type": "number", - "required": false + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "required": false, + "type": "number" } }, { "session_absolute_timeout": { "default": 86400, - "type": "number", - "required": false + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "required": false, + "type": "number" } }, { "session_cookie_path": { + "default": "/", + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/", + "required": false, "match_none": [ { - "err": "must not have empty segments", - "pattern": "//" + "pattern": "//", + "err": "must not have empty segments" } - ], - "starts_with": "/", - "default": "/", - "required": false, - "type": "string" + ] } }, { "session_cookie_domain": { - "type": "string", - "required": false + "description": "The session cookie domain flag.", + "required": false, + "type": "string" } }, { "session_cookie_same_site": { + "default": "Lax", + "type": "string", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", "required": false, "one_of": [ "Strict", "Lax", "None", "Default" - ], - "type": "string", - "default": "Lax" + ] } }, { "session_cookie_http_only": { "default": true, - "type": "boolean", - "required": false + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, + "type": "boolean" } }, { "session_cookie_secure": { - "type": "boolean", - "required": false + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false, + "type": "boolean" } }, { @@ -389,169 +358,191 @@ }, { "session_storage": { + "default": "cookie", + "type": "string", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", "required": false, "one_of": [ "cookie", "memcache", "memcached", "redis" - ], - "type": "string", - "default": "cookie" + ] } }, { "session_store_metadata": { "default": false, - "type": "boolean", - "required": false + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "required": false, + "type": "boolean" } }, { "session_enforce_same_subject": { "default": false, - "type": "boolean", - "required": false + "description": "When set to `true`, audiences are forced to share the same subject.", + "required": false, + "type": "boolean" } }, { "session_hash_subject": { "default": false, - "type": "boolean", - "required": false + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "required": false, + "type": "boolean" } }, { "session_hash_storage_key": { "default": false, - "type": "boolean", - "required": false + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "required": false, + "type": "boolean" } }, { "session_memcached_prefix": { - "type": "string", - "required": false + "description": "The memcached session key prefix.", + "required": false, + "type": "string" } }, { "session_memcached_socket": { - "type": "string", - "required": false + "description": "The memcached unix socket path.", + "required": false, + "type": "string" } }, { "session_memcached_host": { "default": "127.0.0.1", - "type": "string", - "required": false + "description": "The memcached host.", + "required": false, + "type": "string" } }, { "session_memcached_port": { + "default": 11211, "type": "integer", "between": [ 0, 65535 ], - "required": false, - "default": 11211 + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": false } }, { "session_redis_prefix": { - "type": "string", - "required": false + "description": "The Redis session key prefix.", + "required": false, + "type": "string" } }, { "session_redis_socket": { - "type": "string", - "required": false + "description": "The Redis unix socket path.", + "required": false, + "type": "string" } }, { "session_redis_host": { "default": "127.0.0.1", - "type": "string", - "required": false + "description": "The Redis host IP.", + "required": false, + "type": "string" } }, { "session_redis_port": { + "default": 6379, "type": "integer", "between": [ 0, 65535 ], - "required": false, - "default": 6379 + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": false } }, { "session_redis_username": { "referenceable": true, - "type": "string", - "required": false + "description": "Redis username if the `redis` session storage is defined and ACL authentication is desired.If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "required": false, + "type": "string" } }, { "session_redis_password": { - "required": false, - "encrypted": true, + "referenceable": true, "type": "string", - "referenceable": true + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no auth commands are sent to Redis. This value is pulled from", + "required": false, + "encrypted": true } }, { "session_redis_connect_timeout": { - "type": "integer", - "required": false + "description": "The Redis connection timeout in milliseconds.", + "required": false, + "type": "integer" } }, { "session_redis_read_timeout": { - "type": "integer", - "required": false + "description": "The Redis read timeout in milliseconds.", + "required": false, + "type": "integer" } }, { "session_redis_send_timeout": { - "type": "integer", - "required": false + "description": "The Redis send timeout in milliseconds.", + "required": false, + "type": "integer" } }, { "session_redis_ssl": { "default": false, - "type": "boolean", - "required": false + "description": "Use SSL/TLS for the Redis connection.", + "required": false, + "type": "boolean" } }, { "session_redis_ssl_verify": { "default": false, - "type": "boolean", - "required": false + "description": "Verify the Redis server certificate.", + "required": false, + "type": "boolean" } }, { "session_redis_server_name": { - "type": "string", - "required": false + "description": "The SNI used for connecting to the Redis server.", + "required": false, + "type": "string" } }, { "session_redis_cluster_nodes": { - "type": "array", "required": false, + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", "elements": { "fields": [ { "ip": { - "type": "string", + "description": "A string representing a host name, such as example.com.", "default": "127.0.0.1", - "required": true + "required": true, + "type": "string" } }, { @@ -560,23 +551,99 @@ 0, 65535 ], - "type": "integer", - "default": 6379 + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" } } ], "type": "record" - } + }, + "type": "array" } }, { "session_redis_cluster_max_redirections": { - "type": "integer", - "required": false + "description": "The Redis cluster maximum redirects.", + "required": false, + "type": "integer" } } ], - "required": true + "shorthand_fields": [ + { + "session_cookie_lifetime": { + "type": "number" + } + }, + { + "session_cookie_idletime": { + "type": "number" + } + }, + { + "session_cookie_samesite": { + "type": "string" + } + }, + { + "session_cookie_httponly": { + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "type": "string" + } + }, + { + "session_memcache_socket": { + "type": "string" + } + }, + { + "session_memcache_host": { + "type": "string" + } + }, + { + "session_memcache_port": { + "type": "integer" + } + }, + { + "session_redis_cluster_maxredirections": { + "type": "integer" + } + }, + { + "session_cookie_renew": { + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "type": "integer" + } + }, + { + "session_strategy": { + "type": "string" + } + }, + { + "session_compressor": { + "type": "string" + } + }, + { + "session_auth_ttl": { + "type": "number" + } + } + ], + "required": true, + "type": "record" } } ] diff --git a/schemas/session/3.4.x.json b/schemas/session/3.4.x.json index ab89e85b..09b14172 100644 --- a/schemas/session/3.4.x.json +++ b/schemas/session/3.4.x.json @@ -1,10 +1,14 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { @@ -16,6 +20,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -30,167 +35,156 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "shorthand_fields": [ - { - "cookie_lifetime": { - "type": "number" - } - }, - { - "cookie_idletime": { - "type": "number" - } - }, - { - "cookie_renew": { - "type": "number" - } - }, - { - "cookie_discard": { - "type": "number" - } - }, - { - "cookie_samesite": { - "type": "string" - } - }, - { - "cookie_httponly": { - "type": "boolean" - } - }, - { - "cookie_persistent": { - "type": "boolean" - } - } - ], - "required": true, "fields": [ { "secret": { - "required": false, + "referenceable": true, + "default": "SlGI58s4QRfcq8J6AW5LSteAUJxQJUqY1pBFtkl3l6Ij", "type": "string", - "default": "x8iNgCZK6ujBch4SJzrfXTvxciHURzefZYUqZ0PDyIwr", - "encrypted": true, - "referenceable": true + "description": "The secret that is used in keyed HMAC generation.", + "required": false, + "encrypted": true } }, { "storage": { - "type": "string", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", "default": "cookie", "one_of": [ "cookie", "kong" - ] + ], + "type": "string" } }, { "audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", "default": "default", "type": "string" } }, { "idling_timeout": { + "description": "The session cookie idle time, in seconds.", "default": 900, "type": "number" } }, { "rolling_timeout": { + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", "default": 3600, "type": "number" } }, { "absolute_timeout": { + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", "default": 86400, "type": "number" } }, { "stale_ttl": { + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", "default": 10, "type": "number" } }, { "cookie_name": { + "description": "The name of the cookie.", "default": "session", "type": "string" } }, { "cookie_path": { + "description": "The resource in the host where the cookie is available.", "default": "/", "type": "string" } }, { "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", "type": "string" } }, { "cookie_same_site": { - "type": "string", + "description": "Determines whether and how a cookie may be sent with cross-site requests.", "default": "Strict", "one_of": [ "Strict", "Lax", "None", "Default" - ] + ], + "type": "string" } }, { "cookie_http_only": { + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", "default": true, "type": "boolean" } }, { "cookie_secure": { + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", "default": true, "type": "boolean" } }, { "remember": { + "description": "Enables or disables persistent sessions.", "default": false, "type": "boolean" } }, { "remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", "default": "remember", "type": "string" } }, { "remember_rolling_timeout": { + "description": "The persistent session rolling timeout window, in seconds.", "default": 604800, "type": "number" } }, { "remember_absolute_timeout": { + "description": "The persistent session absolute timeout limit, in seconds.", "default": 2592000, "type": "number" } }, { "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", "elements": { "one_of": [ "id", @@ -208,6 +202,7 @@ }, { "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", "elements": { "one_of": [ "id", @@ -225,7 +220,11 @@ }, { "logout_methods": { - "type": "set", + "default": [ + "POST", + "DELETE" + ], + "description": "A set of HTTP methods that the plugin will respond to.", "elements": { "one_of": [ "GET", @@ -234,26 +233,63 @@ ], "type": "string" }, - "default": [ - "POST", - "DELETE" - ] + "type": "set" } }, { "logout_query_arg": { + "description": "The query argument passed to logout requests.", "default": "session_logout", "type": "string" } }, { "logout_post_arg": { + "description": "The POST argument passed to logout requests. Do not change this property.", "default": "session_logout", "type": "string" } } ], - "type": "record" + "type": "record", + "required": true, + "shorthand_fields": [ + { + "cookie_lifetime": { + "type": "number" + } + }, + { + "cookie_idletime": { + "type": "number" + } + }, + { + "cookie_renew": { + "type": "number" + } + }, + { + "cookie_discard": { + "type": "number" + } + }, + { + "cookie_samesite": { + "type": "string" + } + }, + { + "cookie_httponly": { + "type": "boolean" + } + }, + { + "cookie_persistent": { + "type": "boolean" + } + } + ] } } ] diff --git a/schemas/statsd-advanced/3.4.x.json b/schemas/statsd-advanced/3.4.x.json index 4e74fce9..ea5b48b9 100644 --- a/schemas/statsd-advanced/3.4.x.json +++ b/schemas/statsd-advanced/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,18 +27,27 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "host": { - "type": "string", - "default": "localhost" + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" } }, { @@ -43,19 +56,20 @@ 0, 65535 ], - "type": "integer", - "default": 8125 + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" } }, { "prefix": { - "type": "string", - "default": "kong" + "description": "String to prefix to each metric's name.", + "default": "kong", + "type": "string" } }, { "metrics": { - "type": "array", "default": [ { "stat_type": "counter", @@ -63,12 +77,12 @@ "sample_rate": 1 }, { - "name": "latency", - "stat_type": "timer" + "stat_type": "timer", + "name": "latency" }, { - "name": "request_size", - "stat_type": "timer" + "stat_type": "timer", + "name": "request_size" }, { "stat_type": "counter", @@ -76,12 +90,12 @@ "sample_rate": 1 }, { - "name": "response_size", - "stat_type": "timer" + "stat_type": "timer", + "name": "response_size" }, { - "name": "unique_users", - "stat_type": "set" + "stat_type": "set", + "name": "unique_users" }, { "stat_type": "counter", @@ -89,12 +103,12 @@ "sample_rate": 1 }, { - "name": "upstream_latency", - "stat_type": "timer" + "stat_type": "timer", + "name": "upstream_latency" }, { - "name": "kong_latency", - "stat_type": "timer" + "stat_type": "timer", + "name": "kong_latency" }, { "stat_type": "counter", @@ -127,77 +141,11 @@ "sample_rate": 1 } ], + "description": "List of Metrics to be logged.", "elements": { - "entity_checks": [ - { - "conditional": { - "if_match": { - "one_of": [ - "unique_users" - ] - }, - "then_field": "stat_type", - "if_field": "name", - "then_match": { - "eq": "set" - } - } - }, - { - "conditional": { - "if_match": { - "one_of": [ - "request_count", - "status_count", - "request_per_user", - "status_count_per_user", - "status_count_per_workspace", - "status_count_per_user_per_route", - "cache_datastore_hits_total", - "cache_datastore_misses_total" - ] - }, - "then_field": "stat_type", - "if_field": "name", - "then_match": { - "eq": "counter" - } - } - }, - { - "conditional": { - "if_match": { - "one_of": [ - "shdict_usage" - ] - }, - "then_field": "stat_type", - "if_field": "name", - "then_match": { - "eq": "gauge" - } - } - }, - { - "conditional": { - "if_match": { - "one_of": [ - "counter", - "gauge" - ] - }, - "then_field": "sample_rate", - "if_field": "stat_type", - "then_match": { - "required": true - } - } - } - ], "fields": [ { "name": { - "type": "string", "required": true, "one_of": [ "kong_latency", @@ -215,12 +163,12 @@ "shdict_usage", "cache_datastore_hits_total", "cache_datastore_misses_total" - ] + ], + "type": "string" } }, { "stat_type": { - "type": "string", "required": true, "one_of": [ "counter", @@ -229,13 +177,14 @@ "meter", "set", "timer" - ] + ], + "type": "string" } }, { "sample_rate": { - "gt": 0, - "type": "number" + "type": "number", + "gt": 0 } }, { @@ -269,15 +218,83 @@ } } ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "eq": "set" + }, + "if_match": { + "one_of": [ + "unique_users" + ] + }, + "then_field": "stat_type", + "if_field": "name" + } + }, + { + "conditional": { + "then_match": { + "eq": "counter" + }, + "if_match": { + "one_of": [ + "request_count", + "status_count", + "request_per_user", + "status_count_per_user", + "status_count_per_workspace", + "status_count_per_user_per_route", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + }, + "then_field": "stat_type", + "if_field": "name" + } + }, + { + "conditional": { + "then_match": { + "eq": "gauge" + }, + "if_match": { + "one_of": [ + "shdict_usage" + ] + }, + "then_field": "stat_type", + "if_field": "name" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type" + } + } + ], "type": "record" - } + }, + "type": "array" } }, { "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", "elements": { - "match": "^[0-9]+-[0-9]+$", - "type": "string" + "type": "string", + "match": "^[0-9]+-[0-9]+$" }, "type": "array" } @@ -288,61 +305,66 @@ 0, 65507 ], - "type": "number", - "default": 0 + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "default": 0, + "type": "number" } }, { "use_tcp": { - "type": "boolean", - "default": false + "description": "Use TCP instead of UDP.", + "default": false, + "type": "boolean" } }, { "hostname_in_prefix": { - "type": "boolean", - "default": false + "description": "Include the `hostname` in the `prefix` for each metric name.", + "default": false, + "type": "boolean" } }, { "consumer_identifier_default": { + "default": "custom_id", + "type": "string", + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", "required": true, "one_of": [ "consumer_id", "custom_id", "username" - ], - "default": "custom_id", - "type": "string" + ] } }, { "service_identifier_default": { + "default": "service_name_or_host", + "type": "string", + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", "required": true, "one_of": [ "service_id", "service_name", "service_host", "service_name_or_host" - ], - "default": "service_name_or_host", - "type": "string" + ] } }, { "workspace_identifier_default": { + "default": "workspace_id", + "type": "string", + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", "required": true, "one_of": [ "workspace_id", "workspace_name" - ], - "default": "workspace_id", - "type": "string" + ] } }, { "queue": { - "required": true, "fields": [ { "max_batch_size": { @@ -350,8 +372,9 @@ 1, 1000000 ], - "type": "number", - "default": 1 + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer" } }, { @@ -360,8 +383,9 @@ 0, 3600 ], - "type": "number", - "default": 1 + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number" } }, { @@ -370,38 +394,53 @@ 1, 1000000 ], - "type": "number", - "default": 10000 + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer" } }, { "max_bytes": { - "type": "number" + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." } }, { "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", "default": 60, "type": "number" } }, { "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", "type": "number" } }, { "max_retry_delay": { + "between": [ + 0.001, + 1000000 + ], "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", "type": "number" } } ], + "required": true, "type": "record" } } ], + "required": true, "type": "record" } } diff --git a/schemas/statsd/3.4.x.json b/schemas/statsd/3.4.x.json index f0d86dd8..64c70f11 100644 --- a/schemas/statsd/3.4.x.json +++ b/schemas/statsd/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,29 +27,27 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "retry_count", - "queue_size", - "flush_timeout" - ] - } - } - ], "fields": [ { "host": { - "type": "string", - "default": "localhost" + "default": "localhost", + "description": "The IP address or hostname of StatsD server to send data to.", + "type": "string" } }, { @@ -54,19 +56,20 @@ 0, 65535 ], - "type": "integer", - "default": 8125 + "description": "The port of StatsD server to send data to.", + "default": 8125, + "type": "integer" } }, { "prefix": { + "description": "String to prefix to each metric's name.", "default": "kong", "type": "string" } }, { "metrics": { - "type": "array", "default": [ { "stat_type": "counter", @@ -74,8 +77,8 @@ "sample_rate": 1 }, { - "name": "latency", - "stat_type": "timer" + "stat_type": "timer", + "name": "latency" }, { "stat_type": "counter", @@ -93,8 +96,8 @@ "sample_rate": 1 }, { - "name": "unique_users", - "stat_type": "set" + "stat_type": "set", + "name": "unique_users" }, { "stat_type": "counter", @@ -102,12 +105,12 @@ "sample_rate": 1 }, { - "name": "upstream_latency", - "stat_type": "timer" + "stat_type": "timer", + "name": "upstream_latency" }, { - "name": "kong_latency", - "stat_type": "timer" + "stat_type": "timer", + "name": "kong_latency" }, { "stat_type": "counter", @@ -140,29 +143,13 @@ "sample_rate": 1 } ], + "description": "List of metrics to be logged.", "elements": { - "entity_checks": [ - { - "conditional": { - "if_match": { - "one_of": [ - "counter", - "gauge" - ] - }, - "then_field": "sample_rate", - "if_field": "stat_type", - "then_match": { - "required": true - } - } - } - ], "fields": [ { "name": { - "type": "string", "required": true, + "description": "StatsD metric’s name.", "one_of": [ "kong_latency", "latency", @@ -179,13 +166,14 @@ "shdict_usage", "cache_datastore_hits_total", "cache_datastore_misses_total" - ] + ], + "type": "string" } }, { "stat_type": { - "type": "string", "required": true, + "description": "Determines what sort of event a metric represents.", "one_of": [ "counter", "gauge", @@ -193,17 +181,20 @@ "meter", "set", "timer" - ] + ], + "type": "string" } }, { "sample_rate": { + "description": "Sampling rate", "gt": 0, "type": "number" } }, { "consumer_identifier": { + "description": "Authenticated user detail.", "one_of": [ "consumer_id", "custom_id", @@ -214,6 +205,7 @@ }, { "service_identifier": { + "description": "Service detail.", "one_of": [ "service_id", "service_name", @@ -225,6 +217,7 @@ }, { "workspace_identifier": { + "description": "Workspace detail.", "one_of": [ "workspace_id", "workspace_name" @@ -233,15 +226,34 @@ } } ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type" + } + } + ], "type": "record" - } + }, + "type": "array" } }, { "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", "elements": { - "match": "^[0-9]+-[0-9]+$", - "type": "string" + "type": "string", + "match": "^[0-9]+-[0-9]+$" }, "type": "array" } @@ -252,8 +264,8 @@ 0, 65507 ], - "type": "number", - "default": 0 + "default": 0, + "type": "number" } }, { @@ -270,18 +282,19 @@ }, { "consumer_identifier_default": { + "required": true, "default": "custom_id", "one_of": [ "consumer_id", "custom_id", "username" ], - "type": "string", - "required": true + "type": "string" } }, { "service_identifier_default": { + "required": true, "default": "service_name_or_host", "one_of": [ "service_id", @@ -289,19 +302,18 @@ "service_host", "service_name_or_host" ], - "type": "string", - "required": true + "type": "string" } }, { "workspace_identifier_default": { + "required": true, "default": "workspace_id", "one_of": [ "workspace_id", "workspace_name" ], - "type": "string", - "required": true + "type": "string" } }, { @@ -321,19 +333,18 @@ }, { "tag_style": { - "type": "string", "required": false, "one_of": [ "dogstatsd", "influxdb", "librato", "signalfx" - ] + ], + "type": "string" } }, { "queue": { - "required": true, "fields": [ { "max_batch_size": { @@ -341,8 +352,9 @@ 1, 1000000 ], - "type": "number", - "default": 1 + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer" } }, { @@ -351,8 +363,9 @@ 0, 3600 ], - "type": "number", - "default": 1 + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number" } }, { @@ -361,38 +374,64 @@ 1, 1000000 ], - "type": "number", - "default": 10000 + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer" } }, { "max_bytes": { - "type": "number" + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." } }, { "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", "default": 60, "type": "number" } }, { "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", "type": "number" } }, { "max_retry_delay": { + "between": [ + 0.001, + 1000000 + ], "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", "type": "number" } } ], + "required": true, "type": "record" } } ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "retry_count", + "queue_size", + "flush_timeout" + ] + } + } + ], + "required": true, "type": "record" } } diff --git a/schemas/syslog/3.4.x.json b/schemas/syslog/3.4.x.json index 68cc12eb..2bfc7bad 100644 --- a/schemas/syslog/3.4.x.json +++ b/schemas/syslog/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,16 +27,25 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "log_level": { + "required": true, "default": "info", "one_of": [ "debug", @@ -44,12 +57,12 @@ "alert", "emerg" ], - "type": "string", - "required": true + "type": "string" } }, { "successful_severity": { + "required": true, "default": "info", "one_of": [ "debug", @@ -61,12 +74,12 @@ "alert", "emerg" ], - "type": "string", - "required": true + "type": "string" } }, { "client_errors_severity": { + "required": true, "default": "info", "one_of": [ "debug", @@ -78,12 +91,12 @@ "alert", "emerg" ], - "type": "string", - "required": true + "type": "string" } }, { "server_errors_severity": { + "required": true, "default": "info", "one_of": [ "debug", @@ -95,26 +108,29 @@ "alert", "emerg" ], - "type": "string", - "required": true + "type": "string" } }, { "custom_fields_by_lua": { - "type": "map", "keys": { "len_min": 1, "type": "string" }, + "description": "Lua code as a key-value map", "values": { - "type": "string", - "len_min": 1 - } + "len_min": 1, + "type": "string" + }, + "type": "map" } }, { "facility": { "default": "user", + "type": "string", + "description": "The facility is used by the operating system to decide how to handle each log message.", + "required": true, "one_of": [ "auth", "authpriv", @@ -136,12 +152,11 @@ "local5", "local6", "local7" - ], - "type": "string", - "required": true + ] } } ], + "required": true, "type": "record" } } diff --git a/schemas/tcp-log/3.4.x.json b/schemas/tcp-log/3.4.x.json index 514c797b..72d6f752 100644 --- a/schemas/tcp-log/3.4.x.json +++ b/schemas/tcp-log/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,18 +27,27 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "host": { - "type": "string", - "required": true + "description": "The IP address or host name to send data to.", + "required": true, + "type": "string" } }, { @@ -43,48 +56,55 @@ 0, 65535 ], - "type": "integer", - "required": true + "description": "The port to send data to on the upstream server.", + "required": true, + "type": "integer" } }, { "timeout": { - "type": "number", - "default": 10000 + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000, + "type": "number" } }, { "keepalive": { - "type": "number", - "default": 60000 + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "default": 60000, + "type": "number" } }, { "tls": { - "type": "boolean", + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "default": false, "required": true, - "default": false + "type": "boolean" } }, { "tls_sni": { - "type": "string" + "type": "string", + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake." } }, { "custom_fields_by_lua": { - "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", "keys": { "len_min": 1, "type": "string" }, - "values": { - "type": "string", - "len_min": 1 - } + "type": "map" } } ], + "required": true, "type": "record" } } diff --git a/schemas/tls-handshake-modifier/3.4.x.json b/schemas/tls-handshake-modifier/3.4.x.json index 6520e6ae..b1be13fb 100644 --- a/schemas/tls-handshake-modifier/3.4.x.json +++ b/schemas/tls-handshake-modifier/3.4.x.json @@ -1,14 +1,19 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "protocols": { + "required": true, "default": [ "https", "grpcs" @@ -21,25 +26,33 @@ ], "type": "string" }, - "type": "set", - "required": true + "type": "set" + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "tls_client_certificate": { + "default": "REQUEST", "type": "string", + "description": "TLS Client Certificate", + "required": false, "one_of": [ "REQUEST" - ], - "required": false, - "default": "REQUEST" + ] } } ], + "required": true, "type": "record" } } diff --git a/schemas/tls-metadata-headers/3.4.x.json b/schemas/tls-metadata-headers/3.4.x.json index 0c234808..b603b3e1 100644 --- a/schemas/tls-metadata-headers/3.4.x.json +++ b/schemas/tls-metadata-headers/3.4.x.json @@ -1,14 +1,19 @@ { + "entity_checks": [ + + ], "fields": [ { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "protocols": { + "required": true, "default": [ "https", "grpcs" @@ -21,23 +26,31 @@ ], "type": "string" }, - "type": "set", - "required": true + "type": "set" + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "inject_client_cert_details": { - "type": "boolean", - "default": false + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "default": false, + "type": "boolean" } }, { "client_cert_header_name": { "default": "X-Client-Cert", + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", "required": true, "type": "string" } @@ -45,6 +58,7 @@ { "client_serial_header_name": { "default": "X-Client-Cert-Serial", + "description": "Define the HTTP header name used for the serial number of the client certificate.", "required": true, "type": "string" } @@ -52,6 +66,7 @@ { "client_cert_issuer_dn_header_name": { "default": "X-Client-Cert-Issuer-DN", + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", "required": true, "type": "string" } @@ -59,6 +74,7 @@ { "client_cert_subject_dn_header_name": { "default": "X-Client-Cert-Subject-DN", + "description": "Define the HTTP header name used for the subject DN of the client certificate.", "required": true, "type": "string" } @@ -66,11 +82,13 @@ { "client_cert_fingerprint_header_name": { "default": "X-Client-Cert-Fingerprint", + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", "required": true, "type": "string" } } ], + "required": true, "type": "record" } } diff --git a/schemas/udp-log/3.4.x.json b/schemas/udp-log/3.4.x.json index 5aa0881f..454bfece 100644 --- a/schemas/udp-log/3.4.x.json +++ b/schemas/udp-log/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,18 +27,27 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "host": { - "type": "string", - "required": true + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" } }, { @@ -43,30 +56,34 @@ 0, 65535 ], - "type": "integer", - "required": true + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "type": "integer" } }, { "timeout": { - "type": "number", - "default": 10000 + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000, + "type": "number" } }, { "custom_fields_by_lua": { - "type": "map", "keys": { "len_min": 1, "type": "string" }, + "description": "Lua code as a key-value map", "values": { - "type": "string", - "len_min": 1 - } + "len_min": 1, + "type": "string" + }, + "type": "map" } } ], + "required": true, "type": "record" } } diff --git a/schemas/upstream-timeout/3.4.x.json b/schemas/upstream-timeout/3.4.x.json index c28d97dd..b5569d95 100644 --- a/schemas/upstream-timeout/3.4.x.json +++ b/schemas/upstream-timeout/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,13 +20,21 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "read_timeout": { @@ -31,6 +42,7 @@ 0, 2147483646 ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "type": "integer" } }, @@ -40,6 +52,7 @@ 0, 2147483646 ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "type": "integer" } }, @@ -49,10 +62,12 @@ 0, 2147483646 ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "type": "integer" } } ], + "required": true, "type": "record" } } diff --git a/schemas/vault-auth/3.4.x.json b/schemas/vault-auth/3.4.x.json index 188b14b5..e41bf777 100644 --- a/schemas/vault-auth/3.4.x.json +++ b/schemas/vault-auth/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,72 +20,91 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "consumer": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, - "reference": "consumers", - "type": "foreign" + "reference": "consumers" } }, { "config": { - "required": true, "fields": [ { "access_token_name": { "default": "access_token", "elements": { - "type": "string" + "type": "string", + "description": "A string representing an HTTP header name." }, - "required": true, - "type": "string" + "type": "string", + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "required": true } }, { "secret_token_name": { "default": "secret_token", "elements": { - "type": "string" + "type": "string", + "description": "A string representing an HTTP header name." }, - "required": true, - "type": "string" + "type": "string", + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "required": true } }, { "vault": { - "type": "foreign", "reference": "vault_auth_vaults", - "required": true + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "required": true, + "type": "foreign" } }, { "hide_credentials": { "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", "type": "boolean" } }, { "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", "type": "string" } }, { "tokens_in_body": { "default": false, + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", "type": "boolean" } }, { "run_on_preflight": { "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", "type": "boolean" } } ], + "required": true, "type": "record" } } diff --git a/schemas/websocket-size-limit/3.4.x.json b/schemas/websocket-size-limit/3.4.x.json index e77a8035..ab4a9625 100644 --- a/schemas/websocket-size-limit/3.4.x.json +++ b/schemas/websocket-size-limit/3.4.x.json @@ -1,7 +1,11 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { + "required": true, "default": [ "ws", "wss" @@ -13,21 +17,19 @@ ], "type": "string" }, - "required": true, "type": "set" } }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" + } + }, { "config": { - "required": true, - "entity_checks": [ - { - "at_least_one_of": [ - "client_max_payload", - "upstream_max_payload" - ] - } - ], "fields": [ { "client_max_payload": { @@ -50,6 +52,15 @@ } } ], + "entity_checks": [ + { + "at_least_one_of": [ + "client_max_payload", + "upstream_max_payload" + ] + } + ], + "required": true, "type": "record" } } diff --git a/schemas/websocket-validator/3.4.x.json b/schemas/websocket-validator/3.4.x.json index 5df13fb2..df5dbd2c 100644 --- a/schemas/websocket-validator/3.4.x.json +++ b/schemas/websocket-validator/3.4.x.json @@ -1,7 +1,11 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { + "required": true, "default": [ "ws", "wss" @@ -13,70 +17,44 @@ ], "type": "string" }, - "required": true, "type": "set" } }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" + } + }, { "config": { - "required": true, - "entity_checks": [ - { - "at_least_one_of": [ - "client", - "upstream" - ] - } - ], "fields": [ { "client": { - "type": "record", - "entity_checks": [ - { - "at_least_one_of": [ - "text", - "binary" - ] - } - ], "fields": [ { "text": { - "type": "record", - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "type", - "schema" - ] - } - } - ], "fields": [ { "type": { - "type": "string", "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", "one_of": [ "draft4" - ] + ], + "type": "string" } }, { "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", "required": true, "type": "string" } } ], - "required": false - } - }, - { - "binary": { - "type": "record", "entity_checks": [ { "custom_entity_check": { @@ -87,33 +65,46 @@ } } ], + "required": false, + "type": "record" + } + }, + { + "binary": { "fields": [ { "type": { - "type": "string", "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", "one_of": [ "draft4" - ] + ], + "type": "string" } }, { "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", "required": true, "type": "string" } } ], - "required": false + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "required": false, + "type": "record" } } ], - "required": false - } - }, - { - "upstream": { - "type": "record", "entity_checks": [ { "at_least_one_of": [ @@ -122,43 +113,34 @@ ] } ], + "required": false, + "type": "record" + } + }, + { + "upstream": { "fields": [ { "text": { - "type": "record", - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "type", - "schema" - ] - } - } - ], "fields": [ { "type": { - "type": "string", "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", "one_of": [ "draft4" - ] + ], + "type": "string" } }, { "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", "required": true, "type": "string" } } ], - "required": false - } - }, - { - "binary": { - "type": "record", "entity_checks": [ { "custom_entity_check": { @@ -169,31 +151,68 @@ } } ], + "required": false, + "type": "record" + } + }, + { + "binary": { "fields": [ { "type": { - "type": "string", "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", "one_of": [ "draft4" - ] + ], + "type": "string" } }, { "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", "required": true, "type": "string" } } ], - "required": false + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "required": false, + "type": "record" } } ], - "required": false + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ], + "required": false, + "type": "record" } } ], + "entity_checks": [ + { + "at_least_one_of": [ + "client", + "upstream" + ] + } + ], + "required": true, "type": "record" } } diff --git a/schemas/xml-threat-protection/3.4.x.json b/schemas/xml-threat-protection/3.4.x.json index d052e082..5f9354d1 100644 --- a/schemas/xml-threat-protection/3.4.x.json +++ b/schemas/xml-threat-protection/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -17,51 +20,21 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, - "entity_checks": [ - { - "conditional": { - "if_match": { - "eq": true - }, - "then_field": "max_namespaces", - "if_field": "namespace_aware", - "then_match": { - "required": true - } - } - }, - { - "conditional": { - "if_match": { - "eq": true - }, - "then_field": "prefix", - "if_field": "namespace_aware", - "then_match": { - "required": true - } - } - }, - { - "conditional": { - "if_match": { - "eq": true - }, - "then_field": "namespaceuri", - "if_field": "namespace_aware", - "then_match": { - "required": true - } - } - } - ], "fields": [ { "checked_content_types": { @@ -70,10 +43,11 @@ ], "elements": { "match": "^[^%s]+%/[^ ;]+$", - "type": "string", - "required": true + "required": true, + "type": "string" }, "type": "set", + "description": "A list of Content-Type values with payloads that must be validated.", "required": true } }, @@ -84,16 +58,18 @@ ], "elements": { "match": "^[^%s]+%/[^ ;]+$", - "type": "string", - "required": true + "required": true, + "type": "string" }, "type": "set", + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", "required": true } }, { "allow_dtd": { "default": false, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", "required": true, "type": "boolean" } @@ -101,163 +77,222 @@ { "namespace_aware": { "default": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", "required": true, "type": "boolean" } }, { "max_depth": { + "default": 50, "type": "integer", + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", "required": true, - "gt": 0, - "default": 50 + "gt": 0 } }, { "max_children": { + "default": 100, "type": "integer", + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", "required": true, - "gt": 0, - "default": 100 + "gt": 0 } }, { "max_attributes": { + "default": 100, "type": "integer", + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", "required": true, - "gt": 0, - "default": 100 + "gt": 0 } }, { "max_namespaces": { + "default": 20, "type": "integer", + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", "required": false, - "gt": 0, - "default": 20 + "gt": 0 } }, { "document": { + "gt": 0, "type": "integer", + "description": "Maximum size of the entire document.", "required": true, - "gt": 0, "default": 10485760 } }, { "buffer": { + "gt": 0, "type": "integer", + "description": "Maximum size of the unparsed buffer (see below).", "required": true, - "gt": 0, "default": 1048576 } }, { "comment": { + "gt": 0, "type": "integer", + "description": "Maximum size of comments.", "required": true, - "gt": 0, "default": 1024 } }, { "localname": { + "gt": 0, "type": "integer", + "description": "Maximum size of the localname. This applies to tags and attributes.", "required": true, - "gt": 0, "default": 1024 } }, { "prefix": { + "gt": 0, "type": "integer", + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", "required": false, - "gt": 0, "default": 1024 } }, { "namespaceuri": { + "gt": 0, "type": "integer", + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", "required": false, - "gt": 0, "default": 1024 } }, { "attribute": { + "gt": 0, "type": "integer", + "description": "Maximum size of the attribute value.", "required": true, - "gt": 0, "default": 1048576 } }, { "text": { + "gt": 0, "type": "integer", + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", "required": true, - "gt": 0, "default": 1048576 } }, { "pitarget": { + "gt": 0, "type": "integer", + "description": "Maximum size of processing instruction targets.", "required": true, - "gt": 0, "default": 1024 } }, { "pidata": { + "gt": 0, "type": "integer", + "description": "Maximum size of processing instruction data.", "required": true, - "gt": 0, "default": 1024 } }, { "entityname": { + "gt": 0, "type": "integer", + "description": "Maximum size of entity names in EntityDecl.", "required": true, - "gt": 0, "default": 1024 } }, { "entity": { + "gt": 0, "type": "integer", + "description": "Maximum size of entity values in EntityDecl.", "required": true, - "gt": 0, "default": 1024 } }, { "entityproperty": { + "gt": 0, "type": "integer", + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", "required": true, - "gt": 0, "default": 1024 } }, { "bla_max_amplification": { + "default": 100, "type": "number", + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", "required": true, - "gt": 1, - "default": 100 + "gt": 1 } }, { "bla_threshold": { - "required": true, - "type": "integer", "gt": 1024, + "type": "integer", + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "required": true, "default": 8388608 } } ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "max_namespaces", + "if_field": "namespace_aware" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "prefix", + "if_field": "namespace_aware" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "namespaceuri", + "if_field": "namespace_aware" + } + } + ], + "required": true, "type": "record" } } diff --git a/schemas/zipkin/3.4.x.json b/schemas/zipkin/3.4.x.json index 7b252fc7..e7df563b 100644 --- a/schemas/zipkin/3.4.x.json +++ b/schemas/zipkin/3.4.x.json @@ -1,4 +1,7 @@ { + "entity_checks": [ + + ], "fields": [ { "protocols": { @@ -9,6 +12,7 @@ "https" ], "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", "one_of": [ "grpc", "grpcs", @@ -23,24 +27,34 @@ ], "type": "string" }, - "required": true, - "type": "set" + "type": "set", + "description": "A set of strings representing protocols.", + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups" } }, { "config": { - "required": true, "fields": [ { "local_service_name": { + "description": "The name of the service as displayed in Zipkin.", "default": "kong", - "type": "string", - "required": true + "required": true, + "type": "string" } }, { "http_endpoint": { - "type": "string" + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." } }, { @@ -49,35 +63,42 @@ 0, 1 ], - "type": "number", - "default": 0.001 + "default": 0.001, + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "type": "number" } }, { "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", "type": "string" } }, { "include_credential": { + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", "default": true, - "type": "boolean", - "required": true + "required": true, + "type": "boolean" } }, { "traceid_byte_count": { + "default": 16, + "type": "integer", + "description": "The length in bytes of each request's Trace ID.", "required": true, "one_of": [ 8, 16 - ], - "type": "integer", - "default": 16 + ] } }, { "header_type": { + "default": "preserve", + "type": "string", + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", "required": true, "one_of": [ "preserve", @@ -87,14 +108,16 @@ "w3c", "jaeger", "ot", + "aws", "datadog" - ], - "type": "string", - "default": "preserve" + ] } }, { "default_header_type": { + "default": "b3", + "type": "string", + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", "required": true, "one_of": [ "b3", @@ -102,26 +125,28 @@ "w3c", "jaeger", "ot", + "aws", "datadog" - ], - "type": "string", - "default": "b3" + ] } }, { "tags_header": { + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", "default": "Zipkin-Tags", - "type": "string", - "required": true + "required": true, + "type": "string" } }, { "static_tags": { - "type": "array", + "description": "The tags specified on this property will be added to the generated request traces.", "elements": { "fields": [ { "name": { + "type": "string", + "required": true, "not_one_of": [ "error", "http.method", @@ -136,31 +161,31 @@ "kong.service", "lc", "peer.hostname" - ], - "type": "string", - "required": true + ] } }, { "value": { - "type": "string", - "required": true + "required": true, + "type": "string" } } ], "type": "record" - } + }, + "type": "array" } }, { "http_span_name": { + "default": "method", + "type": "string", + "description": "Specify whether to include the HTTP path in the span name.", "required": true, "one_of": [ "method", "method_path" - ], - "type": "string", - "default": "method" + ] } }, { @@ -169,8 +194,9 @@ 0, 2147483646 ], - "type": "integer", - "default": 2000 + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" } }, { @@ -179,8 +205,9 @@ 0, 2147483646 ], - "type": "integer", - "default": 5000 + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" } }, { @@ -189,8 +216,9 @@ 0, 2147483646 ], - "type": "integer", - "default": 5000 + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" } }, { @@ -200,18 +228,18 @@ }, { "phase_duration_flavor": { + "default": "annotations", + "type": "string", + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", "required": true, "one_of": [ "annotations", "tags" - ], - "type": "string", - "default": "annotations" + ] } }, { "queue": { - "required": true, "fields": [ { "max_batch_size": { @@ -219,8 +247,9 @@ 1, 1000000 ], - "type": "number", - "default": 1 + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer" } }, { @@ -229,8 +258,9 @@ 0, 3600 ], - "type": "number", - "default": 1 + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number" } }, { @@ -239,38 +269,53 @@ 1, 1000000 ], - "type": "number", - "default": 10000 + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer" } }, { "max_bytes": { - "type": "number" + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." } }, { "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", "default": 60, "type": "number" } }, { "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", "type": "number" } }, { "max_retry_delay": { + "between": [ + 0.001, + 1000000 + ], "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", "type": "number" } } ], + "required": true, "type": "record" } } ], + "required": true, "type": "record" } }