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 7FF97901A1
 for <pve-devel@lists.proxmox.com>; Tue, 30 Aug 2022 12:45:14 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 6AF15BA7
 for <pve-devel@lists.proxmox.com>; Tue, 30 Aug 2022 12:44:44 +0200 (CEST)
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) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Tue, 30 Aug 2022 12:44:43 +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 7777F42BE9
 for <pve-devel@lists.proxmox.com>; Tue, 30 Aug 2022 12:44:43 +0200 (CEST)
Message-ID: <ccb9e5ef-50fc-4088-9f86-25b78c30ad55@proxmox.com>
Date: Tue, 30 Aug 2022 12:44:42 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:105.0) Gecko/20100101
 Thunderbird/105.0
Content-Language: en-GB
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
 Stoiko Ivanov <s.ivanov@proxmox.com>
References: <20220829160755.2497031-1-s.ivanov@proxmox.com>
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
In-Reply-To: <20220829160755.2497031-1-s.ivanov@proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.004 Adjusted score from AWL reputation of From: address
 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 Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [ldap.pm, ldapwiki.com, proxmox.com]
Subject: [pve-devel] applied: [PATCH access-control] auth ldap/ad: compare
 group member dn case-insensitively
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: Tue, 30 Aug 2022 10:45:14 -0000

Am 29/08/2022 um 18:07 schrieb Stoiko Ivanov:
> currently we add a user to a group if it's DN is listed in the
> member-attributes of a group. The comparison for this is done via
> existence check of a hash key, which is case-sensitive.
> 
> The equality for DNs is defined in a not straight forward way [0]:
> (roughly translating to you need to honor the equality rules for each
> 'component' (RDN) of the DN) and is implementation-specific (Microsoft
> AD is case-insensitive).
> 
> While this patch does not address the complete complexity of comparing
> DNs it should work fine in practice.
> 
> issue with case-sensitive mismatches was reported in our community
> forum:
> https://forum.proxmox.com/threads/.113387
> 
> tested against a local test-vm used for reproducing the issue.
> 
> [0] https://ldapwiki.com/wiki/Distinguished%20Name%20Case%20Sensitivity
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
>  src/PVE/Auth/LDAP.pm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
>

applied, thanks!