Skip to content

Commit

Permalink
fix(acme) add missing config parameter to vault (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Jun 29, 2020
1 parent fe97d26 commit c6fd01b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ config.tos_accepted | | `false` | If you are using Let's Encrypt,
"port": 8500,
"token": null,
"kv_path": "acme",
"timeout": 2000
"timeout": 2000,
"https": false
},
"vault": {
"host": "127.0.0.1",
Expand Down
19 changes: 15 additions & 4 deletions kong/plugins/acme/schema.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,26 @@ local REDIS_STORAGE_SCHEMA = {
{ auth = { type = "string" }}
}

local CONSUL_VAULT_STORAGE_SCHEMA = {
{ https = { type = "boolean", default = true, }, },
local CONSUL_STORAGE_SCHEMA = {
{ https = { type = "boolean", default = false, }, },
{ host = typedefs.host, },
{ port = typedefs.port, },
{ kv_path = { type = "string", }, },
{ timeout = { type = "number", }, },
{ token = { type = "string", }, },
}

local VAULT_STORAGE_SCHEMA = {
{ https = { type = "boolean", default = false, }, },
{ host = typedefs.host, },
{ port = typedefs.port, },
{ kv_path = { type = "string", }, },
{ timeout = { type = "number", }, },
{ token = { type = "string", }, },
{ tls_verify = { type = "boolean", default = true, }, },
{ tls_server_name = { type = "string" }, },
}

local schema = {
name = "acme",
fields = {
Expand Down Expand Up @@ -77,8 +88,8 @@ local schema = {
{ shm = { type = "record", fields = SHM_STORAGE_SCHEMA, } },
{ kong = { type = "record", fields = KONG_STORAGE_SCHEMA, } },
{ redis = { type = "record", fields = REDIS_STORAGE_SCHEMA, } },
{ consul = { type = "record", fields = CONSUL_VAULT_STORAGE_SCHEMA, } },
{ vault = { type = "record", fields = CONSUL_VAULT_STORAGE_SCHEMA, } },
{ consul = { type = "record", fields = CONSUL_STORAGE_SCHEMA, } },
{ vault = { type = "record", fields = VAULT_STORAGE_SCHEMA, } },
},
}, },
},
Expand Down

0 comments on commit c6fd01b

Please sign in to comment.