public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Leo Nunner <l.nunner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH firewall/manager] firewall: introduce scoping for ipsets/aliases
Date: Wed,  7 Jun 2023 12:17:47 +0200	[thread overview]
Message-ID: <20230607101751.87616-1-l.nunner@proxmox.com> (raw)

This patch introduces scoping mechanisms for IPsets and aliases, since
its possible to have two of them with the same name on different layers
(i.e. one on the cluster layer, and one on the VM layer). Datacenter
entries are now prefixed with "dc/", and VM entries are prefixed with
"ct/".

The first two patches:

  fix #4556: introduce 'dc' and 'vm' prefix for IPSets
  fix #4556: introduce 'dc' and 'vm' prefix for aliases

should retain backwards compatibility with existing setups. All older
configs will continue to work as previously, since unscoped values
retain the previous behaviour.

  fix #4556: api: return scoped IPSets and aliases
  firewall: add scope field to IPRefSelector

introduce new return values to the API endpoints for /refs, leading to
all new entries that are being added via the GUI being scoped by
default. This will break compatibility with older systems, since the
scoped values cannot be parsed.

firewall:

Leo Nunner (3):
  fix #4556: introduce 'dc' and 'vm' prefix for IPSets
  fix #4556: introduce 'dc' and 'vm' prefix for aliases
  fix #4556: api: return scoped IPSets and aliases

 src/PVE/API2/Firewall/Cluster.pm | 34 ++-------------
 src/PVE/API2/Firewall/IPSet.pm   |  9 ++--
 src/PVE/API2/Firewall/VM.pm      | 47 +++++----------------
 src/PVE/Firewall.pm              | 71 +++++++++++++++++++++-----------
 src/PVE/Firewall/Helpers.pm      | 43 +++++++++++++++++++
 5 files changed, 110 insertions(+), 94 deletions(-)

manager:

Leo Nunner (1):
  firewall: add scope field to IPRefSelector

 www/manager6/form/IPRefSelector.js | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

-- 
2.30.2





             reply	other threads:[~2023-06-07 10:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 10:17 Leo Nunner [this message]
2023-06-07 10:17 ` [pve-devel] [PATCH firewall 1/3] fix #4556: introduce 'dc' and 'vm' prefix for IPSets Leo Nunner
2023-06-07 10:17 ` [pve-devel] [PATCH firewall 2/3] fix #4556: introduce 'dc' and 'vm' prefix for aliases Leo Nunner
2023-06-07 13:14   ` Wolfgang Bumiller
2023-06-07 10:17 ` [pve-devel] [PATCH firewall 3/3] fix #4556: api: return scoped IPSets and aliases Leo Nunner
2023-06-07 10:17 ` [pve-devel] [PATCH manager] firewall: add scope field to IPRefSelector Leo Nunner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230607101751.87616-1-l.nunner@proxmox.com \
    --to=l.nunner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal