Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to prefix retrieved by gitlab groups #1572

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hightoxicity
Copy link

We have dex configured to connect to both AD and gitlab and acting as an OIDC for kubernetes, retrieved groups are used in RBAC...
Since users in gitlab can create groups, they are able to create a group in gitlab with the same name as the admin group in AD and benefit of a privileged escalation that way.

Letting us configure a group prefix for gitlab prevent them to do that.

Thx.

@sagikazarmark
Copy link
Member

Shouldn't this be a provider independent configuration instead? I mean, adding features like this to a single provider feels a bit weird.

My 2 cents.

@jfrabaute
Copy link
Contributor

I'm working on a similar feature for google groups as well.
Do we want to provide a regexp for filtering, so filtering can be done in a more powerful way?

(I haven't checked yet how to make this feature generic across provider, or if it's even possible)

@sagikazarmark
Copy link
Member

(I haven't checked yet how to make this feature generic across provider, or if it's even possible)

That's exactly what we plan to do, but still looking for the best options.

@jfrabaute
Copy link
Contributor

From the current code, ConnectorConfig is an interface, and the structs are per connector. It seems to make sense to have the "FilterGroup" field per connector and filter in each connector.
A helper function could help to share some code maybe, but as a first iteration, I'll probably go with implementing this only for the google connector.
In the long term, if this becomes common to a lot of connector, then something more fancy, like having a base Config object shared between connectors (using embedding) with a shared function could be implemented, or something similar, but it seems overkill for just one or two cases so far.

@jfrabaute
Copy link
Contributor

Corresponding commit for the filtering on the google connector: jfrabaute@498f19e

@sagikazarmark
Copy link
Member

I've just opened the issue for the common middleware layer: #1635

Personally, I'm against merging any more PRs adding per connector features. Would be nice to make this a top priority though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants