From: Mira Limbeck <m.limbeck@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Thomas Skinner <thomas@atskinner.net>
Subject: [pve-devel] [PATCH v4 perl-rs] fix #4234: openid: adjust openid verification function for userinfo option
Date: Fri, 4 Apr 2025 16:07:17 +0200 [thread overview]
Message-ID: <20250404140717.289504-1-m.limbeck@proxmox.com> (raw)
In-Reply-To: <20250324033737.1347963-6-thomas@atskinner.net>
From: Thomas Skinner <thomas@atskinner.net>
Signed-off-by: Thomas Skinner <thomas@atskinner.net>
[ML: rebased on master, added code to common and pve-rs forwarding]
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
---
PMG uses the functions as well, depending on how perlmod handles
unspecified parameters, those callsites may need to be updated.
common/src/oidc/mod.rs | 7 ++++++-
pve-rs/src/openid/mod.rs | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/common/src/oidc/mod.rs b/common/src/oidc/mod.rs
index 29791bc..1b398d6 100644
--- a/common/src/oidc/mod.rs
+++ b/common/src/oidc/mod.rs
@@ -54,9 +54,14 @@ pub mod export {
#[try_from_ref] this: &OIDC,
code: &str,
private_auth_state: PrivateAuthState,
+ query_userinfo: Option<bool>,
) -> Result<Value, Error> {
let oidc = this.inner.lock().unwrap();
- let claims = oidc.verify_authorization_code_simple(code, &private_auth_state)?;
+ let claims = oidc.verify_authorization_code_simple_userinfo(
+ code,
+ &private_auth_state,
+ query_userinfo.unwrap_or(true),
+ )?;
Ok(to_value(&claims)?)
}
diff --git a/pve-rs/src/openid/mod.rs b/pve-rs/src/openid/mod.rs
index 2adb8bb..f18639c 100644
--- a/pve-rs/src/openid/mod.rs
+++ b/pve-rs/src/openid/mod.rs
@@ -41,7 +41,8 @@ mod export {
#[try_from_ref] this: &OpenId,
code: &str,
private_auth_state: PrivateAuthState,
+ query_userinfo: Option<bool>,
) -> Result<Value, Error> {
- common::verify_authorization_code(this, code, private_auth_state)
+ common::verify_authorization_code(this, code, private_auth_state, query_userinfo)
}
}
--
2.39.5
_______________________________________________
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-04-04 14:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-24 3:37 [pve-devel] [PATCH SERIES access-control/docs/manager/perl-rs/proxmox-openid v4] Make OIDC userinfo endpoint optional Thomas Skinner
2025-03-24 3:37 ` [pve-devel] [PATCH docs v4 1/1] fix #4234: add docs for openid optional userinfo request Thomas Skinner
2025-03-24 3:37 ` [pve-devel] [PATCH manager v4 1/1] fix #4234: add GUI option " Thomas Skinner
2025-03-24 3:37 ` [pve-devel] [PATCH access-control v4 1/1] fix #4234: add library functions " Thomas Skinner
2025-03-24 3:37 ` [pve-devel] [PATCH proxmox-openid v4 1/1] fix #4234: openid: add library functions for optional userinfo endpoint Thomas Skinner
2025-03-24 3:37 ` [pve-devel] [PATCH perl-rs v4 1/1] fix #4234: openid: adjust openid verification function for userinfo option Thomas Skinner
2025-03-31 10:38 ` Mira Limbeck
2025-04-04 14:07 ` Mira Limbeck [this message]
2025-04-04 14:08 ` [pve-devel] [PATCH SERIES access-control/docs/manager/perl-rs/proxmox-openid v4] Make OIDC userinfo endpoint optional Mira Limbeck
2025-04-04 14:32 ` [pve-devel] applied-series: " Fabian Grünbichler
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=20250404140717.289504-1-m.limbeck@proxmox.com \
--to=m.limbeck@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