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 C78D41FF17E for ; Thu, 16 Oct 2025 11:24:25 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9F018E32A; Thu, 16 Oct 2025 11:24:45 +0200 (CEST) Message-ID: <70b771e4-41f5-4e07-bd46-54da8e9774e8@proxmox.com> Date: Thu, 16 Oct 2025 11:24:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Shannon Sterz References: <20251014150358.553238-1-s.shaji@proxmox.com> <20251014150358.553238-3-s.shaji@proxmox.com> <52b7cfb5-83bf-4717-b93d-14f5e013aa99@proxmox.com> Content-Language: en-US From: Stefan Hanreich In-Reply-To: X-SPAM-LEVEL: Spam detection results: 0 AWL 0.712 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 2/3] fix #6901: api: add explicit permission check for vnets list 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 Cc: 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" On 10/16/25 10:12 AM, Shannon Sterz wrote: >> we use UNAUTHORIZED instead of FORBIDDEN in other places, so imo would >> be better to do that here too - same for the other 2 patches as well. > > this was already discussed for a previous patch series. UNAUTHORIZED > there is arguably false, as we usually return a 403 FORBIDDEN when a > user does not have sufficient permissions (e.g. that's what you get if > you define permissions through the api macro and a user doesn't have > them). not a 401 UNAUTHORIZED, which we use to indicate that the user > has not been authenticated (i.e. no or invalid ticket). > > iirc Permission::Anybody above means that anybody that has been > authenticated can access this endpoint (as opposed to Permission::World, > which means even unauthenticated users can access it). hence, we know > the user is authenticated here. so this is fine, but returning 401 > UNAUTHORIZED in those other endpoints is wrong imo. > > note that the ui relies on that in many cases: a 401 will trigger the > login prompt to be shown again, a 403 will simply show an error. > makes sense, thanks for clearing this up! _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel