]> git.proxmox.com Git - pve-access-control.git/commitdiff
openid: support configuring ACR values
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 18 Nov 2021 16:01:04 +0000 (17:01 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 19 Nov 2021 05:59:34 +0000 (06:59 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/API2/OpenId.pm
src/PVE/Auth/OpenId.pm

index 02fa2b52c2bac25b0daf00d4f2bf8d2e849b4ca0..03a7a04bb33ee7a4e4bc9787dc206d58400d5dfb 100644 (file)
@@ -41,6 +41,10 @@ my $lookup_openid_auth = sub {
     my $scopes = $config->{'scopes'} // 'email profile';
     $openid_config->{scopes} = [ PVE::Tools::split_list($scopes) ];
 
+    if (defined(my $acr = $config->{'acr-values'})) {
+       $openid_config->{acr_values} = [ PVE::Tools::split_list($acr) ];
+    }
+
     my $openid = PVE::RS::OpenId->discover($openid_config, $redirect_url);
     return ($config, $openid);
 };
index 0fbcde4428a3183d0d5f3517d4c176aa6391328f..56904e64e76d34230a20b5ea529d299bbdc47937 100755 (executable)
@@ -56,6 +56,12 @@ sub properties {
            default => "email profile",
            optional => 1,
        },
+       'acr-values' => {
+           description => "Specifies the Authentication Context Class Reference values that the"
+               ."Authorization Server is being requested to use for the Auth Request.",
+           type => 'string', # format => 'some-safe-id-list', # FIXME: TODO
+           optional => 1,
+       },
    };
 }
 
@@ -68,6 +74,7 @@ sub options {
        "username-claim" => { optional => 1, fixed => 1 },
        prompt => { optional => 1 },
        scopes => { optional => 1 },
+       "acr-values" => { optional => 1 },
        default => { optional => 1 },
        comment => { optional => 1 },
     };