[jcifs] NtlmHttpFilter: Error when trying to store the authentication...

Fabio Mazanatti Nunes Fabio.Nunes at nextel.com.br
Fri Apr 8 20:51:07 GMT 2005

Hi all,
I'm trying to optimize the NtlmHttpFilter process to a minimum, 'cause the only thing I need is to get the currently logged user, which is retrieved by the SmbSession.getChallenge().
So, when the
   NtlmSsp.authenticate( req, resp, challenge );
returns an actual object, it´s stored into the session:
   ssn.setAttribute("NtlmHttpAuth", ntlm);
The next time the filter is called, I try to retrieve the object from session, and, if it´s there, the 
   chain.doFilter( new NtlmHttpServletRequest( req, ntlm ), response );
is immediatly called.
Sometimes, the original code already do this, by trying to get the object from session when there´s no authentication data at all:
   if (ssn == null || (ntlm = (NtlmPasswordAuthentication) ssn.getAttribute("NtlmHttpAuth")) == null) {
My problem is: when there´s some authentication data at the header, and I load the ntlm variable from the session and call the chain, the response object is empty at the next Filter/Action/JSP!!!
Any ideas to make it work, or at least why it doesn't work?
When I do not try to retrieve from session myself, everything went OK, but the whole authentication protocol has to be done, causing a considerable overhead at the network - and that´s exactly the point I'm trying to tackle...
The web.xml configuration:

Thanks in advance,
Fabio Mazanatti

--Esta mensagem pode conter informações confidenciais e/ou privilegiadas. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não deve usar, copiar ou divulgar as informações nela contida ou tomar qualquer ação baseada nessas informações. O sistema de mensagens da Internet não é considerado seguro ou livre de erros. Esta empresa não se responsabiliza por opiniões ou declarações veiculadas através de e-mails.

--The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you.

Nextel Telecomunicações Ltda. - Segurança da Informação / Information Security

More information about the jcifs mailing list