]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
4 years agoACME: fix fallback to implicit standalone plugin
Fabian Grünbichler [Thu, 7 May 2020 08:01:37 +0000 (10:01 +0200)]
ACME: fix fallback to implicit standalone plugin

we need to parse the config even if it does not exist - it will return
the 'standalone' entry that's needed to be backwards compatible with
existing setups.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoui: node/{ACME, Certificates}: add stopUpdate on destruction
Dominik Csapak [Thu, 7 May 2020 08:27:13 +0000 (10:27 +0200)]
ui: node/{ACME, Certificates}: add stopUpdate on destruction

else the stores never stop updating

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: node/ACME: only enable order button when it should work
Dominik Csapak [Thu, 7 May 2020 08:27:12 +0000 (10:27 +0200)]
ui: node/ACME: only enable order button when it should work

to order a ceritificate, we need at least one configured domain, and
the configured account (or default) must exist

so track the domaincount in the viewmodel and introduce a
'canOrder' formula which is only true when domaincount > 0 and
account is set (if the configured account does not exist, or no account
exists at all we set 'account' to 'null')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: node/ACME: use accountselector for verification
Dominik Csapak [Thu, 7 May 2020 08:27:11 +0000 (10:27 +0200)]
ui: node/ACME: use accountselector for verification

instead of using API2Request manually, just reload the store of
the accountselector and check if the configured account is in it

this should fix the spurious loading mask of the panel when
loading the accounts

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: node/ACME: fix some eslint errors/warnings
Dominik Csapak [Thu, 7 May 2020 08:27:10 +0000 (10:27 +0200)]
ui: node/ACME: fix some eslint errors/warnings

* unneeded brackets for arrow function
* unused variables
* me not defined
* trailing commas

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: dc/ACMEClusterView: use a diff/update store combo for the grids
Dominik Csapak [Thu, 7 May 2020 08:27:09 +0000 (10:27 +0200)]
ui: dc/ACMEClusterView: use a diff/update store combo for the grids

so that they are get automatically reloaded with the default interval (3seconds)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: ACME: add emptyText and add minHeight
Dominik Csapak [Thu, 7 May 2020 08:27:08 +0000 (10:27 +0200)]
ui: ACME: add emptyText and add minHeight

without the minHeight, the panel does resize weirdly on the first load

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoNodeConfig/get_acme_conf: make domains always a hash
Dominik Csapak [Thu, 7 May 2020 08:27:07 +0000 (10:27 +0200)]
NodeConfig/get_acme_conf: make domains always a hash

on all call sites, we assume $cfg->{domains} is a hash, but if we do not
have any domains configured, that fails with
'Can't use an undefined value as a HASH reference at ...'

so always make domains a hash to avoid this

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agobump version to 6.2-1
Thomas Lamprecht [Wed, 6 May 2020 18:20:02 +0000 (20:20 +0200)]
bump version to 6.2-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: auth base: add onlineHelp
Thomas Lamprecht [Wed, 6 May 2020 18:35:41 +0000 (20:35 +0200)]
ui: auth base: add onlineHelp

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/control: versioned build-dependency for pve-doc-generator
Thomas Lamprecht [Wed, 6 May 2020 18:25:01 +0000 (20:25 +0200)]
d/control: versioned build-dependency for pve-doc-generator

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: dc/SyncWindow: add help button
Dominik Csapak [Thu, 30 Apr 2020 11:16:10 +0000 (13:16 +0200)]
ui: dc/SyncWindow: add help button

with link to the LDAP Syncing section of the documentation

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: switch backup default compression selection to ZSTD
Thomas Lamprecht [Wed, 6 May 2020 18:16:39 +0000 (20:16 +0200)]
ui: switch backup default compression selection to ZSTD

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoadd some onlineHelp
Thomas Lamprecht [Wed, 6 May 2020 18:12:23 +0000 (20:12 +0200)]
add some onlineHelp

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: fix spelling in file name
Thomas Lamprecht [Wed, 6 May 2020 18:08:02 +0000 (20:08 +0200)]
ui: fix spelling in file name

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: acme: allow to register+set an account directly
Thomas Lamprecht [Wed, 6 May 2020 18:04:13 +0000 (20:04 +0200)]
ui: acme: allow to register+set an account directly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: acme add domain: prefill with nodename.
Thomas Lamprecht [Wed, 6 May 2020 18:03:42 +0000 (20:03 +0200)]
ui: acme add domain: prefill with nodename.

FQDN would be more ideal, though

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: acme add domain: move Domain field below, hide plugin in http mode
Thomas Lamprecht [Wed, 6 May 2020 18:03:19 +0000 (20:03 +0200)]
ui: acme add domain: move Domain field below, hide plugin in http mode

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: acme: call Standalone plugin type HTTP
Thomas Lamprecht [Wed, 6 May 2020 18:01:39 +0000 (20:01 +0200)]
ui: acme: call Standalone plugin type HTTP

It's not 100% true, but for the user more understandable. IF we
actually change such that this detail matters we can still go for a
"Better" solution then, as it will need UI updates anyway..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agonode config: fix invalid domain error message
Thomas Lamprecht [Wed, 6 May 2020 17:53:07 +0000 (19:53 +0200)]
node config: fix invalid domain error message

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: acme: reduce update store interval
Thomas Lamprecht [Wed, 6 May 2020 17:13:53 +0000 (19:13 +0200)]
ui: acme: reduce update store interval

the grid glitches on load, that's a bug which we just reduce it's
frequency here...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoacme: various small UX improvements
Thomas Lamprecht [Wed, 6 May 2020 17:13:38 +0000 (19:13 +0200)]
acme: various small UX improvements

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: acme: actually show Account button if none is registered
Thomas Lamprecht [Wed, 6 May 2020 17:13:09 +0000 (19:13 +0200)]
ui: acme: actually show Account button if none is registered

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix undefined access on acme variable
Thomas Lamprecht [Wed, 6 May 2020 17:11:12 +0000 (19:11 +0200)]
fix undefined access on acme variable

We have 4 call sites of that, one had a fallback - the other three
was totally unchecked and triggered already exceptions on panel
render ... -.-

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: node/ACME: rework ACME grid for plugin based domains
Dominik Csapak [Wed, 6 May 2020 14:31:12 +0000 (16:31 +0200)]
ui: node/ACME: rework ACME grid for plugin based domains

This is basically a complete rework of the ACME grid.
Instead of having an ObjectGrid, we now have a normal
GridPanel which allows us to show a row for each Domain.

But to achieve this, we need to manually fill the store with data
from the 'acme' and 'acmedomainX' entries of the node config.

We also add an AccountSelector to the tbar and a link to the
datacenter->acme panel (when there is no account)

this also removes the 'register account' and 'view account' buttons,
since those are now available in datacenter->acme

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: node/ACME: add ACMEDomainEdit
Dominik Csapak [Wed, 6 May 2020 14:31:11 +0000 (16:31 +0200)]
ui: node/ACME: add ACMEDomainEdit

which expects a nodeconfig (for digest and domaincount)
and for the edit case, the parsed 'domain' object

this editwindow has three fields:
* type selector (standalone/dns)
* domain
* plugin (only for dns)

if the user chooses dns but there are already the maximum count of
acmedomainX entries, the type field gets invalid (with a error tooltip)

the onGetValues method is non-trivial, because of the mixing of
acmedomainX and acme.domain values, so we have to be careful
that we delete/edit the correct entry

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: Utils: add helper functions for acme domains
Dominik Csapak [Wed, 6 May 2020 14:31:10 +0000 (16:31 +0200)]
ui: Utils: add helper functions for acme domains

to convieniently add and remove domains from a parsed ACME object
they also make domains unique in the array

also add the count of configureable acmedomainX entries

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: Parser: add printACME
Dominik Csapak [Wed, 6 May 2020 14:31:09 +0000 (16:31 +0200)]
ui: Parser: add printACME

since we decode the domain list in parseACME into an array, we
have to join them again to a string when printing

otherwise printPropertyString attaches them just with ',' which
does not work here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: add ACME selector formfields for account and plugins
Dominik Csapak [Wed, 6 May 2020 14:31:08 +0000 (16:31 +0200)]
ui: add ACME selector formfields for account and plugins

filter the plugins by type === 'dns'
and add a convenience method for ACMEAccountSelector to check if there
are any accounts

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: fix missing htmlEncodes
Dominik Csapak [Thu, 30 Apr 2020 14:04:19 +0000 (16:04 +0200)]
ui: fix missing htmlEncodes

username can include some special characters, so we have
to escape them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: auth: clear ui capabilities on logout
Tim Marx [Wed, 6 May 2020 12:00:56 +0000 (14:00 +0200)]
ui: auth: clear ui capabilities on logout

Signed-off-by: Tim Marx <t.marx@proxmox.com>
4 years agoui: whitespace cleanup
Tim Marx [Wed, 6 May 2020 12:00:52 +0000 (14:00 +0200)]
ui: whitespace cleanup

Signed-off-by: Tim Marx <t.marx@proxmox.com>
4 years agoceph purge: adapt warning message slightly
Thomas Lamprecht [Wed, 6 May 2020 14:38:51 +0000 (16:38 +0200)]
ceph purge: adapt warning message slightly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoFix #1210: ceph: extend pveceph purge
Alwin Antreich [Tue, 5 May 2020 15:27:27 +0000 (17:27 +0200)]
Fix #1210: ceph: extend pveceph purge

to clean service directories as well as disable and stop Ceph services.
Addtionally provide the option to remove crash and log information.

This patch is also in addtion to #2607, as the current cleanup doesn't
allow to re-configure Ceph, without manual steps during purge.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
4 years agogui: never collapse notes for templates
Stefan Reiter [Wed, 6 May 2020 10:34:59 +0000 (12:34 +0200)]
gui: never collapse notes for templates

There's no graphs on screen, so no reason to collapse the notes to save
space. Besides, it looked a bit funky expanding the notes on smaller
screens, since they always jumped to the bottom to fill the space...

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoImprove storage selection on restore
Fabian Ebner [Wed, 6 May 2020 08:14:27 +0000 (10:14 +0200)]
Improve storage selection on restore

Previously, the blank '' would be passed along and lead to a
parameter verfication failure.

For LXC the default behavior in the backend is to use 'local', so
disallow blank and auto-select the first storage supporting'rootdir'
instead.

For QEMU the default behavior in the backend is to use the
original layout from the backup configuration file, which
makes sense to use as the default in the GUI as well.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
4 years agovzdump: set 'pbs' option when backing up to PBS target
Fabian Grünbichler [Wed, 6 May 2020 08:57:52 +0000 (10:57 +0200)]
vzdump: set 'pbs' option when backing up to PBS target

this unifies the logic into a single place instead of all over this
module and the plugins.

it also fixes tons of 'uninitialized value' warnings when backing up
with --dumpdir but no --storage set, since the existing conditions for
PBS targets are missing a definedness check.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoui: acme: minor nits
Thomas Lamprecht [Tue, 5 May 2020 17:43:12 +0000 (19:43 +0200)]
ui: acme: minor nits

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: acme view: hide data textarea if we got schema fields
Thomas Lamprecht [Tue, 5 May 2020 17:43:00 +0000 (19:43 +0200)]
ui: acme view: hide data textarea if we got schema fields

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: acme view: sort fields lexically by id
Thomas Lamprecht [Tue, 5 May 2020 17:42:09 +0000 (19:42 +0200)]
ui: acme view: sort fields lexically by id

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: acme plugin field generator: support emptyText
Thomas Lamprecht [Tue, 5 May 2020 17:27:14 +0000 (19:27 +0200)]
ui: acme plugin field generator: support emptyText

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: acme view: do north-center layout, add online help reference
Thomas Lamprecht [Tue, 5 May 2020 17:25:51 +0000 (19:25 +0200)]
ui: acme view: do north-center layout, add online help reference

