LDAPIdentityProvider could support group queries using an attributes from the authenticating user other than DN #1533
Labels
enhancement
New feature or request
estimate/L
Estimated effort/complexity/risk is large
state/accepted
All done!
Is your feature request related to a problem? Please describe.
The group search capability of the Pinniped Supervisor's LDAPIdentityProvider CR could be more flexible.
For example, given an LDAP server in which users are defined like this:
And groups are defined like this:
Then I would like to be able to configure the LDAP group search query to compare the authenticating user's
uid
value to the group'smemberUid
attributes, e.g.(&(objectClass=posixGroup)(memberUid={}))
where Pinniped would automatically replace the{}
placeholder with the authenticating user'suid
value. However, currently the LDAPIdentityProvider will only replace the{}
placeholder with the user'sdn
(which is to enablemember={}
group searching). This is not currently configurable.Describe the solution you'd like
Some way to tell the LDAPIdentityProvider's spec which attribute of the authenticating user's record should be used to fill in the
{}
placeholder of the group search filter setting. When this new setting is not provided, then it should default to the old behavior of using thedn
to replace the placeholder to make it backwards compatible and to make sure that behavior does not change as the result of an upgrade to a version which includes this new feature.One possibility would be to add a new option
LDAPIdentityProvider.spec.groupSearch.userAttributeForFilter
.For example:
The same enhancement could be made to ActiveDirectoryIdentityProvider to maintain the symmetry between the configuration options of ActiveDirectoryIdentityProvider and LDAPIdentityProvider, which previously supported the exact same configuration options (with different defaults).
Describe alternatives you've considered
Also considered changing the filter syntax to allow the user to specify the name of the attribute inside the placeholder, e.g.
&(objectClass=posixGroup)(memberUid={uid})
. This allows a little more flexibility because multiple placeholders could be used to support replacing different user attributes into different parts of the filter. However, the practical usefulness for this seems limited and it adds extra complexity to the implementation.Are you considering submitting a PR for this feature?
Yes.
Notes
The existing group search settings are documented here.
The text was updated successfully, but these errors were encountered: