Prime Home SSO implementation

From DocWiki

Jump to: navigation, search

(This page is a work in progress. Need to learn about tags that will format the .xml properly.

The two .xml files on this page are key to SSO implementation for Prime Home. For full details, see the LDAP and SSO Implementation Tutorial.

auth.external.sso.xml

This Spring context configuration file for the SSO module can be accessed from this link and added to your system. You will not need to change the contents of this file unless you need to use both SSO and LDAP. This file is loaded from the classpath, by default, so be sure to specify a classpath URL for the value (as shown above).

<?xml version="1.0" encoding="UTF-8"?> <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">

   <bean id="preAuthUserDetailsService" class="org.springframework.security.providers.preauth.PreAuthenticatedGrantedAuthoritiesUserDetailsService"/>
   <bean id="preAuthProvider" class="org.springframework.security.providers.preauth.PreAuthenticatedAuthenticationProvider">
       <property name="preAuthenticatedUserDetailsService" ref="preAuthUserDetailsService"/>
   </bean>
   <bean id="providerManager" class="org.springframework.security.providers.ProviderManager">
       <property name="providers">
           <list>
               <ref local="preAuthProvider"/>
           </list>
       </property>
   </bean>
   <bean id="roleMapper" class="com.clearaccess.acs.auth.impl.AuthorityMapperImpl">
       <constructor-arg index="0" ref="roleMapper.configuration"/>
   </bean>
   <bean id="domainMapper" class="com.clearaccess.acs.auth.impl.AuthorityMapperImpl">
       <constructor-arg index="0" ref="domainMapper.configuration"/>
   </bean>

</beans>

example.sso.xml

This file contains the role and domain mappings for the single sign-on service and is also available to copy at this link and added to your system. You will need to modify this, as needed, to map the roles and domains your users need access to.

{code: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:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:util="http://www.springframework.org/schema/util"
      xsi:schemaLocation="
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
      ">

<util:map id="roleMapper.configuration" key-type="java.lang.String" value-type="java.util.List"> <entry key="admin"> <util:list> <value>administrator</value> </util:list> </entry> <entry key="csr"> <util:list> <value>csr</value> </util:list> </entry> </util:map>

<util:map id="domainMapper.configuration" key-type="java.lang.String" value-type="java.util.List"> <entry key="west"> <util:list> <value>AD_ISLAND_1</value> <value>AD_ISLAND_2</value> </util:list> </entry> <entry key="east"> <util:list> <value>AD_ISLAND_3</value> <value>AD_ISLAND_4</value> </util:list> </entry> </util:map>

</beans> {code}

Rating: 0.0/5 (0 votes cast)

Personal tools