* Re: [pve-devel] [PATCH SERIES openid/access-control/docs/manager] fix #4411: add support for openid groups
[not found] <mailman.204.1731508602.391.pve-devel@lists.proxmox.com>
@ 2024-12-12 5:50 ` Thomas Skinner
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Skinner @ 2024-12-12 5:50 UTC (permalink / raw)
To: m.limbeck; +Cc: Proxmox VE development discussion
> It seemed to work reliably once Keycloak was configured correctly. One
> thing that was confusing, even with `Overwrite Groups` no groups are set
> if they aren't already configured on the PVE cluster.
This is by design (and mentioned in docs patch) to prevent an
arbitrary number of groups being created in the event there are other
groups in the claim that do not exist in PVE (e.g. imagine every group
for a large directory service is included in the claim but not all of
them apply to PVE). There could be an option added to auto-create
groups (maybe default disabled) to allow users to have this
capability, too.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pve-devel] [PATCH SERIES openid/access-control/docs/manager] fix #4411: add support for openid groups
@ 2024-09-01 16:55 Thomas Skinner
2024-10-03 1:45 ` Thomas Skinner
2024-11-13 14:08 ` Mira Limbeck
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Skinner @ 2024-09-01 16:55 UTC (permalink / raw)
To: pve-devel; +Cc: Thomas Skinner
This patch series adds support for groups for OpenID logins.
The following options are implemented:
- Configurable claim for retrieving a list of groups and adding them to the
user in PVE
- Allowing "synchronization" of groups on login by overriding groups assigned
to the user in PVE (this option is off by default)
- Replacing invalid characters in group names with a configurable valid characters
(by default, this is an underscore '_')
The logic implemented by this patch expects the groups claim in the ID token/userinfo
endpoint to send a list of groups.
This patch also adds support for using additional claims from the OpenID provider
by exposing all additional claims and their values from the ID token (previously
only available for the userinfo endpoint). This is necessary for OpenID providers
that do not support additional information in the userinfo endpoint.
proxmox/proxmox-openid:
Thomas Skinner (1):
fix #4411: openid: add library code for openid groups support
proxmox-openid/src/lib.rs | 55 +++++++++++++++++++++++++++++++++------
1 file changed, 47 insertions(+), 8 deletions(-)
pve-access-control:
Thomas Skinner (1):
fix #4411: openid: add logic for openid groups support
src/PVE/API2/OpenId.pm | 32 ++++++++++++++++++++++++++++++++
src/PVE/Auth/OpenId.pm | 21 +++++++++++++++++++++
2 files changed, 53 insertions(+)
pve-docs:
Thomas Skinner (1):
fix #4411: openid: add docs for openid groups support
api-viewer/apidata.js | 40 ++++++++++++++++++++++++++++++++++++++++
pveum.adoc | 32 ++++++++++++++++++++++++++++++++
2 files changed, 72 insertions(+)
pve-manager:
Thomas Skinner (1):
fix #4411: openid: add ui config for openid groups support
www/manager6/dc/AuthEditOpenId.js | 35 ++++++++++++++++++++++++++++---
1 file changed, 32 insertions(+), 3 deletions(-)
--
2.39.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [pve-devel] [PATCH SERIES openid/access-control/docs/manager] fix #4411: add support for openid groups
2024-09-01 16:55 Thomas Skinner
@ 2024-10-03 1:45 ` Thomas Skinner
2024-10-06 17:27 ` DERUMIER, Alexandre via pve-devel
2024-11-13 14:08 ` Mira Limbeck
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Skinner @ 2024-10-03 1:45 UTC (permalink / raw)
To: pve-devel
This is still applicable to the latest master for the referenced
repositories. Any movement?
On Sun, Sep 1, 2024, 11:55 AM Thomas Skinner <thomas@atskinner.net> wrote:
> This patch series adds support for groups for OpenID logins.
>
> The following options are implemented:
> - Configurable claim for retrieving a list of groups and adding them to
> the
> user in PVE
> - Allowing "synchronization" of groups on login by overriding groups
> assigned
> to the user in PVE (this option is off by default)
> - Replacing invalid characters in group names with a configurable valid
> characters
> (by default, this is an underscore '_')
>
> The logic implemented by this patch expects the groups claim in the ID
> token/userinfo
> endpoint to send a list of groups.
>
> This patch also adds support for using additional claims from the OpenID
> provider
> by exposing all additional claims and their values from the ID token
> (previously
> only available for the userinfo endpoint). This is necessary for OpenID
> providers
> that do not support additional information in the userinfo endpoint.
>
>
> proxmox/proxmox-openid:
>
> Thomas Skinner (1):
> fix #4411: openid: add library code for openid groups support
>
> proxmox-openid/src/lib.rs | 55 +++++++++++++++++++++++++++++++++------
> 1 file changed, 47 insertions(+), 8 deletions(-)
>
>
> pve-access-control:
>
> Thomas Skinner (1):
> fix #4411: openid: add logic for openid groups support
>
> src/PVE/API2/OpenId.pm | 32 ++++++++++++++++++++++++++++++++
> src/PVE/Auth/OpenId.pm | 21 +++++++++++++++++++++
> 2 files changed, 53 insertions(+)
>
>
> pve-docs:
>
> Thomas Skinner (1):
> fix #4411: openid: add docs for openid groups support
>
> api-viewer/apidata.js | 40 ++++++++++++++++++++++++++++++++++++++++
> pveum.adoc | 32 ++++++++++++++++++++++++++++++++
> 2 files changed, 72 insertions(+)
>
>
> pve-manager:
>
> Thomas Skinner (1):
> fix #4411: openid: add ui config for openid groups support
>
> www/manager6/dc/AuthEditOpenId.js | 35 ++++++++++++++++++++++++++++---
> 1 file changed, 32 insertions(+), 3 deletions(-)
>
> --
> 2.39.2
>
>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [pve-devel] [PATCH SERIES openid/access-control/docs/manager] fix #4411: add support for openid groups
2024-10-03 1:45 ` Thomas Skinner
@ 2024-10-06 17:27 ` DERUMIER, Alexandre via pve-devel
0 siblings, 0 replies; 5+ messages in thread
From: DERUMIER, Alexandre via pve-devel @ 2024-10-06 17:27 UTC (permalink / raw)
To: pve-devel; +Cc: DERUMIER, Alexandre
[-- Attachment #1: Type: message/rfc822, Size: 16672 bytes --]
From: "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>
To: "pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH SERIES openid/access-control/docs/manager] fix #4411: add support for openid groups
Date: Sun, 6 Oct 2024 17:27:57 +0000
Message-ID: <1c15fbd6029c9b9f85c3da9dd00f885908d3885f.camel@groupe-cyllene.com>
Looking for this feature too for my production :)
-------- Message initial --------
De: Thomas Skinner <thomas@atskinner.net>
Répondre à: Proxmox VE development discussion <pve-
devel@lists.proxmox.com>
À: pve-devel@lists.proxmox.com
Objet: Re: [pve-devel] [PATCH SERIES openid/access-
control/docs/manager] fix #4411: add support for openid groups
Date: 03/10/2024 03:45:15
This is still applicable to the latest master for the referenced
repositories. Any movement?
On Sun, Sep 1, 2024, 11:55 AM Thomas Skinner <thomas@atskinner.net>
wrote:
> This patch series adds support for groups for OpenID logins.
>
> The following options are implemented:
> - Configurable claim for retrieving a list of groups and adding
> them to
> the
> user in PVE
> - Allowing "synchronization" of groups on login by overriding
> groups
> assigned
> to the user in PVE (this option is off by default)
> - Replacing invalid characters in group names with a configurable
> valid
> characters
> (by default, this is an underscore '_')
>
> The logic implemented by this patch expects the groups claim in the
> ID
> token/userinfo
> endpoint to send a list of groups.
>
> This patch also adds support for using additional claims from the
> OpenID
> provider
> by exposing all additional claims and their values from the ID token
> (previously
> only available for the userinfo endpoint). This is necessary for
> OpenID
> providers
> that do not support additional information in the userinfo endpoint.
>
>
> proxmox/proxmox-openid:
>
> Thomas Skinner (1):
> fix #4411: openid: add library code for openid groups support
>
> proxmox-openid/src/lib.rs | 55 +++++++++++++++++++++++++++++++++----
> --
> 1 file changed, 47 insertions(+), 8 deletions(-)
>
>
> pve-access-control:
>
> Thomas Skinner (1):
> fix #4411: openid: add logic for openid groups support
>
> src/PVE/API2/OpenId.pm | 32 ++++++++++++++++++++++++++++++++
> src/PVE/Auth/OpenId.pm | 21 +++++++++++++++++++++
> 2 files changed, 53 insertions(+)
>
>
> pve-docs:
>
> Thomas Skinner (1):
> fix #4411: openid: add docs for openid groups support
>
> api-viewer/apidata.js | 40 ++++++++++++++++++++++++++++++++++++++++
> pveum.adoc | 32 ++++++++++++++++++++++++++++++++
> 2 files changed, 72 insertions(+)
>
>
> pve-manager:
>
> Thomas Skinner (1):
> fix #4411: openid: add ui config for openid groups support
>
> www/manager6/dc/AuthEditOpenId.js | 35 ++++++++++++++++++++++++++++-
> --
> 1 file changed, 32 insertions(+), 3 deletions(-)
>
> --
> 2.39.2
>
>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://antiphishing.vadesecure.com/v4?f=c2xMdVN4Smh2R2tOZDdIRKCk7WEocH
pTPMerT1Q-
Aq5qwr8l2xvAWuOGvFsV3frp2oSAgxNUQCpJDHp2iUmTWg&i=d1l4NXNNaWE4SWZqU0dLWe
iyW515SOU2RVoj_9OQ7Ew&k=fjzS&r=MXJUa0FrUVJqc1UwYWxNZ-
tmXdGQOM0bQR6kYEgvrmGZrgAumkB5XEgd10kSzvIx&s=8cd24c2f90b250765f2ceb8891
4e45da75f5223e1030847b6919a9863d0e2f09&u=https%3A%2F%2Flists.proxmox.co
m%2Fcgi-bin%2Fmailman%2Flistinfo%2Fpve-devel
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [pve-devel] [PATCH SERIES openid/access-control/docs/manager] fix #4411: add support for openid groups
2024-09-01 16:55 Thomas Skinner
2024-10-03 1:45 ` Thomas Skinner
@ 2024-11-13 14:08 ` Mira Limbeck
1 sibling, 0 replies; 5+ messages in thread
From: Mira Limbeck @ 2024-11-13 14:08 UTC (permalink / raw)
To: pve-devel
On 9/1/24 18:55, Thomas Skinner wrote:
> This patch series adds support for groups for OpenID logins.
>
> The following options are implemented:
> - Configurable claim for retrieving a list of groups and adding them to the
> user in PVE
> - Allowing "synchronization" of groups on login by overriding groups assigned
> to the user in PVE (this option is off by default)
> - Replacing invalid characters in group names with a configurable valid characters
> (by default, this is an underscore '_')
>
> The logic implemented by this patch expects the groups claim in the ID token/userinfo
> endpoint to send a list of groups.
>
> This patch also adds support for using additional claims from the OpenID provider
> by exposing all additional claims and their values from the ID token (previously
> only available for the userinfo endpoint). This is necessary for OpenID providers
> that do not support additional information in the userinfo endpoint.
I did a small test of this patch series with a Keycloak 17 as provider.
For the test I added a `Client Scope` in the realm with the predefined
mapper `groups'. The user info can then be checked under Realm -> Client
Scope -> Evaluate -> (select user, evaluate) -> Generated User Info
Tests done:
1)
* no groups defined in PVE
* realm configured with:
- Groups Claim: `groups`
- Overwrite Groups: true
* user in keycloak configured with groups: group1, group2, group3
* login with user
* no groups created and/or assigned to the user (missing 3 groups)
2)
* group1 defined in PVE
* realm configured with:
- Groups Claim: `groups`
- Overwrite Groups: true
* user in keycloak configured with groups: group1, group2, group3
* login with user
* user was assigned the group1 (missing 2 others)
3)
* group2 defined in PVE
* realm configured with:
- Groups Claim: `groups`
- Overwrite Groups: true
* user in keycloak configured with groups: group1, group2, group3
* login with user
* group was switched from group1 to group2
4)
* group1, group2 defined in PVE
* realm configured with:
- Groups Claim: `groups`
- Overwrite Groups: false
* user in keycloak configured with groups: group1, group3
* login with user
* group1 was added, group2 was kept
5)
* group1, group2 defined in PVE
* realm configured with:
- Groups Claim: none (default)
- Overwrite Groups: <any>
* user in keycloak configured with groups: group1, group2, group3
* login with user
* no changes
It seemed to work reliably once Keycloak was configured correctly. One
thing that was confusing, even with `Overwrite Groups` no groups are set
if they aren't already configured on the PVE cluster.
I haven't tested the character replacement yet.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-12 5:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <mailman.204.1731508602.391.pve-devel@lists.proxmox.com>
2024-12-12 5:50 ` [pve-devel] [PATCH SERIES openid/access-control/docs/manager] fix #4411: add support for openid groups Thomas Skinner
2024-09-01 16:55 Thomas Skinner
2024-10-03 1:45 ` Thomas Skinner
2024-10-06 17:27 ` DERUMIER, Alexandre via pve-devel
2024-11-13 14:08 ` Mira Limbeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox