directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu" <akaras...@apache.org>
Subject Re: [ApacheDS] SASL Branch
Date Wed, 09 May 2007 14:05:28 GMT
On 5/9/07, Enrique Rodriguez <enriquer9@gmail.com> wrote:
>
> On 5/8/07, Alex Karasulu <akarasulu@apache.org> wrote:
> > I started to take a look at the sasl branch so you can merge it into the
> > trunk however
> > it seems the SaslBindTest fails for some reason.
>
> Test log would be helpful but I suspect it is the Kerberos port
> binding issue I mentioned, namely that the JDK Kerberos client doesn't
> allow you to specify port in code, so it will default to the Kerberos
> port, 88, which requires root to bind.


That's going to present a problem for us.  We cannot perform this test if it
has to run as root:
those checking out the code to build the server and test the server are not
going to want to
have to run as root to make the tests pass.  You can imagine the problems
this will cause us.
Is there no other way?  I'd hate to disable the test overall since it's
great to have if we wind
up breaking the SASL mechanism with changes.

BTW I just ran this test again not as root tho and it passed this time but
produced
the following stack trace on the command line.  I guess you're dumping the
trace
in your test case out to stderr.  We might not want to do that.

Running org.apache.directory.server.SaslBindTest
javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid
response]
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:2985)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2732)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2646)
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java
:175)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java
:193)
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(
LdapCtxFactory.java:136)
        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(
LdapCtxFactory.java:66)
        at javax.naming.spi.NamingManager.getInitialContext(
NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java
:247)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at javax.naming.directory.InitialDirContext.<init>(
InitialDirContext.java:82)
        at
org.apache.directory.server.SaslBindTest.testSaslCramMd5BindBadPassword(
SaslBindTest.java:499)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
JUnitTestSet.java:213)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(
AbstractDirectoryTestSuite.java:138)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
AbstractDirectoryTestSuite.java:163)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:84)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
SurefireBooter.java:244)
        at org.apache.maven.surefire.booter.SurefireBooter.main(
SurefireBooter.java:814)

I ran this test using the following command within the server-unit directory
of the sasl branch:

      mvn -Dintegration -Dtest=SaslBindTest test

So it turns out that you were right.  This SaslBindTest just blows the stack
but does not fail it's the
SaslGssapiBindTest that does fail.  I have included the surefire report for
this test below just in
case even though we know the problem is due to permissions for binding on
port 88:

-------------------------------------------------------------------------------
Test set: org.apache.directory.server.SaslGssapiBindTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 95.495 sec
<<< FAILURE!
testSaslGssapiBind(org.apache.directory.server.SaslGssapiBindTest)  Time
elapsed: 95.436 sec  <<< FAILURE!
junit.framework.AssertionFailedError: Authentication failed:  Receive timed
out
        at junit.framework.Assert.fail(Assert.java:47)
        at org.apache.directory.server.SaslGssapiBindTest.testSaslGssapiBind
(SaslGssapiBindTest.java:246)
        at org.apache.directory.server.SaslGssapiBindTest.testSaslGssapiBind
(SaslGssapiBindTest.java:246)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
JUnitTestSet.java:213)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(
AbstractDirectoryTestSuite.java:138)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
AbstractDirectoryTestSuite.java:163)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:84)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
SurefireBooter.java:244)
        at org.apache.maven.surefire.booter.SurefireBooter.main(
SurefireBooter.java:814)

I just ran the tests OK ... as root.


Yep the test does run ok as root for me as well.   BTW as non-root when I
run just that test
using the -Dtest=SaslGssapiBindTest  parameter to maven the test hangs for
me.

SNIP ...


> Looks like Christine moved it to 1.0?  Did you guys discuss
> backporting this at AC EU?  I was expecting this to go into 1.5.1.
>
> Direct SASL page:
>
> http://cwiki.apache.org/confluence/display/DIRxSRVx10/SASL+Authentication+to+ApacheDS
>
> 1.0 AUG:
>
> http://cwiki.apache.org/confluence/display/DIRxSRVx10/ApacheDS+v1.0+Advanced+User%27s+Guide



Hmmm yeah that's probably why I could not find it.  I guess it should be
moved back
into the 1.5 area.  Christine is this possible.

Enrique, we have to find some work around for this failing test and quiet
down the one
that spits out the stack trace.  Perhaps you can come up with some
recommendations.

Alex

Mime
View raw message