From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 1F5CD1FF17E for ; Thu, 13 Nov 2025 18:05:58 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A78552455F; Thu, 13 Nov 2025 18:06:52 +0100 (CET) Message-ID: Date: Thu, 13 Nov 2025 18:06:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: Proxmox Datacenter Manager development discussion , Shannon Sterz References: <20251106143836.288888-1-s.sterz@proxmox.com> <1763041798.famz3bfta9.astroid@yuna.none> <4793f1cc-d93a-46f6-b129-f95ee2b3b1ac@proxmox.com> Content-Language: en-US From: Thomas Lamprecht In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1763053582436 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.024 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pdm-devel] [PATCH datacenter-manager/proxmox/yew-comp v3 00/10] add support for checking acl permissions in (yew) front-ends X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" Am 13.11.25 um 17:39 schrieb Shannon Sterz: > On Thu Nov 13, 2025 at 5:18 PM CET, Thomas Lamprecht wrote: >> Am 13.11.25 um 15:26 schrieb Shannon Sterz: >>> i suppose i could also try to extract the roles with `AclTree::roles`, >>> which extracts the roles via `AclTreeNode::extract_roles` which is >>> already somewhat opinionated about how groups should work here. not sure >>> what is ideal here. >> >> That I did not looked closely enough into to answer for sure. > > thanks for your quick reply, i looked into this some more after i send > this mail and i have a version of this series here now that uses > `AclTreeNode::extract_roles` to extract the roles for user in general. > the upshot of this approach is that we already use the acl tree's > implementation here instead of manually extracting the roles. so once we > add better support for groups in the acl tree, we'll pick them up here > for free. > > context: the acl tree has somewhat half-baked support for groups already > and supports extracting them correctly for a given user. the part that > is missing there is the look up of what groups a user belongs too. so > relying on that seems somewhat safe to me as the pre-existing codepaths > have been around for a while now. > > it looks somewhat like this: > > if all_for_authid { > if let Some(auth_id) = auth_id_filter { > for (role, propagate) in node.extract_roles(auth_id, true) { > to_return.push(AclListItem { > path: path_str.to_owned(), > propagate, > // do not disclose what groups exist and by > // making them always look like user permissions > ugid_type: AclUgidType::User, > ugid: auth_id.to_string(), > roleid: role.to_string(), > }) > } > } > > what do you think? should we go with this approach instead? Again, only glanced at your series and this hunk, so do take this with a grain of salt (and a potential for Fabian's rejection ;), but it does look OK to me, and would indeed be a bit more future proof w.r.t. hedging against leaking any groups themselves. _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel