Commit Graph

4835 Commits

Author SHA1 Message Date
Fabian Grünbichler
ae11002ff7 d/control: bump versioned dependency on pve-cluster
for new ACME plugin config file

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
9f5f3dcbf1 d/control: wrap-and-sort
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
fcc60c16de acme: encode plugin data in proxmox-acme-perl
when reading/writing plugin config

Signed-off-by: Fabian Grünbichler <f.gruenbichler@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
08a61c7b30 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>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
922f7b07f4 acme plugins: handle update errors
instead of silently ignoring them

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
dcfb9f2c03 nodeconfig: make domain default key of acmedomain
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
ab53e139eb 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>
2020-05-03 14:10:17 +02:00
Fabian Grünbichler
b456a0f31a nodeconfig: don't register unused formats
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
2fafc70666 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>
2020-05-03 14:10:17 +02:00
Wolfgang Link
b227e9d2ab 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>
2020-05-03 14:10:17 +02:00
Wolfgang Link
74f7f7c1ea Add libproxmox-acme-perl to pveversion
Signed-off-by: Wolfgang Link <w.link@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
f9a14ae347 Remove unused code
Signed-off-by: Wolfgang Link <w.link@proxmox.com>
2020-05-03 14:10:17 +02:00
Wolfgang Link
cc442d3ee2 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>
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
Thomas Lamprecht
dbbe181cad ui: fix indentation, again ...
exact same thing commit 67cb91e4d7
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>
2020-05-03 14:10:17 +02:00
Thomas Lamprecht
453f43043b bump version to 6.1-9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-29 17:16:51 +02:00
Thomas Lamprecht
e5ede40a6a ui: realm sync: add some empty texts and specifiy what gets purged
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-29 16:47:26 +02:00
Dominik Csapak
4b60ee19de ui: dc/Auth: add sync button
opens a window with the parameters for the sync and two buttons:
'preview' and 'sync'

both open the taskviewer, but the 'preview' one sets the 'dry-run'
parameter so that it does not get written out to the user.cfg

loads the realm config and prefills the selection with values from
the config, and shows a hint about where to set the defaults
if none are set

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-29 16:36:27 +02:00
Fabian Ebner
4119b159e9 ui: don't block offline migration due non-referenced disk in the config
All local disks can/will be migrated if not for a reason we don't
know about yet at this stage. The disks we get from the API call as
'local_disks' are either referenced by the config or by snapshots in
the config (which was not checked for and the reason one could run
into the 'else if' branch).

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-29 12:17:14 +02:00
Thomas Lamprecht
084fca1cb8 update shipped appliance index for PMG 6.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-28 11:03:28 +02:00
Thomas Lamprecht
e33f43a3de cert renew: note reason why renewal due to long lifetime is done 2020-04-27 18:28:59 +02:00
Fabian Grünbichler
75456ef378 certs: early renew long-lived certificates
if our self-signed certificate expires in more than 825 days, but was
created after July 2019 it won't be accepted by modern Apple devices. we
fixed the issuance to generate shorter-lived certificates in November
2019, this cleans up the existing ones to fix this and similar future
issues.

two years / 730 days as cut-off was chosen since it's our new maximum
self-signed certificate lifetime, and should thus catch all old-style
certificates.

another positive side-effect is that we can now phase out support for
older certificates faster, e.g. if we want to move to bigger keys,
different signature algorithms, or anything else in that direction.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-04-27 13:14:10 +02:00
Dominik Csapak
822fb26d85 ui: dc/AuthEdit: add sync tab for ldap/ad realms
this modifies AuthEditBase so that if there is a sync inputpanel specified,
we display it in a second tab (we need to modify the bodyPadding here,
else the whole window has too much padding)

we use the same panel for both ldap/ad, since the most options behave
the same (except for user_attribute, but the default for AD is
sAMAccount which i think is good enough for now, users can still
override it in the cli)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-27 11:27:33 +02:00
Thomas Lamprecht
3c51d9ba9a update aplinfo
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-27 10:08:10 +02:00
Thomas Lamprecht
ed00cf491f ui: auth realm: do not delete tfa if empty on create
that breaks the schema as the POST endpoint obviously doesn't knows
about a delete property.

fixes commit 58e1ccc4f5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-26 13:35:36 +02:00
Thomas Lamprecht
aaf5e58452 ui: auth base: fix setting auth type in onGetValues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-26 13:26:50 +02:00
Thomas Lamprecht
ed58f35906 ui: indentation fix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-26 13:26:26 +02:00
Dominik Csapak
0194c802c4 ui: dc/AuthView: refactor panel
use more static declarations
move functions to class
use modern js features

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-26 13:12:47 +02:00
Dominik Csapak
2db8e90d66 ui: Utils: delete_if_default: add values by correct type
if 'delete' is an Array, we want to push into it, not append a string
this could be an issue when we use an edit window with multiple inputpanels
and deleteEmpty set on some fields

we then could have an aray like this:

values: {
    delete: [
	'foo',
	'bar',
	'baz, qux',
    ],
},

which the edit window does not handle correctly anymore
(it only does string splitting if 'delete' itself is a string)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-26 13:12:28 +02:00
Dominik Csapak
efff7eab9a ui: dc/Auth*: refactor AuthEdit
similar to storage/Base.js so that we have the different
RealmTypes in different inputpanels

this will come in handy when we define sync options

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-26 13:07:54 +02:00
Thomas Lamprecht
8b966034aa ui: storageSchema: add PBS and fix trailing comma
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-26 13:07:54 +02:00
Thomas Lamprecht
affa15671a ui: tfa selector code/spelling nit fix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-26 12:56:43 +02:00
Dominik Csapak
58e1ccc4f5 ui: dc/AuthEdit: refactor TFASelector in its own component
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-26 12:47:54 +02:00
Dominik Csapak
428d5e7864 add Language selection in user menu
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-26 12:45:28 +02:00
Thomas Lamprecht
2ac41a189a ui: drop login-user fixed token edit due to multi window/z-index issues
We normally do not stack windows and it breaks/allows some funky
stuff.. As this isn't really required and can be done just fine over
the the DC -> Token panel, especially as we prefill the username to
the logged in one for new tokens now..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-26 12:29:27 +02:00
Thomas Lamprecht
9fdc5b2ef8 ui token edit: add online help and fix subject
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-26 12:25:14 +02:00
Thomas Lamprecht
48a66a12ee ui: api token: rewrite
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-26 12:18:25 +02:00
Thomas Lamprecht
4dedd333d1 ui: token selector: refactor to more schematic approach
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-25 18:25:06 +02:00
Fabian Grünbichler
e3372697a0 ui: add TokenView with fixed userid
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-04-25 18:25:06 +02:00
Fabian Grünbichler
f5c429bc27 ui: add Token to ACL
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-04-25 18:25:06 +02:00
Fabian Grünbichler
c831fbde20 ui: add Token Panel + Edit Window
modeled after UserView and related code.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-04-25 18:25:06 +02:00
Thomas Lamprecht
34d0acbd90 ui: format_sdnzone_type: uppercase
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-25 18:25:06 +02:00