fit's more the style used in PVE, where west-center layouts are
normally just used if there's some data relation between west and
center.

Make it more similar to panels like the HA overview, CephFS, ...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: acme selector: make searchable
Thomas Lamprecht [Tue, 5 May 2020 17:25:03 +0000 (19:25 +0200)]
ui: acme selector: make searchable

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: ACME selectors - adapt to new API path/return schema
Thomas Lamprecht [Tue, 5 May 2020 17:24:44 +0000 (19:24 +0200)]
ui: ACME selectors - adapt to new API path/return schema

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: add ACMEClusterView
Dominik Csapak [Tue, 5 May 2020 12:38:18 +0000 (14:38 +0200)]
ui: add ACMEClusterView

to show the list of accounts and defined plugins
for now we ignore 'standalone' plugins here and only show 'dns' ones

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: add ACMEPluginEdit window
Dominik Csapak [Tue, 5 May 2020 12:38:17 +0000 (14:38 +0200)]
ui: add ACMEPluginEdit window

this is a rather complex edit window, because we dynamically create form
fields according to the schema we get from the api

to do this properly we have to handle a few things:
* we have to properly set the values on edit
* we have to properly track the original values
* we have to merge and split with/from the generic 'data' field
  (so that if a plugin has some extra fields that we did not include in
  the schema the user can still enter them)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: add ACMEAPiSelector field
Dominik Csapak [Tue, 5 May 2020 12:38:16 +0000 (14:38 +0200)]
ui: add ACMEAPiSelector field

which return all api types from /cluster/acme/challengeschema
and has a convenience method for getting the schema of the current value

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: ACMEAccountCreate: add optional name field
Dominik Csapak [Tue, 5 May 2020 12:38:15 +0000 (14:38 +0200)]
ui: ACMEAccountCreate: add optional name field

so that we can create multiple accounts, but leave it empty and set the
emptyText to the default name 'default'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoACME: add challengeschema api call
Dominik Csapak [Tue, 5 May 2020 12:38:14 +0000 (14:38 +0200)]
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 ]

4 years agoACMEPlugin: check digest on update
Dominik Csapak [Tue, 5 May 2020 12:38:13 +0000 (14:38 +0200)]
ACMEPlugin: check digest on update

and extract the param, otherwise the check dies because of an unknown
field 'digest'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: cluster edit/create: style nits, avoid extra label
Thomas Lamprecht [Tue, 5 May 2020 16:23:01 +0000 (18:23 +0200)]
ui: cluster edit/create: style nits, avoid extra label

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: corosync addLink: more flexible params and pass emptyText
Thomas Lamprecht [Tue, 5 May 2020 16:21:44 +0000 (18:21 +0200)]
ui: corosync addLink: more flexible params and pass emptyText

Use that instead of the label, as it's using less space

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: corosync link edit: styleistic nits
Thomas Lamprecht [Tue, 5 May 2020 16:20:57 +0000 (18:20 +0200)]
ui: corosync link edit: styleistic nits

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agogui/cluster: add structured peerLinks to join info
Stefan Reiter [Mon, 23 Mar 2020 12:41:14 +0000 (13:41 +0100)]
gui/cluster: add structured peerLinks to join info

Instead of the old 'ring_addr' property (which is kept for
compatibility), we also encode the link numbers into the new peerLinks
structure. This allows us to display which IP is assigned to which link
on the cluster in the join dialog, helping a user identify which link
should receive which interface on the new node.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agogui/cluster: add CorosyncLinkEdit component to support up to 8 links
Stefan Reiter [Mon, 23 Mar 2020 12:41:13 +0000 (13:41 +0100)]
gui/cluster: add CorosyncLinkEdit component to support up to 8 links

CorosyncLinkEdit is a Panel that contains between one and 8
CorosyncLinkSelectors. These can be added or removed with according
buttons.

Values submitted to the API are calculated by each
ProxmoxNetworkSelector itself. This works because ExtJS searches
recursively through all child components for ones with a value to be
submitted, i.e. the CorosyncLinkEdit and CorosyncLinkSelector components
are not part of data submission at all.

Change ClusterEdit.js to use the new component for cluster join and
create. To make space in layout, move 'password' field to the side
(where the network-selector previously was) and use 'hbox' panel for
horizontal layouting to avoid spacing issues with languages where the
fieldLabel doesn't fit on one line.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agobump version to 6.1-11
Fabian Grünbichler [Mon, 4 May 2020 12:11:43 +0000 (14:11 +0200)]
bump version to 6.1-11

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agod/control: bump build-deps on pve-storage and pve-guest-common
Fabian Grünbichler [Mon, 4 May 2020 12:10:07 +0000 (14:10 +0200)]
d/control: bump build-deps on pve-storage and pve-guest-common

they contain the new zstd options and the refactored RE for compressed
archives.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agozstd: add --rsyncable flag
Fabian Grünbichler [Mon, 4 May 2020 10:19:31 +0000 (12:19 +0200)]
zstd: add --rsyncable flag

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoFix #2124: Add support for zstd
Alwin Antreich [Tue, 28 Apr 2020 13:58:09 +0000 (15:58 +0200)]
Fix #2124: Add support for zstd

This patch adds the zstd to the compression selection for backup on the
GUI and add .zst to the backup file filter. Including zstd as package
install dependency.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
4 years agobump version to 6.1-9
Fabian Grünbichler [Mon, 20 Apr 2020 08:42:27 +0000 (10:42 +0200)]
bump version to 6.1-9

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/postinst: triggers: call updatecerts manually on reloads
Thomas Lamprecht [Sun, 3 May 2020 16:50:58 +0000 (18:50 +0200)]
d/postinst: triggers: call updatecerts manually on reloads

if pve-manager gets triggered we will normally always do a reload,
that means that updatecerts call won't get triggered, as systemd
doesn't executes the ExecStartPre directives in the reload case.
Do it ourself

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agonode config: check if plugin is valid for acmedomain
Thomas Lamprecht [Sun, 3 May 2020 16:46:02 +0000 (18:46 +0200)]
node config: check if plugin is valid for acmedomain

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoapi acme: reduce verification delays
Thomas Lamprecht [Sun, 3 May 2020 16:43:40 +0000 (18:43 +0200)]
api acme: reduce verification delays

As proxmox-acme has now a default delay for DNS challenge plugins,
which is the important one. Those are just for not overloading the
acme servers with a lot of requests, but once the challenge was
propagate they have it verified pretty quickly, so reduce delay for
checking validation after first requesting it down to 10 seconds

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoapi acme: use the same plugin config for an order
Thomas Lamprecht [Sun, 3 May 2020 16:41:09 +0000 (18:41 +0200)]
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>
4 years agoapi acme: code cleanups
Thomas Lamprecht [Sun, 3 May 2020 16:40:49 +0000 (18:40 +0200)]
api acme: code cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agosdn: remove reverts buttons
Alexandre Derumier [Mon, 13 Apr 2020 06:20:59 +0000 (08:20 +0200)]
sdn: remove reverts buttons

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agonodeconfig: allow up to 5 domains for now
Thomas Lamprecht [Sun, 3 May 2020 14:36:02 +0000 (16:36 +0200)]
nodeconfig: allow up to 5 domains for now

20 was a bit overkill, and we can increase this easily, decreasing
isn't that easy at all...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoapi acme account: refactor and cleanup
Thomas Lamprecht [Sun, 3 May 2020 14:34:01 +0000 (16:34 +0200)]
api acme account: refactor and cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoapi: acme plugins: we're not the storage content API endpoint
Thomas Lamprecht [Sun, 3 May 2020 13:22:48 +0000 (15:22 +0200)]
api: acme plugins: we're not the storage content API endpoint

Drop various leftovers from the storage content API module this was
based on, e.g., ACME plugins have no fixed options and the like.
Also, the descriptions shouldn't mention "storage".

Further, drop the "update_config" "helper" with its operations
effectively only increasing code complexity and adding another rabbit
hole to jump into.

IF, this should have been factoring out the lock+read+write cycle
only, living the rest to a passed CODE-ref, but honestly that saves
only really the read and write config lines, and at this point
nothing is really gained, so just let it be.

Should have been actually three or so separate patches, but to deep
into this rabbit hole to care..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoNodeConfig: ensure locked context has current view
Fabian Grünbichler [Thu, 30 Apr 2020 08:37:02 +0000 (10:37 +0200)]
NodeConfig: ensure locked context has current view

similar to the recent changes for pve-guest-common - we start each API
call with a cfs_update, but while we were waiting for the flock another
R-M-W cycle might have happened, so we need to refresh after obtaining
the lock.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agonode config: verify abstract relations on write
Thomas Lamprecht [Sat, 2 May 2020 16:30:11 +0000 (18:30 +0200)]
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>
4 years agonode config: die on type failure
Thomas Lamprecht [Sat, 2 May 2020 16:29:36 +0000 (18:29 +0200)]
node config: die on type failure

as else we'd continued with bogus data and possible write out
something stupid

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopvenode: allow replying on samle line on interactive questions
Thomas Lamprecht [Sat, 2 May 2020 16:29:15 +0000 (18:29 +0200)]
pvenode: allow replying on samle line on interactive questions

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoacme/node cfg: various code cleanups
Thomas Lamprecht [Sat, 2 May 2020 16:26:56 +0000 (18:26 +0200)]
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>
4 years agoacme plugins: improve API
Fabian Grünbichler [Mon, 20 Apr 2020 21:08:41 +0000 (23:08 +0200)]
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>
4 years agonodeconfig: make ACME plugin optional
Fabian Grünbichler [Mon, 20 Apr 2020 18:50:15 +0000 (20:50 +0200)]
nodeconfig: make ACME plugin optional

and default to the always available 'standalone' http-01 plugin

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agod/control: bump versioned dependency on pve-cluster
Fabian Grünbichler [Mon, 20 Apr 2020 08:37:01 +0000 (10:37 +0200)]
d/control: bump versioned dependency on pve-cluster

for new ACME plugin config file

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agod/control: wrap-and-sort
Fabian Grünbichler [Mon, 20 Apr 2020 08:35:06 +0000 (10:35 +0200)]
d/control: wrap-and-sort

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoacme: encode plugin data in proxmox-acme-perl
Fabian Grünbichler [Fri, 17 Apr 2020 13:10:15 +0000 (15:10 +0200)]
acme: encode plugin data in proxmox-acme-perl

when reading/writing plugin config

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoacme: catch failed plugin setup
Fabian Grünbichler [Fri, 17 Apr 2020 09:15:13 +0000 (11:15 +0200)]
acme: catch failed plugin setup

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoacme: always use domain from authorization
Fabian Grünbichler [Fri, 17 Apr 2020 09:11:32 +0000 (11:11 +0200)]
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>
4 years agoacme: drop unused parameter from challenge validation request
Fabian Grünbichler [Fri, 17 Apr 2020 07:38:01 +0000 (09:38 +0200)]
acme: drop unused parameter from challenge validation request

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoacme: move more of challenge handling to ACME client
Fabian Grünbichler [Fri, 17 Apr 2020 07:37:42 +0000 (09:37 +0200)]
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>
4 years agowww: fix acme parser
Fabian Grünbichler [Fri, 17 Apr 2020 06:09:54 +0000 (08:09 +0200)]
www: fix acme parser

not yet for the new features/keys, but the old one was broken already..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoacme plugins: handle update errors
Fabian Grünbichler [Thu, 16 Apr 2020 18:42:17 +0000 (20:42 +0200)]
acme plugins: handle update errors

instead of silently ignoring them

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agonodeconfig: make domain default key of acmedomain
Fabian Grünbichler [Thu, 16 Apr 2020 18:20:25 +0000 (20:20 +0200)]
nodeconfig: make domain default key of acmedomain

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agonodeconfig: drop '_additional_' from acme domain keys
Fabian Grünbichler [Thu, 16 Apr 2020 18:16:10 +0000 (20:16 +0200)]
nodeconfig: drop '_additional_' from acme domain keys

each entry represents one domain, it could also be the only one.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agonodeconfig: don't register unused formats
Fabian Grünbichler [Thu, 16 Apr 2020 18:15:41 +0000 (20:15 +0200)]
nodeconfig: don't register unused formats

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoacme: improve get_acme_conf
Fabian Grünbichler [Thu, 16 Apr 2020 17:55:09 +0000 (19:55 +0200)]
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>
4 years agoacme: fix account parsing
Fabian Grünbichler [Thu, 16 Apr 2020 17:42:27 +0000 (19:42 +0200)]
acme: fix account parsing

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoAdd libproxmox-acme to the dependencies.
Wolfgang Link [Thu, 16 Apr 2020 05:18:34 +0000 (07:18 +0200)]
Add libproxmox-acme to the dependencies.

It is a build dependency as it is needed for the man generator.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
4 years agoCreate ACME Plugin config.
Wolfgang Link [Thu, 16 Apr 2020 05:18:32 +0000 (07:18 +0200)]
Create ACME Plugin config.

With this configuration it is possible to use many different plugins
with different providers and users.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
4 years agoAdd libproxmox-acme-perl to pveversion
Wolfgang Link [Thu, 16 Apr 2020 05:18:30 +0000 (07:18 +0200)]
Add libproxmox-acme-perl to pveversion

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
4 years agoAdapt acme node config parser and rename the function.
Wolfgang Link [Thu, 16 Apr 2020 05:18:28 +0000 (07:18 +0200)]
Adapt acme node config parser and rename the function.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
4 years agoAdd function that selects the desired plugin.
Wolfgang Link [Thu, 16 Apr 2020 05:18:26 +0000 (07:18 +0200)]
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>
4 years agoRemove unused code
Wolfgang Link [Thu, 16 Apr 2020 05:18:25 +0000 (07:18 +0200)]
Remove unused code

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
4 years agoExtend node config in the acme section.
Wolfgang Link [Thu, 16 Apr 2020 05:18:23 +0000 (07:18 +0200)]
Extend node config in the acme section.

Allow additional domains with different sub-plugins,
However, only one domain per additional entry is permitted.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
4 years agoUse the plugin architecture.
Wolfgang Link [Thu, 16 Apr 2020 05:18:21 +0000 (07:18 +0200)]
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>
4 years agoui: fix indentation, again ...
Thomas Lamprecht [Sun, 3 May 2020 12:08:42 +0000 (14:08 +0200)]
ui: fix indentation, again ...

exact same thing commit 67cb91e4d7c98ab8cf4d8047af5e3789932bb52c
already did for the old location of this, but indentation error was
introduced again when moving it (fix y'all editors..)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 6.1-9
Thomas Lamprecht [Wed, 29 Apr 2020 15:15:53 +0000 (17:15 +0200)]
bump version to 6.1-9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>