Post

4 followers Follow
1
Avatar

Integrate Crowd and Deployit 3.7.x

This article is about to use Atlassian Crowd as the authentication manager in Deployit 3.7.x.

Reference: 

Steps:

  1. Download the crowd-integration-client.jar for Spring Security 3.x
  2. In your deployit-server installation, create a crowd directory: ${DEPLOYT_HOME}/crowd
  3. Copy the downloaded crowd-integration-client.jar to ${DEPLOYT_HOME}/crowd
  4. Copy the crowd client libraries from CROWD/client/lib to ${DEPLOYT_HOME}/crowd
  5. Copy CROWD/client/conf/crowd.properties  and CROWD/client/conf/crowd-ehcache.xml ${DEPLOYT_HOME}/conf
  6. Edit the crowd.properties files matching your crowd installation
  7. Replace ${DEPLOYT_HOME}/conf/deployit-security.xml with this one
  8. Add the jar files from the ${DEPLOYIT_HOME}/crowd in the server classpath

Sample files:

deployit-security.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
">

 <!-- crowd context -->
 <import resource="applicationContext-CrowdClient.xml"/>

  <bean id="rememberMeAuthenticationProvider" class="com.xebialabs.deployit.security.authentication.RememberMeAuthenticationProvider"/>
  <bean id="jcrAuthenticationProvider" class="com.xebialabs.deployit.security.authentication.JcrAuthenticationProvider"/>

  <security:authentication-manager alias="authenticationManager">
  <security:authentication-provider ref="rememberMeAuthenticationProvider" />
  <security:authentication-provider ref="crowdAuthenticationProvider"/>
  <security:authentication-provider ref="jcrAuthenticationProvider"/>
  </security:authentication-manager>

  <bean id="crowdUserDetailsService" class="com.atlassian.crowd.integration.springsecurity.user.CrowdUserDetailsServiceImpl">
  <property name="authenticationManager" ref="crowdAuthenticationManager" />
  <property name="groupMembershipManager" ref="crowdGroupMembershipManager" />
  <property name="userManager" ref="crowdUserManager" />
  <property name="authorityPrefix" value=""/>
  <!-- sample value <property name="authorityPrefix" value="ROLE_"/> -->
  </bean>

 <bean id="crowdAuthenticationProvider" class="com.atlassian.crowd.integration.springsecurity.RemoteCrowdAuthenticationProvider">
  <constructor-arg ref="crowdAuthenticationManager" />
  <constructor-arg ref="httpAuthenticator" />
  <constructor-arg ref="crowdUserDetailsService" />
  </bean>
  </beans>

server.sh

 for each in `find crowd -name "\*.jar" 2>/dev/null`
  do
  if [ -f $each ]; then
  DEPLOYIT_SERVER_CLASSPATH=${DEPLOYIT_SERVER_CLASSPATH}:${each}
  fi
  done
XebiaLabs Support

Please sign in to leave a comment.

4 comments

0
Avatar

Using Deployit 3.9.4 and Crowd 2.7.1 I also had to copy jdom-1.1.3.jar from CROWD/crowd-webapp/WEB-INF/lib/jdom-1.1.3.jar to ${DEPLOYIT_HOME}/crowd to avoid getting a "java.lang.ClassNotFoundException: org.jdom.Element" error.

Bjarte Nilsen 0 votes
0
Avatar

Hi Bjarte,

any upgrade/more tips with latter version of xldepoyit , by any chance ? :)

( I'm dealing with 5.1 now .... )

regards,
Daniel.

daniel kachaner 0 votes