-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
schema.lua
27 lines (25 loc) 路 1.12 KB
/
schema.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
local typedefs = require "kong.db.schema.typedefs"
return {
name = "acl",
fields = {
{ consumer = typedefs.no_consumer },
{ protocols = typedefs.protocols_http },
{ config = {
type = "record",
fields = {
{ allow = { description = "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.",
type = "array",
elements = { type = "string" }, }, },
{ deny = { description = "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.",
type = "array",
elements = { type = "string" }, }, },
{ hide_groups_header = { type = "boolean", required = true, default = false, description = "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service." }, },
},
}
}
},
entity_checks = {
{ only_one_of = { "config.allow", "config.deny" }, },
{ at_least_one_of = { "config.allow", "config.deny" }, },
},
}