Home Grails 3.3.2 Spring Security Code & CAS
Reply: 0

Grails 3.3.2 Spring Security Code & CAS

user5592
1#
user5592 Published in May 23, 2018, 10:40 pm

I am getting the following exception after entering my user name and pw into my CAS login form, Grails 3.3.2 app.

Configuring Spring Security Core ...
... finished configuring Spring Security Core


Configuring Spring Security CAS ...
... finished configuring Spring Security CAS

Grails application running at http://localhost:8089 in environment: development
2018-05-22 13:59:47.395 DEBUG --- [nio-8089-exec-2] o.j.c.c.session.SingleSignOutHandler     : Recording session for token ST-1553-4NR7XWRPXGioiJXs9oLd-cas-01.mydomain.com
2018-05-22 13:59:47.395 DEBUG --- [nio-8089-exec-2] o.j.c.c.session.SingleSignOutHandler     : Recording session for token ST-1553-4NR7XWRPXGioiJXs9oLd-cas-01.mydomain.com
2018-05-22 13:59:47.425 DEBUG --- [nio-8089-exec-2] c.c.s.HashMapBackedSessionMappingStorage : Attempting to remove Session=[7CBCC94E9BF728A044B05C07ABFAB894]
2018-05-22 13:59:47.425 DEBUG --- [nio-8089-exec-2] c.c.s.HashMapBackedSessionMappingStorage : Attempting to remove Session=[7CBCC94E9BF728A044B05C07ABFAB894]
2018-05-22 13:59:47.425 DEBUG --- [nio-8089-exec-2] c.c.s.HashMapBackedSessionMappingStorage : No mapping for session found.  Ignoring.
2018-05-22 13:59:47.425 DEBUG --- [nio-8089-exec-2] c.c.s.HashMapBackedSessionMappingStorage : No mapping for session found.  Ignoring.
2018-05-22 13:59:47.440 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator    : Placing URL parameters in map.
2018-05-22 13:59:47.440 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator    : Placing URL parameters in map.
2018-05-22 13:59:47.441 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator    : Calling template URL attribute map.
2018-05-22 13:59:47.441 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator    : Calling template URL attribute map.
2018-05-22 13:59:47.441 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator    : Loading custom parameters from configuration.
2018-05-22 13:59:47.441 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator    : Loading custom parameters from configuration.
2018-05-22 13:59:47.442 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator    : Constructing validation url: https://cas.mydomain.com/cas/serviceValidate?pgtUrl=http%3A%2F%2Flocalhost%3A8089%2Fsecure%2Freceptor&ticket=ST-1553-4NR7XWRPXGioiJXs9oLd-cas-01.mydomain.com&service=http%3A%2F%2Flocalhost%3A8089%2Flogin%2Fcas
2018-05-22 13:59:47.442 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator    : Constructing validation url: https://cas.mydomain.com/cas/serviceValidate?pgtUrl=http%3A%2F%2Flocalhost%3A8089%2Fsecure%2Freceptor&ticket=ST-1553-4NR7XWRPXGioiJXs9oLd-cas-01.mydomain.com&service=http%3A%2F%2Flocalhost%3A8089%2Flogin%2Fcas
2018-05-22 13:59:47.442 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator    : Retrieving response from server.
2018-05-22 13:59:47.442 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator    : Retrieving response from server.
2018-05-22 13:59:48.864 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator    : Server response: 
2018-05-22 13:59:48.864 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator    : Server response: 
2018-05-22 13:59:49.334 ERROR --- [nio-8089-exec-2] org.jasig.cas.client.util.XmlUtils       : Premature end of file.

org.xml.sax.SAXParseException: Premature end of file.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.jasig.cas.client.util.XmlUtils.getTextForElement(XmlUtils.java:192)

serverUrlPrefix  = 'http://cas.mydomain.com/cas'

Any ideas or suggestions would be appreciated!!!

Below is the output from my Grails 2.5.1 version of the same app and CAS server.

2018-05-18 10:42:26,755 DEBUG AbstractUrlBasedTicketValidator - Placing URL parameters in map.
2018-05-18 10:42:26,755 DEBUG AbstractUrlBasedTicketValidator - Calling template URL attribute map.
2018-05-18 10:42:26,756 DEBUG AbstractUrlBasedTicketValidator - Loading custom parameters from configuration.
2018-05-18 10:42:26,756 DEBUG AbstractUrlBasedTicketValidator - Constructing validation url: https://cas.mydomin.com/serviceValidate?ticket=ST-1485-7X6VirHikiEKadmDnt0Y-cas-01.mydomin.com&service=http%3A%2F%2Flocalhost%3A8089%2Fj_spring_cas_security_check
2018-05-18 10:42:26,756 DEBUG AbstractUrlBasedTicketValidator - Retrieving response from server.
2018-05-18 10:42:27,204 DEBUG AbstractUrlBasedTicketValidator - Server response: 
<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
    <cas:authenticationSuccess>
        <cas:user>first.lastname</cas:user>


    </cas:authenticationSuccess>
</cas:serviceResponse>
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.300141 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO