This Question is Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
1 Replies Last post: Feb 23, 2013 12:13 AM by Marshall Gseit  
Marshall Gseit Newbie 13 posts since
Feb 15, 2013
Currently Being Moderated

Feb 22, 2013 4:00 AM

teamcity.users.login.capture causes IllegalArgumentException to be thrown

I'm trying to get TeamCity to accept logins from 2 domains, but store just the username.

E.g. logging in with AD\mary and DOMAIN\john would cause TeamCity to create 2 user accounts of mary and john.

 

I got it to work, but to me the solution isn't ideal.

 

# File:  ldap-config.properties

teamcity.users.login.capture=(?i).+\\\\(.+)

 

My question revolves around my first attempt, which was:

 

# File:  ldap-config.properties

teamcity.users.login.capture=(?i)AD\\\\(.+)|DOMAIN\\\\(.+)

 

I can login with AD\mary OK.  But, if I login with DOMAIN\john I get the following within teamcity-server.log:

 

[2013-02-21 18:49:32,102]   WARN -   jetbrains.buildServer.SERVER - Login for user "DOMAIN\john" failed: javax.security.auth.login.LoginException: java.lang.IllegalArgumentException: Argument 1 for @NotNull parameter of jetbrains/buildServer/serverSide/auth/ServerPrincipalEx.<init> must not be null
    at jetbrains.buildServer.serverSide.auth.ServerPrincipalEx.<init>(ServerPrincipalEx.java)
    at jetbrains.buildServer.serverSide.impl.auth.LDAPLoginModule.login(LDAPLoginModule.java:192)
    at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at javax.security.auth.login.LoginContext.invoke(Unknown Source)
    at javax.security.auth.login.LoginContext.access$000(Unknown Source)
    at javax.security.auth.login.LoginContext$5.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.login.LoginContext.invokeCreatorPriv(Unknown Source)
    at javax.security.auth.login.LoginContext.login(Unknown Source)
    at jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl$1.run(ServerLoginModelImpl.java:8)
    at jetbrains.buildServer.plugins.PluginSupportUtil.switchClassLoader(PluginSupportUtil.java:19)
    at jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl.tryToLogin(ServerLoginModelImpl.java:55)
    at jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl.doCheckCredentials(ServerLoginModelImpl.java:23)
    at jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl.checkPassword(ServerLoginModelImpl.java:69)
    at jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl.login(ServerLoginModelImpl.java:61)
    at jetbrains.buildServer.controllers.login.WebLoginModelImpl$2.compute(WebLoginModelImpl.java:2)
    at jetbrains.buildServer.controllers.login.WebLoginModelImpl$2.compute(WebLoginModelImpl.java)
    at jetbrains.buildServer.controllers.login.WebLoginModelImpl.doLogin(WebLoginModelImpl.java:45)
    at jetbrains.buildServer.controllers.login.WebLoginModelImpl.login(WebLoginModelImpl.java:70)
    at jetbrains.buildServer.controllers.login.WebLoginModelImpl.loginFromRequest(WebLoginModelImpl.java:101)
    at jetbrains.buildServer.controllers.login.LoginSubmitController.doPost(LoginSubmitController.java:20)
    at jetbrains.buildServer.controllers.BaseFormXmlController$1.handleRequest(BaseFormXmlController.java:54)
    at jetbrains.buildServer.controllers.AjaxRequestProcessor.processRequest(AjaxRequestProcessor.java:45)
    at jetbrains.buildServer.controllers.BaseFormXmlController.doHandle(BaseFormXmlController.java:52)
    at jetbrains.buildServer.controllers.BaseController.handleRequestInternal(BaseController.java:73)
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at jetbrains.buildServer.maintenance.TeamCityDispatcherServlet.service(TeamCityDispatcherServlet.java:31)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at jetbrains.buildServer.web.ParametersProviderCalculationContextFilter.doFilter(ParametersProviderCalculationContextFilter.java:7)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at jetbrains.buildServer.web.DisableSessionIdFromUrlFilter.doFilter(DisableSessionIdFromUrlFilter.java:0)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at jetbrains.buildServer.web.DiagnosticFilter.doFilter(DiagnosticFilter.java:56)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at jetbrains.buildServer.web.ResponseFragmentFilter.doFilter(ResponseFragmentFilter.java:19)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

 

I'm sure this is a regular expression issue; but I just can't see it.  Ugh, it's 7 PM.  Maybe it's time to go home and look at it tomorrow.

 

But, any help from the great folks here is much appreciated.

 

--

Marshall

More Like This

  • Retrieving data ...