16 Commits

Author SHA1 Message Date
Folke Gleumes
b4050780a6 acme: mark caaIdentities as an array
caaIdentities was mistakenly labled as a string in a previous patch
and not as an array of strings, as it is defined in the rfc [0].

[0] https://datatracker.ietf.org/doc/html/rfc8555#section-7.1.1

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
2023-11-13 15:15:22 +01:00
Thomas Lamprecht
dab65f7395 api: acme meta: require Sys.Audit on the node
As even though restricted to some specific endpoints and formats, one
can still scan HTTP, potentially also on the LAN.

We can do this here as the API call is new and was never packaged
since introduced, so this isn't a breaking change.
The TOS one will be removed with the next major release, so not a
problem anymore from then one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 14:14:08 +01:00
Thomas Lamprecht
c0ab227ab4 api: fixup missing trailing commas
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 12:28:34 +01:00
Thomas Lamprecht
0231e3043b api: acme: move description to the top
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 12:22:59 +01:00
Folke Gleumes
bd3f27adbc api/acme: deprecate tos endpoint in favor of meta
The ToS endpoint ignored data that is needed to detect if EAB needs to
be used. Instead of adding a new endpoint that does the same request,
the tos endpoint is deprecated and replaced by the meta endpoint,
that returns all information returned by the directory.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
2023-11-13 12:06:10 +01:00
Folke Gleumes
fe64969b63 fix #4497: acme: add support for external account bindings
Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
2023-11-13 11:54:22 +01:00
Thomas Lamprecht
96d4c3b4a6 api: acme: fix API index entry for challenge-schema
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-05 15:52:49 +02:00
Dominik Csapak
75a2be66bb ACME: add challengeschema api call
which returns a list of challenge api types with the schema of their
required data (if it exists)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[ Thomas: adapt to my changes from proxmox-acme schema def and change
  path from challengeschema to challenge-schema ]
2020-05-05 19:23:04 +02:00
Thomas Lamprecht
69060f1a84 api acme account: refactor and cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-03 16:36:46 +02:00
Thomas Lamprecht
7ffd15504e acme/node cfg: various code cleanups
just a small selection I already had done, avoid to much time
consuming cleanups for now.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
838470846c acme plugins: improve API
add checks, encoding of loaded data files, update API path, proper inclusion into API tree

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-03 14:10:17 +02:00
Dominik Csapak
29a6f85885 fix #2462: ACMEAccount: make tos in get_tos optional
the code returns undef in case there is no 'tos', and the code
calling this api call handles a non-existing tos already, but
fails in that case becasue of the failing return value verification

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-22 12:19:27 +01:00
Dietmar Maurer
7fa666d299 pvenode: use print_api_result to print acme account information 2018-07-26 13:09:08 +02:00
Dominik Csapak
16e393ab22 let all users retrieve the directories and tos for acme
else all non-root users get an empty dropdown box for the directories
and get no feedback why that is

with this, they can select it, but ultimately get an api error if the
permissions are not sufficient

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-06-04 17:34:53 +02:00
Dominik Csapak
bed7626a5f api/acme: fallback to default for account name parameter
We defined 'default' as fallback default value for the optional
pve-acme-account-name standard option but did not honored that.

Thus we got a perl error ($account_name not defined) if we did not
passed a name. Fix that by actually falling back to 'default' in this
case.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-04 17:33:51 +02:00
Fabian Grünbichler
5c3fd6ace6 add ACME account API endpoints
for registering, updating, refreshing and deactiving a PVE-managed ACME
account, as well as for retrieving the (optional, but required if
available) terms of service of the ACME API provider / CA.

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