From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pmg-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id CD7D41FF165
	for <inbox@lore.proxmox.com>; Wed, 26 Feb 2025 12:30:58 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 5B87211258;
	Wed, 26 Feb 2025 12:30:57 +0100 (CET)
Message-ID: <1ba483e1-4ab4-475f-b841-7d36609242e2@proxmox.com>
Date: Wed, 26 Feb 2025 12:30:23 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Mira Limbeck <m.limbeck@proxmox.com>, pmg-devel@lists.proxmox.com
References: <20250225133619.42012-1-m.frank@proxmox.com>
 <9c402244-de19-4939-97ba-6f1cf5514f28@proxmox.com>
Content-Language: de-AT, en-US
From: Lukas Wagner <l.wagner@proxmox.com>
In-Reply-To: <9c402244-de19-4939-97ba-6f1cf5514f28@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.010 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
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [pmg-devel] [PATCH
 pve-common/perl-rs/pmg-api/widget-toolkit/pmg-gui v6 0/12] fix #3892:
 OpenID Connect
X-BeenThere: pmg-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Mail Gateway development discussion
 <pmg-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pmg-devel>, 
 <mailto:pmg-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pmg-devel/>
List-Post: <mailto:pmg-devel@lists.proxmox.com>
List-Help: <mailto:pmg-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel>, 
 <mailto:pmg-devel-request@lists.proxmox.com?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pmg-devel-bounces@lists.proxmox.com
Sender: "pmg-devel" <pmg-devel-bounces@lists.proxmox.com>



On  2025-02-26 12:08, Mira Limbeck wrote:
> Gave it a quick test with Authentik as OIDC provider.
> Login with a non-existent (on PMG) user without an email address works now.
> Setting the username-claim to `email` fails with:
> ```
> openid connect authentication failure; rhost=<host> msg=autocreate
> openid connect user failed: verify entry failed
> username: value does not match the regex pattern
> ```
> 
> And setting username-claim to `sub` fails with:
> ```
> openid connect authentication failure; rhost=<host> msg=autocreate
> openid connect user failed: verify entry
> userid: value may only be 64 characters long
> ```
> 
> I've documented this in bugzilla [1].
> 
> 
> [0] https://openid.net/specs/openid-connect-core-1_0.html#IDToken
> [1] https://bugzilla.proxmox.com/show_bug.cgi?id=6200
> 
> 

Just for the record, tested the same two scenarios against Keycloak:
  - username-claim = sub works there, since the generated IDs are shorter (36 chars)
  - username-claim = email also does not work, no surprise there

Apart from that it seems to work (but I don't know much about OIDC yet, so maybe
I didn't test some edge cases)

-- 
- Lukas



_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel