public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH access-control 1/2] allow up to three levels of pool nesting
Date: Fri, 17 Nov 2023 11:00:46 +0100	[thread overview]
Message-ID: <owja4zizy3gxdpjpsyudsqbwhw34xmrtssjdlhe5bxkhsi24bc@hnguquwl2h6m> (raw)
In-Reply-To: <20231116153128.788593-2-f.gruenbichler@proxmox.com>

On Thu, Nov 16, 2023 at 04:31:25PM +0100, Fabian Grünbichler wrote:
> with ACLs being inherited along the pool hierarchy.
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
>  src/PVE/AccessControl.pm | 10 ++++++++--
>  src/test/perm-test6.pl   | 16 ++++++++++++++++
>  src/test/test6.cfg       |  5 +++++
>  3 files changed, 29 insertions(+), 2 deletions(-)
> 
> diff --git a/src/PVE/AccessControl.pm b/src/PVE/AccessControl.pm
> index 9600e59..d9ae611 100644
> --- a/src/PVE/AccessControl.pm
> +++ b/src/PVE/AccessControl.pm
> @@ -1264,7 +1264,7 @@ sub check_path {
>  	|/nodes
>  	|/nodes/[[:alnum:]\.\-\_]+
>  	|/pool
> -	|/pool/[[:alnum:]\.\-\_]+
> +	|/pool/(:?[[:alnum:]\.\-\_]+\/?)+

Should we incorporate the 3 level limit here?
    eg. [chars]+(?:/[chars]+){0,2}
Although regex would differ from the one used below (although it could
use the same with only the `{0,2}` bit removed...).

>  	|/sdn
>  	|/sdn/controllers
>  	|/sdn/controllers/[[:alnum:]\_\-]+




  reply	other threads:[~2023-11-17 10:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 15:31 [pve-devel] [RFC access-control/manager 0/4] fix #1148: nested pools Fabian Grünbichler
2023-11-16 15:31 ` [pve-devel] [PATCH access-control 1/2] allow up to three levels of pool nesting Fabian Grünbichler
2023-11-17 10:00   ` Wolfgang Bumiller [this message]
2023-11-17 15:31     ` Fabian Grünbichler
2023-11-16 15:31 ` [pve-devel] [PATCH access-control 2/2] pools: record parent/subpool information Fabian Grünbichler
2023-11-17 10:10   ` Wolfgang Bumiller
2023-11-17 15:29     ` Fabian Grünbichler
2023-11-16 15:33 ` Fabian Grünbichler
2023-11-16 15:54 ` [pve-devel] [RFC access-control/manager 0/4] fix #1148: nested pools Philipp Hufnagl
2023-11-17  7:09 ` [pve-devel] [PATCH manager 1/2] api: pools: support " Fabian Grünbichler
2023-11-17  7:09   ` [pve-devel] [PATCH manager 2/2] ui: pools: switch to new API endpoints Fabian Grünbichler
2023-11-17 11:58   ` [pve-devel] [PATCH manager 1/2] api: pools: support nested pools Wolfgang Bumiller
2023-11-17 15:27     ` Fabian Grünbichler

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=owja4zizy3gxdpjpsyudsqbwhw34xmrtssjdlhe5bxkhsi24bc@hnguquwl2h6m \
    --to=w.bumiller@proxmox.com \
    --cc=f.gruenbichler@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