<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Blog Posts From Jivespace Community Blog Tagged With acegi</title>
    <link>http://www.jivesoftware.com/jivespace/blogs/jivespace</link>
    <description>Jivespace Developer Community Blog</description>
    <pubDate>Sat, 05 Jul 2008 15:31:23 GMT</pubDate>
    <generator>Jive SBS 3.0.8 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2008-07-05T15:31:23Z</dc:date>
    <item>
      <title>Customization Part 6: Custom Authentication and User Data Providers</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/07/11/customization-part-6-custom-authentication-and-user-data-providers</link>
      <description>&lt;!-- [DocumentBodyStart:76a4c2be-acef-412c-8a66-a59aef9d9bf8] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;This post is the sixth in a series of blog posts about customizing for Clearspace 2.x. The previous posts covered:&lt;/p&gt;&lt;ol&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/06/24/customizations-in-clearspace-2x-part-one/"&gt;Customizations in Clearspace 2.x&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/06/26/customization-part-2-upgrading-themes-and-ftl-files/"&gt;Upgrading Themes and FTL Files&lt;/a&gt;. &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/06/30/customization-part-3-widgets"&gt;Widgets in Clearspace 2.x&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/07/03/customization-part-4-macros"&gt;Macros for Clearspace 2.0&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/07/07/customization-part-5-web-services"&gt;Web Services&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;As in the Clearspace 1.x series, in Clearspace 2.x versions you can write your own components to manage user information and provide custom authentication. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Upgrading a User Data Provider&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;In version 1 you created a custom user provider by implementing the com.jivesoftware.spi.user.UserProvider interface to interact with your user data source and implementing the com.jivesoftware.base.User interface to represent a user. In version 2, you implement UserProvider and User, but the interfaces have changed a bit. The version 2 model is more streamlined, removing the need to implement the lifecycle methods that the SPI framework requires. Here's a summary of the changes:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Because you no longer implement the ServiceProvider interface, you don't implement support for its life cycle methods. Clearspace handles provider life cycle through Spring.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;The com.jivesoftware.base.User interface is read-only (lacks setters) in version 2. Your implementation now provides the interface and logic for updating user information and returning it to Clearspace.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;The User.authenticate method has been removed. Use an authentication provider to authenticate a user.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;The User interface includes several new methods for retrieving information about the user.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;You now connect your custom provider to Clearspace using Spring conventions rather than by setting a Jive property.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here's a high level view of the upgrade steps you'll need to consider.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Implement the User interface to support whatever setters it needs. You'll also want to implement the is*Supported methods that indicate to Clearspace which user data is supported for setting.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;For UserProvider methods in which your code receives and returns a User instance, you'll need to rewrite a bit to return your own User implementation. In version 1 the UserProvider instance received a UserTemplate with setters. Because you can no longer simply call setters on the User instance you receive (it might not have any), you'll instead copy data from the received instance into an instance of your own implementation and return your own (such as by constructing your instance from the User your code receives). The methods you'll need to change include create(User) and getUser(User).&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Implement UserProvider.supportsUpdate to return true if your data store supports creating or updating users from Clearspace. If you return false from this method, be sure to also throw an UnsupportedOperationException from the create and update methods.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Upgrading an Authentication Provider&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;Authentication is substantially changed in version 2. For example, you no longer need to pass an AuthToken instance with method calls. Every request is guaranteed to have an authentication context. In version 2, Clearspace uses Acegi security, which is designed to fit well with the Spring framework. If you're implementing your own authentication provider, your components are based on Acegi; in some cases you might be able to use the classes included with Acegi, such as Authentication implementations.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Be sure to read the &lt;a class="jive-link-external-small" href="http://www.acegisecurity.org/guide/springsecurity.html"&gt;Acegi documentation&lt;/a&gt;, which includes information you'll find useful.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;span&gt;What Your Implementation Should Include&lt;/span&gt;&lt;/h4&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Implement org.acegisecurity.AuthenticationProvider to provide the service that authenticates users for Clearspace. This interface includes two methods: authenticate(Authentication) and supports(Class). Your supports method is called by Clearspace to determine whether the Authentication approach is supported by your provider. You should return true if the Authentication class it receives is one your authenticate method supports.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;!--[CodeBlockStart:2d749299-3f77-4ca9-a4ba-6e0de169867d]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;public boolean supports(Class authentication) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; return authentication == UsernamePasswordAuthenticationToken.class;
}&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:2d749299-3f77-4ca9-a4ba-6e0de169867d]--&gt;&lt;p&gt;&lt;br/&gt; The authenticate method receives an Authentication instance containing information identifying the user. Your implementation knows how to authenticate the user and should return an Authentication instance that indicates whether the user is authenticated. Here's a simple authenticate method example in which the checkAuth method (not shown) communicates with the data source and returns true if the user is authentic: &lt;br/&gt; &lt;/p&gt;&lt;!--[CodeBlockStart:c63d4169-bf29-4296-b78c-45f5c0725b5e]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;public Authentication authenticate(Authentication authentication) throws AuthenticationException {
&amp;nbsp;&amp;nbsp;&amp;nbsp; UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication;
&amp;nbsp;&amp;nbsp;&amp;nbsp; String username = String.valueOf(auth.getPrincipal());
&amp;nbsp;&amp;nbsp;&amp;nbsp; String password = String.valueOf(auth.getCredentials());
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!checkAuth(username, password)){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new BadCredentialsException("Username:" + username + " was not authenticated");
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; return new UsernamePasswordAuthenticationToken(username, password, new GrantedAuthority[]{});
}&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:c63d4169-bf29-4296-b78c-45f5c0725b5e]--&gt;&lt;p&gt;&lt;br/&gt; &lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Implement org.acegisecurity.Authentication to contain details of the authentication request (you can also use an existing class that implements Authentication ). An Authentication class represents the user in the context of a particular authentication approach -- such as basic authentication, LDAP, X.509 certificate, and so on. An instance includes details such as principal (something identifying the user, such as a username) and credentials (such as a password). Your isAuthenticated method should return true if the user is authentic. &lt;br/&gt;&amp;nbsp; &lt;br/&gt; The Authentication class includes a getAuthorities method that is not currently supported by Clearspace. Your implementation should return an empty array: &lt;br/&gt; &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;!--[CodeBlockStart:374cd848-a27c-4a66-a6b2-f5f549433d09]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;public GrantedAuthority[] getAuthorities() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; return new GrantedAuthority[0];
}]&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:374cd848-a27c-4a66-a6b2-f5f549433d09]--&gt;&lt;p&gt;&lt;br/&gt; &lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Connect your authentication provider to Clearspace by adding a Spring configuration XML file to the jiveHome/etc directory.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:7d9b6b6e-063e-4ba7-b975-2b0c7b2709ac]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"&amp;gt;
&amp;lt;bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy"&amp;gt;
&amp;lt;property name="filterInvocationDefinitionSource"&amp;gt;
&amp;lt;value&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
&amp;nbsp;&amp;nbsp;&amp;nbsp; PATTERN_TYPE_APACHE_ANT
&amp;nbsp;&amp;nbsp;&amp;nbsp; /upgrade/**=httpSessionContextIntegrationFilter, upgradeAuthenticationFilter, upgradeExceptionTranslationFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp; /post-upgrade/**=httpSessionContextIntegrationFilter, postUpgradeAuthenticationFilter, postUpgradeExceptionTranslationFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp; /admin/**=httpSessionContextIntegrationFilter, adminAuthenticationFilter, adminExceptionTranslationFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp; /rpc/xmlrpc=httpSessionContextIntegrationFilter, basicAuthenticationFilter, wsExceptionTranslator
&amp;nbsp;&amp;nbsp;&amp;nbsp; /rpc/rest/**=httpSessionContextIntegrationFilter, basicAuthenticationFilter, wsExceptionTranslator
&amp;nbsp;&amp;nbsp;&amp;nbsp; /**=httpSessionContextIntegrationFilter, formAuthenticationFilter, rememberMeProcessingFilter, anonymousProcessingFilter, exceptionTranslationFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp; .... add your implementation ...
&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;
&amp;lt;/bean&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:7d9b6b6e-063e-4ba7-b975-2b0c7b2709ac]--&gt;&lt;p&gt;The following stanza lists the authentication providers that Clearspace tries to use. When trying to authenticate a user, Clearspace tries with each in turn, top to bottom. Each of the beans listed here&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:4fcc0005-216f-4a8e-b88f-fb3ecab5ed7e]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;&amp;lt;!-- A list of authentication sources that will be consulted when attempting to
&amp;nbsp;&amp;nbsp;&amp;nbsp; authenticate the user. Each is consulted in order until a provider does
&amp;nbsp;&amp;nbsp;&amp;nbsp; *not* return null. This chains multiple providers together
&amp;nbsp;&amp;nbsp;&amp;nbsp; until one decides it can handle the user. --&amp;gt;
&amp;lt;bean id="authenticationManager" 
&amp;nbsp;&amp;nbsp;&amp;nbsp; class="org.acegisecurity.providers.ProviderManager"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="providers"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;list&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="jiveLdapAuthenticationProvider"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="jiveLegacyAuthenticationProvider"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="daoAuthenticationProvider" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="rememberMeAuthenticationProvider"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="anonymousAuthenticationProvider"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/list&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;
&amp;lt;/bean&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:4fcc0005-216f-4a8e-b88f-fb3ecab5ed7e]--&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The information above along with more details can be found in the &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/docs/DOC-2060/"&gt;Upgrading Extensions to 2.0 documentation&lt;/a&gt;.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you are working on authentication for SSO, you might also be interested in reading Fred's post about &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/07/01/quick-sso-on-clearspace-20/"&gt;Quick SSO on Clearspace 2.0&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:76a4c2be-acef-412c-8a66-a59aef9d9bf8] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">sso</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">sso</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">authentication</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">acegi</category>
      <pubDate>Fri, 11 Jul 2008 21:37:43 GMT</pubDate>
      <author>communities@jivesoftware.com</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/07/11/customization-part-6-custom-authentication-and-user-data-providers</guid>
      <dc:date>2008-07-11T21:37:43Z</dc:date>
      <clearspace:dateToText>1 year, 4 months ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/customization-part-6-custom-authentication-and-user-data-providers</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1550</wfw:commentRss>
    </item>
    <item>
      <title>Quick SSO on Clearspace 2.0</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/07/01/quick-sso-on-clearspace-20</link>
      <description>&lt;!-- [DocumentBodyStart:a127c4f5-9f1b-4913-85b8-aa56b8a4beee] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Below is a small filter that I co-authored recently to integrate with Oracle Access Manager (formerly called Oblix). With the release of CS 2.0 we have totally revamped the authentication process and it is now built on spring-security (formerly acegi). Doing this makes it super easy for most of the typical SSO use-cases to be implemented in a reasonable amount of time. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here was the use case:&lt;/p&gt;&lt;p&gt;1. User Makes initiial request and is not authenticated yet.&lt;/p&gt;&lt;p&gt;2. Webgate routes user to the corporate login page&lt;/p&gt;&lt;p&gt;3. User supplies auth credentials&lt;/p&gt;&lt;p&gt;4. Webgate authenticates the user&lt;/p&gt;&lt;p&gt;5. Webgate sets an Authentication Cookie that identifies this user to Webgate&lt;/p&gt;&lt;p&gt;6. Webgate adds custom HTTP Headers to a new request to the originally requested resource, in this case clearspace.&lt;/p&gt;&lt;p&gt;7. Clearspace ACEGI Filter chain executes for /*** path, this is where I inserted the OblixSSOFilter right before the form authentication.&lt;/p&gt;&lt;p&gt;8. The Filter executes, grabs the HTTP Header "jwt-dn" and extracts the users DN (the user name).&lt;/p&gt;&lt;p&gt;9. The Filter retrieves the User and creates an Authentication and allows the rest of the filters to execute.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The User is now authenticated. The Default authoprovider ultimatly loads the Users permission etc downstream using the default AuthProvider. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here is the code for the filter. The filter is pretty straight forward. It looks at the incoming HttpServletRequest and attempts to retrieve a HTTP Header that was sent along from the webgate authentication form previously visited by the user, as stated above, in this particular scenario I was able to assume authentication would always be done prior to accessing clearspace. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:caee8188-7608-48f3-be42-cfbf9c13690f]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt; &lt;font color="navy"&gt;&lt;b&gt;package&lt;/b&gt;&lt;/font&gt; com.jivesoftware.clearspace.sso.oblix;
&amp;nbsp;
&amp;nbsp;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; com.jivesoftware.community.aaa.AnonymousAuthentication;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; com.jivesoftware.community.aaa.JiveUserAuthentication;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; com.jivesoftware.base.*;
&amp;nbsp;
&amp;nbsp;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; javax.servlet.*;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; javax.servlet.http.HttpServletRequest;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; javax.servlet.ServletResponse;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; javax.servlet.FilterChain;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; java.io.IOException;
&amp;nbsp;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; org.acegisecurity.context.SecurityContextHolder;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; org.acegisecurity.Authentication;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; org.apache.commons.lang.StringUtils;
&amp;nbsp;
&lt;font color="darkgreen"&gt;/**
 * Created by IntelliJ IDEA.
 * User: fred
 * Date: Jun 11, 2008
 * Time: 12:36:14 PM
 */&lt;/font&gt;
&lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; OblixSSOFilter &lt;font color="navy"&gt;&lt;b&gt;implements&lt;/b&gt;&lt;/font&gt; Filter &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; String OAMHEADER = &lt;font color="red"&gt;"jwt-unique"&lt;/font&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; String HEADER_NAME = &lt;font color="red"&gt;"jwt-dn"&lt;/font&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; UserManager userManager;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="darkgreen"&gt;//possible to use system properties to enable and change the header, for&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="darkgreen"&gt;//now just keep it simple.&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; String oamHeaderName = HEADER_NAME;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;boolean&lt;/b&gt;&lt;/font&gt; enabled = &lt;font color="navy"&gt;&lt;b&gt;true&lt;/b&gt;&lt;/font&gt;;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; OblixSSOFilter()&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;super&lt;/b&gt;&lt;/font&gt;();
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp; 
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) &lt;font color="navy"&gt;&lt;b&gt;throws&lt;/b&gt;&lt;/font&gt; IOException, ServletException &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Authentication authentication;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;(!enabled)&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filterChain.doFilter(servletRequest,servletResponse);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;&lt;font color="navy"&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.debug(&lt;font color="red"&gt;"executing oblix filter"&lt;/font&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpServletRequest request = (HttpServletRequest)servletRequest;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String oamHeader = request.getHeader(getOamHeaderName());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;(oamHeader != &lt;font color="navy"&gt;&lt;b&gt;null&lt;/b&gt;&lt;/font&gt;)&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.debug(&lt;font color="red"&gt;"got OAM header: "&lt;/font&gt; + oamHeader);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String userDN = extractUserDN(oamHeader);
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; User authenticationTarget = &lt;font color="navy"&gt;&lt;b&gt;null&lt;/b&gt;&lt;/font&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/font&gt;&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authenticationTarget = userManager.getUser(StringUtils.chomp(userDN));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;&lt;font color="navy"&gt;&lt;b&gt;catch&lt;/b&gt;&lt;/font&gt;(UserNotFoundException e)&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.error(&lt;font color="red"&gt;"no user found with username: "&lt;/font&gt; + userDN);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="darkgreen"&gt;//Found an a&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authentication = &lt;font color="navy"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; JiveUserAuthentication(authenticationTarget);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authentication.setAuthenticated(&lt;font color="navy"&gt;&lt;b&gt;true&lt;/b&gt;&lt;/font&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;&lt;font color="navy"&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.debug(&lt;font color="red"&gt;"no OAM Header"&lt;/font&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authentication = &lt;font color="navy"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; AnonymousAuthentication();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SecurityContextHolder.getContext().setAuthentication(authentication);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;&lt;font color="navy"&gt;&lt;b&gt;catch&lt;/b&gt;&lt;/font&gt; (Exception e) &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.error(&lt;font color="red"&gt;"Exception occured while trying to authenticate OAM response: "&lt;/font&gt; + e.getMessage());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filterChain.doFilter(servletRequest,servletResponse);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; String extractUserDN(String header)&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String userName = &lt;font color="navy"&gt;&lt;b&gt;null&lt;/b&gt;&lt;/font&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String[] elements = StringUtils.split(header,&lt;font color="navy"&gt;','&lt;/font&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;for&lt;/b&gt;&lt;/font&gt;(String element: elements)&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.debug(&lt;font color="red"&gt;"processing header: "&lt;/font&gt; + element);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;(element.startsWith(OAMHEADER))&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String[] uniqueID = StringUtils.split(element,&lt;font color="navy"&gt;'='&lt;/font&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; userName = uniqueID[1];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt;(userName);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; destroy()&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; setUserManager(UserManager userManager) &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.userManager = userManager;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; AuthenticationProvider getAuthenticationProvider() &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; authenticationProvider;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; setAuthenticationProvider(AuthenticationProvider authenticationProvider) &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.authenticationProvider = authenticationProvider;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; String getOamHeaderName() &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; oamHeaderName;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; setOamHeaderName(String oamHeaderName) &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.oamHeaderName = oamHeaderName;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;boolean&lt;/b&gt;&lt;/font&gt; isEnabled() &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; enabled;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; setEnabled(&lt;font color="navy"&gt;&lt;b&gt;boolean&lt;/b&gt;&lt;/font&gt; enabled) &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.enabled = enabled;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&lt;font color="navy"&gt;}&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:caee8188-7608-48f3-be42-cfbf9c13690f]--&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I simply created a jar containing this one class that I deployed to the WEB-INF\lib directory of a expanded clearspace war file. You can use any IDE or VI and Ant to create the jar, nothing special about it or clearspace specific.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;After I had the jar. I needed to tell clearspace about the filter. Since 2.0 there is a back door that can be utilized to override the default implementation of clearspace managers,DAOs and other spring managed beans, this back door is your jiveHome\etc directoy. Within the jiveHome\etc directory you can copy and modify the various spring context files packaged in the clearspace.jar file found in \WEB\lib. This is done by extracting the appropriate spring context file from the clearspace.jar file found in WEB-INF\lib, make your edits to it and copy it into \jiveHome\etc. In my case the authentication filter stack is configured in spring-securityContext.xml so I extracted that and made the changes listed below:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:fa4f886a-4ced-44e2-b9eb-003b572b4fe8]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-xml"&gt;
&lt;span class="jive-xml-comment"&gt;&amp;lt;!-- NOTICE THE ADDITION OF oblixSS0Filter --&amp;gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy"&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;property name="filterInvocationDefinitionSource"&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;value&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PATTERN_TYPE_APACHE_ANT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /upgrade/**=httpSessionContextIntegrationFilter, upgradeAuthenticationFilter, upgradeExceptionTranslationFilter,jiveAuthenticationTranslationFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /post-upgrade/**=httpSessionContextIntegrationFilter, postUpgradeAuthenticationFilter, postUpgradeExceptionTranslationFilter,jiveAuthenticationTranslationFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /admin/**=httpSessionContextIntegrationFilter, adminAuthenticationFilter, adminExceptionTranslationFilter,jiveAuthenticationTranslationFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /rpc/xmlrpc=wsRequireSSLFilter, httpSessionContextIntegrationFilter, basicAuthenticationFilter, wsExceptionTranslator, jiveAuthenticationTranslationFilter, wsAccessTypeCheckFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /rpc/rest/**=wsRequireSSLFilter, httpSessionContextIntegrationFilter, basicAuthenticationFilter, wsExceptionTranslator, jiveAuthenticationTranslationFilter, wsAccessTypeCheckFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /rpc/soap/**=wsRequireSSLFilter, httpSessionContextIntegrationFilter, jiveAuthenticationTranslationFilter 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**=httpSessionContextIntegrationFilter, oblixSSoFilter formAuthenticationFilter, rememberMeProcessingFilter, feedBasicAuthenticationFilter, jiveAuthenticationTranslationFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;

&amp;lt;!-- DECLARE THE NEW FILTER --&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;bean id="oblixSSoFilter" class="com.jivesoftware.clearspace.sso.oblix.OblixSSOFilter"&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;property name="userManager" ref="userManager" /&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:fa4f886a-4ced-44e2-b9eb-003b572b4fe8]--&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;As you can see the stack is configured to protect various resources within clearspace, you can add to this stack as required for your particular case, in my case it was simply a matter of declaring my filter, this allows spring to handle the creation of the object and changing the filter stack for the root path of the application to ensure the oblixSSOFilter fired off prior to formAuthentication. If the oblix filter is able to vouch for the user making the request (via the headers) the filter sets the Authentication on the SecurityContext and life moves forward with an authenticated user, if not, I allow it to fall to the next filter in the stack and the process repeats, with this new framework in place it makes it easy to support multiple authentication sources while still staying on the peripheral edges of the product which will help when it comes time to upgrade. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;After you have made the changes, restart your clearspace instance and you should be up and running with your new filter.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Enjoy!.&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:a127c4f5-9f1b-4913-85b8-aa56b8a4beee] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">code</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">customization</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">sso</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">acegi</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">spring-security</category>
      <pubDate>Tue, 01 Jul 2008 21:24:46 GMT</pubDate>
      <author>communities@jivesoftware.com</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/07/01/quick-sso-on-clearspace-20</guid>
      <dc:date>2008-07-01T21:24:46Z</dc:date>
      <clearspace:dateToText>1 year, 4 months ago</clearspace:dateToText>
      <clearspace:replyCount>11</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/quick-sso-on-clearspace-20</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1547</wfw:commentRss>
    </item>
    <item>
      <title>Clearspace Security Changes for 2.0</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/03/28/clearspace-security-changes-for-20</link>
      <description>&lt;!-- [DocumentBodyStart:538e1fa3-3ac5-45ac-8a58-ebf5db18cdc2] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Clearspace 2.0 made several improvements to the internal security mechanisms within the product that serve to streamline and standardize the way authentication, authorization and auditing occur within the application. Following on Dolan's blog about &lt;a class="jive-link-blog-small" href="http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/03/20/how-and-where-we-used-the-spring-framework-in-clearspace-20"&gt;Spring in Clearspace 2.0&lt;/a&gt;, this post will cover the &lt;a class="jive-link-external-small" href="http://www.acegisecurity.org/"&gt;Acegi&lt;/a&gt;-related changes for 2.0 security.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;&lt;span&gt;Motivation&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;There were several motivations for using Acegi Security in Clearspace 2.0:&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;&lt;strong&gt;Reuse of standard, community reviewed code&lt;/strong&gt; - At the time of writing, Acegi is planned to be incorporated into Spring proper in the near future. Particularly with security-related code, community review is essential to producing a more robust end result.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;&lt;strong&gt;Removal of unnecessary, Jive-specific code&lt;/strong&gt; - There really wasn't a need for us to manage our own authentication framework, authorization framework, X509 handling, etc. when Acegi has already made available a solid implementation. Additionally, Acegi gives us out of the box AuthenticationProvider and Filter implementations for things that previously we had to roll from scratch such as SiteMinder integration or X509 authentication. Acegi's implementations will still require some customization, largely due to the way we perform authorization, but the jive-managed code can be substantially reduced.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;&lt;strong&gt;Community&lt;/strong&gt; - As with Spring, Acegi has a healthy community that we can leverage, both through shared code as well as by contributing back to the project.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;&lt;strong&gt;Flexibility&lt;/strong&gt; - Acegi is well written and tends to give us extension points where we need them. For example, we needed to support existing LDAP configurations from Clearspace 1.x installations. This required us to inject custom LDAP search properties into the Acegi BindAuthenticator which was easily done through the setUserSearch method on the authenticator.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;&lt;strong&gt;Leverage Existing Enterprise Competencies&lt;/strong&gt; - Acegi and Spring are fairly well known in Java enterprise development. Existing skill sets around Acegi will translate to SSO implementations with Clearspace 2.0 as opposed to the 1.x model which required a customer's developers to learn an entirely new security model.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;&lt;span&gt;Implementation&lt;/span&gt;&lt;/h2&gt;&lt;h3&gt;&lt;span&gt;Authentication&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;The Clearspace 2.0 authentication model follows standard Acegi authentication, defining a Spring-managed FilterChainProxy bean in web.xml which then delegates to URL-mapped filter chains. These chains manage various security-related concerns including Session expiration, authentication cookie management, password encoding, user profile loading and federated identity features of Clearspace. One notable change is the move to a stronger password hash using a SHA-256 hash of a salted password. Additionally, the amount of Jive-specific LDAP code has been dramatically reduced instead delegating to Acegi's LDAP lookup and bind implementation.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Authorization&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;Clearspace 2.0 authorization has not changed substantially from 1.x with the exception that contextual information about a user is now accessed via the Acegi SecurityContext rather than explicitly passed through the application as AuthToken objects. This change focused the APIs on business concerns and moved security concerns to more of a cross-cutting realm, a change we're leveraging in 2.1 to make authorization driven by annotation rather than proxied objects. The hope for 2.1 is that this will greatly reduce the amount of authoirzation code while improving security.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Auditing&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;Acegi fundamentally feeds into the new auditing features of Clearspace 2.0. Based on contextual authentication information accessed by Acegi's SecurityContext, the auditing functionality logs operations performed by the effective user performing an action in the system.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;&lt;span&gt;Customization&lt;/span&gt;&lt;/h2&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Customization of authentication and authorization have several extension mechanisms in Clearspace 2.0 and the required APIs have been simplified. The older AuthFactory class has been removed and implementing jive-specific interfaces is no-longer required to customize the authentication mechanism. The goal for 2.0 authentication customization has shifted focus to a more modular, composition and inversion of control-driven approach. This better aligns with the Spring-standard Acegi approach and focuses customization on Spring-managed filters and/or AuthenticationProvider implementations. The Clearspace 2.0 documentation has more information on creating new authentication customizations or migrating 1.x authentication customizations.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The hope for these changes is that they will improve, standardize and simplify security as it exists in Clearspace. Let us know your feedback! &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:538e1fa3-3ac5-45ac-8a58-ebf5db18cdc2] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">security</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">design</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">spring</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">acegi</category>
      <pubDate>Fri, 28 Mar 2008 17:02:23 GMT</pubDate>
      <author>communities@jivesoftware.com</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/03/28/clearspace-security-changes-for-20</guid>
      <dc:date>2008-03-28T17:02:23Z</dc:date>
      <clearspace:dateToText>1 year, 8 months ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/clearspace-security-changes-for-20</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1496</wfw:commentRss>
    </item>
    <item>
      <title>Spring Is Coming</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/01/17/spring-is-coming</link>
      <description>&lt;!-- [DocumentBodyStart:7f18a448-5160-40aa-9026-d9604fca238a] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Among the changes being made to Clearspace during 2008 is the adoption of the &lt;a class="jive-link-external-small" href="http://www.springframework.org"&gt;Spring framework&lt;/a&gt; in many parts of the application.&amp;nbsp; The first and most obvious feature of Spring of which we are taking advantage is the well-known and robust configuration and dependency injection service.&amp;nbsp; Much of what was formerly done using the JiveContext is now delegated to a Spring ApplicationContext, and this trend will continue.&amp;nbsp; This enables easier integration with existing libraries, more pluggability and testablility, and greater familiarity to the developer world.&amp;nbsp; What is more, with our upgrade to &lt;a class="jive-link-external-small" href="http://struts.apache.org/2.x/"&gt;Struts2&lt;/a&gt; (from WebWork2) all Struts objects are created using Spring as the object factory.&amp;nbsp; The immediate benefit to the developer is that any Spring-managed dependencies in a Struts object (actions, interceptors, etc) will automagically be set using Spring autowiring.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;JDBC and Transactional support are other areas where we have attempted to make use of the facilities provided by the Spring framework.&amp;nbsp; Indeed anyone who has used the code provided by the framework for those two areas will be clear as to why we have chosen to do so.&amp;nbsp; Because of the improved ease of layering transactions declaratively, much more of the codebase will be transactional than before, leading to improved data integrity across the system.&amp;nbsp; We have also taken advantage of &lt;a class="jive-link-external-small" href="http://www.springframework.org/ldap"&gt;Spring LDAP&lt;/a&gt; support, &lt;a class="jive-link-external-small" href="http://getahead.org/dwr/"&gt;DWR&lt;/a&gt; integration, &lt;a class="jive-link-external-small" href="http://incubator.apache.org/cxf/"&gt;CXF&lt;/a&gt; integration, and &lt;a class="jive-link-external-small" href="http://www.opensymphony.com/osworkflow/"&gt;OSWorkflow&lt;/a&gt; integration.&amp;nbsp; Last but not least, we have worked to integrate the &lt;a class="jive-link-external-small" href="http://www.acegisecurity.org/"&gt;Acegi&lt;/a&gt; framework for authentication, and are working to use it for authorization as well.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The inclusion of the Spring framework into our project lays the groundwork for many benefits in upcoming versions of Clearspace.&amp;nbsp; We hope that you're as excited as we are to explore the possibilities and reap the benefits of its arrival.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:7f18a448-5160-40aa-9026-d9604fca238a] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">spring</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">framework</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">acegi</category>
      <pubDate>Thu, 17 Jan 2008 21:48:47 GMT</pubDate>
      <author>communities@jivesoftware.com</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/01/17/spring-is-coming</guid>
      <dc:date>2008-01-17T21:48:47Z</dc:date>
      <clearspace:dateToText>1 year, 10 months ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/spring-is-coming</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1366</wfw:commentRss>
    </item>
  </channel>
</rss>

