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

Possible to only sync specified LDAP groups? #34

Closed
Macleykun opened this issue Jan 4, 2023 · 5 comments
Closed

Possible to only sync specified LDAP groups? #34

Macleykun opened this issue Jan 4, 2023 · 5 comments
Labels
support A request for support

Comments

@Macleykun
Copy link
Contributor

Hello!
Thank you for writing this program, it’s a real life saver!
I do have one feature request;question.
Is it possible to specify which groups only can be synced? The structure I work with basically means I have to exclude every single group as we have lots in the same OU folder.
Smth like:
AllowedGroups: XYZ-GitLab-*
Which will only sync all groups that start with XYZ-GitLab-

I do hope it’s possible to add this functionality, I also worked out the Dockerfile more and will create a PR soon, once I’m happy with the whole setup.
I may want to include a update-ca-certificates so that SSL works between LDAP and GitLab.

@Macleykun
Copy link
Contributor Author

A different question i have is, is it possible to use this script with nested groups?
Like let's say i have ACCESS-GITLAB-1 group which the GITLAB-TEAM-A is member of.
In the GITLAB-TEAM-A there are users, could these users be then added in GitLab?

@Adambean
Copy link
Owner

Adambean commented Jan 5, 2023

If you just need to filter groups based on their name you could do this already by updating the LDIF query in the groupFilter setting.

This should satisfy the example you provided: (&(objectClass=groupOfUniqueNames)(cn=XYZ-GitLab-*))
It should also be possible to so multiple filters: (&(objectClass=groupOfUniqueNames)(|(cn=XYZ-GitLab-*)(cn=123-GitLab-*)))

Your directory back end would do the filtering. If your directory is quite large you may want to enable indexing to speed this up if it isn't on already.)

For your nested group query you probably want this: #17
(Not implemented in this project yet though one of the forks may have it.)

@Adambean Adambean added question Further information is requested support A request for support and removed question Further information is requested labels Jan 5, 2023
@Macleykun
Copy link
Contributor Author

Macleykun commented Jan 6, 2023

If you just need to filter groups based on their name you could do this already by updating the LDIF query in the groupFilter setting.

This should satisfy the example you provided: (&(objectClass=groupOfUniqueNames)(cn=XYZ-GitLab-*)) It should also be possible to so multiple filters: (&(objectClass=groupOfUniqueNames)(|(cn=XYZ-GitLab-*)(cn=123-GitLab-*)))

Your directory back end would do the filtering. If your directory is quite large you may want to enable indexing to speed this up if it isn't on already.)

For your nested group query you probably want this: #17 (Not implemented in this project yet though one of the forks may have it.)

thank you first of all! The groupfilter is going way better and filtering only on the groups i need cleaned the config file up alot!

It seems that @hvanscherpenzeel has implemented nested groups. I will try to fork his and make a docker container to test it out on my end.
9875254

I assume the following groupFilter would work for nesting?
(&(objectClass=groupOfUniqueNames)(memberof:1.2.840.113556.1.4.1941:=cn=XYZ-GitLab-*))
(assuming XYZ-GitLab has only a group member, which contains the users)

@Macleykun
Copy link
Contributor Author

(mentioned the wrong person)
@hvanscherpenzeel could you confirm if nested groups work on your end (and if the groupfilter i propose, would work with your fork?)

(and if i may be so rude to ask, would you consider sending a PR whenever to Adambean's repo?)

@Macleykun
Copy link
Contributor Author

i'll close this issue as adjusting the search function to only search for specific groups works!

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

No branches or pull requests

2 participants