This is an automated email from the ASF dual-hosted git repository. bzp2010 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new 9d99ab7 feat: basic support Apache APISIX 2.12.1 (#2315)
9d99ab7 is described below
commit 9d99ab79afe63aed60da7899a3f9bee9a5380026
Author: Baoyuan <[email protected]>
AuthorDate: Tue Mar 1 14:54:43 2022 +0800
feat: basic support Apache APISIX 2.12.1 (#2315)
Co-authored-by: 白泽平 <[email protected]>
---
api/conf/schema.json | 1098 ++++++++++++++++++++++++++++++---
api/test/e2enew/schema/schema_test.go | 11 +-
web/src/components/Plugin/data.tsx | 27 +
3 files changed, 1043 insertions(+), 93 deletions(-)
diff --git a/api/conf/schema.json b/api/conf/schema.json
index 37f7c48..a65c22a 100644
--- a/api/conf/schema.json
+++ b/api/conf/schema.json
@@ -723,6 +723,43 @@
"type":
"object"
},
"passive": {
+
"default": {
+
"healthy": {
+
"http_statuses": [
+
200,
+
201,
+
202,
+
203,
+
204,
+
205,
+
206,
+
207,
+
208,
+
226,
+
300,
+
301,
+
302,
+
303,
+
304,
+
305,
+
306,
+
307,
+
308
+
],
+
"successes": 0
+
},
+
"type": "http",
+
"unhealthy": {
+
"http_failures": 0,
+
"http_statuses": [
+
429,
+
500,
+
503
+
],
+
"tcp_failures": 0,
+
"timeouts": 0
+
}
+ },
"properties": {
"healthy": {
"properties": {
@@ -760,7 +797,7 @@
"successes": {
"default": 5,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
}
},
@@ -780,7 +817,7 @@
"http_failures": {
"default": 5,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
},
"http_statuses": {
@@ -801,13 +838,13 @@
"tcp_failures": {
"default": 2,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
}
},
@@ -981,11 +1018,15 @@
},
"scheme": {
"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.",
"enum": [
"grpc",
"grpcs",
"http",
- "https"
+ "https",
+ "tcp",
+ "tls",
+ "udp"
]
},
"service_name": {
@@ -1306,6 +1347,43 @@
"type":
"object"
},
"passive": {
+
"default": {
+
"healthy": {
+
"http_statuses": [
+
200,
+
201,
+
202,
+
203,
+
204,
+
205,
+
206,
+
207,
+
208,
+
226,
+
300,
+
301,
+
302,
+
303,
+
304,
+
305,
+
306,
+
307,
+
308
+
],
+
"successes": 0
+
},
+
"type": "http",
+
"unhealthy": {
+
"http_failures": 0,
+
"http_statuses": [
+
429,
+
500,
+
503
+
],
+
"tcp_failures": 0,
+
"timeouts": 0
+
}
+ },
"properties": {
"healthy": {
"properties": {
@@ -1343,7 +1421,7 @@
"successes": {
"default": 5,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
}
},
@@ -1363,7 +1441,7 @@
"http_failures": {
"default": 5,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
},
"http_statuses": {
@@ -1384,13 +1462,13 @@
"tcp_failures": {
"default": 2,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
}
},
@@ -1564,11 +1642,15 @@
},
"scheme": {
"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.",
"enum": [
"grpc",
"grpcs",
"http",
- "https"
+ "https",
+ "tcp",
+ "tls",
+ "udp"
]
},
"service_name": {
@@ -2026,6 +2108,43 @@
"type":
"object"
},
"passive": {
+
"default": {
+
"healthy": {
+
"http_statuses": [
+
200,
+
201,
+
202,
+
203,
+
204,
+
205,
+
206,
+
207,
+
208,
+
226,
+
300,
+
301,
+
302,
+
303,
+
304,
+
305,
+
306,
+
307,
+
308
+
],
+
"successes": 0
+
},
+
"type": "http",
+
"unhealthy": {
+
"http_failures": 0,
+
"http_statuses": [
+
429,
+
500,
+
503
+
],
+
"tcp_failures": 0,
+
"timeouts": 0
+
}
+ },
"properties": {
"healthy": {
"properties": {
@@ -2063,7 +2182,7 @@
"successes": {
"default": 5,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
}
},
@@ -2083,7 +2202,7 @@
"http_failures": {
"default": 5,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
},
"http_statuses": {
@@ -2104,13 +2223,13 @@
"tcp_failures": {
"default": 2,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
}
},
@@ -2284,11 +2403,15 @@
},
"scheme": {
"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.",
"enum": [
"grpc",
"grpcs",
"http",
- "https"
+ "https",
+ "tcp",
+ "tls",
+ "udp"
]
},
"service_name": {
@@ -2526,6 +2649,43 @@
"type": "object"
},
"passive": {
+ "default": {
+ "healthy": {
+
"http_statuses": [
+
200,
+
201,
+
202,
+
203,
+
204,
+
205,
+
206,
+
207,
+
208,
+
226,
+
300,
+
301,
+
302,
+
303,
+
304,
+
305,
+
306,
+
307,
+
308
+ ],
+
"successes": 0
+ },
+ "type": "http",
+ "unhealthy": {
+
"http_failures": 0,
+
"http_statuses": [
+
429,
+
500,
+
503
+ ],
+
"tcp_failures": 0,
+
"timeouts": 0
+ }
+ },
"properties": {
"healthy": {
"properties": {
@@ -2563,7 +2723,7 @@
"successes": {
"default": 5,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
}
},
@@ -2583,7 +2743,7 @@
"http_failures": {
"default": 5,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
},
"http_statuses": {
@@ -2604,13 +2764,13 @@
"tcp_failures": {
"default": 2,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
}
},
@@ -2784,11 +2944,15 @@
},
"scheme": {
"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.",
"enum": [
"grpc",
"grpcs",
"http",
- "https"
+ "https",
+ "tcp",
+ "tls",
+ "udp"
]
},
"service_name": {
@@ -3175,6 +3339,83 @@
},
"version": 0.1
},
+ "aws-lambda": {
+ "priority": -1899,
+ "schema": {
+ "$comment": "this is a mark for our injected
plugin schema",
+ "properties": {
+ "authorization": {
+ "properties": {
+ "apikey": {
+ "type": "string"
+ },
+ "iam": {
+ "properties": {
+
"accesskey": {
+
"description": "access key id from from aws iam console",
+
"type": "string"
+ },
+
"aws_region": {
+
"default": "us-east-1",
+
"description": "the aws region that is receiving the request",
+
"type": "string"
+ },
+
"secretkey": {
+
"description": "secret access key from from aws iam console",
+
"type": "string"
+ },
+
"service": {
+
"default": "execute-api",
+
"description": "the service that is receiving the request",
+
"type": "string"
+ }
+ },
+ "required": [
+
"accesskey",
+
"secretkey"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "disable": {
+ "type": "boolean"
+ },
+ "function_uri": {
+ "type": "string"
+ },
+ "keepalive": {
+ "default": true,
+ "type": "boolean"
+ },
+ "keepalive_pool": {
+ "default": 5,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "keepalive_timeout": {
+ "default": 60000,
+ "minimum": 1000,
+ "type": "integer"
+ },
+ "ssl_verify": {
+ "default": true,
+ "type": "boolean"
+ },
+ "timeout": {
+ "default": 3000,
+ "minimum": 100,
+ "type": "integer"
+ }
+ },
+ "required": [
+ "function_uri"
+ ],
+ "type": "object"
+ },
+ "version": 0.1
+ },
"azure-functions": {
"metadata_schema": {
"properties": {
@@ -3264,6 +3505,10 @@
"properties": {
"disable": {
"type": "boolean"
+ },
+ "hide_credentials": {
+ "default": false,
+ "type": "boolean"
}
},
"title": "work with route or service object",
@@ -3381,6 +3626,9 @@
"minimum": 200,
"type": "integer"
},
+ "rejected_msg": {
+ "type": "string"
+ },
"type": {
"default": "consumer_name",
"enum": [
@@ -3490,7 +3738,7 @@
"$comment": "this is a mark for our injected
plugin schema",
"properties": {
"batch_max_size": {
- "default": 5000,
+ "default": 1000,
"minimum": 1,
"type": "integer"
},
@@ -3508,13 +3756,22 @@
"type": "integer"
},
"max_retry_count": {
- "default": 1,
- "minimum": 1,
+ "default": 0,
+ "minimum": 0,
"type": "integer"
},
+ "name": {
+ "default": "datadog",
+ "type": "string"
+ },
"prefer_name": {
"default": true,
"type": "boolean"
+ },
+ "retry_delay": {
+ "default": 1,
+ "minimum": 0,
+ "type": "integer"
}
},
"type": "object"
@@ -3805,6 +4062,10 @@
"schema": {
"$comment": "this is a mark for our injected
plugin schema",
"properties": {
+ "allow_degradation": {
+ "default": false,
+ "type": "boolean"
+ },
"conf": {
"items": {
"properties": {
@@ -3839,6 +4100,10 @@
"schema": {
"$comment": "this is a mark for our injected
plugin schema",
"properties": {
+ "allow_degradation": {
+ "default": false,
+ "type": "boolean"
+ },
"conf": {
"items": {
"properties": {
@@ -3934,48 +4199,237 @@
},
"version": 0.1
},
- "grpc-transcode": {
- "priority": 506,
+ "forward-auth": {
+ "priority": 2002,
"schema": {
"$comment": "this is a mark for our injected
plugin schema",
- "additionalProperties": true,
"properties": {
- "deadline": {
- "default": 0,
- "description": "deadline for
grpc, millisecond",
- "type": "number"
+ "client_headers": {
+ "default": {},
+ "description": "authorization
response header that will be sent tothe client when authorizing failed",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
},
"disable": {
"type": "boolean"
},
- "method": {
- "description": "the method name
in the grpc service.",
- "type": "string"
+ "keepalive": {
+ "default": true,
+ "type": "boolean"
},
- "pb_option": {
+ "keepalive_pool": {
+ "default": 5,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "keepalive_timeout": {
+ "default": 60000,
+ "minimum": 1000,
+ "type": "integer"
+ },
+ "request_headers": {
+ "default": {},
+ "description": "client request
header that will be sent to the authorization service",
"items": {
- "anyOf": [
- {
-
"description": "enum as result",
- "enum":
[
-
"int64_as_hexstring",
-
"int64_as_number",
-
"int64_as_string"
- ],
- "type":
"string"
- },
- {
-
"description": "int64 as result",
- "enum":
[
-
"enum_as_name",
-
"enum_as_value"
- ],
- "type":
"string"
- },
- {
-
"description": "default values option",
- "enum":
[
-
"auto_default_values",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "ssl_verify": {
+ "default": true,
+ "type": "boolean"
+ },
+ "timeout": {
+ "default": 3000,
+ "description": "timeout in
milliseconds",
+ "maximum": 60000,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "upstream_headers": {
+ "default": {},
+ "description": "authorization
response header that will be sent to the upstream",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "uri": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "uri"
+ ],
+ "type": "object"
+ },
+ "version": 0.1
+ },
+ "google-cloud-logging": {
+ "priority": 407,
+ "schema": {
+ "$comment": "this is a mark for our injected
plugin schema",
+ "oneOf": [
+ {
+ "required": [
+ "auth_config"
+ ]
+ },
+ {
+ "required": [
+ "auth_file"
+ ]
+ }
+ ],
+ "properties": {
+ "auth_config": {
+ "properties": {
+ "entries_uri": {
+ "default":
"https://logging.googleapis.com/v2/entries:write",
+ "type": "string"
+ },
+ "private_key": {
+ "type": "string"
+ },
+ "project_id": {
+ "type": "string"
+ },
+ "scopes": {
+ "default": [
+
"https://www.googleapis.com/auth/cloud-platform",
+
"https://www.googleapis.com/auth/logging.admin",
+
"https://www.googleapis.com/auth/logging.read",
+
"https://www.googleapis.com/auth/logging.write"
+ ],
+ "items": {
+
"description": "Google OAuth2 Authorization Scopes",
+ "type":
"string"
+ },
+ "minItems": 1,
+ "type": "array",
+ "uniqueItems":
true
+ },
+ "token_uri": {
+ "default":
"https://oauth2.googleapis.com/token",
+ "type": "string"
+ }
+ },
+ "required": [
+ "private_key",
+ "project_id",
+ "token_uri"
+ ],
+ "type": "object"
+ },
+ "auth_file": {
+ "type": "string"
+ },
+ "batch_max_size": {
+ "default": 1000,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "buffer_duration": {
+ "default": 60,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "disable": {
+ "type": "boolean"
+ },
+ "inactive_timeout": {
+ "default": 5,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "log_id": {
+ "default":
"apisix.apache.org%2Flogs",
+ "type": "string"
+ },
+ "max_retry_count": {
+ "default": 0,
+ "minimum": 0,
+ "type": "integer"
+ },
+ "name": {
+ "default":
"google-cloud-logging",
+ "type": "string"
+ },
+ "resource": {
+ "default": {
+ "type": "global"
+ },
+ "properties": {
+ "labels": {
+ "type": "object"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "type": "object"
+ },
+ "retry_delay": {
+ "default": 1,
+ "minimum": 0,
+ "type": "integer"
+ },
+ "ssl_verify": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "version": 0.1
+ },
+ "grpc-transcode": {
+ "priority": 506,
+ "schema": {
+ "$comment": "this is a mark for our injected
plugin schema",
+ "additionalProperties": true,
+ "properties": {
+ "deadline": {
+ "default": 0,
+ "description": "deadline for
grpc, millisecond",
+ "type": "number"
+ },
+ "disable": {
+ "type": "boolean"
+ },
+ "method": {
+ "description": "the method name
in the grpc service.",
+ "type": "string"
+ },
+ "pb_option": {
+ "items": {
+ "anyOf": [
+ {
+
"description": "enum as result",
+ "enum":
[
+
"int64_as_hexstring",
+
"int64_as_number",
+
"int64_as_string"
+ ],
+ "type":
"string"
+ },
+ {
+
"description": "int64 as result",
+ "enum":
[
+
"enum_as_name",
+
"enum_as_value"
+ ],
+ "type":
"string"
+ },
+ {
+
"description": "default values option",
+ "enum":
[
+
"auto_default_values",
"no_default_values",
"use_default_metatable",
"use_default_values"
@@ -4024,6 +4478,19 @@
},
"version": 0.1
},
+ "grpc-web": {
+ "priority": 505,
+ "schema": {
+ "$comment": "this is a mark for our injected
plugin schema",
+ "properties": {
+ "disable": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "version": 0.1
+ },
"gzip": {
"priority": 995,
"schema": {
@@ -4225,6 +4692,17 @@
"default": false,
"type": "boolean"
},
+ "include_resp_body": {
+ "default": false,
+ "type": "boolean"
+ },
+ "include_resp_body_expr": {
+ "items": {
+ "type": "array"
+ },
+ "minItems": 1,
+ "type": "array"
+ },
"max_retry_count": {
"default": 0,
"minimum": 0,
@@ -4377,6 +4855,22 @@
"private_key",
"public_key"
]
+ },
+ {
+ "properties": {
+
"algorithm": {
+
"enum": [
+
"RS256"
+
]
+ },
+
"vault": {
+
"properties": {},
+
"type": "object"
+ }
+ },
+ "required": [
+ "vault"
+ ]
}
]
}
@@ -4405,6 +4899,10 @@
},
"secret": {
"type": "string"
+ },
+ "vault": {
+ "properties": {},
+ "type": "object"
}
},
"required": [
@@ -4484,9 +4982,17 @@
},
"include_req_body_expr": {
"items": {
- "items": {
- "type": "string"
- },
+ "type": "array"
+ },
+ "minItems": 1,
+ "type": "array"
+ },
+ "include_resp_body": {
+ "default": false,
+ "type": "boolean"
+ },
+ "include_resp_body_expr": {
+ "items": {
"type": "array"
},
"minItems": 1,
@@ -4787,6 +5293,9 @@
"disable": {
"type": "boolean"
},
+ "group": {
+ "type": "string"
+ },
"key": {
"default": "remote_addr",
"type": "string"
@@ -4794,6 +5303,7 @@
"key_type": {
"default": "var",
"enum": [
+ "constant",
"var",
"var_combination"
],
@@ -4918,6 +5428,66 @@
"scope": "global",
"version": 0.1
},
+ "opa": {
+ "priority": 2001,
+ "schema": {
+ "$comment": "this is a mark for our injected
plugin schema",
+ "properties": {
+ "disable": {
+ "type": "boolean"
+ },
+ "host": {
+ "type": "string"
+ },
+ "keepalive": {
+ "default": true,
+ "type": "boolean"
+ },
+ "keepalive_pool": {
+ "default": 5,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "keepalive_timeout": {
+ "default": 60000,
+ "minimum": 1000,
+ "type": "integer"
+ },
+ "policy": {
+ "type": "string"
+ },
+ "ssl_verify": {
+ "default": true,
+ "type": "boolean"
+ },
+ "timeout": {
+ "default": 3000,
+ "description": "timeout in
milliseconds",
+ "maximum": 60000,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "with_consumer": {
+ "default": false,
+ "type": "boolean"
+ },
+ "with_route": {
+ "default": false,
+ "type": "boolean"
+ },
+ "with_service": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "host",
+ "policy"
+ ],
+ "type": "object"
+ },
+ "version": 0.1
+ },
"openid-connect": {
"priority": 2599,
"schema": {
@@ -4975,34 +5545,103 @@
"description": "Whether the
access token should be added as a header to the request for downstream",
"type": "boolean"
},
- "set_id_token_header": {
+ "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"
+ },
+ "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"
+ },
+ "ssl_verify": {
+ "default": false,
+ "type": "boolean"
+ },
+ "timeout": {
+ "default": 3,
+ "description": "timeout in
seconds",
+ "minimum": 1,
+ "type": "integer"
+ },
+ "token_signing_alg_values_expected": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "client_id",
+ "client_secret",
+ "discovery"
+ ],
+ "type": "object"
+ },
+ "version": 0.1
+ },
+ "openwhisk": {
+ "priority": -1901,
+ "schema": {
+ "$comment": "this is a mark for our injected
plugin schema",
+ "properties": {
+ "action": {
+ "maxLength": 256,
+ "pattern":
"\\A([\\w]|[\\w][\\w@ .-]*[\\[email protected]]+)\\z",
+ "type": "string"
+ },
+ "api_host": {
+ "type": "string"
+ },
+ "disable": {
+ "type": "boolean"
+ },
+ "keepalive": {
+ "default": true,
+ "type": "boolean"
+ },
+ "keepalive_pool": {
+ "default": 5,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "keepalive_timeout": {
+ "default": 60000,
+ "minimum": 1000,
+ "type": "integer"
+ },
+ "namespace": {
+ "maxLength": 256,
+ "pattern":
"\\A([\\w]|[\\w][\\w@ .-]*[\\[email protected]]+)\\z",
+ "type": "string"
+ },
+ "package": {
+ "maxLength": 256,
+ "pattern":
"\\A([\\w]|[\\w][\\w@ .-]*[\\[email protected]]+)\\z",
+ "type": "string"
+ },
+ "result": {
"default": true,
- "description": "Whether the ID
token should be added in the X-ID-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"
+ "service_token": {
+ "type": "string"
},
"ssl_verify": {
- "default": false,
+ "default": true,
"type": "boolean"
},
"timeout": {
- "default": 3,
- "description": "timeout in
seconds",
+ "default": 3000,
+ "description": "timeout in
milliseconds",
+ "maximum": 60000,
"minimum": 1,
"type": "integer"
- },
- "token_signing_alg_values_expected": {
- "type": "string"
}
},
"required": [
- "client_id",
- "client_secret",
- "discovery"
+ "action",
+ "api_host",
+ "namespace",
+ "service_token"
],
"type": "object"
},
@@ -5128,11 +5767,27 @@
},
"version": 0.2
},
+ "proxy-control": {
+ "priority": 21990,
+ "schema": {
+ "$comment": "this is a mark for our injected
plugin schema",
+ "properties": {
+ "disable": {
+ "type": "boolean"
+ },
+ "request_buffering": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "version": 0.1
+ },
"proxy-mirror": {
"priority": 1010,
"schema": {
"$comment": "this is a mark for our injected
plugin schema",
- "minProperties": 1,
"properties": {
"disable": {
"type": "boolean"
@@ -5439,6 +6094,12 @@
"header_schema": {
"type": "object"
},
+ "rejected_code": {
+ "default": 400,
+ "maximum": 599,
+ "minimum": 200,
+ "type": "integer"
+ },
"rejected_msg": {
"maxLength": 256,
"minLength": 1,
@@ -5487,6 +6148,128 @@
},
"version": 0.1
},
+ "rocketmq-logger": {
+ "metadata_schema": {
+ "properties": {
+ "log_format": {
+ "default": {
+ "@timestamp":
"$time_iso8601",
+ "client_ip":
"$remote_addr",
+ "host": "$host"
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "priority": 402,
+ "schema": {
+ "$comment": "this is a mark for our injected
plugin schema",
+ "properties": {
+ "access_key": {
+ "default": "",
+ "type": "string"
+ },
+ "batch_max_size": {
+ "default": 1000,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "buffer_duration": {
+ "default": 60,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "disable": {
+ "type": "boolean"
+ },
+ "inactive_timeout": {
+ "default": 5,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "include_req_body": {
+ "default": false,
+ "type": "boolean"
+ },
+ "include_req_body_expr": {
+ "items": {
+ "type": "array"
+ },
+ "minItems": 1,
+ "type": "array"
+ },
+ "include_resp_body": {
+ "default": false,
+ "type": "boolean"
+ },
+ "include_resp_body_expr": {
+ "items": {
+ "type": "array"
+ },
+ "minItems": 1,
+ "type": "array"
+ },
+ "key": {
+ "type": "string"
+ },
+ "max_retry_count": {
+ "default": 0,
+ "minimum": 0,
+ "type": "integer"
+ },
+ "meta_format": {
+ "default": "default",
+ "enum": [
+ "default",
+ "origin"
+ ],
+ "type": "string"
+ },
+ "name": {
+ "default": "rocketmq logger",
+ "type": "string"
+ },
+ "nameserver_list": {
+ "items": {
+ "type": "string"
+ },
+ "minItems": 1,
+ "type": "array"
+ },
+ "retry_delay": {
+ "default": 1,
+ "minimum": 0,
+ "type": "integer"
+ },
+ "secret_key": {
+ "default": "",
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ },
+ "timeout": {
+ "default": 3,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "topic": {
+ "type": "string"
+ },
+ "use_tls": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "nameserver_list",
+ "topic"
+ ],
+ "type": "object"
+ },
+ "version": 0.1
+ },
"server-info": {
"priority": 990,
"schema": {
@@ -5520,7 +6303,7 @@
"default": "access",
"enum": [
"access",
- "balancer",
+ "before_proxy",
"body_filter",
"header_filter",
"log",
@@ -5555,7 +6338,7 @@
"default": "access",
"enum": [
"access",
- "balancer",
+ "before_proxy",
"body_filter",
"header_filter",
"log",
@@ -5746,6 +6529,79 @@
},
"version": 0.1
},
+ "splunk-hec-logging": {
+ "priority": 409,
+ "schema": {
+ "$comment": "this is a mark for our injected
plugin schema",
+ "properties": {
+ "batch_max_size": {
+ "default": 1000,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "buffer_duration": {
+ "default": 60,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "disable": {
+ "type": "boolean"
+ },
+ "endpoint": {
+ "properties": {
+ "channel": {
+ "type": "string"
+ },
+ "timeout": {
+ "default": 10,
+ "minimum": 1,
+ "type":
"integer"
+ },
+ "token": {
+ "type": "string"
+ },
+ "uri": {
+ "pattern":
"^[^\\/]+:\\/\\/([\\da-zA-Z.-]+|\\[[\\da-fA-F:]+\\])(:\\d+)?",
+ "type": "string"
+ }
+ },
+ "required": [
+ "token",
+ "uri"
+ ],
+ "type": "object"
+ },
+ "inactive_timeout": {
+ "default": 5,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "max_retry_count": {
+ "default": 0,
+ "minimum": 0,
+ "type": "integer"
+ },
+ "name": {
+ "default": "splunk-hec-logging",
+ "type": "string"
+ },
+ "retry_delay": {
+ "default": 1,
+ "minimum": 0,
+ "type": "integer"
+ },
+ "ssl_verify": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "endpoint"
+ ],
+ "type": "object"
+ },
+ "version": 0.1
+ },
"syslog": {
"priority": 401,
"schema": {
@@ -5776,10 +6632,20 @@
"host": {
"type": "string"
},
+ "inactive_timeout": {
+ "default": 5,
+ "minimum": 1,
+ "type": "integer"
+ },
"include_req_body": {
"default": false,
"type": "boolean"
},
+ "max_retry_count": {
+ "default": 0,
+ "minimum": 0,
+ "type": "integer"
+ },
"max_retry_times": {
"default": 1,
"minimum": 1,
@@ -5797,6 +6663,11 @@
"port": {
"type": "integer"
},
+ "retry_delay": {
+ "default": 1,
+ "minimum": 0,
+ "type": "integer"
+ },
"retry_interval": {
"default": 1,
"minimum": 0,
@@ -6085,6 +6956,43 @@
"type": "object"
},
"passive": {
+
"default": {
+
"healthy": {
+
"http_statuses": [
+
200,
+
201,
+
202,
+
203,
+
204,
+
205,
+
206,
+
207,
+
208,
+
226,
+
300,
+
301,
+
302,
+
303,
+
304,
+
305,
+
306,
+
307,
+
308
+
],
+
"successes": 0
+
},
+
"type": "http",
+
"unhealthy": {
+
"http_failures": 0,
+
"http_statuses": [
+
429,
+
500,
+
503
+
],
+
"tcp_failures":
0,
+
"timeouts": 0
+
}
+
},
"properties": {
"healthy": {
"properties": {
@@ -6122,7 +7030,7 @@
"successes": {
"default": 5,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
}
},
@@ -6142,7 +7050,7 @@
"http_failures": {
"default": 5,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
},
"http_statuses": {
@@ -6163,13 +7071,13 @@
"tcp_failures": {
"default": 2,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
},
"timeouts": {
"default": 7,
"maximum": 254,
-
"minimum": 1,
+
"minimum": 0,
"type": "integer"
}
},
@@ -6343,11 +7251,15 @@
},
"scheme": {
"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.",
"enum": [
"grpc",
"grpcs",
"http",
-
"https"
+
"https",
+
"tcp",
+
"tls",
+
"udp"
]
},
"service_name": {
@@ -6453,6 +7365,10 @@
"$comment": "this is a mark for our injected
plugin schema",
"properties": {
"allowlist": {
+ "items": {
+ "minLength": 1,
+ "type": "string"
+ },
"minItems": 1,
"type": "array"
},
@@ -6461,6 +7377,10 @@
"type": "boolean"
},
"denylist": {
+ "items": {
+ "minLength": 1,
+ "type": "string"
+ },
"minItems": 1,
"type": "array"
},
@@ -6508,6 +7428,11 @@
"default": false,
"type": "boolean"
},
+ "max_retry_count": {
+ "default": 0,
+ "minimum": 0,
+ "type": "integer"
+ },
"name": {
"default": "udp logger",
"type": "string"
@@ -6516,6 +7441,11 @@
"minimum": 0,
"type": "integer"
},
+ "retry_delay": {
+ "default": 1,
+ "minimum": 0,
+ "type": "integer"
+ },
"timeout": {
"default": 3,
"minimum": 1,
@@ -6786,6 +7716,7 @@
"type": "string"
},
"upstream": {
+ "description": "Deprecated. We
should configure upstream outside of the plugin",
"oneOf": [
{
"required": [
@@ -6816,8 +7747,7 @@
},
"required": [
"protocol_level",
- "protocol_name",
- "upstream"
+ "protocol_name"
],
"type": "object"
},
diff --git a/api/test/e2enew/schema/schema_test.go
b/api/test/e2enew/schema/schema_test.go
index febb3c7..fb99b27 100644
--- a/api/test/e2enew/schema/schema_test.go
+++ b/api/test/e2enew/schema/schema_test.go
@@ -36,15 +36,8 @@ var _ = ginkgo.Describe("Schema Test", func() {
Query: "schema_type=consumer",
Headers: map[string]string{"Authorization":
base.GetToken()},
ExpectStatus: http.StatusOK,
- ExpectBody:
"{\"dependencies\":{\"algorithm\":{\"oneOf\":[{\"properties\":{\"algorithm\":" +
-
"{\"default\":\"HS256\",\"enum\":[\"HS256\",\"HS512\"]}}},{\"properties\":{\"algorithm\":"
+
-
"{\"enum\":[\"RS256\"]},\"private_key\":{\"type\":\"string\"},\"public_key\":{\"type\":\"string\"}},"
+
-
"\"required\":[\"private_key\",\"public_key\"]}]}},\"properties\":{\"algorithm\":{\"default\":"
+
-
"\"HS256\",\"enum\":[\"HS256\",\"HS512\",\"RS256\"],\"type\":\"string\"},\"base64_secret\""
+
-
":{\"default\":false,\"type\":\"boolean\"},\"exp\":{\"default\":86400,\"minimum\":1,\"type\":"
+
-
"\"integer\"},\"key\":{\"type\":\"string\"},\"secret\":{\"type\":\"string\"}},"
+
- "\"required\":[\"key\"],\"type\":\"object\"}",
- Sleep: base.SleepTime,
+ ExpectBody:
"{\"dependencies\":{\"algorithm\":{\"oneOf\":[{\"properties\":{\"algorithm\":{\"default\":\"HS256\",\"enum\":[\"HS256\",\"HS512\"]}}},{\"properties\":{\"algorithm\":{\"enum\":[\"RS256\"]},\"private_key\":{\"type\":\"string\"},\"public_key\":{\"type\":\"string\"}},\"required\":[\"private_key\",\"public_key\"]},{\"properties\":{\"algorithm\":{\"enum\":[\"RS256\"]},\"vault\":{\"properties\":{},\"type\":\"object\"}},\"required\":[\"vault\"]}]}},\"properties\":{\"algorithm\":
[...]
+ Sleep: base.SleepTime,
}),
table.Entry("get schema of plugin `require-id`",
base.HttpTestCase{
Object: base.ManagerApiExpect(),
diff --git a/web/src/components/Plugin/data.tsx
b/web/src/components/Plugin/data.tsx
index 143b703..0f40f04 100644
--- a/web/src/components/Plugin/data.tsx
+++ b/web/src/components/Plugin/data.tsx
@@ -242,4 +242,31 @@ export const PLUGIN_LIST = {
'ua-restriction': {
type: PluginType.security,
},
+ 'splunk-hec-logging': {
+ type: PluginType.observability,
+ },
+ 'rocketmq-logger': {
+ type: PluginType.observability,
+ },
+ 'proxy-control': {
+ type: PluginType.other,
+ },
+ openwhisk: {
+ type: PluginType.serverless,
+ },
+ opa: {
+ type: PluginType.authentication,
+ },
+ 'grpc-web': {
+ type: PluginType.other,
+ },
+ 'google-cloud-logging': {
+ type: PluginType.observability,
+ },
+ 'forward-auth': {
+ type: PluginType.authentication,
+ },
+ 'aws-lambda': {
+ type: PluginType.serverless,
+ },
};
