Commit Graph

14 Commits

Author SHA1 Message Date
Thomas Lamprecht
b1e879ecae api acme: use the same plugin config for an order
re-loading it always would mean that we could potentially switch the
config to something completely different, and the mix of the previous
and the old could result in total bogus actions.

Better to use the same one for one full order, even if it may get
"outdated" it was still valid in the past and most important
coherent.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-03 18:46:12 +02:00
Thomas Lamprecht
48662a1eb0 api acme: code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-03 18:46:12 +02:00
Thomas Lamprecht
75afd54a01 node config: verify abstract relations on write
for now mostly due to the "nice" property of the acmedomains which
do not use their property key as index but actually the doamain.

Without this one could set up duplicated domain entries just fine,
but once using them -> error.
This is not nice UX, so verify node config before writing an updated
one out, to catch those issues.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
91c85a64a0 acme: catch failed plugin setup
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
b87f55d1b8 acme: always use domain from authorization
instead of relying that the authorization URLs and the ordered
identifiers are sorted the same way for already validated
authorizations.

on the contrary, RFC 8555 even says:

"The authorizations required are dictated by server policy; there may
not be a 1:1 relationship between the order identifiers and the
authorizations required."

authorizations MUST always include a single identifier, no matter which
state they are in.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
7b22e2888b acme: drop unused parameter from challenge validation request
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
a810b15449 acme: move more of challenge handling to ACME client
so that we don't have to duplicate this logic for PMG

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
b232807dac acme: improve get_acme_conf
mixed bag of improvements:
- return hash based on domain
- check for duplicate domains, allow overlap between main and additional
keys otherwise

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
a3a9f9e0ba acme: fix account parsing
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-03 14:10:17 +02:00
Wolfgang Link
c30e112eff Adapt acme node config parser and rename the function.
Signed-off-by: Wolfgang Link <w.link@proxmox.com>
2020-05-03 14:10:17 +02:00
Wolfgang Link
a5c3854706 Add function that selects the desired plugin.
These functions also extract the data required for the plugin.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
2020-05-03 14:10:17 +02:00
Wolfgang Link
d9012197b3 Use the plugin architecture.
And remove the call of standalone plugin directly.
Prepare all necessary data for the plugin.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
2020-05-03 14:10:17 +02:00
Dominik Csapak
c93bc1a1de ACMEv2 order "ready" status update
since letsencrypt updates their implementation to the ACMEv2 spec [1],
we should correctly parse the order status

1: https://community.letsencrypt.org/t/acmev2-order-ready-status/62866

note that we (for now) try to be compatbile to both versions,
with and without ready state, this can be changed when all letsencrypt
apis have changed

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-06-25 10:42:17 +02:00
Fabian Grünbichler
9945a5018e add ACME certificate API endpoints
for creating/ordering a new certificate and renewing respectively
revoking an existing one.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-05-02 11:34:52 +02:00