Re: [pve-devel] [PATCH v3 many 00/66] fix #4156: introduce new notification system

2023-07-19 Thread Lukas Wagner
Hi again, On 7/18/23 14:34, Dominik Csapak wrote: * i found one bug, but not quite sure yet where it comes from exactly,   putting in emojis into a field (e.g. a comment or author) it's accepted,   but editing a different entry fails with: --->8--- could not serialize configuration: writing '

Re: [pve-devel] [PATCH http-server] fix #4859: properly configure TLSv1.3 only mode

2023-07-19 Thread Fabian Grünbichler
this version is actually breaking spiceproxy, please use v2 (just sent) instead! On July 18, 2023 2:51 pm, Fabian Grünbichler wrote: > set_min/max_proto_version is recommended upstream nowadays, and it seems to be > required for some reason if *only* TLS v1.3 is supposed to be enabled. > > queryi

[pve-devel] [PATCH http-server v2] fix #4859: properly configure TLSv1.3 only mode

2023-07-19 Thread Fabian Grünbichler
set_min/max_proto_version is recommended upstream nowadays, and it seems to be required for some reason if *only* TLS v1.3 is supposed to be enabled. querying via get_options gives us the union of - system-wide openssl defaults - our internal SSL defaults - flags configured by the user via /etc/de

[pve-devel] applied-series: [PATCH pve-network 0/2] add warning if sdn config in not include in /etc/network/interfaces

2023-07-19 Thread Fabian Grünbichler
with first patch correctly attributed to me, since I wrote the change ;) and fixed up the first warn to also be a log_warn. also added two followups, one for the error message, the other for style of the second patch - please shout if you notice something off with either of those! On June 23, 202

Re: [pve-devel] [PATCH v3 many 00/66] fix #4156: introduce new notification system

2023-07-19 Thread Wolfgang Bumiller
On Wed, Jul 19, 2023 at 10:40:09AM +0200, Lukas Wagner wrote: > Hi again, > > On 7/18/23 14:34, Dominik Csapak wrote: > > * i found one bug, but not quite sure yet where it comes from exactly, > >   putting in emojis into a field (e.g. a comment or author) it's accepted, > >   but editing a diff

Re: [pve-devel] [PATCH v3 proxmox-perl-rs 24/66] add PVE::RS::Notify module

2023-07-19 Thread Wolfgang Bumiller
On Mon, Jul 17, 2023 at 05:00:09PM +0200, Lukas Wagner wrote: > Signed-off-by: Lukas Wagner > --- > pve-rs/Cargo.toml| 1 + > pve-rs/Makefile | 1 + > pve-rs/src/lib.rs| 1 + > pve-rs/src/notify.rs | 71 > 4 files changed, 74 insertions

[pve-devel] applied: [PATCH qemu-server] api: update: also check access for currently configured bridge

2023-07-19 Thread Fabian Grünbichler
On July 17, 2023 9:15 am, Fiona Ebner wrote: > Relevant when modifying or removing an existing network device. > > Signed-off-by: Fiona Ebner > --- > PVE/API2/Qemu.pm | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm > index 59307133..fd

[pve-devel] applied: [PATCH container] config permission check: also check access for currently configured bridge

2023-07-19 Thread Fabian Grünbichler
On July 17, 2023 9:15 am, Fiona Ebner wrote: > Relevant when modifying or removing an existing network device. > > Signed-off-by: Fiona Ebner > --- > src/PVE/LXC.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm > index a531ea5..1e9af0

Re: [pve-devel] [PATCH v3 proxmox-perl-rs 24/66] add PVE::RS::Notify module

2023-07-19 Thread Wolfgang Bumiller
On Wed, Jul 19, 2023 at 12:10:02PM +0200, Wolfgang Bumiller wrote: > On Mon, Jul 17, 2023 at 05:00:09PM +0200, Lukas Wagner wrote: > > Signed-off-by: Lukas Wagner > > --- > > pve-rs/Cargo.toml| 1 + > > pve-rs/Makefile | 1 + > > pve-rs/src/lib.rs| 1 + > > pve-rs/src/notify.rs |

Re: [pve-devel] [PATCH v3 proxmox-perl-rs 24/66] add PVE::RS::Notify module

2023-07-19 Thread Lukas Wagner
On 7/19/23 12:23, Wolfgang Bumiller wrote: +#[export(raw_return)] +fn parse_config( +#[raw] class: Value, +raw_config: &str, +raw_private_config: &str, I half-suspect that using &[u8] here - since that's what perl *actually* gives us if we just read the data out

Re: [pve-devel] [PATCH v3 proxmox-perl-rs 31/66] notify: implement context for getting default author/mailfrom

2023-07-19 Thread Wolfgang Bumiller
On Mon, Jul 17, 2023 at 05:00:16PM +0200, Lukas Wagner wrote: > Signed-off-by: Lukas Wagner > --- > pve-rs/src/notify.rs | 33 - > 1 file changed, 32 insertions(+), 1 deletion(-) > > diff --git a/pve-rs/src/notify.rs b/pve-rs/src/notify.rs > index ea34bfe..04e902c

[pve-devel] applied: [PATCH pve-manager] ui: sdn: zonedit: fix display && refactor

2023-07-19 Thread Fabian Grünbichler
thanks! On June 17, 2023 2:43 pm, Alexandre Derumier wrote: > move ipam selector to main items as it's non optional, and it's breaking > display if present in advanced. > > move common id,mtu,nodes fields from modules to base > > Signed-off-by: Alexandre Derumier > --- > www/manager6/sdn/zones

Re: [pve-devel] [PATCH v3 proxmox 06/66] notify: api: add API for sendmail endpoints

2023-07-19 Thread Lukas Wagner
On 7/18/23 14:36, Wolfgang Bumiller wrote: + +/// Get sendmail endpoint with given `name`. +/// +/// The caller is responsible for any needed permission checks. +/// Returns the endpoint or an `ApiError` if the endpoint was not found. +pub fn get_endpoint(config: &Config, name: &str) -> Result

Re: [pve-devel] [PATCH qemu-server v6 1/3] feature #1027: virtio-fs support

2023-07-19 Thread Fabian Grünbichler
On July 6, 2023 12:54 pm, Markus Frank wrote: > adds support for sharing directorys with a guest vm > > virtio-fs needs virtiofsd to be started. > > In order to start virtiofsd as a process (despite being a daemon it is does > not run > in the background), a double-fork is used. > > virtiofsd s

Re: [pve-devel] [PATCH v3 proxmox 06/66] notify: api: add API for sendmail endpoints

2023-07-19 Thread Wolfgang Bumiller
On Wed, Jul 19, 2023 at 01:51:33PM +0200, Lukas Wagner wrote: > > > On 7/18/23 14:36, Wolfgang Bumiller wrote: > > > + > > > +/// Get sendmail endpoint with given `name`. > > > +/// > > > +/// The caller is responsible for any needed permission checks. > > > +/// Returns the endpoint or an `ApiEr

Re: [pve-devel] [PATCH cluster/guest-common/qemu-server/manager v6 0/11] virtiofs

2023-07-19 Thread Fabian Grünbichler
high level: - some indication for which patches require which patches and/or package relation bumps would be nice (e.g., qemu-server -> pve-guest-common and pve-manager -> pve-doc-generator) - the qemu-server unit tests fail for me with the patches, but work without. they do work when run as

Re: [pve-devel] [PATCH guest-common v6 1/1] add DIR mapping config

2023-07-19 Thread Fabian Grünbichler
On July 6, 2023 12:54 pm, Markus Frank wrote: > adds a config file for directories by using a 'map' > array propertystring for each node mapping. > > next to node & path, there are xattr, acl & submounts parameters for > virtiofsd in the map array. > > example config: > ``` > some-dir-id >

[pve-devel] [PATCH widget-toolkit/manager] improve combogrid default value handling

2023-07-19 Thread Dominik Csapak
the default value for combogrids is '', but we often need to set it to [], to avoid issues with dirty tracking. Fix this by setting it to [] by default, making it unnecessary to carry the workaround + comment around in child classes. the first patch of pve-manager is a bit unrelated but popped up

[pve-devel] [PATCH manager 1/3] ui: ipset: make ip/cidr required

2023-07-19 Thread Dominik Csapak
it is in the backend, so make it required in the gui too Signed-off-by: Dominik Csapak --- can be applied independently www/manager6/panel/IPSet.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/manager6/panel/IPSet.js b/www/manager6/panel/IPSet.js index c449cdaa..d42d062d 100644 --- a

[pve-devel] [PATCH manager 2/3] ui: don't set the default value of combogrids to ''

2023-07-19 Thread Dominik Csapak
the combogrid does that itself already Signed-off-by: Dominik Csapak --- can be applied independently, but fixes dirty tracking when the widget-toolkit patch is also present www/manager6/grid/FirewallRules.js | 2 -- www/manager6/panel/IPSet.js| 1 - 2 files changed, 3 deletions(-) dif

[pve-devel] [PATCH widget-toolkit 1/1] combogrid: initialze value with [] by default

2023-07-19 Thread Dominik Csapak
we have to initialize the value of a combogrid to something (else extjs does not initialize everything in the object *sometimes* for yet unknown reasons), but the empty string is wrong. we already have at least two places where we set the default value to [] (namely NodeSelector and ha GroupSelect

[pve-devel] [PATCH manager 3/3] ui: don't set the default value of combogrids to []

2023-07-19 Thread Dominik Csapak
the combogrid sets the default itself correctly Signed-off-by: Dominik Csapak --- depends on the widget-toolkit patch www/manager6/form/NodeSelector.js | 5 + www/manager6/ha/GroupSelector.js | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/www/manager6/form/NodeSelecto

Re: [pve-devel] [PATCH v3 many 00/66] fix #4156: introduce new notification system

2023-07-19 Thread Wolfgang Bumiller
The proxmox-perl-rs part can be considered Acked-by: Wolfgang Bumiller The String -> &[u8] modification in the parse method may be a follow-up or a v4 - depending on how we proceed with applying this the whole thing. ___ pve-devel mailing list pve-de

Re: [pve-devel] [PATCH v3 many 00/66] fix #4156: introduce new notification system

2023-07-19 Thread Lukas Wagner
On 7/19/23 14:11, Wolfgang Bumiller wrote: The String -> &[u8] modification in the parse method may be a follow-up or a v4 - depending on how we proceed with applying this the whole thing. Discussed this with Thomas yesterday - I'll post a v4 once all reviews are done. Though I'll leave some th

Re: [pve-devel] [PATCH v3 pve-manager 54/66] ui: backup: allow to select notification target for jobs

2023-07-19 Thread Dominik Csapak
looks fine, one comment inline On 7/17/23 17:00, Lukas Wagner wrote: This commit adds a possibility to choose between different options for notifications for backup jobs: - Notify via email, in the same manner as before - Notify via an endpoint/group If 'notify via mail' is selected,

Re: [pve-devel] [PATCH widget-toolkit/manager] improve combogrid default value handling

2023-07-19 Thread Fabian Grünbichler
somewhat plays into #4840 , in that we now no longer do a bogus GET call for the 'null' storage and display a misleading permission error as a result, but there still could be a nice (big?) error message about the general lack of (accessible) storages ;) https://bugzilla.proxmox.com/show_bug.cgi?i

Re: [pve-devel] [PATCH v3 pve-cluster 36/66] add libpve-notify-perl package

2023-07-19 Thread Wolfgang Bumiller
On Mon, Jul 17, 2023 at 05:00:21PM +0200, Lukas Wagner wrote: > The package contains the PVE::Notify. It is a very thin wrapper > around the Proxmox::RS::Notify module, feeding the configuration > from the new 'notifications.cfg' and 'priv/notifications.cfg' files > into it. > > Signed-off-by: Lu

Re: [pve-devel] [PATCH v3 pve-common 38/66] JSONSchema: increase maxLength of config-digest to 64

2023-07-19 Thread Wolfgang Bumiller
On Mon, Jul 17, 2023 at 05:00:23PM +0200, Lukas Wagner wrote: > The new notification backend is implemented in Rust where we use SHA256 > for config digests. > > Signed-off-by: Lukas Wagner Acked-by: Wolfgang Bumiller > --- > src/PVE/JSONSchema.pm | 7 +-- > 1 file changed, 5 insertions(+

Re: [pve-devel] [PATCH v3 pve-common 38/66] JSONSchema: increase maxLength of config-digest to 64

2023-07-19 Thread Fiona Ebner
Am 17.07.23 um 17:00 schrieb Lukas Wagner: > The new notification backend is implemented in Rust where we use SHA256 > for config digests. > > Signed-off-by: Lukas Wagner > --- > src/PVE/JSONSchema.pm | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/src/PVE/JSONSc

Re: [pve-devel] [PATCH v3 pve-manager 57/66] ui: allow to configure notification event -> target mapping

2023-07-19 Thread Dominik Csapak
some comments inline: On 7/17/23 17:00, Lukas Wagner wrote: Signed-off-by: Lukas Wagner --- www/manager6/Makefile | 1 + www/manager6/dc/Config.js | 12 ++ www/manager6/dc/NotificationEvents.js | 238 ++ 3 files changed, 251 insertions

Re: [pve-devel] [PATCH v3 pve-common 38/66] JSONSchema: increase maxLength of config-digest to 64

2023-07-19 Thread Wolfgang Bumiller
On Wed, Jul 19, 2023 at 02:41:17PM +0200, Fiona Ebner wrote: > Am 17.07.23 um 17:00 schrieb Lukas Wagner: > > The new notification backend is implemented in Rust where we use SHA256 > > for config digests. > > > > Signed-off-by: Lukas Wagner > > --- > > src/PVE/JSONSchema.pm | 7 +-- > > 1 f

Re: [pve-devel] [PATCH v3 pve-manager 59/66] ui: perm path: load notification target/filter acl entries

2023-07-19 Thread Dominik Csapak
On 7/17/23 17:00, Lukas Wagner wrote: Signed-off-by: Lukas Wagner --- Notes: I'm not sure if I like this solution, but adding notification targets to the resources API endpoint would not have make sense. Maybe we could create a new API endpoint that returns all possible ACL

Re: [pve-devel] [PATCH v3 many 00/66] fix #4156: introduce new notification system

2023-07-19 Thread Lukas Wagner
On 7/18/23 16:37, Thomas Lamprecht wrote: Am 18/07/2023 um 14:34 schrieb Dominik Csapak: * the backup edit window is rather tall at this point, and if we assume a  minimum   screen size of 1280x720 there is not quite enough space when you subtract   the (typical) os bar and browser window deco

Re: [pve-devel] [PATCH v3 proxmox-widget-toolkit 61/66] notification: add gui for sendmail notification endpoints

2023-07-19 Thread Dominik Csapak
some comments/nits inline: On 7/17/23 17:00, Lukas Wagner wrote: Signed-off-by: Lukas Wagner --- src/Makefile | 4 + src/Schema.js| 8 ++ src/data/model/NotificationConfig.js | 8 ++ src/panel/NotificationConfigView.js | 192 ++

Re: [pve-devel] [PATCH v3 proxmox-widget-toolkit 63/66] notification: add gui for notification groups

2023-07-19 Thread Dominik Csapak
comments inline On 7/17/23 17:00, Lukas Wagner wrote: Signed-off-by: Lukas Wagner --- src/Makefile| 1 + src/Schema.js | 5 + src/panel/NotificationGroupEditPanel.js | 177 src/window/EndpointEditBase.js

Re: [pve-devel] [PATCH v3 proxmox-widget-toolkit 65/66] notification: add ui for managing notification filters

2023-07-19 Thread Dominik Csapak
more or less the same comments as for 61/66 autoShow, single line if, column use, etc. On 7/17/23 17:00, Lukas Wagner wrote: Signed-off-by: Lukas Wagner --- src/Makefile | 3 +- src/data/model/NotificationConfig.js | 9 ++ src/panel/NotificationConfigView.js |

Re: [pve-devel] [PATCH v3 pve-manager 57/66] ui: allow to configure notification event -> target mapping

2023-07-19 Thread Lukas Wagner
Hi, On 7/19/23 14:45, Dominik Csapak wrote: + +Ext.define('PVE.dc.NotificationEventsTargetSelector', { +    alias: ['widget.pveNotificationEventsTargetSelector'], +    extend: 'PVE.form.NotificationTargetSelector', +    fieldLabel: gettext('Notification Target'), +    allowBlank: true, +    edit

[pve-devel] [PATCH access-control] auth: tfa: fail if realm requires TFA but no challenge is generated

2023-07-19 Thread Friedrich Weber
Before 0f3d14d6 ("auth: tfa: read tfa.cfg also if the user.cfg entry has no "x" marker"), `user_get_tfa` failed if the realm required TFA, but the user's `keys` attribute was empty. Since 0f3d14d6, `user_get_tfa` fails if the realm requires TFA, but neither user.cfg nor tfa.cfg define any second fa

[pve-devel] [PATCH common 3/5] ldap: handle errors explicitly everywhere instead of simply `die`ing

2023-07-19 Thread Christoph Heiss
Most codepaths already have explicit error handling (by the means of checking the return value), which is essential dead code due to setting `onerror`. As LDAP errors might get presented to users due to upcoming changes, the error location should not be present in these error messages, thus switch

[pve-devel] [PATCH common 2/5] test: add test cases for new 'ldap-dn' schema format

2023-07-19 Thread Christoph Heiss
Mostly from [0], slightly adapted due to marginally different rules due to using Net::LDAP::Util::canonical_dn() under the hood. [0] https://lists.proxmox.com/pipermail/pve-devel/2023-May/056839.html Co-authored-by: Stefan Sterz Signed-off-by: Christoph Heiss --- debian/control |

[pve-devel] [PATCH access-control 5/5] ldap: check bind credentials with LDAP directory directly on change

2023-07-19 Thread Christoph Heiss
Instead of letting a sync fail on the first try due to e.g. bad bind credentials, give the user some direct feedback when trying to save a LDAP realm in the UI. This is part of the result of a previous discussion [0], and the same approach is already implemented for PBS [1]. [0] https://lists.pro

[pve-devel] [PATCH access-control 4/5] ldap: validate LDAP DNs using the `ldap-dn` schema format

2023-07-19 Thread Christoph Heiss
Remove the dreaded DN regex, instead validating DNs using the newly defined `ldap-dn` schema format (which uses Net::LDAP::Util::canonical_dn() under the hood). Result of a previous discussion [0]. [0] https://lists.proxmox.com/pipermail/pve-devel/2023-May/056839.html Signed-off-by: Christoph He

[pve-devel] [PATCH common 1/5] schema: add `ldap-dn` format for validating LDAP distinguished names

2023-07-19 Thread Christoph Heiss
The Net::LDAP library conveniently provides a canonical_dn() function, which can be used to (roughly) check if a DN is valid or not. This will be used in future changes to replace the current dreaded regex to validate DNs. pve-common previously already (silently) depended on the Net::LDAP library

[pve-devel] [PATCH common/access-control 0/5] improve LDAP DN and bind creds checking on creation/change

2023-07-19 Thread Christoph Heiss
tl;dr implements the result of the discussion in [0]. First, this removes the dreaded LDAP DN regex, replacing it instead with a proper schema format, which does validation using Net::LDAP::Util::canonical_dn(). Further, upon saving a LDAP realm in the UI, it tries to connect & bind using the pro

[pve-devel] [PATCH installer v2] tui: fix FQDN validation

2023-07-19 Thread Christoph Heiss
Add checks to ensure that: * It is actually has a hostname, not just a domain name * Properly check if the hostname is purely numeric, which was broken/different to how the GUI installer does it The custom error type also allows for easier future adaptions, as the changes can be entirely cont