Migrating CAS 3.3.5 to 5.0.8 - Configurations

108 views
Skip to first unread message

Micas Camela

unread,
Sep 18, 2017, 9:23:39 AM9/18/17
to CAS Community
Hi there!

I am trying to migrate from 3.3.5 to 5.0.8.

In 3.3.5 the deployerConfig.xml file contains this type of configuration:

<bean id="authenticationManager" class="org.jasig.cas.authentication.AuthenticationManagerImpl">
        <property name="credentialsToPrincipalResolvers">
            <list>
                <bean class="com.csw.impression.cas.authentication.principal.AS400CredentialsToPrincipalResolver">
                    <property name="attributeRepository">
                        <ref bean="attributeRepository" />
                    </property>
                    <property name="as400UsernameKey" value="AS400Utilizador"/>
                    <property name="as400UsernameLockAttributeName" value="AS400UtilizadorLock"/>
                </bean>
                <bean class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
                <bean class="com.csw.impression.cas.authentication.principal.X509CertificateCredentialsToIdentifierPrincipalResolver">
                  <property name="attributeRepository">
                    <ref bean="attributeRepository" />
                  </property>
                </bean>
            </list>
        </property>
        <property name="authenticationHandlers">
            <list>
                <bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
                    p:httpClient-ref="httpClient" />
                <bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">
                       <property name="filter" value="sAMAccountName=%u" />
                       <property name="searchBase" value="DC=mozal,DC=local" />
                       <property name="contextSource" ref="contextSource" />
                       <property name="ignorePartialResultException" value="true" />
                       <property name="scope" value="2" />
                       <property name="searchContextSource" ref="contextSource"/>
                </bean>
                <bean
                    class="org.jasig.cas.adaptors.x509.authentication.handler.support.X509CredentialsAuthenticationHandler">
                     <property name="trustedIssuerDnPattern" value="CN=.+" />
                  <property name="maxPathLengthAllowUnspecified" value="true" />
                </bean>
            </list>
        </property>
</bean>


From what I read, in 5.0.8 everything is done in cas.properties file.

How can I put that kind of configurations in the 5.0.8 file structure?

Thanks in advance

Priit Serk

unread,
Sep 18, 2017, 9:39:45 AM9/18/17
to cas-...@apereo.org
Hi

Forget 5.0.8 -> Take the latest 5.1.4

The only way I could swim through the bugs and lack of documentation was to get the source code and just started debugging and overwriting their code (overlay style)

Take a look to ...Configuration classes. For example 
CasCoreAuthenticationHandlersConfiguration
CasCookieConfiguration
etc ...

After importing source, just hit Ctrl+N in Intellij and type Configuration -> debug and investigate the classes and happy debugging ...

Honestly, going through the source with debugging was only way for me to configure required components.

Br
Priit


--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/b668b6ea-be68-49b9-bb1c-1ec616f6ac35%40apereo.org.

Doug Campbell

unread,
Sep 18, 2017, 10:54:24 AM9/18/17
to cas-...@apereo.org

Micas,

 

Check out what Dave Curry wrote at:

 

https://dacurry-tns.github.io/deploying-apereo-cas/building_server_ldap_resolution-release_overview.html

 

It gives one method on how to do what you want.

--

- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

Micas Camela

unread,
Sep 18, 2017, 11:13:11 AM9/18/17
to CAS Community
Priit, thanks for the tip.

Doug,

I already have SAML included in the overlay (pom.xml), and I am using samValidate (100% working).

1 - The point is that there are some classes from the package com.csw.impression.cas.* developed in the past (around 2010) by our consultant (CSW).

2 - From what I know, those classes are compatible with the packages org.jasig.cas.* and maybe not with org.apereo.cas.*

I don't see how can I to explicitily configure this like this cas.properties:

Pablo Vidaurri

unread,
Sep 19, 2017, 1:59:29 PM9/19/17
to CAS Community
In the process of doing the same from 3.5.2 to 5.1.3+

Not fun so far.
Reply all
Reply to author
Forward
0 new messages