From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 7225F60A24 for ; Thu, 10 Sep 2020 10:19:57 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 598E4198CF for ; Thu, 10 Sep 2020 10:19:27 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 20628198C3 for ; Thu, 10 Sep 2020 10:19:26 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id D8A4644AE7 for ; Thu, 10 Sep 2020 10:19:25 +0200 (CEST) To: =?UTF-8?Q?Fabian_Gr=c3=bcnbichler?= , PVE development discussion , Tim Marx References: <20200706124544.2126341-1-t.marx@proxmox.com> <3da92568-0886-a522-fbd5-d28afe0f8e71@proxmox.com> <1599724494.q0shm5qvme.astroid@nora.none> From: Thomas Lamprecht Message-ID: <008ff748-78d4-ec63-9680-e6129cf7993d@proxmox.com> Date: Thu, 10 Sep 2020 10:19:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Thunderbird/81.0 MIME-Version: 1.0 In-Reply-To: <1599724494.q0shm5qvme.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 1.602 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -3.576 Looks like a legit reply (A) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH v3 access-control] add ui capabilities endpoint X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2020 08:19:57 -0000 On 10.09.20 10:00, Fabian Gr=C3=BCnbichler wrote: > On September 9, 2020 9:00 pm, Thomas Lamprecht wrote: >> On 06.07.20 14:45, Tim Marx wrote: >>> Signed-off-by: Tim Marx >>> --- >>> * no changes >> >> Maybe we could merge this into the "/access/permissions" endpoint, may= be with a >> "heurisitic" parameter? >=20 > IIRC Dominik wanted to slowly replace the caps with permissions anyway,= =20 > the caps are just (still) there because that hasn't happened yet. >=20 I wanted that too sine a long time ;-) But that did not made it happen ye= t.. > I am also not sure whether tokens are a good fit for the regular Web GU= I=20 > - the fact that tickets expire and you are not permanently logged in is= =20 > a feature there IMHO ;) nobody forces you to use it, and any user can just do the few modificatio= ns and run the gui with tokens, artificial limits for such things are stupid= IMO. Further: * and active log-out clears it, so people who use it and want to play saf= e can do so. I mean, on most sites one is logged in for a few hours to even d= ays, so if you used a shared or not 100% trusted device you already need to actively log out from all relevant sides, independent of they use self-= expiring tickets, or something else. * It's effectively not advertised actively, so mostly for debug use for u= s. We could show a hint if a token is entered, though. "Tokes do not automatically expire, you need to actively log out for that= =2E" > also, permissions has a return schema already, while it does 'match'=20 > from a structural point of view (a two-level deep hash), it is somethin= g=20 > altogether different semantically. as the semantics are actively controlled by the requested via a switch th= at does not matters much, IMO. They then actively request another semantic. > TL;DR: iff we really need this, then I'd put it in a separate API call.= We could also just do the "cap heuristic calculation" in the frontend, us= ing the full permissions, and fill the Cap object with it. This avoids a new api call or new multiplexer switch for an existing one = but does not needs to restructure the whole UI cap control, yet.