Skip to content
This repository was archived by the owner on Aug 27, 2021. It is now read-only.

Commit b0df70b

Browse files
committed
feat(*) sync upstream features including Vault K8S auth and preferred
chain selection
1 parent 3607f35 commit b0df70b

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ config.storage_config| | (See below)| Storage configs for each backend
101101
config.tos_accepted | | `false` | If you are using Let's Encrypt, you must set this to true to agree the [Terms of Service](https://letsencrypt.org/repository/).
102102
config.eab_kid | | | External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.
103103
config.eab_hmac_key | | | External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.
104+
config.preferred_chain | | | Select a preferrable chain that has root CA issuer name matches the given value. If it's unconfigured or no such chain is matched, the default chain will be selected.
104105

105106
`config.storage_config` is a table for all possible storage types, by default it is:
106107
```json
@@ -131,14 +132,20 @@ config.eab_hmac_key | | | External account binding (EAB) b
131132
"timeout": 2000,
132133
"https": false,
133134
"tls_verify": true,
134-
"tls_server_name": null
135+
"tls_server_name": null,
136+
"auth_pass": null,
137+
"auth_role": null,
138+
"jwt_path": null
135139
},
136140
}
137141
```
138142

139143
To configure storage type other than `kong`, please refer to [lua-resty-acme](https://github.com/fffonion/lua-resty-acme#storage-adapters).
140144

141-
Note `tls_verify` and `tls_server_name` parameters for Vault are only supported from plugin version 0.2.7.
145+
Note `tls_verify` and `tls_server_name` parameters for Vault are only supported from plugin version 0.2.7;
146+
K8S auth configurations `auth_pass`, `auth_role` and `jwt_path` for Vault are only supported from
147+
plugin version 0.3.0.
148+
142149

143150
Here's a sample declarative configuration with `redis` as storage:
144151

kong-plugin-acme-0.2.14-1.rockspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ build = {
2424
}
2525
dependencies = {
2626
--"kong >= 1.2.0",
27-
"lua-resty-acme ~> 0.6"
27+
"lua-resty-acme ~> 0.7"
2828
}

kong/plugins/acme/client.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ local function new(conf)
111111
storage_config = conf.storage_config[conf.storage],
112112
eab_kid = conf.eab_kid,
113113
eab_hmac_key = conf.eab_hmac_key,
114+
preferred_chain = conf.preferred_chain,
114115
})
115116
end
116117

kong/plugins/acme/schema.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ local VAULT_STORAGE_SCHEMA = {
4141
{ token = { type = "string", }, },
4242
{ tls_verify = { type = "boolean", default = true, }, },
4343
{ tls_server_name = { type = "string" }, },
44+
{ auth_path = { type = "string" }, },
45+
{ auth_role = { type = "string" }, },
46+
{ jwt_path = { type = "string" }, },
4447
}
4548

4649
local schema = {
@@ -102,6 +105,9 @@ local schema = {
102105
{ vault = { type = "record", fields = VAULT_STORAGE_SCHEMA, } },
103106
},
104107
}, },
108+
{ preferred_chain = {
109+
type = "string",
110+
}, },
105111
},
106112
}, },
107113
},

0 commit comments

Comments
 (0)