-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
schema.lua
29 lines (27 loc) 路 1.28 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
28
29
local typedefs = require "kong.db.schema.typedefs"
-- If you add more configuration parameters, be sure to check if it needs to be added to cache key
-- Fields currently used for cache_key: ldap_host, ldap_port, base_dn, attribute, cache_ttl
return {
name = "ldap-auth",
fields = {
{ consumer = typedefs.no_consumer },
{ run_on = typedefs.run_on_first },
{ config = {
type = "record",
fields = {
{ ldap_host = typedefs.host({ required = true }), },
{ ldap_port = typedefs.port({ required = true }), },
{ start_tls = { type = "boolean", required = true, default = false }, },
{ verify_ldap_host = { type = "boolean", required = true, default = false }, },
{ base_dn = { type = "string", required = true }, },
{ attribute = { type = "string", required = true }, },
{ cache_ttl = { type = "number", required = true, default = 60 }, },
{ hide_credentials = { type = "boolean", default = false }, },
{ timeout = { type = "number", default = 10000 }, },
{ keepalive = { type = "number", default = 60000 }, },
{ anonymous = { type = "string", uuid = true, legacy = true }, },
{ header_type = { type = "string", default = "ldap" }, },
},
}, },
},
}