public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Shannon Sterz <s.sterz@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pmg-api v5] fix #5076: auth: openid: add support for an optional "audiences" field
Date: Thu,  7 May 2026 13:10:57 +0200	[thread overview]
Message-ID: <20260507111058.146433-1-s.sterz@proxmox.com> (raw)
In-Reply-To: <20260423133548.349086-1-s.sterz@proxmox.com>

adds an optional "audiences" field to the open id configuration
schema. "audiences" is a list of additionally accepted audiences that
an open id provider may include.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 src/PMG/API2/OIDC.pm | 4 ++++
 src/PMG/Auth/OIDC.pm | 9 +++++++++
 2 files changed, 13 insertions(+)

diff --git a/src/PMG/API2/OIDC.pm b/src/PMG/API2/OIDC.pm
index 7ea8f8c..8cbfc98 100644
--- a/src/PMG/API2/OIDC.pm
+++ b/src/PMG/API2/OIDC.pm
@@ -46,6 +46,10 @@ my $lookup_oidc_auth = sub {
         $oidc_config->{acr_values} = [PVE::Tools::split_list($acr)];
     }
 
+    if (defined(my $audiences = $config->{'audiences'})) {
+	$openid_config->{audiences} = [PVE::Tools::split_list($audiences)];
+    }
+
     my $oidc = Proxmox::RS::OIDC->discover($oidc_config, $redirect_url);
     return ($config, $oidc);
 };
diff --git a/src/PMG/Auth/OIDC.pm b/src/PMG/Auth/OIDC.pm
index be57afb..993466e 100755
--- a/src/PMG/Auth/OIDC.pm
+++ b/src/PMG/Auth/OIDC.pm
@@ -129,6 +129,14 @@ sub properties {
             pattern => qr/^[a-zA-Z0-9._:-]+$/,
             optional => 1,
         },
+        'audiences' => {
+            description =>
+                "A list of audiences that the OpenID Issuer may include that are accepted in "
+                . "addition to 'client-id'.",
+            type => 'string', # format => 'some-safe-id-list', # FIXME: TODO
+            pattern => qr/^[a-zA-Z0-9._:-]+$/,
+            optional => 1,
+        },
     };
 }
 
@@ -144,6 +152,7 @@ sub options {
         prompt => { optional => 1 },
         scopes => { optional => 1 },
         'acr-values' => { optional => 1 },
+        audiences => { optional => 1 },
         default => { optional => 1 },
         comment => { optional => 1 },
     };
-- 
2.47.3





  parent reply	other threads:[~2026-05-07 11:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23 13:35 [PATCH many v5 0/8] fix #5076: add support for open id audiences Shannon Sterz
2026-04-23 13:35 ` [PATCH proxmox v5 1/8] fix #5076: openid: add logic to handle OIDC audiences Shannon Sterz
2026-04-23 13:35 ` [PATCH proxmox v5 2/8] fix #5076: pbs-api-types: add audiences to open id realm config Shannon Sterz
2026-04-23 13:35 ` [PATCH access-control v5 3/8] fix #5076: auth: open id: add an optional "audiences" field Shannon Sterz
2026-04-23 13:35 ` [PATCH manager v5 4/8] fix #5076: ui: dc: add an optional "audiences" field for open id realms Shannon Sterz
2026-04-23 13:35 ` [PATCH yew-comp v5 5/8] fix #5076: auth edit openid: add advanced "audiences" field Shannon Sterz
2026-04-23 13:35 ` [PATCH datacenter-manager v5 6/8] fix #5076: api-types/api: support audiences property for open id realms Shannon Sterz
2026-04-23 13:35 ` [PATCH proxmox-backup v5 7/8] fix #5076: api: " Shannon Sterz
2026-04-23 13:35 ` [PATCH widget-toolkit v5 8/8] fix #5076: ui: dc: add an optional "audiences" field " Shannon Sterz
2026-05-07  9:35 ` partially-applied: [PATCH many v5 0/8] fix #5076: add support for open id audiences Fabian Grünbichler
2026-05-07 11:11   ` Shannon Sterz
2026-05-07 11:10 ` Shannon Sterz [this message]
2026-05-07 11:10   ` [PATCH pmg-gui v5] fix #5076: auth edit open id: add an optional audiences field Shannon Sterz

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=20260507111058.146433-1-s.sterz@proxmox.com \
    --to=s.sterz@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /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