ManageIQ / manageiq

ManageIQ Open-Source Management Platform
https://manageiq.org
Apache License 2.0
1.35k stars 900 forks source link

CP4AIOPS-3113 Introduce configurable delimiter for LDAP group names #23139

Closed kbrock closed 1 week ago

kbrock commented 3 months ago

Overview

Auth Server Interface Delimiter
Liberty oicd ,
saml ;
ipa sssd :
ldap sssd :

Goal

Allow users to have a : in group names.

Since the group can come in with 3 possible delimiters, we treat :, ,, and ; as possible delimiters.

This works fine if groups do not have one of those characters in it.

Liberty uses a , as a delimiter and allows : in the group name. If a liberty server sends groups value of 'group1,people:fun,people:sad', we treat this as groups 'group1', 'people', 'fun', 'people', and 'sad'.

If a configuration references group1, then it works fine, but configuration that references people:fun will not find the group and not work as expected.

Solution

  1. Allow apache to pass the delimiter used to ruby.
  2. Allow the admin to override this delimiter in advanced settings.

The various configurations use different delimiters, so it makes sense to allow each of those configurations to specify the delimiter that is being used.

If an oidc server uses a different delimiter, then allow the admin to configure the correct delimiter in settings.

See Also

blocked:

dependent:

ref:

Next steps

We could change the configuration for LookupUserGroup and mod_auth_mellon to just use a , as a delimiter, but that felt like too much change.

kbrock commented 3 months ago

update:

kbrock commented 3 months ago

Updated:

kbrock commented 2 months ago

update:

Fryguy commented 2 months ago

I noticed you have a test that checks priority of config over header, however I don't see a test that shows the header working correctly without config. There are a few other tests I think needed.

kbrock commented 2 months ago

update:

miq-bot commented 1 week ago

Checked commits https://github.com/kbrock/manageiq/compare/e273f4c64df2abfa5e6da50b9d467ca56c6e7ba9~...c6766b81ec985bd55015805af84df24bea7df638 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint 3 files checked, 0 offenses detected Everything looks fine. :star:

Fryguy commented 1 week ago

Backported to radjabov in commit 8859562fce4177f65287669bbc61c1cb22800d04.

commit 8859562fce4177f65287669bbc61c1cb22800d04
Author: Jason Frey <fryguy9@gmail.com>
Date:   Tue Nov 19 15:41:30 2024 -0500

    Merge pull request #23139 from kbrock/CP4AIOPS-3113

    CP4AIOPS-3113 Introduce configurable delimiter for LDAP group names

    (cherry picked from commit e88fdc670a6c34788becabe1c096680d04c549b9)