This Question is Not Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
13 Replies Last post: May 23, 2013 11:34 PM by Helios Dev  
Helios Dev Newbie 17 posts since
Jul 21, 2011
Currently Being Moderated

Feb 15, 2013 2:38 PM

Timeout using basic LDAP login for users in a specific LDAP group

Hello,

 

we are trying to setup the basic LDAP login for users in a specific LDAP group. The AD structure looks like


 

Domain.Company.corp

-          APAC

o   City A

o  Users

o   City B

o  Users

-          EMEA

o   City C

o  Users

o   City D

o  Users

-          Americas

o   City E

o  Users

o   City F

o  Users

 

 

The teamcity.users.login.filter group contains users from the different regions. Now we tried to set the base group to the root domain in the following ways:

 

java.naming.provider.url=ldap://AD-Controller:389

teamcity.users.base=DC=Domain,DC=Company,DC=corp

 

or

 

java.naming.provider.url=ldap://AD-Controller:389/DC=Domain,DC=Company,DC=corp

teamcity.users.base=

 

However, in both cases we run into a connection timeout.

The base group contains around 15k users. The filtered users (the one that need to logon to TeamCity) are around 100.

Is there a way to increase the timeout using the above setup?

As, changes in the current AD structure are not possible, is there another way to load the users base which then gets filtered?

 

Regards,

Helios

Maxim Podkolzine JetBrains 226 posts since
Dec 17, 2008
Currently Being Moderated
Mar 20, 2013 4:24 PM in response to: Helios Dev
Re: Timeout using basic LDAP login for users in a specific LDAP group

Hi,

 

First of all, you can control the timeout for LDAP operations since Java 6: you can define the property

com.sun.jndi.ldap.read.timeout

(as described in http://docs.oracle.com/javase/tutorial/jndi/newstuff/readtimeout.html )

and TeamCity should fetch it.

 

Next, if you'd like to filter users by group membership, there is a way to include "memberof" in a filter (LDAP server support is required):

filter=(memberof=cn=Developers,ou=Groups,ou=Work)

 

If there are no so many users matching the filter, you shouldn't run into timeout.

 

 

--

Maxim

Maxim Podkolzine JetBrains 226 posts since
Dec 17, 2008
Currently Being Moderated
Apr 18, 2013 8:05 PM in response to: Helios Dev
Re: Timeout using basic LDAP login for users in a specific LDAP group

Hi,

 

What is your "java.naming.provider.url" and what is your "teamcity.users.base"?

 

 

 

--

Maxim

Maxim Podkolzine JetBrains 226 posts since
Dec 17, 2008
Currently Being Moderated
Apr 19, 2013 1:07 PM in response to: Helios Dev
Re: Timeout using basic LDAP login for users in a specific LDAP group

Hi,

 

So, you set:

java.naming.provider.url=ldap://AD-Controller:389/DC=Domain,DC=Company,DC=corp

teamcity.users.base=

 

and got a NameNotFoundException?

 

That seems very strange to me. I guess you wouldn't got a connection timeout error, as you wrote previously, because LDAP can't do any search by invalid path.

If that is so, please provide more details: logs with DEBUG, stacktraces (can do it in our issue tracker if you're concerned about privacy).

 

 

--

Maxim

Maxim Podkolzine JetBrains 226 posts since
Dec 17, 2008
Currently Being Moderated
Apr 19, 2013 4:56 PM in response to: Helios Dev
Re: Timeout using basic LDAP login for users in a specific LDAP group

Sorry, I don't understand what is the actual problem now and with what settings.

Please create an issue at http://youtrack.jetbrains.com/ and attach all relevant data.

 

 

--

Maxim

Maxim Podkolzine JetBrains 226 posts since
Dec 17, 2008
Currently Being Moderated
Apr 29, 2013 5:15 PM in response to: Helios Dev
Re: Timeout using basic LDAP login for users in a specific LDAP group

Hi,

 

The search is always recursive. I didn't look at the thread you posted, but we have verified that and LDAP plugin is used in many big companies (where recursive search is a must).

If you turn on DEBUG logging, you should see the line like "Performing search in LDAP: ... scope=<value>...". If scope is 2, it means subtree scope.

Do you see it?

 

 

--

Maxim

Maxim Podkolzine JetBrains 226 posts since
Dec 17, 2008
Currently Being Moderated
Apr 29, 2013 5:28 PM in response to: Helios Dev
Re: Timeout using basic LDAP login for users in a specific LDAP group

OK. Why do you think it wasn't working?

More Like This

  • Retrieving data ...