[jcifs] Fw: Authentication module

Гуревич Андрей a_gurevich at protek.ru
Thu Dec 4 10:42:54 GMT 2008


> Hi!
> I`ve got the same problem with jcifs 1.3.0 and 1.3.1.
> With jcifs 1.2.5 web app works almost fine - after some users get 
> autentificated, others had to sing their domain login&password 3 times, 
> after that they don`t get autentificated, in log files i get this type of 
> messages:
>
> 1) NtlmHttpFilter: <webserver_name>\<username>: 0xC000006D: 
> jcifs.smb.SmbAuthException: Logon failure: unknown user name or bad 
> password.
> 2) NtlmHttpFilter: <webserver_name>\<username>: 0xC0000022: 
> jcifs.smb.SmbAuthException: Access is denied.
> 3) NtlmHttpFilter: <domain_name>\<username>: 0xC0000022: 
> jcifs.smb.SmbAuthException: Access is denied.
>
> Any ideas?
>
> Error with 1.3.1 looks like that:
> java.lang.ArrayIndexOutOfBoundsException
> java.lang.System.arraycopy(Native Method)
> jcifs.ntlmssp.Type2Message.toByteArray(Type2Message.java:261)
> jcifs.http.NtlmSsp.authenticate(NtlmSsp.java:90)
> jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:167)
> jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:121)
>
>
>
>
> Kotapally, Srini wrote:
>>
>> Hi all,
>>
>> I am trying to implement jcifs to authentication for one of my webapps.
>> I have setup a test environment on my PC where I am troubleshooting this
>> issue.  What I have done is as follow.  I have a webapp (the example app
>> from the tomcat dev, and I have configured it as described in the jcifs
>> documentation.  I keep getting a arrayindexoutofboundsexception.
>> Essentially I want tomcat to authenticate against our Active Directory
>> and then pass the user ID in the header to the webapp (I may need to do
>> this through some java code, but I want the basic setup to work first).
>> Can you please advise where I am going wrong?
>>
>> I am using tomcat 5.5.9 and jcifs 1.3.1 (latest) running on java
>> j2sdk1.4.2_13.  Here is my web.xml:
>>
>>     <filter>
>>         <filter-name>NtlmHttpFilter</filter-name>
>>         <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
>>         <init-param>
>>             <description>Log Level</description>
>>             <param-name>jcifs.util.loglevel</param-name>
>>             <param-value>10</param-value>
>>         </init-param>
>>         <init-param>
>>             <param-name>jcifs.smb.client.domain</param-name>
>>             <param-value>MYDOMAIN</param-value>
>>         </init-param>
>>         <init-param>
>>             <param-name>jcifs.http.domainController</param-name>
>>             <param-value>domaincontroller.mydomain.com</param-value>
>>         </init-param>
>>         <init-param>
>>             <param-name>jcifs.resolveOrder</param-name>
>>             <param-value>DNS</param-value>
>>         </init-param>
>>         <init-param>
>>             <description>userName</description>
>>             <param-name>jcifs.smb.client.username</param-name>
>>             <param-value>username</param-value>
>>         </init-param>
>>         <init-param>
>>             <description>password</description>
>>             <param-name>jcifs.smb.client.password</param-name>
>>             <param-value>password</param-value>
>>         </init-param>
>>         </filter>
>>     <filter-mapping>
>>         <filter-name>NtlmHttpFilter</filter-name>
>>         <servlet-name>CheckNtlm</servlet-name>
>>         <dispatcher>REQUEST</dispatcher>
>>         <dispatcher>FORWARD</dispatcher>
>>         <dispatcher>INCLUDE</dispatcher>
>>         <dispatcher>ERROR</dispatcher>
>>     </filter-mapping>
>>
>>
>>
>>
>> Error:
>> java.lang.ArrayIndexOutOfBoundsException
>> at java.lang.System.arraycopy(Native Method)
>> at jcifs.ntlmssp.Type2Message.toByteArray(Type2Message.java:261)
>> at jcifs.http.NtlmSsp.authenticate(NtlmSsp.java:90)
>> at jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:166)
>> at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:120)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
>> tionFilterChain.java:202)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>> erChain.java:173)
>> at filters.RRFilter.doFilter(RRFilter.java:163)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
>> tionFilterChain.java:202)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>> erChain.java:173)
>> at
>> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
>> lter.java:362)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
>> tionFilterChain.java:202)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>> erChain.java:173)
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
>> e.java:213)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
>> e.java:178)
>> at
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
>> Base.java:482)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
>> :126)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
>> :105)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
>> java:107)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
>> 48)
>> at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
>> 6)
>> at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
>> onnection(Http11Protocol.java:744)
>> at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
>> .java:527)
>> at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
>> erWorkerThread.java:80)
>> at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
>> .java:684)
>> at java.lang.Thread.run(Thread.java:534)
>>
>>
>> Regards,
>>
>> Srini
>>
>>
> Quoted from:
> http://www.nabble.com/Authentication-module-tp20802066p20802066.html
> 




More information about the jcifs mailing list