tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@gmail.com>
Subject Re: Tomcat Servlet Filters (or Valves) and OpenEJB
Date Fri, 22 Jul 2011 07:49:27 GMT

On Jul 22, 2011, at 12:28 AM, rnieto wrote:

> I've implemented a Valve which just converts the SpNegoHttpFilter into a
> class that extends ValveBase instead. Then I did declare it on the same
> level as the RequestDumper Valve (on server.xml), and now it works! I'm
> seeing on the request dumps that the invocation of the web-service now has
> authentication info in it.

That's really excellent!!  I'm also under a deadline (speaking at OSCON on Monday), but about
to dig out the 3.1.4 code and prose a hack to get you a hook into the code so you could extend
that part of the system.

The valve approach is better :)  Perhaps not as cool as filters, but they get the job done.

> Though, I wouldn't really recommend this due to two things:
> - Tomcat is deprecating Valves in Tomcat 7, and people seem to want/advise
> using Filters instead.
> - It's literally authenticating every request (I'd just need to add a
> configuration parameter).
> 
> I won't be able to upload the source as it was just about getting the spnego
> source, reading the SpnegoHttpFilter and converting it into some class that
> extends ValveBase instead. (It would take just about 5~10 minutes to do
> that)

Spnego appears to be GPL so we couldn't take it anyway.  But you could certainly contribute
it back to Spnego.

Anyway, wonderful to hear it's working.  We'll definitely fix up the WS context thing on our
end.  The WS Servlets we create should go right into the app where they came from.

-David


Mime
View raw message