From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: Thomas Skinner <thomas@atskinner.net>
Subject: Re: [pve-devel] [PATCH access-control v3 1/1] fix #4234: add library functions for openid optional userinfo request
Date: Mon, 17 Mar 2025 13:12:42 +0100 [thread overview]
Message-ID: <1742213518.eiu0heftg2.astroid@yuna.none> (raw)
In-Reply-To: <88535a55-62b4-4bc9-ad8b-9e147fb5371a@proxmox.com>
On March 6, 2025 4:20 pm, Mira Limbeck wrote:
>
>
> On 2/8/25 06:42, Thomas Skinner wrote:
>> Signed-off-by: Thomas Skinner <thomas@atskinner.net>
>> ---
>> src/PVE/API2/OpenId.pm | 6 +++++-
>> src/PVE/Auth/OpenId.pm | 7 +++++++
>> 2 files changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/PVE/API2/OpenId.pm b/src/PVE/API2/OpenId.pm
>> index 77410e6..456e96a 100644
>> --- a/src/PVE/API2/OpenId.pm
>> +++ b/src/PVE/API2/OpenId.pm
>> @@ -170,7 +170,11 @@ __PACKAGE__->register_method ({
>>
>> my ($config, $openid) = $lookup_openid_auth->($realm, $redirect_url);
>>
>> - my $info = $openid->verify_authorization_code($param->{code}, $private_auth_state);
>> + my $info = $openid->verify_authorization_code(
>> + $param->{code},
>> + $private_auth_state,
>> + $config->{'disable-userinfo'} // 0,
>> + );
>> my $subject = $info->{'sub'};
>>
>> my $unique_name;
>> diff --git a/src/PVE/Auth/OpenId.pm b/src/PVE/Auth/OpenId.pm
>> index c8e4db9..6efa696 100755
>> --- a/src/PVE/Auth/OpenId.pm
>> +++ b/src/PVE/Auth/OpenId.pm
>> @@ -63,6 +63,12 @@ sub properties {
>> pattern => '^[^\x00-\x1F\x7F <>#"]*$', # Prohibit characters not allowed in URI RFC 2396.
>> optional => 1,
>> },
>> + "disable-userinfo" => {
>> + description => "Prevents querying the userinfo endpoint for claims values.",
>> + type => 'boolean',
>> + default => 0,
>> + optional => 1,
>> + },
> I would prefer `query-userinfo` (or similar) and a default of `1` over
> `disable-userinfo` and a default of `0`.
that probably makes sense..
@Thomas - would you mind rebasing this and incorporating this last bit
of feedback, I think this is otherwise ready to be applied :)
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-03-17 12:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-08 5:42 [pve-devel] [PATCH SERIES access-control/docs/manager/perl-rs/proxmox-openid v3] Make OIDC userinfo endpoint optional Thomas Skinner
2025-02-08 5:42 ` [pve-devel] [PATCH docs v3 1/1] fix #4234: add docs for openid optional userinfo request Thomas Skinner
2025-02-08 5:42 ` [pve-devel] [PATCH manager v3 1/1] fix #4234: add GUI option " Thomas Skinner
2025-02-08 5:42 ` [pve-devel] [PATCH access-control v3 1/1] fix #4234: add library functions " Thomas Skinner
2025-03-06 15:20 ` Mira Limbeck
2025-03-17 12:12 ` Fabian Grünbichler [this message]
2025-02-08 5:42 ` [pve-devel] [PATCH proxmox-openid v3 1/1] fix #4234: openid: add library functions for optional userinfo endpoint Thomas Skinner
2025-02-08 5:42 ` [pve-devel] [PATCH perl-rs v3 1/1] fix #4234: openid: adjust openid verification function for userinfo option Thomas Skinner
2025-03-06 15:23 ` Mira Limbeck
2025-03-06 15:15 ` [pve-devel] [PATCH SERIES access-control/docs/manager/perl-rs/proxmox-openid v3] Make OIDC userinfo endpoint optional Mira Limbeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1742213518.eiu0heftg2.astroid@yuna.none \
--to=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=thomas@atskinner.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal