| { |
| "main": { |
| "plugins": { |
| "items": { |
| "required": [ |
| "name" |
| ], |
| "type": "object", |
| "properties": { |
| "name": { |
| "minLength": 1, |
| "type": "string" |
| }, |
| "stream": { |
| "type": "boolean" |
| } |
| } |
| }, |
| "type": "array" |
| }, |
| "plugin_config": { |
| "required": [ |
| "id", |
| "plugins" |
| ], |
| "type": "object", |
| "properties": { |
| "desc": { |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "plugins": { |
| "type": "object" |
| }, |
| "labels": { |
| "patternProperties": { |
| ".*": { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^\\S+$", |
| "type": "string", |
| "description": "value of label" |
| } |
| }, |
| "description": "key/value pairs to specify attributes", |
| "type": "object" |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "update_time": { |
| "type": "integer" |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| } |
| } |
| }, |
| "consumer": { |
| "required": [ |
| "username" |
| ], |
| "type": "object", |
| "properties": { |
| "desc": { |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "plugins": { |
| "type": "object" |
| }, |
| "labels": { |
| "patternProperties": { |
| ".*": { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^\\S+$", |
| "type": "string", |
| "description": "value of label" |
| } |
| }, |
| "description": "key/value pairs to specify attributes", |
| "type": "object" |
| }, |
| "username": { |
| "minLength": 1, |
| "maxLength": 100, |
| "pattern": "^[a-zA-Z0-9_]+$", |
| "type": "string" |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "group_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "update_time": { |
| "type": "integer" |
| } |
| } |
| }, |
| "global_rule": { |
| "required": [ |
| "plugins" |
| ], |
| "type": "object", |
| "properties": { |
| "update_time": { |
| "type": "integer" |
| }, |
| "plugins": { |
| "type": "object" |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| } |
| } |
| }, |
| "upstream": { |
| "oneOf": [ |
| { |
| "required": [ |
| "nodes" |
| ] |
| }, |
| { |
| "required": [ |
| "service_name", |
| "discovery_type" |
| ] |
| } |
| ], |
| "type": "object", |
| "properties": { |
| "scheme": { |
| "enum": [ |
| "grpc", |
| "grpcs", |
| "http", |
| "https", |
| "tcp", |
| "tls", |
| "udp", |
| "kafka" |
| ], |
| "default": "http", |
| "description": "The scheme of the upstream. For L7 proxy, it can be one of grpc/grpcs/http/https. For L4 proxy, it can be one of tcp/tls/udp. For specific protocols, it can be kafka." |
| }, |
| "key": { |
| "description": "the key of chash for dynamic load balancing", |
| "type": "string" |
| }, |
| "timeout": { |
| "required": [ |
| "connect", |
| "send", |
| "read" |
| ], |
| "type": "object", |
| "properties": { |
| "send": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "connect": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "read": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| } |
| } |
| }, |
| "discovery_type": { |
| "description": "discovery type", |
| "type": "string" |
| }, |
| "discovery_args": { |
| "properties": { |
| "group_name": { |
| "description": "group name", |
| "type": "string" |
| }, |
| "namespace_id": { |
| "description": "namespace id", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "pass_host": { |
| "enum": [ |
| "pass", |
| "node", |
| "rewrite" |
| ], |
| "default": "pass", |
| "description": "mod of host passing", |
| "type": "string" |
| }, |
| "upstream_host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "service_name": { |
| "minLength": 1, |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "type": { |
| "default": "roundrobin", |
| "description": "algorithms of load balancing", |
| "type": "string" |
| }, |
| "name": { |
| "minLength": 1, |
| "maxLength": 100, |
| "type": "string" |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "tls": { |
| "dependencies": { |
| "client_key": { |
| "not": { |
| "required": [ |
| "client_cert_id" |
| ] |
| }, |
| "required": [ |
| "client_cert" |
| ] |
| }, |
| "client_cert_id": { |
| "not": { |
| "required": [ |
| "client_client", |
| "client_key" |
| ] |
| } |
| }, |
| "client_cert": { |
| "not": { |
| "required": [ |
| "client_cert_id" |
| ] |
| }, |
| "required": [ |
| "client_key" |
| ] |
| } |
| }, |
| "type": "object", |
| "properties": { |
| "client_key": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| }, |
| "client_cert_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "verify": { |
| "default": false, |
| "description": "Turn on server certificate verification, currently only kafka upstream is supported", |
| "type": "boolean" |
| }, |
| "client_cert": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| } |
| } |
| }, |
| "retry_timeout": { |
| "minimum": 0, |
| "type": "number" |
| }, |
| "desc": { |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "checks": { |
| "anyOf": [ |
| { |
| "required": [ |
| "active" |
| ] |
| }, |
| { |
| "required": [ |
| "active", |
| "passive" |
| ] |
| } |
| ], |
| "type": "object", |
| "properties": { |
| "passive": { |
| "properties": { |
| "healthy": { |
| "properties": { |
| "successes": { |
| "default": 5, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 200, |
| 201, |
| 202, |
| 203, |
| 204, |
| 205, |
| 206, |
| 207, |
| 208, |
| 226, |
| 300, |
| 301, |
| 302, |
| 303, |
| 304, |
| 305, |
| 306, |
| 307, |
| 308 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "unhealthy": { |
| "properties": { |
| "tcp_failures": { |
| "default": 2, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "timeouts": { |
| "default": 7, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_failures": { |
| "default": 5, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 429, |
| 500, |
| 503 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "type": { |
| "enum": [ |
| "http", |
| "https", |
| "tcp" |
| ], |
| "default": "http", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "active": { |
| "properties": { |
| "concurrency": { |
| "default": 10, |
| "type": "integer" |
| }, |
| "healthy": { |
| "properties": { |
| "successes": { |
| "default": 2, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "interval": { |
| "minimum": 1, |
| "default": 1, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 200, |
| 302 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "https_verify_certificate": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "timeout": { |
| "default": 1, |
| "type": "number" |
| }, |
| "unhealthy": { |
| "properties": { |
| "tcp_failures": { |
| "default": 2, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "timeouts": { |
| "default": 3, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "interval": { |
| "minimum": 1, |
| "default": 1, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 429, |
| 404, |
| 500, |
| 501, |
| 502, |
| 503, |
| 504, |
| 505 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| }, |
| "http_failures": { |
| "default": 5, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| } |
| }, |
| "type": "object" |
| }, |
| "req_headers": { |
| "minItems": 1, |
| "items": { |
| "uniqueItems": true, |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "port": { |
| "minimum": 1, |
| "maximum": 65535, |
| "type": "integer" |
| }, |
| "type": { |
| "enum": [ |
| "http", |
| "https", |
| "tcp" |
| ], |
| "default": "http", |
| "type": "string" |
| }, |
| "http_path": { |
| "default": "/", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "labels": { |
| "patternProperties": { |
| ".*": { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^\\S+$", |
| "type": "string", |
| "description": "value of label" |
| } |
| }, |
| "description": "key/value pairs to specify attributes", |
| "type": "object" |
| }, |
| "retries": { |
| "minimum": 0, |
| "type": "integer" |
| }, |
| "update_time": { |
| "type": "integer" |
| }, |
| "nodes": { |
| "anyOf": [ |
| { |
| "patternProperties": { |
| ".*": { |
| "minimum": 0, |
| "description": "weight of node", |
| "type": "integer" |
| } |
| }, |
| "type": "object" |
| }, |
| { |
| "items": { |
| "required": [ |
| "host", |
| "port", |
| "weight" |
| ], |
| "type": "object", |
| "properties": { |
| "priority": { |
| "default": 0, |
| "description": "priority of node", |
| "type": "integer" |
| }, |
| "weight": { |
| "minimum": 0, |
| "description": "weight of node", |
| "type": "integer" |
| }, |
| "port": { |
| "minimum": 1, |
| "description": "port of node", |
| "type": "integer" |
| }, |
| "host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "metadata": { |
| "description": "metadata of node", |
| "type": "object" |
| } |
| } |
| }, |
| "type": "array" |
| } |
| ] |
| }, |
| "keepalive_pool": { |
| "properties": { |
| "requests": { |
| "default": 1000, |
| "minimum": 1, |
| "type": "integer" |
| }, |
| "size": { |
| "default": 320, |
| "minimum": 1, |
| "type": "integer" |
| }, |
| "idle_timeout": { |
| "default": 60, |
| "minimum": 0, |
| "type": "number" |
| } |
| }, |
| "type": "object" |
| }, |
| "hash_on": { |
| "enum": [ |
| "vars", |
| "header", |
| "cookie", |
| "consumer", |
| "vars_combinations" |
| ], |
| "default": "vars", |
| "type": "string" |
| } |
| } |
| }, |
| "upstream_hash_header_schema": { |
| "pattern": "^[a-zA-Z0-9-_]+$", |
| "type": "string" |
| }, |
| "upstream_hash_vars_schema": { |
| "pattern": "^((uri|server_name|server_addr|request_uri|remote_port|remote_addr|query_string|host|hostname)|arg_[0-9a-zA-z_-]+)$", |
| "type": "string" |
| }, |
| "consumer_group": { |
| "required": [ |
| "id", |
| "plugins" |
| ], |
| "type": "object", |
| "properties": { |
| "desc": { |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "plugins": { |
| "type": "object" |
| }, |
| "labels": { |
| "patternProperties": { |
| ".*": { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^\\S+$", |
| "type": "string", |
| "description": "value of label" |
| } |
| }, |
| "description": "key/value pairs to specify attributes", |
| "type": "object" |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "update_time": { |
| "type": "integer" |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| } |
| } |
| }, |
| "ssl": { |
| "type": "object", |
| "if": { |
| "properties": { |
| "type": { |
| "enum": [ |
| "server" |
| ] |
| } |
| } |
| }, |
| "else": { |
| "required": [ |
| "key", |
| "cert" |
| ] |
| }, |
| "then": { |
| "oneOf": [ |
| { |
| "required": [ |
| "sni", |
| "key", |
| "cert" |
| ] |
| }, |
| { |
| "required": [ |
| "snis", |
| "key", |
| "cert" |
| ] |
| } |
| ] |
| }, |
| "properties": { |
| "status": { |
| "enum": [ |
| 1, |
| 0 |
| ], |
| "default": 1, |
| "description": "ssl status, 1 to enable, 0 to disable", |
| "type": "integer" |
| }, |
| "snis": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| } |
| }, |
| "update_time": { |
| "type": "integer" |
| }, |
| "type": { |
| "enum": [ |
| "server", |
| "client" |
| ], |
| "default": "server", |
| "description": "ssl certificate type, server to server certificate, client to client certificate for upstream", |
| "type": "string" |
| }, |
| "cert": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| }, |
| "validity_start": { |
| "type": "integer" |
| }, |
| "key": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "sni": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "keys": { |
| "items": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "labels": { |
| "patternProperties": { |
| ".*": { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^\\S+$", |
| "type": "string", |
| "description": "value of label" |
| } |
| }, |
| "description": "key/value pairs to specify attributes", |
| "type": "object" |
| }, |
| "client": { |
| "required": [ |
| "ca" |
| ], |
| "type": "object", |
| "properties": { |
| "ca": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| }, |
| "depth": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| } |
| } |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "validity_end": { |
| "type": "integer" |
| }, |
| "exptime": { |
| "minimum": 1588262400, |
| "type": "integer" |
| }, |
| "certs": { |
| "items": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| }, |
| "type": "array" |
| } |
| } |
| }, |
| "service": { |
| "properties": { |
| "plugins": { |
| "type": "object" |
| }, |
| "enable_websocket": { |
| "description": "enable websocket for request", |
| "type": "boolean" |
| }, |
| "upstream_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "name": { |
| "minLength": 1, |
| "maxLength": 100, |
| "type": "string" |
| }, |
| "labels": { |
| "patternProperties": { |
| ".*": { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^\\S+$", |
| "type": "string", |
| "description": "value of label" |
| } |
| }, |
| "description": "key/value pairs to specify attributes", |
| "type": "object" |
| }, |
| "hosts": { |
| "type": "array", |
| "minItems": 1, |
| "uniqueItems": true, |
| "items": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| } |
| }, |
| "update_time": { |
| "type": "integer" |
| }, |
| "upstream": { |
| "oneOf": [ |
| { |
| "required": [ |
| "nodes" |
| ] |
| }, |
| { |
| "required": [ |
| "service_name", |
| "discovery_type" |
| ] |
| } |
| ], |
| "type": "object", |
| "properties": { |
| "scheme": { |
| "enum": [ |
| "grpc", |
| "grpcs", |
| "http", |
| "https", |
| "tcp", |
| "tls", |
| "udp", |
| "kafka" |
| ], |
| "default": "http", |
| "description": "The scheme of the upstream. For L7 proxy, it can be one of grpc/grpcs/http/https. For L4 proxy, it can be one of tcp/tls/udp. For specific protocols, it can be kafka." |
| }, |
| "key": { |
| "description": "the key of chash for dynamic load balancing", |
| "type": "string" |
| }, |
| "timeout": { |
| "required": [ |
| "connect", |
| "send", |
| "read" |
| ], |
| "type": "object", |
| "properties": { |
| "send": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "connect": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "read": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| } |
| } |
| }, |
| "discovery_type": { |
| "description": "discovery type", |
| "type": "string" |
| }, |
| "discovery_args": { |
| "properties": { |
| "group_name": { |
| "description": "group name", |
| "type": "string" |
| }, |
| "namespace_id": { |
| "description": "namespace id", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "pass_host": { |
| "enum": [ |
| "pass", |
| "node", |
| "rewrite" |
| ], |
| "default": "pass", |
| "description": "mod of host passing", |
| "type": "string" |
| }, |
| "upstream_host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "service_name": { |
| "minLength": 1, |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "type": { |
| "default": "roundrobin", |
| "description": "algorithms of load balancing", |
| "type": "string" |
| }, |
| "name": { |
| "minLength": 1, |
| "maxLength": 100, |
| "type": "string" |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "tls": { |
| "dependencies": { |
| "client_key": { |
| "not": { |
| "required": [ |
| "client_cert_id" |
| ] |
| }, |
| "required": [ |
| "client_cert" |
| ] |
| }, |
| "client_cert_id": { |
| "not": { |
| "required": [ |
| "client_client", |
| "client_key" |
| ] |
| } |
| }, |
| "client_cert": { |
| "not": { |
| "required": [ |
| "client_cert_id" |
| ] |
| }, |
| "required": [ |
| "client_key" |
| ] |
| } |
| }, |
| "type": "object", |
| "properties": { |
| "client_key": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| }, |
| "client_cert_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "verify": { |
| "default": false, |
| "description": "Turn on server certificate verification, currently only kafka upstream is supported", |
| "type": "boolean" |
| }, |
| "client_cert": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| } |
| } |
| }, |
| "retry_timeout": { |
| "minimum": 0, |
| "type": "number" |
| }, |
| "desc": { |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "checks": { |
| "anyOf": [ |
| { |
| "required": [ |
| "active" |
| ] |
| }, |
| { |
| "required": [ |
| "active", |
| "passive" |
| ] |
| } |
| ], |
| "type": "object", |
| "properties": { |
| "passive": { |
| "properties": { |
| "healthy": { |
| "properties": { |
| "successes": { |
| "default": 5, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 200, |
| 201, |
| 202, |
| 203, |
| 204, |
| 205, |
| 206, |
| 207, |
| 208, |
| 226, |
| 300, |
| 301, |
| 302, |
| 303, |
| 304, |
| 305, |
| 306, |
| 307, |
| 308 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "unhealthy": { |
| "properties": { |
| "tcp_failures": { |
| "default": 2, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "timeouts": { |
| "default": 7, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_failures": { |
| "default": 5, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 429, |
| 500, |
| 503 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "type": { |
| "enum": [ |
| "http", |
| "https", |
| "tcp" |
| ], |
| "default": "http", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "active": { |
| "properties": { |
| "concurrency": { |
| "default": 10, |
| "type": "integer" |
| }, |
| "healthy": { |
| "properties": { |
| "successes": { |
| "default": 2, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "interval": { |
| "minimum": 1, |
| "default": 1, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 200, |
| 302 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "https_verify_certificate": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "timeout": { |
| "default": 1, |
| "type": "number" |
| }, |
| "unhealthy": { |
| "properties": { |
| "tcp_failures": { |
| "default": 2, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "timeouts": { |
| "default": 3, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "interval": { |
| "minimum": 1, |
| "default": 1, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 429, |
| 404, |
| 500, |
| 501, |
| 502, |
| 503, |
| 504, |
| 505 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| }, |
| "http_failures": { |
| "default": 5, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| } |
| }, |
| "type": "object" |
| }, |
| "req_headers": { |
| "minItems": 1, |
| "items": { |
| "uniqueItems": true, |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "port": { |
| "minimum": 1, |
| "maximum": 65535, |
| "type": "integer" |
| }, |
| "type": { |
| "enum": [ |
| "http", |
| "https", |
| "tcp" |
| ], |
| "default": "http", |
| "type": "string" |
| }, |
| "http_path": { |
| "default": "/", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "labels": { |
| "patternProperties": { |
| ".*": { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^\\S+$", |
| "type": "string", |
| "description": "value of label" |
| } |
| }, |
| "description": "key/value pairs to specify attributes", |
| "type": "object" |
| }, |
| "retries": { |
| "minimum": 0, |
| "type": "integer" |
| }, |
| "update_time": { |
| "type": "integer" |
| }, |
| "nodes": { |
| "anyOf": [ |
| { |
| "patternProperties": { |
| ".*": { |
| "minimum": 0, |
| "description": "weight of node", |
| "type": "integer" |
| } |
| }, |
| "type": "object" |
| }, |
| { |
| "items": { |
| "required": [ |
| "host", |
| "port", |
| "weight" |
| ], |
| "type": "object", |
| "properties": { |
| "priority": { |
| "default": 0, |
| "description": "priority of node", |
| "type": "integer" |
| }, |
| "weight": { |
| "minimum": 0, |
| "description": "weight of node", |
| "type": "integer" |
| }, |
| "port": { |
| "minimum": 1, |
| "description": "port of node", |
| "type": "integer" |
| }, |
| "host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "metadata": { |
| "description": "metadata of node", |
| "type": "object" |
| } |
| } |
| }, |
| "type": "array" |
| } |
| ] |
| }, |
| "keepalive_pool": { |
| "properties": { |
| "requests": { |
| "default": 1000, |
| "minimum": 1, |
| "type": "integer" |
| }, |
| "size": { |
| "default": 320, |
| "minimum": 1, |
| "type": "integer" |
| }, |
| "idle_timeout": { |
| "default": 60, |
| "minimum": 0, |
| "type": "number" |
| } |
| }, |
| "type": "object" |
| }, |
| "hash_on": { |
| "enum": [ |
| "vars", |
| "header", |
| "cookie", |
| "consumer", |
| "vars_combinations" |
| ], |
| "default": "vars", |
| "type": "string" |
| } |
| } |
| }, |
| "script": { |
| "minLength": 10, |
| "maxLength": 102400, |
| "type": "string" |
| }, |
| "desc": { |
| "maxLength": 256, |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "stream_route": { |
| "properties": { |
| "plugins": { |
| "type": "object" |
| }, |
| "server_port": { |
| "description": "server port", |
| "type": "integer" |
| }, |
| "remote_addr": { |
| "anyOf": [ |
| { |
| "title": "IPv4", |
| "format": "ipv4", |
| "type": "string" |
| }, |
| { |
| "title": "IPv4/CIDR", |
| "pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6", |
| "format": "ipv6", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6/CIDR", |
| "pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$", |
| "type": "string" |
| } |
| ], |
| "description": "client IP", |
| "type": "string" |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "protocol": { |
| "required": [ |
| "name" |
| ], |
| "type": "object", |
| "properties": { |
| "name": { |
| "type": "string" |
| }, |
| "superior_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "logger": { |
| "items": { |
| "dependencies": { |
| "name": [ |
| "conf" |
| ] |
| }, |
| "properties": { |
| "name": { |
| "type": "string" |
| }, |
| "filter": { |
| "description": "logger filter rules", |
| "type": "array" |
| }, |
| "conf": { |
| "description": "logger plugin configuration", |
| "type": "object" |
| } |
| } |
| }, |
| "type": "array" |
| }, |
| "conf": { |
| "description": "protocol-specific configuration", |
| "type": "object" |
| } |
| } |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "desc": { |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "upstream_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "upstream": { |
| "oneOf": [ |
| { |
| "required": [ |
| "nodes" |
| ] |
| }, |
| { |
| "required": [ |
| "service_name", |
| "discovery_type" |
| ] |
| } |
| ], |
| "type": "object", |
| "properties": { |
| "scheme": { |
| "enum": [ |
| "grpc", |
| "grpcs", |
| "http", |
| "https", |
| "tcp", |
| "tls", |
| "udp", |
| "kafka" |
| ], |
| "default": "http", |
| "description": "The scheme of the upstream. For L7 proxy, it can be one of grpc/grpcs/http/https. For L4 proxy, it can be one of tcp/tls/udp. For specific protocols, it can be kafka." |
| }, |
| "key": { |
| "description": "the key of chash for dynamic load balancing", |
| "type": "string" |
| }, |
| "timeout": { |
| "required": [ |
| "connect", |
| "send", |
| "read" |
| ], |
| "type": "object", |
| "properties": { |
| "send": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "connect": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "read": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| } |
| } |
| }, |
| "discovery_type": { |
| "description": "discovery type", |
| "type": "string" |
| }, |
| "discovery_args": { |
| "properties": { |
| "group_name": { |
| "description": "group name", |
| "type": "string" |
| }, |
| "namespace_id": { |
| "description": "namespace id", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "pass_host": { |
| "enum": [ |
| "pass", |
| "node", |
| "rewrite" |
| ], |
| "default": "pass", |
| "description": "mod of host passing", |
| "type": "string" |
| }, |
| "upstream_host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "service_name": { |
| "minLength": 1, |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "type": { |
| "default": "roundrobin", |
| "description": "algorithms of load balancing", |
| "type": "string" |
| }, |
| "name": { |
| "minLength": 1, |
| "maxLength": 100, |
| "type": "string" |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "tls": { |
| "dependencies": { |
| "client_key": { |
| "not": { |
| "required": [ |
| "client_cert_id" |
| ] |
| }, |
| "required": [ |
| "client_cert" |
| ] |
| }, |
| "client_cert_id": { |
| "not": { |
| "required": [ |
| "client_client", |
| "client_key" |
| ] |
| } |
| }, |
| "client_cert": { |
| "not": { |
| "required": [ |
| "client_cert_id" |
| ] |
| }, |
| "required": [ |
| "client_key" |
| ] |
| } |
| }, |
| "type": "object", |
| "properties": { |
| "client_key": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| }, |
| "client_cert_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "verify": { |
| "default": false, |
| "description": "Turn on server certificate verification, currently only kafka upstream is supported", |
| "type": "boolean" |
| }, |
| "client_cert": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| } |
| } |
| }, |
| "retry_timeout": { |
| "minimum": 0, |
| "type": "number" |
| }, |
| "desc": { |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "checks": { |
| "anyOf": [ |
| { |
| "required": [ |
| "active" |
| ] |
| }, |
| { |
| "required": [ |
| "active", |
| "passive" |
| ] |
| } |
| ], |
| "type": "object", |
| "properties": { |
| "passive": { |
| "properties": { |
| "healthy": { |
| "properties": { |
| "successes": { |
| "default": 5, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 200, |
| 201, |
| 202, |
| 203, |
| 204, |
| 205, |
| 206, |
| 207, |
| 208, |
| 226, |
| 300, |
| 301, |
| 302, |
| 303, |
| 304, |
| 305, |
| 306, |
| 307, |
| 308 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "unhealthy": { |
| "properties": { |
| "tcp_failures": { |
| "default": 2, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "timeouts": { |
| "default": 7, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_failures": { |
| "default": 5, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 429, |
| 500, |
| 503 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "type": { |
| "enum": [ |
| "http", |
| "https", |
| "tcp" |
| ], |
| "default": "http", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "active": { |
| "properties": { |
| "concurrency": { |
| "default": 10, |
| "type": "integer" |
| }, |
| "healthy": { |
| "properties": { |
| "successes": { |
| "default": 2, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "interval": { |
| "minimum": 1, |
| "default": 1, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 200, |
| 302 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "https_verify_certificate": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "timeout": { |
| "default": 1, |
| "type": "number" |
| }, |
| "unhealthy": { |
| "properties": { |
| "tcp_failures": { |
| "default": 2, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "timeouts": { |
| "default": 3, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "interval": { |
| "minimum": 1, |
| "default": 1, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 429, |
| 404, |
| 500, |
| 501, |
| 502, |
| 503, |
| 504, |
| 505 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| }, |
| "http_failures": { |
| "default": 5, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| } |
| }, |
| "type": "object" |
| }, |
| "req_headers": { |
| "minItems": 1, |
| "items": { |
| "uniqueItems": true, |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "port": { |
| "minimum": 1, |
| "maximum": 65535, |
| "type": "integer" |
| }, |
| "type": { |
| "enum": [ |
| "http", |
| "https", |
| "tcp" |
| ], |
| "default": "http", |
| "type": "string" |
| }, |
| "http_path": { |
| "default": "/", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "labels": { |
| "patternProperties": { |
| ".*": { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^\\S+$", |
| "type": "string", |
| "description": "value of label" |
| } |
| }, |
| "description": "key/value pairs to specify attributes", |
| "type": "object" |
| }, |
| "retries": { |
| "minimum": 0, |
| "type": "integer" |
| }, |
| "update_time": { |
| "type": "integer" |
| }, |
| "nodes": { |
| "anyOf": [ |
| { |
| "patternProperties": { |
| ".*": { |
| "minimum": 0, |
| "description": "weight of node", |
| "type": "integer" |
| } |
| }, |
| "type": "object" |
| }, |
| { |
| "items": { |
| "required": [ |
| "host", |
| "port", |
| "weight" |
| ], |
| "type": "object", |
| "properties": { |
| "priority": { |
| "default": 0, |
| "description": "priority of node", |
| "type": "integer" |
| }, |
| "weight": { |
| "minimum": 0, |
| "description": "weight of node", |
| "type": "integer" |
| }, |
| "port": { |
| "minimum": 1, |
| "description": "port of node", |
| "type": "integer" |
| }, |
| "host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "metadata": { |
| "description": "metadata of node", |
| "type": "object" |
| } |
| } |
| }, |
| "type": "array" |
| } |
| ] |
| }, |
| "keepalive_pool": { |
| "properties": { |
| "requests": { |
| "default": 1000, |
| "minimum": 1, |
| "type": "integer" |
| }, |
| "size": { |
| "default": 320, |
| "minimum": 1, |
| "type": "integer" |
| }, |
| "idle_timeout": { |
| "default": 60, |
| "minimum": 0, |
| "type": "number" |
| } |
| }, |
| "type": "object" |
| }, |
| "hash_on": { |
| "enum": [ |
| "vars", |
| "header", |
| "cookie", |
| "consumer", |
| "vars_combinations" |
| ], |
| "default": "vars", |
| "type": "string" |
| } |
| } |
| }, |
| "update_time": { |
| "type": "integer" |
| }, |
| "server_addr": { |
| "anyOf": [ |
| { |
| "title": "IPv4", |
| "format": "ipv4", |
| "type": "string" |
| }, |
| { |
| "title": "IPv4/CIDR", |
| "pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6", |
| "format": "ipv6", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6/CIDR", |
| "pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$", |
| "type": "string" |
| } |
| ], |
| "description": "server IP", |
| "type": "string" |
| }, |
| "sni": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "description": "server name indication", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "proto": { |
| "required": [ |
| "content" |
| ], |
| "type": "object", |
| "properties": { |
| "desc": { |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "content": { |
| "minLength": 1, |
| "maxLength": 1048576, |
| "type": "string" |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "update_time": { |
| "type": "integer" |
| } |
| } |
| }, |
| "route": { |
| "not": { |
| "anyOf": [ |
| { |
| "required": [ |
| "script", |
| "plugins" |
| ] |
| }, |
| { |
| "required": [ |
| "script", |
| "plugin_config_id" |
| ] |
| } |
| ] |
| }, |
| "allOf": [ |
| { |
| "oneOf": [ |
| { |
| "required": [ |
| "uri" |
| ] |
| }, |
| { |
| "required": [ |
| "uris" |
| ] |
| } |
| ] |
| }, |
| { |
| "oneOf": [ |
| { |
| "not": { |
| "anyOf": [ |
| { |
| "required": [ |
| "host" |
| ] |
| }, |
| { |
| "required": [ |
| "hosts" |
| ] |
| } |
| ] |
| } |
| }, |
| { |
| "required": [ |
| "host" |
| ] |
| }, |
| { |
| "required": [ |
| "hosts" |
| ] |
| } |
| ] |
| }, |
| { |
| "oneOf": [ |
| { |
| "not": { |
| "anyOf": [ |
| { |
| "required": [ |
| "remote_addr" |
| ] |
| }, |
| { |
| "required": [ |
| "remote_addrs" |
| ] |
| } |
| ] |
| } |
| }, |
| { |
| "required": [ |
| "remote_addr" |
| ] |
| }, |
| { |
| "required": [ |
| "remote_addrs" |
| ] |
| } |
| ] |
| } |
| ], |
| "anyOf": [ |
| { |
| "required": [ |
| "plugins", |
| "uri" |
| ] |
| }, |
| { |
| "required": [ |
| "upstream", |
| "uri" |
| ] |
| }, |
| { |
| "required": [ |
| "upstream_id", |
| "uri" |
| ] |
| }, |
| { |
| "required": [ |
| "service_id", |
| "uri" |
| ] |
| }, |
| { |
| "required": [ |
| "plugins", |
| "uris" |
| ] |
| }, |
| { |
| "required": [ |
| "upstream", |
| "uris" |
| ] |
| }, |
| { |
| "required": [ |
| "upstream_id", |
| "uris" |
| ] |
| }, |
| { |
| "required": [ |
| "service_id", |
| "uris" |
| ] |
| }, |
| { |
| "required": [ |
| "script", |
| "uri" |
| ] |
| }, |
| { |
| "required": [ |
| "script", |
| "uris" |
| ] |
| } |
| ], |
| "type": "object", |
| "properties": { |
| "vars": { |
| "type": "array" |
| }, |
| "plugin_config_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "enable_websocket": { |
| "description": "enable websocket for request", |
| "type": "boolean" |
| }, |
| "methods": { |
| "type": "array", |
| "uniqueItems": true, |
| "items": { |
| "enum": [ |
| "GET", |
| "POST", |
| "PUT", |
| "DELETE", |
| "PATCH", |
| "HEAD", |
| "OPTIONS", |
| "CONNECT", |
| "TRACE", |
| "PURGE" |
| ], |
| "description": "HTTP method", |
| "type": "string" |
| } |
| }, |
| "hosts": { |
| "type": "array", |
| "minItems": 1, |
| "uniqueItems": true, |
| "items": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| } |
| }, |
| "host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "filter_func": { |
| "minLength": 10, |
| "pattern": "^function", |
| "type": "string" |
| }, |
| "name": { |
| "minLength": 1, |
| "maxLength": 100, |
| "type": "string" |
| }, |
| "script_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "uri": { |
| "minLength": 1, |
| "maxLength": 4096, |
| "type": "string" |
| }, |
| "status": { |
| "enum": [ |
| 1, |
| 0 |
| ], |
| "default": 1, |
| "description": "route status, 1 to enable, 0 to disable", |
| "type": "integer" |
| }, |
| "plugins": { |
| "type": "object" |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "upstream_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "service_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "priority": { |
| "default": 0, |
| "type": "integer" |
| }, |
| "update_time": { |
| "type": "integer" |
| }, |
| "desc": { |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "upstream": { |
| "oneOf": [ |
| { |
| "required": [ |
| "nodes" |
| ] |
| }, |
| { |
| "required": [ |
| "service_name", |
| "discovery_type" |
| ] |
| } |
| ], |
| "type": "object", |
| "properties": { |
| "scheme": { |
| "enum": [ |
| "grpc", |
| "grpcs", |
| "http", |
| "https", |
| "tcp", |
| "tls", |
| "udp", |
| "kafka" |
| ], |
| "default": "http", |
| "description": "The scheme of the upstream. For L7 proxy, it can be one of grpc/grpcs/http/https. For L4 proxy, it can be one of tcp/tls/udp. For specific protocols, it can be kafka." |
| }, |
| "key": { |
| "description": "the key of chash for dynamic load balancing", |
| "type": "string" |
| }, |
| "timeout": { |
| "required": [ |
| "connect", |
| "send", |
| "read" |
| ], |
| "type": "object", |
| "properties": { |
| "send": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "connect": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "read": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| } |
| } |
| }, |
| "discovery_type": { |
| "description": "discovery type", |
| "type": "string" |
| }, |
| "discovery_args": { |
| "properties": { |
| "group_name": { |
| "description": "group name", |
| "type": "string" |
| }, |
| "namespace_id": { |
| "description": "namespace id", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "pass_host": { |
| "enum": [ |
| "pass", |
| "node", |
| "rewrite" |
| ], |
| "default": "pass", |
| "description": "mod of host passing", |
| "type": "string" |
| }, |
| "upstream_host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "service_name": { |
| "minLength": 1, |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "type": { |
| "default": "roundrobin", |
| "description": "algorithms of load balancing", |
| "type": "string" |
| }, |
| "name": { |
| "minLength": 1, |
| "maxLength": 100, |
| "type": "string" |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "tls": { |
| "dependencies": { |
| "client_key": { |
| "not": { |
| "required": [ |
| "client_cert_id" |
| ] |
| }, |
| "required": [ |
| "client_cert" |
| ] |
| }, |
| "client_cert_id": { |
| "not": { |
| "required": [ |
| "client_client", |
| "client_key" |
| ] |
| } |
| }, |
| "client_cert": { |
| "not": { |
| "required": [ |
| "client_cert_id" |
| ] |
| }, |
| "required": [ |
| "client_key" |
| ] |
| } |
| }, |
| "type": "object", |
| "properties": { |
| "client_key": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| }, |
| "client_cert_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "verify": { |
| "default": false, |
| "description": "Turn on server certificate verification, currently only kafka upstream is supported", |
| "type": "boolean" |
| }, |
| "client_cert": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| } |
| } |
| }, |
| "retry_timeout": { |
| "minimum": 0, |
| "type": "number" |
| }, |
| "desc": { |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "checks": { |
| "anyOf": [ |
| { |
| "required": [ |
| "active" |
| ] |
| }, |
| { |
| "required": [ |
| "active", |
| "passive" |
| ] |
| } |
| ], |
| "type": "object", |
| "properties": { |
| "passive": { |
| "properties": { |
| "healthy": { |
| "properties": { |
| "successes": { |
| "default": 5, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 200, |
| 201, |
| 202, |
| 203, |
| 204, |
| 205, |
| 206, |
| 207, |
| 208, |
| 226, |
| 300, |
| 301, |
| 302, |
| 303, |
| 304, |
| 305, |
| 306, |
| 307, |
| 308 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "unhealthy": { |
| "properties": { |
| "tcp_failures": { |
| "default": 2, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "timeouts": { |
| "default": 7, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_failures": { |
| "default": 5, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 429, |
| 500, |
| 503 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "type": { |
| "enum": [ |
| "http", |
| "https", |
| "tcp" |
| ], |
| "default": "http", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "active": { |
| "properties": { |
| "concurrency": { |
| "default": 10, |
| "type": "integer" |
| }, |
| "healthy": { |
| "properties": { |
| "successes": { |
| "default": 2, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "interval": { |
| "minimum": 1, |
| "default": 1, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 200, |
| 302 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "https_verify_certificate": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "timeout": { |
| "default": 1, |
| "type": "number" |
| }, |
| "unhealthy": { |
| "properties": { |
| "tcp_failures": { |
| "default": 2, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "timeouts": { |
| "default": 3, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "interval": { |
| "minimum": 1, |
| "default": 1, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 429, |
| 404, |
| 500, |
| 501, |
| 502, |
| 503, |
| 504, |
| 505 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| }, |
| "http_failures": { |
| "default": 5, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| } |
| }, |
| "type": "object" |
| }, |
| "req_headers": { |
| "minItems": 1, |
| "items": { |
| "uniqueItems": true, |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "port": { |
| "minimum": 1, |
| "maximum": 65535, |
| "type": "integer" |
| }, |
| "type": { |
| "enum": [ |
| "http", |
| "https", |
| "tcp" |
| ], |
| "default": "http", |
| "type": "string" |
| }, |
| "http_path": { |
| "default": "/", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "labels": { |
| "patternProperties": { |
| ".*": { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^\\S+$", |
| "type": "string", |
| "description": "value of label" |
| } |
| }, |
| "description": "key/value pairs to specify attributes", |
| "type": "object" |
| }, |
| "retries": { |
| "minimum": 0, |
| "type": "integer" |
| }, |
| "update_time": { |
| "type": "integer" |
| }, |
| "nodes": { |
| "anyOf": [ |
| { |
| "patternProperties": { |
| ".*": { |
| "minimum": 0, |
| "description": "weight of node", |
| "type": "integer" |
| } |
| }, |
| "type": "object" |
| }, |
| { |
| "items": { |
| "required": [ |
| "host", |
| "port", |
| "weight" |
| ], |
| "type": "object", |
| "properties": { |
| "priority": { |
| "default": 0, |
| "description": "priority of node", |
| "type": "integer" |
| }, |
| "weight": { |
| "minimum": 0, |
| "description": "weight of node", |
| "type": "integer" |
| }, |
| "port": { |
| "minimum": 1, |
| "description": "port of node", |
| "type": "integer" |
| }, |
| "host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "metadata": { |
| "description": "metadata of node", |
| "type": "object" |
| } |
| } |
| }, |
| "type": "array" |
| } |
| ] |
| }, |
| "keepalive_pool": { |
| "properties": { |
| "requests": { |
| "default": 1000, |
| "minimum": 1, |
| "type": "integer" |
| }, |
| "size": { |
| "default": 320, |
| "minimum": 1, |
| "type": "integer" |
| }, |
| "idle_timeout": { |
| "default": 60, |
| "minimum": 0, |
| "type": "number" |
| } |
| }, |
| "type": "object" |
| }, |
| "hash_on": { |
| "enum": [ |
| "vars", |
| "header", |
| "cookie", |
| "consumer", |
| "vars_combinations" |
| ], |
| "default": "vars", |
| "type": "string" |
| } |
| } |
| }, |
| "labels": { |
| "patternProperties": { |
| ".*": { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^\\S+$", |
| "type": "string", |
| "description": "value of label" |
| } |
| }, |
| "description": "key/value pairs to specify attributes", |
| "type": "object" |
| }, |
| "uris": { |
| "type": "array", |
| "minItems": 1, |
| "uniqueItems": true, |
| "items": { |
| "description": "HTTP uri", |
| "type": "string" |
| } |
| }, |
| "remote_addrs": { |
| "type": "array", |
| "minItems": 1, |
| "uniqueItems": true, |
| "items": { |
| "anyOf": [ |
| { |
| "title": "IPv4", |
| "format": "ipv4", |
| "type": "string" |
| }, |
| { |
| "title": "IPv4/CIDR", |
| "pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6", |
| "format": "ipv6", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6/CIDR", |
| "pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$", |
| "type": "string" |
| } |
| ], |
| "description": "client IP", |
| "type": "string" |
| } |
| }, |
| "remote_addr": { |
| "anyOf": [ |
| { |
| "title": "IPv4", |
| "format": "ipv4", |
| "type": "string" |
| }, |
| { |
| "title": "IPv4/CIDR", |
| "pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6", |
| "format": "ipv6", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6/CIDR", |
| "pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$", |
| "type": "string" |
| } |
| ], |
| "description": "client IP", |
| "type": "string" |
| }, |
| "script": { |
| "minLength": 10, |
| "maxLength": 102400, |
| "type": "string" |
| }, |
| "timeout": { |
| "required": [ |
| "connect", |
| "send", |
| "read" |
| ], |
| "type": "object", |
| "properties": { |
| "send": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "connect": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "read": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| } |
| } |
| } |
| } |
| } |
| }, |
| "plugins": { |
| "hmac-auth": { |
| "priority": 2530, |
| "version": 0.1, |
| "type": "auth", |
| "consumer_schema": { |
| "encrypt_fields": [ |
| "secret_key" |
| ], |
| "required": [ |
| "access_key", |
| "secret_key" |
| ], |
| "type": "object", |
| "title": "work with consumer object", |
| "properties": { |
| "access_key": { |
| "minLength": 1, |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "secret_key": { |
| "minLength": 1, |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "algorithm": { |
| "enum": [ |
| "hmac-sha1", |
| "hmac-sha256", |
| "hmac-sha512" |
| ], |
| "default": "hmac-sha256", |
| "type": "string" |
| }, |
| "clock_skew": { |
| "default": 0, |
| "type": "integer" |
| }, |
| "signed_headers": { |
| "items": { |
| "minLength": 1, |
| "maxLength": 50, |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "keep_headers": { |
| "title": "whether to keep the http request header", |
| "default": false, |
| "type": "boolean" |
| }, |
| "encode_uri_params": { |
| "title": "Whether to escape the uri parameter", |
| "default": true, |
| "type": "boolean" |
| }, |
| "validate_request_body": { |
| "title": "A boolean value telling the plugin to enable body validation", |
| "default": false, |
| "type": "boolean" |
| }, |
| "max_req_body": { |
| "title": "Max request body size", |
| "default": 524288, |
| "type": "integer" |
| } |
| } |
| }, |
| "schema": { |
| "title": "work with route or service object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| } |
| }, |
| "file-logger": { |
| "priority": 399, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "path" |
| ], |
| "type": "object", |
| "properties": { |
| "path": { |
| "type": "string" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "include_resp_body_expr": { |
| "minItems": 1, |
| "items": { |
| "type": "array" |
| }, |
| "type": "array" |
| }, |
| "include_resp_body": { |
| "default": false, |
| "type": "boolean" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "serverless-post-function": { |
| "priority": -2000, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "functions" |
| ], |
| "type": "object", |
| "properties": { |
| "phase": { |
| "enum": [ |
| "rewrite", |
| "access", |
| "header_filter", |
| "body_filter", |
| "log", |
| "before_proxy" |
| ], |
| "default": "access", |
| "type": "string" |
| }, |
| "functions": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "type": "string" |
| } |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "inspect": { |
| "priority": 200, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "referer-restriction": { |
| "priority": 2990, |
| "version": 0.1, |
| "schema": { |
| "oneOf": [ |
| { |
| "required": [ |
| "whitelist" |
| ] |
| }, |
| { |
| "required": [ |
| "blacklist" |
| ] |
| } |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "message": { |
| "minLength": 1, |
| "maxLength": 1024, |
| "default": "Your referer host is not allowed", |
| "type": "string" |
| }, |
| "bypass_missing": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "whitelist": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| } |
| }, |
| "blacklist": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| } |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "cors": { |
| "priority": 4000, |
| "metadata_schema": { |
| "properties": { |
| "allow_origins": { |
| "additionalProperties": { |
| "pattern": "^(\\*|\\*\\*|null|\\w+://[^,]+(,\\w+://[^,]+)*)$", |
| "type": "string" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "allow_credential": { |
| "default": false, |
| "description": "allow client append credential. according to CORS specification,if you set this option to 'true', you can not use '*' for other options.", |
| "type": "boolean" |
| }, |
| "allow_origins": { |
| "pattern": "^(\\*|\\*\\*|null|\\w+://[^,]+(,\\w+://[^,]+)*)$", |
| "default": "*", |
| "description": "you can use '*' to allow all origins when no credentials,'**' to allow forcefully(it will bring some security risks, be carefully),multiple origin use ',' to split. default: *.", |
| "type": "string" |
| }, |
| "allow_origins_by_regex": { |
| "uniqueItems": true, |
| "items": { |
| "minLength": 1, |
| "maxLength": 4096, |
| "type": "string" |
| }, |
| "minItems": 1, |
| "description": "you can use regex to allow specific origins when no credentials,for example use [.*\\.test.com] to allow a.test.com and b.test.com", |
| "type": "array" |
| }, |
| "allow_methods": { |
| "default": "*", |
| "description": "you can use '*' to allow all methods when no credentials,'**' to allow forcefully(it will bring some security risks, be carefully),multiple method use ',' to split. default: *.", |
| "type": "string" |
| }, |
| "allow_origins_by_metadata": { |
| "uniqueItems": true, |
| "items": { |
| "minLength": 1, |
| "maxLength": 4096, |
| "type": "string" |
| }, |
| "minItems": 1, |
| "description": "set allowed origins by referencing origins in plugin metadata", |
| "type": "array" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "allow_headers": { |
| "default": "*", |
| "description": "you can use '*' to allow all header when no credentials,'**' to allow forcefully(it will bring some security risks, be carefully),multiple header use ',' to split. default: *.", |
| "type": "string" |
| }, |
| "expose_headers": { |
| "default": "*", |
| "description": "you can use '*' to expose all header when no credentials,'**' to allow forcefully(it will bring some security risks, be carefully),multiple header use ',' to split. default: *.", |
| "type": "string" |
| }, |
| "max_age": { |
| "default": 5, |
| "description": "maximum number of seconds the results can be cached.-1 means no cached, the max value is depend on browser,more details plz check MDN. default: 5.", |
| "type": "integer" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "ai": { |
| "priority": 22900, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "version": 0.1, |
| "scope": "global" |
| }, |
| "sls-logger": { |
| "priority": 406, |
| "version": 0.1, |
| "schema": { |
| "encrypt_fields": [ |
| "access_key_secret" |
| ], |
| "required": [ |
| "host", |
| "port", |
| "project", |
| "logstore", |
| "access_key_id", |
| "access_key_secret" |
| ], |
| "type": "object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "project": { |
| "type": "string" |
| }, |
| "logstore": { |
| "type": "string" |
| }, |
| "access_key_id": { |
| "type": "string" |
| }, |
| "access_key_secret": { |
| "type": "string" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "sls-logger" |
| }, |
| "include_req_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 5000, |
| "type": "integer" |
| }, |
| "host": { |
| "type": "string" |
| }, |
| "port": { |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "forward-auth": { |
| "priority": 2002, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "uri" |
| ], |
| "type": "object", |
| "properties": { |
| "keepalive": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "timeout": { |
| "default": 3000, |
| "type": "integer", |
| "maximum": 60000, |
| "description": "timeout in milliseconds", |
| "minimum": 1 |
| }, |
| "request_headers": { |
| "items": { |
| "type": "string" |
| }, |
| "default": {}, |
| "description": "client request header that will be sent to the authorization service", |
| "type": "array" |
| }, |
| "ssl_verify": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "request_method": { |
| "enum": [ |
| "GET", |
| "POST" |
| ], |
| "default": "GET", |
| "description": "the method for client to request the authorization service", |
| "type": "string" |
| }, |
| "keepalive_timeout": { |
| "minimum": 1000, |
| "default": 60000, |
| "type": "integer" |
| }, |
| "uri": { |
| "type": "string" |
| }, |
| "keepalive_pool": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "upstream_headers": { |
| "items": { |
| "type": "string" |
| }, |
| "default": {}, |
| "description": "authorization response header that will be sent to the upstream", |
| "type": "array" |
| }, |
| "client_headers": { |
| "items": { |
| "type": "string" |
| }, |
| "default": {}, |
| "description": "authorization response header that will be sent tothe client when authorizing failed", |
| "type": "array" |
| } |
| } |
| } |
| }, |
| "echo": { |
| "priority": 412, |
| "version": 0.1, |
| "schema": { |
| "type": "object", |
| "anyOf": [ |
| { |
| "required": [ |
| "before_body" |
| ] |
| }, |
| { |
| "required": [ |
| "body" |
| ] |
| }, |
| { |
| "required": [ |
| "after_body" |
| ] |
| } |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "properties": { |
| "headers": { |
| "minProperties": 1, |
| "description": "new headers for response", |
| "type": "object" |
| }, |
| "body": { |
| "description": "body to replace upstream response.", |
| "type": "string" |
| }, |
| "after_body": { |
| "description": "body after the modification of filter phase.", |
| "type": "string" |
| }, |
| "before_body": { |
| "description": "body before the filter phase.", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| }, |
| "minProperties": 1 |
| } |
| }, |
| "request-id": { |
| "priority": 12015, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "header_name": { |
| "default": "X-Request-Id", |
| "type": "string" |
| }, |
| "algorithm": { |
| "enum": [ |
| "uuid", |
| "snowflake", |
| "nanoid", |
| "range_id" |
| ], |
| "default": "uuid", |
| "type": "string" |
| }, |
| "range_id": { |
| "properties": { |
| "length": { |
| "minimum": 6, |
| "default": 16, |
| "type": "integer" |
| }, |
| "char_set": { |
| "minLength": 6, |
| "default": "abcdefghijklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ0123456789", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "include_in_response": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "workflow": { |
| "priority": 1006, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "rules": { |
| "items": { |
| "required": [ |
| "case", |
| "actions" |
| ], |
| "type": "object", |
| "properties": { |
| "case": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "anyOf": [ |
| { |
| "type": "array" |
| }, |
| { |
| "type": "string" |
| } |
| ] |
| } |
| }, |
| "actions": { |
| "items": { |
| "minItems": 1, |
| "type": "array" |
| }, |
| "type": "array" |
| } |
| } |
| }, |
| "type": "array" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "ldap-auth": { |
| "schema": { |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "type": "object", |
| "properties": { |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| } |
| }, |
| "base_dn": { |
| "type": "string" |
| }, |
| "ldap_uri": { |
| "type": "string" |
| }, |
| "use_tls": { |
| "type": "boolean", |
| "default": false |
| }, |
| "uid": { |
| "type": "string", |
| "default": "cn" |
| }, |
| "tls_verify": { |
| "type": "boolean", |
| "default": false |
| } |
| }, |
| "title": "work with route or service object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "base_dn", |
| "ldap_uri" |
| ] |
| }, |
| "consumer_schema": { |
| "type": "object", |
| "title": "work with consumer object", |
| "properties": { |
| "user_dn": { |
| "type": "string" |
| } |
| }, |
| "required": [ |
| "user_dn" |
| ] |
| }, |
| "priority": 2540, |
| "version": 0.1, |
| "type": "auth" |
| }, |
| "limit-count": { |
| "priority": 1002, |
| "version": 0.4, |
| "schema": { |
| "required": [ |
| "count", |
| "time_window" |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "if": { |
| "properties": { |
| "policy": { |
| "enum": [ |
| "redis" |
| ] |
| } |
| }, |
| "required": [ |
| "policy" |
| ] |
| }, |
| "then": { |
| "required": [ |
| "redis_host" |
| ], |
| "properties": { |
| "redis_host": { |
| "minLength": 2, |
| "type": "string" |
| }, |
| "redis_port": { |
| "minimum": 1, |
| "default": 6379, |
| "type": "integer" |
| }, |
| "redis_password": { |
| "minLength": 0, |
| "type": "string" |
| }, |
| "redis_database": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "redis_timeout": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| } |
| } |
| }, |
| "else": { |
| "if": { |
| "properties": { |
| "policy": { |
| "enum": [ |
| "redis-cluster" |
| ] |
| } |
| }, |
| "required": [ |
| "policy" |
| ] |
| }, |
| "then": { |
| "required": [ |
| "redis_cluster_nodes", |
| "redis_cluster_name" |
| ], |
| "properties": { |
| "redis_cluster_nodes": { |
| "minItems": 2, |
| "items": { |
| "minLength": 2, |
| "maxLength": 100, |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "redis_cluster_name": { |
| "type": "string" |
| }, |
| "redis_cluster_ssl": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "redis_cluster_ssl_verify": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "redis_password": { |
| "minLength": 0, |
| "type": "string" |
| }, |
| "redis_timeout": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "properties": { |
| "time_window": { |
| "exclusiveMinimum": 0, |
| "type": "integer" |
| }, |
| "key_type": { |
| "enum": [ |
| "var", |
| "var_combination", |
| "constant" |
| ], |
| "default": "var", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "count": { |
| "exclusiveMinimum": 0, |
| "type": "integer" |
| }, |
| "rejected_msg": { |
| "minLength": 1, |
| "type": "string" |
| }, |
| "policy": { |
| "enum": [ |
| "local", |
| "redis", |
| "redis-cluster" |
| ], |
| "default": "local", |
| "type": "string" |
| }, |
| "allow_degradation": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "show_limit_quota_header": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "group": { |
| "type": "string" |
| }, |
| "key": { |
| "default": "remote_addr", |
| "type": "string" |
| }, |
| "rejected_code": { |
| "default": 503, |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "request-validation": { |
| "priority": 2800, |
| "schema": { |
| "anyOf": [ |
| { |
| "required": [ |
| "header_schema" |
| ] |
| }, |
| { |
| "required": [ |
| "body_schema" |
| ] |
| } |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "rejected_code": { |
| "default": 400, |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "rejected_msg": { |
| "minLength": 1, |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "header_schema": { |
| "type": "object" |
| }, |
| "body_schema": { |
| "type": "object" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "version": 0.1, |
| "type": "validation" |
| }, |
| "ua-restriction": { |
| "priority": 2999, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "message": { |
| "minLength": 1, |
| "maxLength": 1024, |
| "default": "Not allowed", |
| "type": "string" |
| }, |
| "bypass_missing": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "allowlist": { |
| "minItems": 1, |
| "items": { |
| "minLength": 1, |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "denylist": { |
| "minItems": 1, |
| "items": { |
| "minLength": 1, |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "splunk-hec-logging": { |
| "priority": 409, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "endpoint" |
| ], |
| "type": "object", |
| "properties": { |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "splunk-hec-logging" |
| }, |
| "ssl_verify": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "endpoint": { |
| "required": [ |
| "uri", |
| "token" |
| ], |
| "type": "object", |
| "properties": { |
| "uri": { |
| "pattern": "^[^\\/]+:\\/\\/([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?", |
| "type": "string" |
| }, |
| "token": { |
| "type": "string" |
| }, |
| "channel": { |
| "type": "string" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 10, |
| "type": "integer" |
| } |
| } |
| } |
| } |
| } |
| }, |
| "datadog": { |
| "priority": 495, |
| "metadata_schema": { |
| "properties": { |
| "port": { |
| "minimum": 0, |
| "default": 8125, |
| "type": "integer" |
| }, |
| "constant_tags": { |
| "default": [ |
| "source:apisix" |
| ], |
| "type": "array", |
| "items": { |
| "type": "string" |
| } |
| }, |
| "host": { |
| "default": "127.0.0.1", |
| "type": "string" |
| }, |
| "namespace": { |
| "default": "apisix", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "name": { |
| "type": "string", |
| "default": "datadog" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "prefer_name": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "kafka-proxy": { |
| "priority": 508, |
| "version": 0.1, |
| "schema": { |
| "encrypt_fields": [ |
| "sasl.password" |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "sasl": { |
| "required": [ |
| "username", |
| "password" |
| ], |
| "type": "object", |
| "properties": { |
| "username": { |
| "type": "string" |
| }, |
| "password": { |
| "type": "string" |
| } |
| } |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "authz-casbin": { |
| "priority": 2560, |
| "metadata_schema": { |
| "required": [ |
| "model", |
| "policy" |
| ], |
| "type": "object", |
| "properties": { |
| "model": { |
| "type": "string" |
| }, |
| "policy": { |
| "type": "string" |
| } |
| } |
| }, |
| "version": 0.1, |
| "schema": { |
| "oneOf": [ |
| { |
| "required": [ |
| "model_path", |
| "policy_path", |
| "username" |
| ] |
| }, |
| { |
| "required": [ |
| "model", |
| "policy", |
| "username" |
| ] |
| } |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "policy": { |
| "type": "string" |
| }, |
| "username": { |
| "type": "string" |
| }, |
| "model_path": { |
| "type": "string" |
| }, |
| "policy_path": { |
| "type": "string" |
| }, |
| "model": { |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "jwt-auth": { |
| "priority": 2510, |
| "version": 0.1, |
| "type": "auth", |
| "consumer_schema": { |
| "encrypt_fields": [ |
| "secret", |
| "private_key" |
| ], |
| "required": [ |
| "key" |
| ], |
| "type": "object", |
| "dependencies": { |
| "algorithm": { |
| "oneOf": [ |
| { |
| "properties": { |
| "algorithm": { |
| "enum": [ |
| "HS256", |
| "HS512" |
| ], |
| "default": "HS256" |
| } |
| } |
| }, |
| { |
| "required": [ |
| "public_key", |
| "private_key" |
| ], |
| "properties": { |
| "public_key": { |
| "type": "string" |
| }, |
| "private_key": { |
| "type": "string" |
| }, |
| "algorithm": { |
| "enum": [ |
| "RS256", |
| "ES256" |
| ] |
| } |
| } |
| } |
| ] |
| } |
| }, |
| "properties": { |
| "algorithm": { |
| "enum": [ |
| "HS256", |
| "HS512", |
| "RS256", |
| "ES256" |
| ], |
| "default": "HS256", |
| "type": "string" |
| }, |
| "lifetime_grace_period": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "base64_secret": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "key": { |
| "type": "string" |
| }, |
| "exp": { |
| "minimum": 1, |
| "default": 86400, |
| "type": "integer" |
| }, |
| "secret": { |
| "type": "string" |
| } |
| } |
| }, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "cookie": { |
| "default": "jwt", |
| "type": "string" |
| }, |
| "header": { |
| "default": "authorization", |
| "type": "string" |
| }, |
| "hide_credentials": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "query": { |
| "default": "jwt", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "client-control": { |
| "priority": 22000, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "max_body_size": { |
| "minimum": 0, |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "csrf": { |
| "priority": 2980, |
| "version": 0.1, |
| "schema": { |
| "encrypt_fields": [ |
| "key" |
| ], |
| "required": [ |
| "key" |
| ], |
| "type": "object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "properties": { |
| "name": { |
| "default": "apisix-csrf-token", |
| "description": "the csrf token name", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "key": { |
| "description": "use to generate csrf token", |
| "type": "string" |
| }, |
| "expires": { |
| "default": 7200, |
| "description": "expires time(s) for csrf token", |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "fault-injection": { |
| "priority": 11000, |
| "version": 0.1, |
| "schema": { |
| "minProperties": 1, |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "delay": { |
| "required": [ |
| "duration" |
| ], |
| "type": "object", |
| "properties": { |
| "duration": { |
| "minimum": 0, |
| "type": "number" |
| }, |
| "vars": { |
| "maxItems": 20, |
| "items": { |
| "type": "array" |
| }, |
| "type": "array" |
| }, |
| "percentage": { |
| "minimum": 0, |
| "maximum": 100, |
| "type": "integer" |
| } |
| } |
| }, |
| "abort": { |
| "required": [ |
| "http_status" |
| ], |
| "type": "object", |
| "properties": { |
| "vars": { |
| "maxItems": 20, |
| "items": { |
| "type": "array" |
| }, |
| "type": "array" |
| }, |
| "body": { |
| "minLength": 0, |
| "type": "string" |
| }, |
| "http_status": { |
| "minimum": 200, |
| "type": "integer" |
| }, |
| "percentage": { |
| "minimum": 0, |
| "maximum": 100, |
| "type": "integer" |
| } |
| } |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "response-rewrite": { |
| "priority": 899, |
| "version": 0.1, |
| "schema": { |
| "dependencies": { |
| "filters": { |
| "not": { |
| "required": [ |
| "body" |
| ] |
| } |
| }, |
| "body": { |
| "not": { |
| "required": [ |
| "filters" |
| ] |
| } |
| } |
| }, |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "headers": { |
| "description": "new headers for response", |
| "anyOf": [ |
| { |
| "type": "object", |
| "patternProperties": { |
| "^[^:]+$": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "number" |
| } |
| ] |
| } |
| }, |
| "minProperties": 1 |
| }, |
| { |
| "properties": { |
| "remove": { |
| "minItems": 1, |
| "items": { |
| "pattern": "^[^:]+$", |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "add": { |
| "minItems": 1, |
| "items": { |
| "pattern": "^[^:]+:[^:]+[^/]$", |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "set": { |
| "type": "object", |
| "patternProperties": { |
| "^[^:]+$": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "number" |
| } |
| ] |
| } |
| }, |
| "minProperties": 1 |
| } |
| } |
| } |
| ] |
| }, |
| "body": { |
| "description": "new body for response", |
| "type": "string" |
| }, |
| "filters": { |
| "items": { |
| "properties": { |
| "replace": { |
| "description": "regex substitution content", |
| "type": "string" |
| }, |
| "options": { |
| "default": "jo", |
| "description": "regex options", |
| "type": "string" |
| }, |
| "regex": { |
| "minLength": 1, |
| "description": "match pattern on response body", |
| "type": "string" |
| }, |
| "scope": { |
| "enum": [ |
| "once", |
| "global" |
| ], |
| "default": "once", |
| "description": "regex substitution range", |
| "type": "string" |
| } |
| }, |
| "required": [ |
| "regex", |
| "replace" |
| ], |
| "description": "filter that modifies response body", |
| "type": "object" |
| }, |
| "minItems": 1, |
| "description": "a group of filters that modify response bodyby replacing one specified string by another", |
| "type": "array" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "body_base64": { |
| "default": false, |
| "description": "whether new body for response need base64 decode before return", |
| "type": "boolean" |
| }, |
| "vars": { |
| "type": "array" |
| }, |
| "status_code": { |
| "maximum": 598, |
| "minimum": 200, |
| "description": "new status code for response", |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "openid-connect": { |
| "priority": 2599, |
| "version": 0.2, |
| "schema": { |
| "encrypt_fields": [ |
| "client_secret" |
| ], |
| "required": [ |
| "client_id", |
| "client_secret", |
| "discovery" |
| ], |
| "type": "object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "properties": { |
| "redirect_uri": { |
| "description": "use ngx.var.request_uri if not configured", |
| "type": "string" |
| }, |
| "post_logout_redirect_uri": { |
| "description": "the URI will be redirect when request logout_path", |
| "type": "string" |
| }, |
| "unauth_action": { |
| "enum": [ |
| "auth", |
| "deny", |
| "pass" |
| ], |
| "default": "auth", |
| "description": "The action performed when client is not authorized. Use auth to redirect user to identity provider, deny to respond with 401 Unauthorized, and pass to allow the request regardless.", |
| "type": "string" |
| }, |
| "scope": { |
| "default": "openid", |
| "type": "string" |
| }, |
| "token_signing_alg_values_expected": { |
| "type": "string" |
| }, |
| "ssl_verify": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "set_access_token_header": { |
| "default": true, |
| "description": "Whether the access token should be added as a header to the request for downstream", |
| "type": "boolean" |
| }, |
| "access_token_in_authorization_header": { |
| "default": false, |
| "description": "Whether the access token should be added in the Authorization header as opposed to the X-Access-Token header.", |
| "type": "boolean" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "client_id": { |
| "type": "string" |
| }, |
| "set_refresh_token_header": { |
| "default": false, |
| "description": "Whether the refresh token should be added in the X-Refresh-Token header to the request for downstream.", |
| "type": "boolean" |
| }, |
| "set_userinfo_header": { |
| "default": true, |
| "description": "Whether the user info token should be added in the X-Userinfo header to the request for downstream.", |
| "type": "boolean" |
| }, |
| "client_secret": { |
| "type": "string" |
| }, |
| "set_id_token_header": { |
| "default": true, |
| "description": "Whether the ID token should be added in the X-ID-Token header to the request for downstream.", |
| "type": "boolean" |
| }, |
| "use_pkce": { |
| "default": false, |
| "description": "when set to true the PKEC(Proof Key for Code Exchange) will be used.", |
| "type": "boolean" |
| }, |
| "introspection_endpoint": { |
| "type": "string" |
| }, |
| "introspection_endpoint_auth_method": { |
| "default": "client_secret_basic", |
| "type": "string" |
| }, |
| "timeout": { |
| "default": 3, |
| "minimum": 1, |
| "description": "timeout in seconds", |
| "type": "integer" |
| }, |
| "bearer_only": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "session": { |
| "additionalProperties": false, |
| "required": [ |
| "secret" |
| ], |
| "type": "object", |
| "properties": { |
| "secret": { |
| "minLength": 16, |
| "description": "the key used for the encrypt and HMAC calculation", |
| "type": "string" |
| } |
| } |
| }, |
| "public_key": { |
| "type": "string" |
| }, |
| "realm": { |
| "default": "apisix", |
| "type": "string" |
| }, |
| "logout_path": { |
| "default": "/logout", |
| "type": "string" |
| }, |
| "discovery": { |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "authz-keycloak": { |
| "priority": 2000, |
| "version": 0.1, |
| "schema": { |
| "encrypt_fields": [ |
| "client_secret" |
| ], |
| "required": [ |
| "client_id" |
| ], |
| "type": "object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "allOf": [ |
| { |
| "anyOf": [ |
| { |
| "required": [ |
| "discovery" |
| ] |
| }, |
| { |
| "required": [ |
| "token_endpoint" |
| ] |
| } |
| ] |
| }, |
| { |
| "anyOf": [ |
| { |
| "properties": { |
| "lazy_load_paths": { |
| "enum": [ |
| false |
| ] |
| } |
| } |
| }, |
| { |
| "anyOf": [ |
| { |
| "required": [ |
| "discovery" |
| ] |
| }, |
| { |
| "required": [ |
| "resource_registration_endpoint" |
| ] |
| } |
| ], |
| "properties": { |
| "lazy_load_paths": { |
| "enum": [ |
| true |
| ] |
| } |
| } |
| } |
| ] |
| } |
| ], |
| "properties": { |
| "permissions": { |
| "type": "array", |
| "default": {}, |
| "uniqueItems": true, |
| "items": { |
| "minLength": 1, |
| "maxLength": 100, |
| "type": "string" |
| } |
| }, |
| "resource_registration_endpoint": { |
| "minLength": 1, |
| "maxLength": 4096, |
| "type": "string" |
| }, |
| "keepalive_pool": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "policy_enforcement_mode": { |
| "enum": [ |
| "ENFORCING", |
| "PERMISSIVE" |
| ], |
| "default": "ENFORCING", |
| "type": "string" |
| }, |
| "timeout": { |
| "minimum": 1000, |
| "default": 3000, |
| "type": "integer" |
| }, |
| "lazy_load_paths": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "http_method_as_scope": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "cache_ttl_seconds": { |
| "minimum": 1, |
| "default": 86400, |
| "type": "integer" |
| }, |
| "access_denied_redirect_uri": { |
| "minLength": 1, |
| "maxLength": 2048, |
| "type": "string" |
| }, |
| "refresh_token_expires_in": { |
| "minimum": 1, |
| "default": 3600, |
| "type": "integer" |
| }, |
| "refresh_token_expires_leeway": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "password_grant_token_generation_incoming_uri": { |
| "minLength": 1, |
| "maxLength": 4096, |
| "type": "string" |
| }, |
| "client_id": { |
| "minLength": 1, |
| "maxLength": 100, |
| "type": "string" |
| }, |
| "client_secret": { |
| "minLength": 1, |
| "maxLength": 100, |
| "type": "string" |
| }, |
| "grant_type": { |
| "minLength": 1, |
| "default": "urn:ietf:params:oauth:grant-type:uma-ticket", |
| "type": "string", |
| "enum": [ |
| "urn:ietf:params:oauth:grant-type:uma-ticket" |
| ], |
| "maxLength": 100 |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "access_token_expires_leeway": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "token_endpoint": { |
| "minLength": 1, |
| "maxLength": 4096, |
| "type": "string" |
| }, |
| "keepalive_timeout": { |
| "minimum": 1000, |
| "default": 60000, |
| "type": "integer" |
| }, |
| "access_token_expires_in": { |
| "minimum": 1, |
| "default": 300, |
| "type": "integer" |
| }, |
| "keepalive": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "ssl_verify": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "discovery": { |
| "minLength": 1, |
| "maxLength": 4096, |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "kafka-logger": { |
| "priority": 403, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "schema": { |
| "oneOf": [ |
| { |
| "required": [ |
| "broker_list", |
| "kafka_topic" |
| ] |
| }, |
| { |
| "required": [ |
| "brokers", |
| "kafka_topic" |
| ] |
| } |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "cluster_name": { |
| "minimum": 1, |
| "default": 1, |
| "type": "integer" |
| }, |
| "producer_batch_num": { |
| "minimum": 1, |
| "default": 200, |
| "type": "integer" |
| }, |
| "producer_batch_size": { |
| "minimum": 0, |
| "default": 1048576, |
| "type": "integer" |
| }, |
| "key": { |
| "type": "string" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 3, |
| "type": "integer" |
| }, |
| "meta_refresh_interval": { |
| "minimum": 1, |
| "default": 30, |
| "type": "integer" |
| }, |
| "include_resp_body_expr": { |
| "minItems": 1, |
| "items": { |
| "type": "array" |
| }, |
| "type": "array" |
| }, |
| "brokers": { |
| "items": { |
| "required": [ |
| "host", |
| "port" |
| ], |
| "type": "object", |
| "properties": { |
| "port": { |
| "maximum": 65535, |
| "minimum": 1, |
| "description": "the port of kafka broker", |
| "type": "integer" |
| }, |
| "sasl_config": { |
| "properties": { |
| "password": { |
| "description": "password", |
| "type": "string" |
| }, |
| "mechanism": { |
| "enum": [ |
| "PLAIN" |
| ], |
| "default": "PLAIN", |
| "type": "string" |
| }, |
| "user": { |
| "description": "user", |
| "type": "string" |
| } |
| }, |
| "required": [ |
| "user", |
| "password" |
| ], |
| "description": "sasl config", |
| "type": "object" |
| }, |
| "host": { |
| "description": "the host of kafka broker", |
| "type": "string" |
| } |
| } |
| }, |
| "minItems": 1, |
| "uniqueItems": true, |
| "type": "array" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "include_resp_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "kafka_topic": { |
| "type": "string" |
| }, |
| "producer_type": { |
| "enum": [ |
| "async", |
| "sync" |
| ], |
| "default": "async", |
| "type": "string" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "required_acks": { |
| "enum": [ |
| 0, |
| 1, |
| -1 |
| ], |
| "default": 1, |
| "type": "integer" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "broker_list": { |
| "type": "object", |
| "patternProperties": { |
| ".*": { |
| "maximum": 65535, |
| "minimum": 1, |
| "description": "the port of kafka broker", |
| "type": "integer" |
| } |
| }, |
| "minProperties": 1 |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "kafka logger" |
| }, |
| "producer_time_linger": { |
| "minimum": 1, |
| "default": 1, |
| "type": "integer" |
| }, |
| "producer_max_buffering": { |
| "minimum": 1, |
| "default": 50000, |
| "type": "integer" |
| }, |
| "include_req_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "meta_format": { |
| "enum": [ |
| "default", |
| "origin" |
| ], |
| "default": "default", |
| "type": "string" |
| }, |
| "include_req_body_expr": { |
| "minItems": 1, |
| "items": { |
| "type": "array" |
| }, |
| "type": "array" |
| }, |
| "log_format": { |
| "type": "object" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "openfunction": { |
| "priority": -1902, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "function_uri" |
| ], |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "ssl_verify": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "function_uri": { |
| "type": "string" |
| }, |
| "keepalive_timeout": { |
| "minimum": 1000, |
| "default": 60000, |
| "type": "integer" |
| }, |
| "keepalive": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "authorization": { |
| "service_token": { |
| "type": "string" |
| } |
| }, |
| "keepalive_pool": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "timeout": { |
| "minimum": 100, |
| "default": 3000, |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "opa": { |
| "priority": 2001, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "host", |
| "policy" |
| ], |
| "type": "object", |
| "properties": { |
| "keepalive_pool": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "with_route": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "host": { |
| "type": "string" |
| }, |
| "timeout": { |
| "default": 3000, |
| "type": "integer", |
| "maximum": 60000, |
| "description": "timeout in milliseconds", |
| "minimum": 1 |
| }, |
| "ssl_verify": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "policy": { |
| "type": "string" |
| }, |
| "keepalive_timeout": { |
| "minimum": 1000, |
| "default": 60000, |
| "type": "integer" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "with_consumer": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "with_service": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "keepalive": { |
| "default": true, |
| "type": "boolean" |
| } |
| } |
| } |
| }, |
| "basic-auth": { |
| "priority": 2520, |
| "version": 0.1, |
| "type": "auth", |
| "consumer_schema": { |
| "encrypt_fields": [ |
| "password" |
| ], |
| "required": [ |
| "username", |
| "password" |
| ], |
| "type": "object", |
| "title": "work with consumer object", |
| "properties": { |
| "username": { |
| "type": "string" |
| }, |
| "password": { |
| "type": "string" |
| } |
| } |
| }, |
| "schema": { |
| "title": "work with route or service object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "hide_credentials": { |
| "default": false, |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| }, |
| "public-api": { |
| "priority": 501, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "uri": { |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "redirect": { |
| "priority": 900, |
| "version": 0.1, |
| "schema": { |
| "oneOf": [ |
| { |
| "required": [ |
| "uri" |
| ] |
| }, |
| { |
| "required": [ |
| "regex_uri" |
| ] |
| }, |
| { |
| "required": [ |
| "http_to_https" |
| ] |
| } |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "http_to_https": { |
| "type": "boolean" |
| }, |
| "encode_uri": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "append_query_string": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "ret_code": { |
| "minimum": 200, |
| "default": 302, |
| "type": "integer" |
| }, |
| "uri": { |
| "minLength": 2, |
| "pattern": "(\\\\\\$[0-9a-zA-Z_]+)|\\$\\{([0-9a-zA-Z_]+)\\}|\\$([0-9a-zA-Z_]+)|(\\$|[^$\\\\]+)", |
| "type": "string" |
| }, |
| "regex_uri": { |
| "maxItems": 2, |
| "type": "array", |
| "minItems": 2, |
| "description": "params for generating new uri that substitute from client uri, first param is regular expression, the second one is uri template", |
| "items": { |
| "description": "regex uri", |
| "type": "string" |
| } |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "openwhisk": { |
| "priority": -1901, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "api_host", |
| "service_token", |
| "namespace", |
| "action" |
| ], |
| "type": "object", |
| "properties": { |
| "result": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "namespace": { |
| "maxLength": 256, |
| "pattern": "\\A([\\w]|[\\w][\\w@ .-]*[\\w@.-]+)\\z", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "timeout": { |
| "default": 3000, |
| "type": "integer", |
| "maximum": 60000, |
| "description": "timeout in milliseconds", |
| "minimum": 1 |
| }, |
| "keepalive_pool": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "ssl_verify": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "package": { |
| "maxLength": 256, |
| "pattern": "\\A([\\w]|[\\w][\\w@ .-]*[\\w@.-]+)\\z", |
| "type": "string" |
| }, |
| "keepalive_timeout": { |
| "minimum": 1000, |
| "default": 60000, |
| "type": "integer" |
| }, |
| "keepalive": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "action": { |
| "maxLength": 256, |
| "pattern": "\\A([\\w]|[\\w][\\w@ .-]*[\\w@.-]+)\\z", |
| "type": "string" |
| }, |
| "service_token": { |
| "type": "string" |
| }, |
| "api_host": { |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "zipkin": { |
| "priority": 12011, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "endpoint", |
| "sample_ratio" |
| ], |
| "type": "object", |
| "properties": { |
| "sample_ratio": { |
| "minimum": 1e-05, |
| "maximum": 1, |
| "type": "number" |
| }, |
| "service_name": { |
| "default": "APISIX", |
| "description": "service name for zipkin reporter", |
| "type": "string" |
| }, |
| "endpoint": { |
| "type": "string" |
| }, |
| "span_version": { |
| "enum": [ |
| 1, |
| 2 |
| ], |
| "default": 2 |
| }, |
| "server_addr": { |
| "pattern": "^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$", |
| "description": "default is $server_addr, you can specify your external ip address", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "real-ip": { |
| "priority": 23000, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "source" |
| ], |
| "type": "object", |
| "properties": { |
| "trusted_addresses": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "anyOf": [ |
| { |
| "title": "IPv4", |
| "format": "ipv4", |
| "type": "string" |
| }, |
| { |
| "title": "IPv4/CIDR", |
| "pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6", |
| "format": "ipv6", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6/CIDR", |
| "pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$", |
| "type": "string" |
| } |
| ] |
| } |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "source": { |
| "minLength": 1, |
| "type": "string" |
| }, |
| "recursive": { |
| "default": false, |
| "type": "boolean" |
| } |
| } |
| } |
| }, |
| "aws-lambda": { |
| "priority": -1899, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "function_uri" |
| ], |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "ssl_verify": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "function_uri": { |
| "type": "string" |
| }, |
| "keepalive_timeout": { |
| "minimum": 1000, |
| "default": 60000, |
| "type": "integer" |
| }, |
| "keepalive": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "authorization": { |
| "properties": { |
| "iam": { |
| "required": [ |
| "accesskey", |
| "secretkey" |
| ], |
| "type": "object", |
| "properties": { |
| "service": { |
| "default": "execute-api", |
| "description": "the service that is receiving the request", |
| "type": "string" |
| }, |
| "secretkey": { |
| "description": "secret access key from from aws iam console", |
| "type": "string" |
| }, |
| "aws_region": { |
| "default": "us-east-1", |
| "description": "the aws region that is receiving the request", |
| "type": "string" |
| }, |
| "accesskey": { |
| "description": "access key id from from aws iam console", |
| "type": "string" |
| } |
| } |
| }, |
| "apikey": { |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "keepalive_pool": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "timeout": { |
| "minimum": 100, |
| "default": 3000, |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "http-logger": { |
| "priority": 410, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "uri" |
| ], |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "concat_method": { |
| "enum": [ |
| "json", |
| "new_line" |
| ], |
| "default": "json", |
| "type": "string" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 3, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "http logger" |
| }, |
| "ssl_verify": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "auth_header": { |
| "type": "string" |
| }, |
| "include_resp_body_expr": { |
| "minItems": 1, |
| "items": { |
| "type": "array" |
| }, |
| "type": "array" |
| }, |
| "uri": { |
| "pattern": "^[^\\/]+:\\/\\/([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?", |
| "type": "string" |
| }, |
| "include_req_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "include_resp_body": { |
| "default": false, |
| "type": "boolean" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "skywalking-logger": { |
| "priority": 408, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "endpoint_addr" |
| ], |
| "type": "object", |
| "properties": { |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "endpoint_addr": { |
| "pattern": "^[^\\/]+:\\/\\/([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?", |
| "type": "string" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 3, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "skywalking logger" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "include_req_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "service_name": { |
| "default": "APISIX", |
| "type": "string" |
| }, |
| "service_instance_name": { |
| "default": "APISIX Instance Name", |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "authz-casdoor": { |
| "priority": 2559, |
| "version": 0.1, |
| "schema": { |
| "encrypt_fields": [ |
| "client_secret" |
| ], |
| "required": [ |
| "callback_url", |
| "endpoint_addr", |
| "client_id", |
| "client_secret" |
| ], |
| "type": "object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "properties": { |
| "client_id": { |
| "type": "string" |
| }, |
| "client_secret": { |
| "type": "string" |
| }, |
| "callback_url": { |
| "pattern": "^[^%?]+[^/]$", |
| "type": "string" |
| }, |
| "endpoint_addr": { |
| "pattern": "^[^%?]+[^/]$", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "ip-restriction": { |
| "priority": 3000, |
| "version": 0.1, |
| "schema": { |
| "oneOf": [ |
| { |
| "required": [ |
| "whitelist" |
| ] |
| }, |
| { |
| "required": [ |
| "blacklist" |
| ] |
| } |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "whitelist": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "anyOf": [ |
| { |
| "title": "IPv4", |
| "format": "ipv4", |
| "type": "string" |
| }, |
| { |
| "title": "IPv4/CIDR", |
| "pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6", |
| "format": "ipv6", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6/CIDR", |
| "pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$", |
| "type": "string" |
| } |
| ] |
| } |
| }, |
| "message": { |
| "minLength": 1, |
| "maxLength": 1024, |
| "default": "Your IP address is not allowed", |
| "type": "string" |
| }, |
| "blacklist": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "anyOf": [ |
| { |
| "title": "IPv4", |
| "format": "ipv4", |
| "type": "string" |
| }, |
| { |
| "title": "IPv4/CIDR", |
| "pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6", |
| "format": "ipv6", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6/CIDR", |
| "pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$", |
| "type": "string" |
| } |
| ] |
| } |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "mocking": { |
| "priority": 10900, |
| "version": 0.1, |
| "schema": { |
| "anyOf": [ |
| { |
| "required": [ |
| "response_example" |
| ] |
| }, |
| { |
| "required": [ |
| "response_schema" |
| ] |
| } |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "response_example": { |
| "type": "string" |
| }, |
| "response_schema": { |
| "type": "object" |
| }, |
| "with_mock_header": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "delay": { |
| "default": 0, |
| "type": "integer" |
| }, |
| "content_type": { |
| "default": "application/json;charset=utf8", |
| "type": "string" |
| }, |
| "response_status": { |
| "default": 200, |
| "minimum": 100, |
| "type": "integer" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "tencent-cloud-cls": { |
| "priority": 397, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "schema": { |
| "encrypt_fields": [ |
| "secret_key" |
| ], |
| "required": [ |
| "cls_host", |
| "cls_topic", |
| "secret_id", |
| "secret_key" |
| ], |
| "type": "object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "secret_key": { |
| "type": "string" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "cls_host": { |
| "type": "string" |
| }, |
| "cls_topic": { |
| "type": "string" |
| }, |
| "secret_id": { |
| "type": "string" |
| }, |
| "global_tag": { |
| "type": "object" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "tencent-cloud-cls" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "sample_ratio": { |
| "default": 1, |
| "minimum": 1e-05, |
| "maximum": 1, |
| "type": "number" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "include_req_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "include_resp_body": { |
| "default": false, |
| "type": "boolean" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "degraphql": { |
| "priority": 509, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "query" |
| ], |
| "type": "object", |
| "properties": { |
| "variables": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "type": "string" |
| } |
| }, |
| "operation_name": { |
| "minLength": 1, |
| "maxLength": 1024, |
| "type": "string" |
| }, |
| "query": { |
| "minLength": 1, |
| "maxLength": 1024, |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "proxy-cache": { |
| "priority": 1009, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "cache_ttl": { |
| "minimum": 1, |
| "default": 300, |
| "type": "integer" |
| }, |
| "cache_zone": { |
| "minLength": 1, |
| "maxLength": 100, |
| "default": "disk_cache_one", |
| "type": "string" |
| }, |
| "cache_strategy": { |
| "enum": [ |
| "disk", |
| "memory" |
| ], |
| "default": "disk", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "cache_http_status": { |
| "default": [ |
| 200, |
| 301, |
| 404 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "maximum": 599, |
| "minimum": 200, |
| "description": "http response status", |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| }, |
| "cache_method": { |
| "default": [ |
| "GET", |
| "HEAD" |
| ], |
| "uniqueItems": true, |
| "items": { |
| "enum": [ |
| "GET", |
| "POST", |
| "HEAD" |
| ], |
| "description": "supported http method", |
| "type": "string" |
| }, |
| "minItems": 1, |
| "type": "array" |
| }, |
| "cache_key": { |
| "default": [ |
| "$host", |
| "$request_uri" |
| ], |
| "minItems": 1, |
| "items": { |
| "pattern": "(^[^\\$].+$|^\\$[0-9a-zA-Z_]+$)", |
| "description": "a key for caching", |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "hide_cache_headers": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "cache_control": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "cache_bypass": { |
| "minItems": 1, |
| "items": { |
| "pattern": "(^[^\\$].+$|^\\$[0-9a-zA-Z_]+$)", |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "no_cache": { |
| "minItems": 1, |
| "items": { |
| "pattern": "(^[^\\$].+$|^\\$[0-9a-zA-Z_]+$)", |
| "type": "string" |
| }, |
| "type": "array" |
| } |
| } |
| }, |
| "version": 0.2 |
| }, |
| "loggly": { |
| "priority": 411, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "type": "object" |
| }, |
| "port": { |
| "default": 514, |
| "type": "integer" |
| }, |
| "host": { |
| "default": "logs-01.loggly.com", |
| "type": "string" |
| }, |
| "protocol": { |
| "enum": [ |
| "syslog", |
| "http", |
| "https" |
| ], |
| "default": "syslog", |
| "type": "string" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 5000, |
| "type": "integer" |
| } |
| }, |
| "type": "object" |
| }, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "customer_token" |
| ], |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "customer_token": { |
| "type": "string" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "tags": { |
| "default": [ |
| "apisix" |
| ], |
| "minItems": 1, |
| "items": { |
| "pattern": "^(?!tag=)[ -~]*", |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "severity_map": { |
| "patternProperties": { |
| "^[1-5][0-9]{2}$": { |
| "enum": [ |
| "INFO", |
| "info", |
| "DEBUG", |
| "debug", |
| "NOTICE", |
| "notice", |
| "ALERT", |
| "alert", |
| "CRIT", |
| "crit", |
| "ERR", |
| "err", |
| "EMEGR", |
| "emegr", |
| "WARNING", |
| "warning" |
| ], |
| "description": "keys are HTTP status code, values are severity", |
| "type": "string" |
| } |
| }, |
| "additionalProperties": false, |
| "description": "upstream response code vs syslog severity mapping", |
| "type": "object" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "loggly" |
| }, |
| "ssl_verify": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "include_req_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "severity": { |
| "enum": [ |
| "INFO", |
| "info", |
| "DEBUG", |
| "debug", |
| "NOTICE", |
| "notice", |
| "ALERT", |
| "alert", |
| "CRIT", |
| "crit", |
| "ERR", |
| "err", |
| "EMEGR", |
| "emegr", |
| "WARNING", |
| "warning" |
| ], |
| "default": "INFO", |
| "description": "base severity log level", |
| "type": "string" |
| }, |
| "include_resp_body_expr": { |
| "minItems": 1, |
| "items": { |
| "type": "array" |
| }, |
| "type": "array" |
| }, |
| "include_resp_body": { |
| "default": false, |
| "type": "boolean" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "cas-auth": { |
| "priority": 2597, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "idp_uri", |
| "cas_callback_uri", |
| "logout_uri" |
| ], |
| "type": "object", |
| "properties": { |
| "cas_callback_uri": { |
| "type": "string" |
| }, |
| "logout_uri": { |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "idp_uri": { |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "api-breaker": { |
| "priority": 1005, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "break_response_code" |
| ], |
| "type": "object", |
| "properties": { |
| "unhealthy": { |
| "default": { |
| "failures": 3, |
| "http_statuses": [ |
| 500 |
| ] |
| }, |
| "type": "object", |
| "properties": { |
| "failures": { |
| "minimum": 1, |
| "default": 3, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 500 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 500, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| } |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "healthy": { |
| "default": { |
| "successes": 3, |
| "http_statuses": [ |
| 200 |
| ] |
| }, |
| "type": "object", |
| "properties": { |
| "successes": { |
| "minimum": 1, |
| "default": 3, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 200 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 499, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| } |
| }, |
| "break_response_code": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "break_response_body": { |
| "type": "string" |
| }, |
| "break_response_headers": { |
| "items": { |
| "required": [ |
| "key", |
| "value" |
| ], |
| "type": "object", |
| "properties": { |
| "key": { |
| "minLength": 1, |
| "type": "string" |
| }, |
| "value": { |
| "minLength": 1, |
| "type": "string" |
| } |
| } |
| }, |
| "type": "array" |
| }, |
| "max_breaker_sec": { |
| "minimum": 3, |
| "default": 300, |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "prometheus": { |
| "priority": 500, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "prefer_name": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "version": 0.2 |
| }, |
| "consumer-restriction": { |
| "priority": 2400, |
| "version": 0.1, |
| "schema": { |
| "anyOf": [ |
| { |
| "required": [ |
| "blacklist" |
| ] |
| }, |
| { |
| "required": [ |
| "whitelist" |
| ] |
| }, |
| { |
| "required": [ |
| "allowed_by_methods" |
| ] |
| } |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "rejected_code": { |
| "minimum": 200, |
| "default": 403, |
| "type": "integer" |
| }, |
| "rejected_msg": { |
| "type": "string" |
| }, |
| "allowed_by_methods": { |
| "items": { |
| "properties": { |
| "user": { |
| "type": "string" |
| }, |
| "methods": { |
| "minItems": 1, |
| "items": { |
| "enum": [ |
| "GET", |
| "POST", |
| "PUT", |
| "DELETE", |
| "PATCH", |
| "HEAD", |
| "OPTIONS", |
| "CONNECT", |
| "TRACE", |
| "PURGE" |
| ], |
| "description": "HTTP method", |
| "type": "string" |
| }, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "type": "array" |
| }, |
| "whitelist": { |
| "minItems": 1, |
| "items": { |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "blacklist": { |
| "minItems": 1, |
| "items": { |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "type": { |
| "enum": [ |
| "consumer_name", |
| "service_id", |
| "route_id", |
| "consumer_group_id" |
| ], |
| "default": "consumer_name", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "limit-conn": { |
| "priority": 1003, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "conn", |
| "burst", |
| "default_conn_delay", |
| "key" |
| ], |
| "type": "object", |
| "properties": { |
| "conn": { |
| "exclusiveMinimum": 0, |
| "type": "integer" |
| }, |
| "key_type": { |
| "enum": [ |
| "var", |
| "var_combination" |
| ], |
| "default": "var", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "burst": { |
| "minimum": 0, |
| "type": "integer" |
| }, |
| "rejected_msg": { |
| "minLength": 1, |
| "type": "string" |
| }, |
| "allow_degradation": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "key": { |
| "type": "string" |
| }, |
| "default_conn_delay": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "only_use_default_delay": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "rejected_code": { |
| "default": 503, |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "google-cloud-logging": { |
| "priority": 407, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "version": 0.1, |
| "schema": { |
| "oneOf": [ |
| { |
| "required": [ |
| "auth_config" |
| ] |
| }, |
| { |
| "required": [ |
| "auth_file" |
| ] |
| } |
| ], |
| "type": "object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "encrypt_fields": [ |
| "auth_config.private_key" |
| ], |
| "properties": { |
| "log_id": { |
| "default": "apisix.apache.org%2Flogs", |
| "type": "string" |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "resource": { |
| "required": [ |
| "type" |
| ], |
| "default": { |
| "type": "global" |
| }, |
| "type": "object", |
| "properties": { |
| "labels": { |
| "type": "object" |
| }, |
| "type": { |
| "type": "string" |
| } |
| } |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "google-cloud-logging" |
| }, |
| "ssl_verify": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "auth_config": { |
| "required": [ |
| "private_key", |
| "project_id", |
| "token_uri" |
| ], |
| "type": "object", |
| "properties": { |
| "entries_uri": { |
| "default": "https://logging.googleapis.com/v2/entries:write", |
| "type": "string" |
| }, |
| "project_id": { |
| "type": "string" |
| }, |
| "private_key": { |
| "type": "string" |
| }, |
| "token_uri": { |
| "default": "https://oauth2.googleapis.com/token", |
| "type": "string" |
| }, |
| "scopes": { |
| "default": [ |
| "https://www.googleapis.com/auth/logging.read", |
| "https://www.googleapis.com/auth/logging.write", |
| "https://www.googleapis.com/auth/logging.admin", |
| "https://www.googleapis.com/auth/cloud-platform" |
| ], |
| "uniqueItems": true, |
| "type": "array", |
| "minItems": 1, |
| "items": { |
| "description": "Google OAuth2 Authorization Scopes", |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "auth_file": { |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "server-info": { |
| "priority": 990, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "scope": "global" |
| }, |
| "traffic-split": { |
| "priority": 966, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "rules": { |
| "items": { |
| "properties": { |
| "weighted_upstreams": { |
| "maxItems": 20, |
| "default": [ |
| { |
| "weight": 1 |
| } |
| ], |
| "type": "array", |
| "minItems": 1, |
| "items": { |
| "properties": { |
| "upstream_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "upstream": { |
| "oneOf": [ |
| { |
| "required": [ |
| "nodes" |
| ] |
| }, |
| { |
| "required": [ |
| "service_name", |
| "discovery_type" |
| ] |
| } |
| ], |
| "type": "object", |
| "properties": { |
| "scheme": { |
| "enum": [ |
| "grpc", |
| "grpcs", |
| "http", |
| "https", |
| "tcp", |
| "tls", |
| "udp", |
| "kafka" |
| ], |
| "default": "http", |
| "description": "The scheme of the upstream. For L7 proxy, it can be one of grpc/grpcs/http/https. For L4 proxy, it can be one of tcp/tls/udp. For specific protocols, it can be kafka." |
| }, |
| "key": { |
| "description": "the key of chash for dynamic load balancing", |
| "type": "string" |
| }, |
| "timeout": { |
| "required": [ |
| "connect", |
| "send", |
| "read" |
| ], |
| "type": "object", |
| "properties": { |
| "send": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "connect": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "read": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| } |
| } |
| }, |
| "discovery_type": { |
| "description": "discovery type", |
| "type": "string" |
| }, |
| "discovery_args": { |
| "properties": { |
| "group_name": { |
| "description": "group name", |
| "type": "string" |
| }, |
| "namespace_id": { |
| "description": "namespace id", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "pass_host": { |
| "enum": [ |
| "pass", |
| "node", |
| "rewrite" |
| ], |
| "default": "pass", |
| "description": "mod of host passing", |
| "type": "string" |
| }, |
| "upstream_host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "service_name": { |
| "minLength": 1, |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "type": { |
| "default": "roundrobin", |
| "description": "algorithms of load balancing", |
| "type": "string" |
| }, |
| "name": { |
| "minLength": 1, |
| "maxLength": 100, |
| "type": "string" |
| }, |
| "create_time": { |
| "type": "integer" |
| }, |
| "tls": { |
| "dependencies": { |
| "client_key": { |
| "not": { |
| "required": [ |
| "client_cert_id" |
| ] |
| }, |
| "required": [ |
| "client_cert" |
| ] |
| }, |
| "client_cert_id": { |
| "not": { |
| "required": [ |
| "client_client", |
| "client_key" |
| ] |
| } |
| }, |
| "client_cert": { |
| "not": { |
| "required": [ |
| "client_cert_id" |
| ] |
| }, |
| "required": [ |
| "client_key" |
| ] |
| } |
| }, |
| "type": "object", |
| "properties": { |
| "client_key": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| }, |
| "client_cert_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "verify": { |
| "default": false, |
| "description": "Turn on server certificate verification, currently only kafka upstream is supported", |
| "type": "boolean" |
| }, |
| "client_cert": { |
| "minLength": 128, |
| "maxLength": 65536, |
| "type": "string" |
| } |
| } |
| }, |
| "retry_timeout": { |
| "minimum": 0, |
| "type": "number" |
| }, |
| "desc": { |
| "maxLength": 256, |
| "type": "string" |
| }, |
| "checks": { |
| "anyOf": [ |
| { |
| "required": [ |
| "active" |
| ] |
| }, |
| { |
| "required": [ |
| "active", |
| "passive" |
| ] |
| } |
| ], |
| "type": "object", |
| "properties": { |
| "passive": { |
| "properties": { |
| "healthy": { |
| "properties": { |
| "successes": { |
| "default": 5, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 200, |
| 201, |
| 202, |
| 203, |
| 204, |
| 205, |
| 206, |
| 207, |
| 208, |
| 226, |
| 300, |
| 301, |
| 302, |
| 303, |
| 304, |
| 305, |
| 306, |
| 307, |
| 308 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "unhealthy": { |
| "properties": { |
| "tcp_failures": { |
| "default": 2, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "timeouts": { |
| "default": 7, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_failures": { |
| "default": 5, |
| "minimum": 0, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 429, |
| 500, |
| 503 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "type": { |
| "enum": [ |
| "http", |
| "https", |
| "tcp" |
| ], |
| "default": "http", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "active": { |
| "properties": { |
| "concurrency": { |
| "default": 10, |
| "type": "integer" |
| }, |
| "healthy": { |
| "properties": { |
| "successes": { |
| "default": 2, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "interval": { |
| "minimum": 1, |
| "default": 1, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 200, |
| 302 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "https_verify_certificate": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "timeout": { |
| "default": 1, |
| "type": "number" |
| }, |
| "unhealthy": { |
| "properties": { |
| "tcp_failures": { |
| "default": 2, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "timeouts": { |
| "default": 3, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| }, |
| "interval": { |
| "minimum": 1, |
| "default": 1, |
| "type": "integer" |
| }, |
| "http_statuses": { |
| "default": [ |
| 429, |
| 404, |
| 500, |
| 501, |
| 502, |
| 503, |
| 504, |
| 505 |
| ], |
| "uniqueItems": true, |
| "items": { |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "minItems": 1, |
| "type": "array" |
| }, |
| "http_failures": { |
| "default": 5, |
| "minimum": 1, |
| "maximum": 254, |
| "type": "integer" |
| } |
| }, |
| "type": "object" |
| }, |
| "req_headers": { |
| "minItems": 1, |
| "items": { |
| "uniqueItems": true, |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "port": { |
| "minimum": 1, |
| "maximum": 65535, |
| "type": "integer" |
| }, |
| "type": { |
| "enum": [ |
| "http", |
| "https", |
| "tcp" |
| ], |
| "default": "http", |
| "type": "string" |
| }, |
| "http_path": { |
| "default": "/", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "labels": { |
| "patternProperties": { |
| ".*": { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^\\S+$", |
| "type": "string", |
| "description": "value of label" |
| } |
| }, |
| "description": "key/value pairs to specify attributes", |
| "type": "object" |
| }, |
| "retries": { |
| "minimum": 0, |
| "type": "integer" |
| }, |
| "update_time": { |
| "type": "integer" |
| }, |
| "nodes": { |
| "anyOf": [ |
| { |
| "patternProperties": { |
| ".*": { |
| "minimum": 0, |
| "description": "weight of node", |
| "type": "integer" |
| } |
| }, |
| "type": "object" |
| }, |
| { |
| "items": { |
| "required": [ |
| "host", |
| "port", |
| "weight" |
| ], |
| "type": "object", |
| "properties": { |
| "priority": { |
| "default": 0, |
| "description": "priority of node", |
| "type": "integer" |
| }, |
| "weight": { |
| "minimum": 0, |
| "description": "weight of node", |
| "type": "integer" |
| }, |
| "port": { |
| "minimum": 1, |
| "description": "port of node", |
| "type": "integer" |
| }, |
| "host": { |
| "pattern": "^\\*?[0-9a-zA-Z-._\\[\\]:]+$", |
| "type": "string" |
| }, |
| "metadata": { |
| "description": "metadata of node", |
| "type": "object" |
| } |
| } |
| }, |
| "type": "array" |
| } |
| ] |
| }, |
| "keepalive_pool": { |
| "properties": { |
| "requests": { |
| "default": 1000, |
| "minimum": 1, |
| "type": "integer" |
| }, |
| "size": { |
| "default": 320, |
| "minimum": 1, |
| "type": "integer" |
| }, |
| "idle_timeout": { |
| "default": 60, |
| "minimum": 0, |
| "type": "number" |
| } |
| }, |
| "type": "object" |
| }, |
| "hash_on": { |
| "enum": [ |
| "vars", |
| "header", |
| "cookie", |
| "consumer", |
| "vars_combinations" |
| ], |
| "default": "vars", |
| "type": "string" |
| } |
| } |
| }, |
| "weight": { |
| "minimum": 0, |
| "default": 1, |
| "description": "used to split traffic between differentupstreams for plugin configuration", |
| "type": "integer" |
| } |
| }, |
| "type": "object" |
| } |
| }, |
| "match": { |
| "items": { |
| "properties": { |
| "vars": { |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "type": "array" |
| } |
| }, |
| "type": "object" |
| }, |
| "type": "array" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "ext-plugin-post-req": { |
| "priority": -3000, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "conf": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "required": [ |
| "name", |
| "value" |
| ], |
| "type": "object", |
| "properties": { |
| "name": { |
| "minLength": 1, |
| "maxLength": 128, |
| "type": "string" |
| }, |
| "value": { |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "allow_degradation": { |
| "default": false, |
| "type": "boolean" |
| } |
| } |
| } |
| }, |
| "example-plugin": { |
| "priority": 0, |
| "metadata_schema": { |
| "required": [ |
| "ikey", |
| "skey" |
| ], |
| "type": "object", |
| "properties": { |
| "ikey": { |
| "minimum": 0, |
| "type": "number" |
| }, |
| "skey": { |
| "type": "string" |
| } |
| } |
| }, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "i" |
| ], |
| "type": "object", |
| "properties": { |
| "i": { |
| "minimum": 0, |
| "type": "number" |
| }, |
| "ip": { |
| "type": "string" |
| }, |
| "s": { |
| "type": "string" |
| }, |
| "port": { |
| "type": "integer" |
| }, |
| "t": { |
| "minItems": 1, |
| "type": "array" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "limit-req": { |
| "priority": 1001, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "rate", |
| "burst", |
| "key" |
| ], |
| "type": "object", |
| "properties": { |
| "key": { |
| "type": "string" |
| }, |
| "rate": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "burst": { |
| "minimum": 0, |
| "type": "number" |
| }, |
| "rejected_msg": { |
| "minLength": 1, |
| "type": "string" |
| }, |
| "allow_degradation": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "key_type": { |
| "enum": [ |
| "var", |
| "var_combination" |
| ], |
| "default": "var", |
| "type": "string" |
| }, |
| "rejected_code": { |
| "default": 503, |
| "minimum": 200, |
| "maximum": 599, |
| "type": "integer" |
| }, |
| "nodelay": { |
| "default": false, |
| "type": "boolean" |
| } |
| } |
| } |
| }, |
| "syslog": { |
| "priority": 401, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "host", |
| "port" |
| ], |
| "type": "object", |
| "properties": { |
| "flush_limit": { |
| "minimum": 1, |
| "default": 4096, |
| "type": "integer" |
| }, |
| "drop_limit": { |
| "default": 1048576, |
| "type": "integer" |
| }, |
| "sock_type": { |
| "enum": [ |
| "tcp", |
| "udp" |
| ], |
| "default": "tcp", |
| "type": "string" |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 3000, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "sys logger" |
| }, |
| "port": { |
| "type": "integer" |
| }, |
| "tls": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "pool_size": { |
| "minimum": 5, |
| "default": 5, |
| "type": "integer" |
| }, |
| "include_req_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "host": { |
| "type": "string" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "proxy-rewrite": { |
| "priority": 1008, |
| "version": 0.1, |
| "schema": { |
| "minProperties": 1, |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "headers": { |
| "description": "new headers for request", |
| "oneOf": [ |
| { |
| "properties": { |
| "remove": { |
| "minItems": 1, |
| "items": { |
| "pattern": "^[^:]+$", |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "add": { |
| "type": "object", |
| "patternProperties": { |
| "^[^:]+$": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "number" |
| } |
| ] |
| } |
| }, |
| "minProperties": 1 |
| }, |
| "set": { |
| "type": "object", |
| "patternProperties": { |
| "^[^:]+$": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "number" |
| } |
| ] |
| } |
| }, |
| "minProperties": 1 |
| } |
| }, |
| "additionalProperties": false, |
| "type": "object", |
| "minProperties": 1 |
| }, |
| { |
| "type": "object", |
| "patternProperties": { |
| "^[^:]+$": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "number" |
| } |
| ] |
| } |
| }, |
| "minProperties": 1 |
| } |
| ] |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "regex_uri": { |
| "maxItems": 2, |
| "type": "array", |
| "minItems": 2, |
| "description": "new uri that substitute from client uri for upstream, lower priority than uri property", |
| "items": { |
| "description": "regex uri", |
| "type": "string" |
| } |
| }, |
| "uri": { |
| "minLength": 1, |
| "maxLength": 4096, |
| "pattern": "^\\/.*", |
| "type": "string", |
| "description": "new uri for upstream" |
| }, |
| "use_real_request_uri_unsafe": { |
| "default": false, |
| "description": "use real_request_uri instead, THIS IS VERY UNSAFE.", |
| "type": "boolean" |
| }, |
| "host": { |
| "pattern": "^[0-9a-zA-Z-.]+(:\\d{1,5})?$", |
| "description": "new host for upstream", |
| "type": "string" |
| }, |
| "method": { |
| "enum": [ |
| "PUT", |
| "DELETE", |
| "MKCOL", |
| "COPY", |
| "MOVE", |
| "OPTIONS", |
| "PROPFIND", |
| "LOCK", |
| "UNLOCK", |
| "PATCH", |
| "TRACE", |
| "GET", |
| "HEAD", |
| "POST" |
| ], |
| "description": "proxy route method", |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "elasticsearch-logger": { |
| "priority": 413, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "version": 0.1, |
| "schema": { |
| "encrypt_fields": [ |
| "auth.password" |
| ], |
| "type": "object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "oneOf": [ |
| { |
| "required": [ |
| "endpoint_addr", |
| "field" |
| ] |
| }, |
| { |
| "required": [ |
| "endpoint_addrs", |
| "field" |
| ] |
| } |
| ], |
| "properties": { |
| "endpoint_addrs": { |
| "minItems": 1, |
| "items": { |
| "pattern": "[^/]$", |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "endpoint_addr": { |
| "pattern": "[^/]$", |
| "type": "string" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 10, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "elasticsearch-logger" |
| }, |
| "field": { |
| "required": [ |
| "index" |
| ], |
| "type": "object", |
| "properties": { |
| "type": { |
| "type": "string" |
| }, |
| "index": { |
| "type": "string" |
| } |
| } |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "auth": { |
| "required": [ |
| "username", |
| "password" |
| ], |
| "type": "object", |
| "properties": { |
| "username": { |
| "minLength": 1, |
| "type": "string" |
| }, |
| "password": { |
| "minLength": 1, |
| "type": "string" |
| } |
| } |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "ssl_verify": { |
| "default": true, |
| "type": "boolean" |
| } |
| } |
| } |
| }, |
| "azure-functions": { |
| "priority": -1900, |
| "metadata_schema": { |
| "properties": { |
| "master_clientid": { |
| "default": "", |
| "type": "string" |
| }, |
| "master_apikey": { |
| "default": "", |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "function_uri" |
| ], |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "ssl_verify": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "function_uri": { |
| "type": "string" |
| }, |
| "keepalive_timeout": { |
| "minimum": 1000, |
| "default": 60000, |
| "type": "integer" |
| }, |
| "keepalive": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "authorization": { |
| "properties": { |
| "clientid": { |
| "type": "string" |
| }, |
| "apikey": { |
| "type": "string" |
| } |
| }, |
| "type": "object" |
| }, |
| "keepalive_pool": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "timeout": { |
| "minimum": 100, |
| "default": 3000, |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "uri-blocker": { |
| "priority": 2900, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "block_rules" |
| ], |
| "type": "object", |
| "properties": { |
| "rejected_code": { |
| "minimum": 200, |
| "default": 403, |
| "type": "integer" |
| }, |
| "rejected_msg": { |
| "minLength": 1, |
| "type": "string" |
| }, |
| "block_rules": { |
| "type": "array", |
| "uniqueItems": true, |
| "items": { |
| "minLength": 1, |
| "maxLength": 4096, |
| "type": "string" |
| } |
| }, |
| "case_insensitive": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "ext-plugin-post-resp": { |
| "priority": -4000, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "conf": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "required": [ |
| "name", |
| "value" |
| ], |
| "type": "object", |
| "properties": { |
| "name": { |
| "minLength": 1, |
| "maxLength": 128, |
| "type": "string" |
| }, |
| "value": { |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "allow_degradation": { |
| "default": false, |
| "type": "boolean" |
| } |
| } |
| } |
| }, |
| "wolf-rbac": { |
| "priority": 2555, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "appid": { |
| "default": "unset", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "header_prefix": { |
| "default": "X-", |
| "type": "string" |
| }, |
| "server": { |
| "default": "http://127.0.0.1:12180", |
| "type": "string" |
| } |
| } |
| }, |
| "type": "auth" |
| }, |
| "udp-logger": { |
| "priority": 400, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "host", |
| "port" |
| ], |
| "type": "object", |
| "properties": { |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "host": { |
| "type": "string" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 3, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "udp logger" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "include_req_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "port": { |
| "minimum": 0, |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "serverless-pre-function": { |
| "priority": 10000, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "functions" |
| ], |
| "type": "object", |
| "properties": { |
| "phase": { |
| "enum": [ |
| "rewrite", |
| "access", |
| "header_filter", |
| "body_filter", |
| "log", |
| "before_proxy" |
| ], |
| "default": "access", |
| "type": "string" |
| }, |
| "functions": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "type": "string" |
| } |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "ext-plugin-pre-req": { |
| "priority": 12000, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "conf": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "required": [ |
| "name", |
| "value" |
| ], |
| "type": "object", |
| "properties": { |
| "name": { |
| "minLength": 1, |
| "maxLength": 128, |
| "type": "string" |
| }, |
| "value": { |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "allow_degradation": { |
| "default": false, |
| "type": "boolean" |
| } |
| } |
| } |
| }, |
| "body-transformer": { |
| "priority": 1080, |
| "schema": { |
| "anyOf": [ |
| { |
| "required": [ |
| "request" |
| ] |
| }, |
| { |
| "required": [ |
| "response" |
| ] |
| }, |
| { |
| "required": [ |
| "request", |
| "response" |
| ] |
| } |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "request": { |
| "required": [ |
| "template" |
| ], |
| "type": "object", |
| "properties": { |
| "template": { |
| "type": "string" |
| }, |
| "input_format": { |
| "enum": [ |
| "xml", |
| "json" |
| ], |
| "type": "string" |
| } |
| } |
| }, |
| "response": { |
| "required": [ |
| "template" |
| ], |
| "type": "object", |
| "properties": { |
| "template": { |
| "type": "string" |
| }, |
| "input_format": { |
| "enum": [ |
| "xml", |
| "json" |
| ], |
| "type": "string" |
| } |
| } |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "key-auth": { |
| "priority": 2500, |
| "version": 0.1, |
| "type": "auth", |
| "consumer_schema": { |
| "encrypt_fields": [ |
| "key" |
| ], |
| "required": [ |
| "key" |
| ], |
| "type": "object", |
| "properties": { |
| "key": { |
| "type": "string" |
| } |
| } |
| }, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "hide_credentials": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "header": { |
| "default": "apikey", |
| "type": "string" |
| }, |
| "query": { |
| "default": "apikey", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "tcp-logger": { |
| "priority": 405, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "host", |
| "port" |
| ], |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "host": { |
| "type": "string" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "tcp logger" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "include_req_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "tls_options": { |
| "type": "string" |
| }, |
| "tls": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "port": { |
| "minimum": 0, |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "clickhouse-logger": { |
| "priority": 398, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "schema": { |
| "oneOf": [ |
| { |
| "required": [ |
| "endpoint_addr", |
| "user", |
| "password", |
| "database", |
| "logtable" |
| ] |
| }, |
| { |
| "required": [ |
| "endpoint_addrs", |
| "user", |
| "password", |
| "database", |
| "logtable" |
| ] |
| } |
| ], |
| "type": "object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "encrypt_fields": [ |
| "password" |
| ], |
| "properties": { |
| "endpoint_addrs": { |
| "minItems": 1, |
| "items": { |
| "pattern": "^[^\\/]+:\\/\\/([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?", |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "database": { |
| "default": "", |
| "type": "string" |
| }, |
| "password": { |
| "default": "", |
| "type": "string" |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 3, |
| "type": "integer" |
| }, |
| "name": { |
| "default": "clickhouse-logger", |
| "type": "string" |
| }, |
| "ssl_verify": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "include_resp_body_expr": { |
| "minItems": 1, |
| "items": { |
| "type": "array" |
| }, |
| "type": "array" |
| }, |
| "include_resp_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "user": { |
| "default": "", |
| "type": "string" |
| }, |
| "endpoint_addr": { |
| "pattern": "^[^\\/]+:\\/\\/([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "include_req_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "logtable": { |
| "default": "", |
| "type": "string" |
| }, |
| "include_req_body_expr": { |
| "minItems": 1, |
| "items": { |
| "type": "array" |
| }, |
| "type": "array" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "proxy-mirror": { |
| "priority": 1010, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "host" |
| ], |
| "type": "object", |
| "properties": { |
| "sample_ratio": { |
| "default": 1, |
| "minimum": 1e-05, |
| "maximum": 1, |
| "type": "number" |
| }, |
| "path": { |
| "pattern": "^/[^?&]+$", |
| "type": "string" |
| }, |
| "path_concat_mode": { |
| "enum": [ |
| "replace", |
| "prefix" |
| ], |
| "default": "replace", |
| "description": "the concatenation mode for custom path", |
| "type": "string" |
| }, |
| "host": { |
| "pattern": "^http(s)?:\\/\\/([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?$", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "rocketmq-logger": { |
| "priority": 402, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "schema": { |
| "encrypt_fields": [ |
| "secret_key" |
| ], |
| "required": [ |
| "nameserver_list", |
| "topic" |
| ], |
| "type": "object", |
| "$comment": "this is a mark for our injected plugin schema", |
| "properties": { |
| "access_key": { |
| "default": "", |
| "type": "string" |
| }, |
| "secret_key": { |
| "default": "", |
| "type": "string" |
| }, |
| "topic": { |
| "type": "string" |
| }, |
| "log_format": { |
| "type": "object" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "key": { |
| "type": "string" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 3, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "rocketmq logger" |
| }, |
| "include_resp_body_expr": { |
| "minItems": 1, |
| "items": { |
| "type": "array" |
| }, |
| "type": "array" |
| }, |
| "include_resp_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "nameserver_list": { |
| "minItems": 1, |
| "items": { |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| "use_tls": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "tag": { |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "include_req_body": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "meta_format": { |
| "enum": [ |
| "default", |
| "origin" |
| ], |
| "default": "default", |
| "type": "string" |
| }, |
| "include_req_body_expr": { |
| "minItems": 1, |
| "items": { |
| "type": "array" |
| }, |
| "type": "array" |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "grpc-transcode": { |
| "priority": 506, |
| "schema": { |
| "required": [ |
| "proto_id", |
| "service", |
| "method" |
| ], |
| "type": "object", |
| "additionalProperties": true, |
| "$comment": "this is a mark for our injected plugin schema", |
| "properties": { |
| "status_detail_type": { |
| "description": "the message type of the grpc-status-details-bin's details part, if not given, the details part will not be decoded", |
| "type": "string" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "proto_id": { |
| "anyOf": [ |
| { |
| "minLength": 1, |
| "maxLength": 64, |
| "pattern": "^[a-zA-Z0-9-_.]+$", |
| "type": "string" |
| }, |
| { |
| "minimum": 1, |
| "type": "integer" |
| } |
| ] |
| }, |
| "deadline": { |
| "default": 0, |
| "description": "deadline for grpc, millisecond", |
| "type": "number" |
| }, |
| "service": { |
| "description": "the grpc service name", |
| "type": "string" |
| }, |
| "pb_option": { |
| "default": [ |
| "enum_as_name", |
| "int64_as_number", |
| "auto_default_values", |
| "disable_hooks" |
| ], |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "anyOf": [ |
| { |
| "enum": [ |
| "int64_as_number", |
| "int64_as_string", |
| "int64_as_hexstring" |
| ], |
| "description": "enum as result", |
| "type": "string" |
| }, |
| { |
| "enum": [ |
| "enum_as_name", |
| "enum_as_value" |
| ], |
| "description": "int64 as result", |
| "type": "string" |
| }, |
| { |
| "enum": [ |
| "auto_default_values", |
| "no_default_values", |
| "use_default_values", |
| "use_default_metatable" |
| ], |
| "description": "default values option", |
| "type": "string" |
| }, |
| { |
| "enum": [ |
| "enable_hooks", |
| "disable_hooks" |
| ], |
| "description": "hooks option", |
| "type": "string" |
| } |
| ], |
| "type": "string" |
| } |
| }, |
| "show_status_in_body": { |
| "default": false, |
| "description": "show decoded grpc-status-details-bin in response body", |
| "type": "boolean" |
| }, |
| "method": { |
| "description": "the method name in the grpc service.", |
| "type": "string" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "proxy-control": { |
| "priority": 21990, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "request_buffering": { |
| "default": true, |
| "type": "boolean" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "gzip": { |
| "priority": 995, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "buffers": { |
| "default": { |
| "number": 32, |
| "size": 4096 |
| }, |
| "type": "object", |
| "properties": { |
| "number": { |
| "minimum": 1, |
| "default": 32, |
| "type": "integer" |
| }, |
| "size": { |
| "minimum": 1, |
| "default": 4096, |
| "type": "integer" |
| } |
| } |
| }, |
| "vary": { |
| "type": "boolean" |
| }, |
| "types": { |
| "anyOf": [ |
| { |
| "minItems": 1, |
| "items": { |
| "minLength": 1, |
| "type": "string" |
| }, |
| "type": "array" |
| }, |
| { |
| "enum": [ |
| "*" |
| ] |
| } |
| ], |
| "default": [ |
| "text/html" |
| ] |
| }, |
| "min_length": { |
| "minimum": 1, |
| "default": 20, |
| "type": "integer" |
| }, |
| "comp_level": { |
| "default": 1, |
| "minimum": 1, |
| "maximum": 9, |
| "type": "integer" |
| }, |
| "http_version": { |
| "enum": [ |
| 1.1, |
| 1 |
| ], |
| "default": 1.1 |
| } |
| } |
| } |
| }, |
| "grpc-web": { |
| "priority": 505, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| }, |
| "version": 0.1 |
| } |
| }, |
| "stream_plugins": { |
| "syslog": { |
| "priority": 401, |
| "metadata_schema": { |
| "properties": { |
| "log_format": { |
| "default": { |
| "client_ip": "$remote_addr", |
| "host": "$host", |
| "@timestamp": "$time_iso8601" |
| }, |
| "type": "object" |
| } |
| }, |
| "type": "object" |
| }, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "host", |
| "port" |
| ], |
| "type": "object", |
| "properties": { |
| "flush_limit": { |
| "minimum": 1, |
| "default": 4096, |
| "type": "integer" |
| }, |
| "drop_limit": { |
| "default": 1048576, |
| "type": "integer" |
| }, |
| "sock_type": { |
| "enum": [ |
| "tcp", |
| "udp" |
| ], |
| "default": "tcp", |
| "type": "string" |
| }, |
| "inactive_timeout": { |
| "minimum": 1, |
| "default": 5, |
| "type": "integer" |
| }, |
| "port": { |
| "type": "integer" |
| }, |
| "max_retry_count": { |
| "minimum": 0, |
| "default": 0, |
| "type": "integer" |
| }, |
| "pool_size": { |
| "minimum": 5, |
| "default": 5, |
| "type": "integer" |
| }, |
| "timeout": { |
| "minimum": 1, |
| "default": 3000, |
| "type": "integer" |
| }, |
| "name": { |
| "type": "string", |
| "default": "stream sys logger" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "buffer_duration": { |
| "minimum": 1, |
| "default": 60, |
| "type": "integer" |
| }, |
| "retry_delay": { |
| "minimum": 0, |
| "default": 1, |
| "type": "integer" |
| }, |
| "batch_max_size": { |
| "minimum": 1, |
| "default": 1000, |
| "type": "integer" |
| }, |
| "tls": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "host": { |
| "type": "string" |
| }, |
| "log_format": { |
| "type": "object" |
| } |
| } |
| }, |
| "version": 0.1 |
| }, |
| "limit-conn": { |
| "priority": 1003, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "conn", |
| "burst", |
| "default_conn_delay", |
| "key" |
| ], |
| "type": "object", |
| "properties": { |
| "burst": { |
| "minimum": 0, |
| "type": "integer" |
| }, |
| "conn": { |
| "exclusiveMinimum": 0, |
| "type": "integer" |
| }, |
| "key": { |
| "type": "string" |
| }, |
| "key_type": { |
| "enum": [ |
| "var", |
| "var_combination" |
| ], |
| "default": "var", |
| "type": "string" |
| }, |
| "default_conn_delay": { |
| "exclusiveMinimum": 0, |
| "type": "number" |
| }, |
| "only_use_default_delay": { |
| "default": false, |
| "type": "boolean" |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| }, |
| "mqtt-proxy": { |
| "priority": 1000, |
| "version": 0.1, |
| "schema": { |
| "$comment": "this is a mark for our injected plugin schema", |
| "required": [ |
| "protocol_name", |
| "protocol_level" |
| ], |
| "type": "object", |
| "properties": { |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| }, |
| "protocol_name": { |
| "type": "string" |
| }, |
| "protocol_level": { |
| "type": "integer" |
| } |
| } |
| } |
| }, |
| "ip-restriction": { |
| "priority": 3000, |
| "version": 0.1, |
| "schema": { |
| "oneOf": [ |
| { |
| "required": [ |
| "whitelist" |
| ] |
| }, |
| { |
| "required": [ |
| "blacklist" |
| ] |
| } |
| ], |
| "$comment": "this is a mark for our injected plugin schema", |
| "type": "object", |
| "properties": { |
| "whitelist": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "anyOf": [ |
| { |
| "title": "IPv4", |
| "format": "ipv4", |
| "type": "string" |
| }, |
| { |
| "title": "IPv4/CIDR", |
| "pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6", |
| "format": "ipv6", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6/CIDR", |
| "pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$", |
| "type": "string" |
| } |
| ] |
| } |
| }, |
| "message": { |
| "minLength": 1, |
| "maxLength": 1024, |
| "default": "Your IP address is not allowed", |
| "type": "string" |
| }, |
| "blacklist": { |
| "minItems": 1, |
| "type": "array", |
| "items": { |
| "anyOf": [ |
| { |
| "title": "IPv4", |
| "format": "ipv4", |
| "type": "string" |
| }, |
| { |
| "title": "IPv4/CIDR", |
| "pattern": "^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6", |
| "format": "ipv6", |
| "type": "string" |
| }, |
| { |
| "title": "IPv6/CIDR", |
| "pattern": "^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$", |
| "type": "string" |
| } |
| ] |
| } |
| }, |
| "_meta": { |
| "properties": { |
| "error_response": { |
| "oneOf": [ |
| { |
| "type": "string" |
| }, |
| { |
| "type": "object" |
| } |
| ] |
| }, |
| "priority": { |
| "description": "priority of plugins by customized order", |
| "type": "integer" |
| }, |
| "filter": { |
| "description": "filter determines whether the plugin needs to be executed at runtime", |
| "type": "array" |
| }, |
| "disable": { |
| "type": "boolean" |
| } |
| }, |
| "type": "object" |
| } |
| } |
| } |
| } |
| } |
| } |