-
Notifications
You must be signed in to change notification settings - Fork 5.8k
ldap filters #2497
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
ldap filters #2497
Conversation
good idea |
@@ -48,6 +48,8 @@ ldap: | |||
base: '_the_base_where_you_search_for_users' | |||
port: 636 | |||
uid: 'sAMAccountName' | |||
## or use a filter | |||
## filter: '(&(uid=%{username})(memberOf=cn=gitlab,ou=groups,dc=mydomain))' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please make this match the style of the rest of the config options?
Thank you so much for this! |
You most welcome, thought all the credit goes to the original creator of the patch for the omniauth-ldap |
PR #3046 implements option forwarding in non hardcoded way, which implements changes done in |
@jacobvosmaer Isn't LDAP filtering implemented in GitLab 6.1 Enterprise? |
https://github.com/gitlabhq/gitlabhq/issues/439 |
What's happening? |
I'm trying to configure ldap auth filter from my gitlab. Could not authorize you from LDAP because "Invalid credentials". My configuration file looks looks like this. filter: '(&(uid=%{username})(memberOf=CN=jira-administrators,OU=Jira-Confluence,OU=GPR,DC=domain,DC=ru))' Without filter authentication succeeds. Could you help me? (memberOf=CN=jira-administrators,OU=Jira-Confluence,OU=GPR,DC=domain,DC=ru) - I am sure that this part is completely true |
If I am not mistaken, there should be 2 tabs for authentication... 1 tab for GitLab and another tab for LDAP. Make sure that you are trying to authenticate via the ldap. Also, which username are you using to authenticate? I have also replied to you on my blog at the link you have provided. I was basically asking you what you are putting in the 'LDAP Login' field. |
Yes, ldap tab. |
have you looked at the logs? See if there's anything relevant there... |
application.log is empty. Only production.log written when you try to login Started POST "/users/auth/ldap/callback" for 127.0.0.1 at 2013-10-07 15:06:31 +0400 Processing by OmniauthCallbacksController#failure as HTML where the error? |
this is what I'm getting when logging in with a bad user:
and a good user:
also, just to make sure, your configuration between jira and gitlab is identical (as far as connection string and filter is concerned), right? |
settings are not the same. can the problem is that a user can belong to several groups samaccountname : r.krankus |
I don't think that filters depend on the language (java, ruby). Try using same filter in gitlab as you are using in jira. Then if that works, add more constraints. |
it's dosn't work. |
I am sorry, my knowledge of LDAP is not anywhere near good, so I am afraid that I can't help you. |
Didn't see this mentioned yet. For anyone else wondering if this is getting worked on. |
This pull request has been closed because a request for more information has not been reacted to for more than 2 weeks. If you respond and conform to the pull request guidelines in our contributing guidelines we will reopen this pull request. /cc @dosire |
This pull request will enable filter queries against ldap which is particularly useful when you have a big ldap directory and want to give access only to a subset of your users to your gitlab instance.
This pull request will enable this feature/functionality after this pull (gitlabhq/omniauth-ldap#3) request is merged in.
Details of mentioned pull request:
Please note that this pull request was migrated from omniauth-ldap project pull request 22 which was developed and authored by sdeframond and can be accessed at this link: intridea#22