What do your CAS logs say?

 

From: Gianluca Diodato [mailto:[email protected]] 
Sent: Tuesday, April 28, 2015 4:27 AM
To: [email protected]
Subject: [cas-user] Cas 4 and SAML problems (NULLPOINTER EXCEPTION on
remoteGetUser() in my login page)

 

Hi all,

I followed this tutorial
https://wiki.jasig.org/display/CASC/Saml11TicketValidationFilter+Example
but don't work.

So I followed this one
<https://wiki.jasig.org/display/CASUM/SAML+Support+in+CAS+4>
https://wiki.jasig.org/display/CASUM/SAML+Support+in+CAS+4.

I changed my files in cas server as attached and configuration of my
web.xml in my java client 3.3.3 with all jar for saml added:

 

<!-- Sign out not yet implemented -->

<!-- 

            <filter>

                        <filter-name>CAS Single Sign Out
Filter</filter-name>

 
<filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-cla
ss>

            </filter>

-->

 

            <filter>

                        <filter-name>CAS Authentication
Filter</filter-name>

 
<filter-class>org.jasig.cas.client.authentication.Saml11AuthenticationFilt
er</filter-class>

                        <init-param>

 
<param-name>casServerLoginUrl</param-name>

 
<param-value>https://aula-pc24:8443/cas/login
<https://aula-pc24:8443/cas/login%3c/param-value> </param-value>

                        </init-param>

                        <init-param>

                                    <param-name>serverName</param-name>

                                    <param-value>http://localhost:8080
<http://localhost:8080%3c/param-value> </param-value>

                        </init-param>

            </filter>

 

            <filter>

                        <filter-name>CAS Validation Filter</filter-name>

 
<filter-class>org.jasig.cas.client.validation.Saml11TicketValidationFilter
</filter-class>

                        <init-param>

 
<param-name>casServerUrlPrefix</param-name>

 
<param-value>https://aula-pc24:8443/cas/samlValidate
<https://aula-pc24:8443/cas/samlValidate%3c/param-value> </param-value>

                        </init-param>

                        <init-param>

                                    <param-name>serverName</param-name>

                                    <param-value>http://localhost:8080
<http://localhost:8080%3c/param-value> </param-value>

                        </init-param>

                        <init-param>

            <param-name>redirectAfterValidation</param-name>

            <param-value>true</param-value>

            </init-param>

            <init-param>

                                    <param-name>useSession</param-name>

                                    <param-value>true</param-value>

                        </init-param>

                        <init-param>

 
<param-name>acceptAnyProxy</param-name>

                                    <param-value>true</param-value>

                        </init-param>

            <init-param>

            <!--

              Adjust to accommodate clock drift between client/server.

              Increasing tolerance has security consequences, so it is
preferable to

              correct the source of clock drift instead.

            -->

            <param-name>tolerance</param-name>

            <param-value>5000</param-value>

        </init-param>

            </filter>

 

            <filter>

                        <filter-name>CAS HttpServletRequest Wrapper
Filter</filter-name>

 
<filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</f
ilter-class>

            </filter>

            

            <filter>

                        <filter-name>CAS Assertion Thread Local
Filter</filter-name>

 
<filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilter</filter
-class>

            </filter>

 

            <!-- ************************* -->

 

<!-- Sign out not yet implemented -->

<!-- 

            <filter-mapping>

                        <filter-name>CAS Single Sign Out
Filter</filter-name>

                        <url-pattern>/*</url-pattern>

            </filter-mapping>

-->

 

            <filter-mapping>

                        <filter-name>CAS Authentication
Filter</filter-name>

                        <url-pattern>/*</url-pattern>

            </filter-mapping>

 

            <filter-mapping>

                        <filter-name>CAS Validation Filter</filter-name>

                        <url-pattern>/*</url-pattern>

            </filter-mapping>

             

            <filter-mapping>

                        <filter-name>CAS HttpServletRequest Wrapper
Filter</filter-name>

                        <url-pattern>/*</url-pattern>

            </filter-mapping>

            

            <filter-mapping>

                        <filter-name>CAS Assertion Thread Local
Filter</filter-name>

                        <url-pattern>/*</url-pattern>

            </filter-mapping>

            

            <!--  *********************** -->

 

<!-- Sign out not yet implemented -->

<!-- 

            <listener>

 
<listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListe
ner</listener-class>

            </listener>

-->

 

            <!--  *********************** -->

 

            <session-config>

        <session-timeout>

            30

        </session-timeout>

    </session-config>

            <welcome-file-list>

                        <welcome-file>index.jsp</welcome-file>

            </welcome-file-list>

 

When i launch my web app i can login in cas server but when redirect go in
my web app again i don't have username (is null) and when in my index.jsp
page i use method "request.getRemoteUser()" i have nullPointer exception..

 

What wrong? I introduced saml because i must any attributes like name,
lastname, address and so back from cas server (info into cas server DB
users table).

 

Best

Gianluca

 
-- 
You are currently subscribed to [email protected]
<mailto:[email protected]>  as: [email protected]
<mailto:[email protected]> 
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to