Full Spring Security Support in Apache CXF Fediz
New features are going to be added in the next version 1.1 of Fediz. I described here how to configure the new Fediz plugin for Spring Security with Container Managed Security (Pre-Authentication in Spring Security terms). The current snapshot version of Fediz 1.1 provides also full/native Spring Security support which means the Servlet Container runs unauthenticated (no security constraints defined in web.xml) and Spring Security enforces authentication.
You can either download the sources here:
git clone git://git.apache.org/cxf-fediz.git
svn co https://svn.apache.org/repos/asf/cxf/fediz/trunk
or download it from the snapshot maven repository.
A new example springWebapp has been added to the distribution to show this.As in the Pre-Authentication case, the application can get access to the Spring Security Context like this:
SecurityContextHolder.getContext().getAuthentication();The Authentication object is of instance
FederationAuthenticationTokenprovides the following methods.
|getCredentials||Element||Issues Security Token (ex. SAML Assertion)|
|getDetails||WebAuthenticationDetails>||Authentication details like IP, Session ID|
|getName||String||Authenticated user name|
|getAuthorities||Collection<? extends GrantedAuthority>||List of roles|
|getUserDetails||FederationUser||Extends the standard Spring User class with method getClaims()|
You can get more information from the Fediz Wiki how to configure Spring Security or have a look at the example here. The example shows how to configure Fediz for Spring Security and how to use the Spring Security API in your application code. Please post feedback and ideas to the CXF mailing list or the JIRA task FEDIZ-39.
Apache CXF Fediz is a subproject of Apache CXF. Fediz helps you to secure your web applications and delegate security enforcement to the underlying application server. With Fediz, authentication is externalized from your web application to an identity provider installed as a dedicated server component. The supported standard is WS-Federation Passive Requestor Profile.
Thank you for all support and feedback!