From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <t.lamprecht@proxmox.com>
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))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id EF70C885A
 for <pve-devel@lists.proxmox.com>; Wed, 16 Nov 2022 10:10:34 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id D90D91C87A
 for <pve-devel@lists.proxmox.com>; Wed, 16 Nov 2022 10:10:34 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (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
 for <pve-devel@lists.proxmox.com>; Wed, 16 Nov 2022 10:10:34 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id C390C44AE8
 for <pve-devel@lists.proxmox.com>; Wed, 16 Nov 2022 10:10:33 +0100 (CET)
Message-ID: <7cfca64a-2ab1-405a-fde1-1f4f14e043b8@proxmox.com>
Date: Wed, 16 Nov 2022 10:10:32 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101
 Thunderbird/107.0
Content-Language: en-GB
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
 Dominik Csapak <d.csapak@proxmox.com>,
 =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
References: <20221115130248.1007325-1-d.csapak@proxmox.com>
 <20221115130248.1007325-5-d.csapak@proxmox.com>
 <1668524410.yomu90q6hb.astroid@yuna.none>
 <895c5e1e-4de0-19fe-91a0-f604cc451be8@proxmox.com>
 <c1e2c7df-fc9e-d402-755a-fc0458f44315@proxmox.com>
 <cfe36567-e458-1823-6c44-2f3c2e272695@proxmox.com>
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
In-Reply-To: <cfe36567-e458-1823-6c44-2f3c2e272695@proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-SPAM-LEVEL: Spam detection results: =?UTF-8?Q?0=0A=09?=AWL -0.031 Adjusted
 score from AWL reputation of From: =?UTF-8?Q?address=0A=09?=BAYES_00 -1.9
 Bayes spam probability is 0 to 1%
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict
 =?UTF-8?Q?Alignment=0A=09?=NICE_REPLY_A -0.001 Looks like a legit reply (A)
 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF
 =?UTF-8?Q?Record=0A=09?=SPF_PASS -0.001 SPF: sender matches SPF record
Subject: Re: [pve-devel] [PATCH cluster v10 4/5] datacenter.cfg: add tag
 rights control to the datacenter config
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Wed, 16 Nov 2022 09:10:35 -0000

Am 16/11/2022 um 10:04 schrieb Dominik Csapak:
> On 11/16/22 09:54, Thomas Lamprecht wrote:
>> Am 16/11/2022 um 09:47 schrieb Dominik Csapak:
>>>> I=C2=A0am=C2=A0not=C2=A0sure=C2=A0the=C2=A0second=C2=A0sentence=C2=A0=
is=C2=A0necessary,=C2=A0or=C2=A0rather,=C2=A0wouldn't=C2=A0it=C2=A0be=C2=A0=
better
>>>> to=C2=A0make=C2=A0the=C2=A0two=C2=A0lists=C2=A0mutually=C2=A0exclusi=
ve?=C2=A0e.g.,=C2=A0by=C2=A0removing=C2=A0privileged=C2=A0tags=C2=A0from
>>>> the=C2=A0other=C2=A0list?
>>>
>>> i=C2=A0don't=C2=A0really=C2=A0want=C2=A0to=C2=A0auto=C2=A0remove=C2=A0=
stuff=C2=A0from=C2=A0one=C2=A0option=C2=A0when=C2=A0set=C2=A0on=C2=A0anot=
her.
>>> maybe=C2=A0it'd=C2=A0make=C2=A0more=C2=A0sense=C2=A0if=C2=A0we=C2=A0d=
on't=C2=A0allow=C2=A0setting=C2=A0and=C2=A0admin=C2=A0tag=C2=A0when
>>> it's=C2=A0already=C2=A0set=C2=A0in=C2=A0the=C2=A0'user-allow-list'=C2=
=A0and=C2=A0vice=C2=A0versa?=C2=A0then
>>> there=C2=A0cannot=C2=A0be=C2=A0a=C2=A0situation=C2=A0where=C2=A0a=C2=A0=
tag=C2=A0is=C2=A0in=C2=A0both=C2=A0lists=C2=A0at=C2=A0the=C2=A0same=C2=A0=
time?
>>>
>>
>>
>> Limits use cases, as we'll only ever allow priv'd tags to be used for =
things
>> like backup job guest-source selection, and there may be scenarios whe=
re an
>> admin wants to allow the user to set a specific privileged tags in the=
 VMs
>> they control.
>>
>> To make that work we'd:
>> - explicitly allow such listed tags for "normal" VM users even if they=
're in the
>> =C2=A0=C2=A0 privileged-tags (that's why I used the term "registered" =
in previous comments,
>> =C2=A0=C2=A0 might be better suited if we deem that privileged is then=
 confusing)
>>
>> - highlight the fact if a tag is in both
>>
>=20
> ok, then i have to change the permission checking code (currently i for=
bid
> 'normal' users the tag if it was in the 'privileged-tags' section, rega=
rdless
> =C2=A0if it was in the 'user-allow-list' or not)

maybe wait on Fabian's opinion on that, I don't want to push this to stro=
ngly
but can imagine that it might be sensible and useful, and hard to change =
later.

>=20
> how would you highlight that? a warning on the cli/syslog/etc. is not
> visible, but on the ui we don't really have an obvious place to do so
>=20
> i could try to add a seperate 'warning' row in the object grid when
> that happens, not sure if that's what you meant though
>=20

Syslog is never the place for such things, needs to happen on edit, and f=
or
now there's no CLI so GUI is the only place we need to care about (edit c=
fgs
manually -> be on your own).

So a bottom section that shows a hints about the tags that are in both li=
sts,
the hint would then be located in the edit windows for registered and all=
owed-list
of tags, so it doesn't necessarily needs to be inline (i.e., some highlig=
ht in
the existing tag edit).