users@grizzly.java.net

Grizzly 2.x and Basic auth. and Filters

From: Gay David (Annecy) <"Gay>
Date: Mon, 5 Sep 2011 11:51:36 +0000

Hi all,

I'm looking for the good way to add authentication support in Grizzly 2.x
I want to support Basic and Kerberos.

I don't know if there is today an already build-in mechanism in Grizzly 2.x ?

But as far as I understand, it seems to me that Grizzly Filters is the good way to implements that because :
* I need to check the auth before going into the HttpHandler
* I don't want that the various HttpHandler to known and implements anything about authentication
* I want to be able to add new auth. system if needed, without modifying my HttpHandlers

Does it make sense to use filter for authentication ?

I'm also very interesting in Grizzly filters for various reasons, mostly because it could allow me to add side features without putting these in the HttpHandler (auditing, logging, performance, reject request if not in a ip range, etc.). I've also see an AddOn interface that seems really nice for packaging all this filters.

Does it make sense also to use filters for that ?


I'm right now didn't going deeper in the filter API (I will), but the interface org.glassfish.grizzly.filterchain.Filter is not so obvious, at least for me.
So, is there some filters examples I could use somewhere that could help me ?


Thanks for any helps
Regards, David.