Darran Lofthouse [
http://community.jboss.org/people/darran.lofthouse%40jboss.com] replied
to the discussion
"JBWS-2210 : CXF Username Token JAAS integration"
To view the discussion, visit:
http://community.jboss.org/message/536495#536495
--------------------------------------------------------------
Hi Sergey - I have worked on some of the similar areas you are looking at here in our
Native stack so have been interested to see your comments here.
Looking at your comments regarding the changes needed in CXF it looks like you are along
the same lines I would consider, essentially I came to the same conclusion that the
UsernameTokenProcessor within WSS4J is making an unsuitable assumption that you can obtain
a users password.
Regarding how all of this would fit with the application server there are a couple of
other things to consider, when integrating with the application server we are really
looking to pass as much back to the application server provided containers as possible and
not just have an independent authentication / authorization process within the web
services stack.
The approach of having two interceptors (one for authentication and one for authorization)
is probably the biggest part of this problem already solved.
Where this becomes really apparent is where endpoints are deployed as EJB3 session beans,
in this case the container can already be configured to perform authentication and
authorization - as a deployed session bean can potentially be called from multiple
different clients it makes sense for the authorization checks to remain with the bean.
A second requirement would be related to endpoints deployed as POJOs - although these do
not have any container security before the invocation there is still the potential that
the implementations will call other secured resources so any identity would need to be
propagated for these calls.
The point of these two comments really is to highlight that this is not just a case of
obtaining a Subject from whatever app server you are running in but actually associating
the users identity with the request so that is propagates for further calls within the
application server. Using the APIs suggested from Anil should help with this so this is
just something to keep in mind.
A final feature related to this that I know there is user demand for would be the ability
to annotate the POJO endpoints with the same role annotations as used on EJB3 sesstion
beans - we were unable to do this for our Native implementation of this as we had to
support JAX-RPC as well as JAX-WS but as this would be JAX-WS only this could be an option
and may help simplify the role configuration.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/536495#536495]
Start a new discussion in JBoss Web Services Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]