Skip to content

add support for ldap referral chasing#87

Closed
timmjd wants to merge 1 commit into
github:masterfrom
timmjd:master
Closed

add support for ldap referral chasing#87
timmjd wants to merge 1 commit into
github:masterfrom
timmjd:master

Conversation

@timmjd

@timmjd timmjd commented Oct 16, 2015

Copy link
Copy Markdown

Add search_referrals flag to Net::LDAP calls, filter out search_referrals and query the returned server with the same credentials & settings like the initial one. Result is a merged list with the result of all servers.

@jch

jch commented Oct 21, 2015

Copy link
Copy Markdown
Contributor

@timmjd thanks for this PR. We'll need to figure out a way to test this before merging.

@timmjd

timmjd commented Oct 22, 2015

Copy link
Copy Markdown
Author

Patch a demo instance, sadly not as as easy as expected: Searching for a group performed by the team sync will fail due to the the search() within domain.rb will call the base search with the following options:

{:size=>1, :scope=>0, :attributes=>[], :base=>"foobar", :paged_searches_supported=>true}

where base is the LDAP group that was queried. So base seems to be in any case required to be a valid base like DC=foobar, DC=com.

So the way on how to search for groups also needs to be modified:

github-ldap-1.8.1/lib/github/ldap/instrumentation.rb:19:in `block in instrument',
activesupport-3.2.21.github6/lib/active_support/notifications.rb:123:in `block in instrument',
activesupport-3.2.21.github6/lib/active_support/notifications/instrumenter.rb:20:in `instrument',
activesupport-3.2.21.github6/lib/active_support/notifications.rb:123:in `instrument',
github-ldap-1.8.1/lib/github/ldap/instrumentation.rb:18:in `instrument',
github-ldap-1.8.1/lib/github/ldap.rb:184:in `search',
github-ldap-1.8.1/lib/github/ldap/domain.rb:160:in `search',
github-ldap-1.8.1/lib/github/ldap/domain.rb:170:in `bind',

lib/github/ldap/search.rb:38:in `find_group',
app/models/team/editor.rb:38:in `update',
app/models/team/editor.rb:9:in `update_team',

@timmjd timmjd closed this Apr 17, 2016
davesims pushed a commit that referenced this pull request Jul 12, 2016
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.

2 participants