CAS, 4.1.7, JoseException: A JWS Compact Serialization must have exactly 3 parts separated by period ('.') characters

1,329 views
Skip to first unread message

Yan Zhou

unread,
Apr 22, 2016, 5:10:52 PM4/22/16
to CAS Community
Hi there,

With my CAS 4.1.7 overlay, getting this exception intermittently. I do not know which value this exception is referring to.

The host.name entry in cas.properties is correctly specified. 

Any suggestions?

Yan

My cas.properties look like this,  host.name does have the FQDN.


server.prefix=${server.name}/cas
cas.securityContext.status.access=hasIpAddress('127.0.0.1')
cas.securityContext.statistics.access=hasIpAddress('127.0.0.1')


Here is the error.

 

2016-04-22 20:58:40,590 INFO [org.jasig.cas.services.DefaultServicesManagerImpl] - <Loaded 13 services.>

2016-04-22 20:59:42,048 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Warning cookie path is set to null and path /cas/>

2016-04-22 20:59:42,048 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <TGC cookie path is set to null and path /cas/>

2016-04-22 20:59:42,050 DEBUG [org.jasig.cas.web.support.CookieRetrievingCookieGenerator] - <org.jose4j.lang.JoseException: A JWS Compact Serialization must have exactly 3 parts separated by period ('.') characters

java.lang.RuntimeException: org.jose4j.lang.JoseException: A JWS Compact Serialization must have exactly 3 parts separated by period ('.') characters

        at org.jasig.cas.util.AbstractCipherExecutor.verifySignature(AbstractCipherExecutor.java:100)

        at org.jasig.cas.util.BaseStringCipherExecutor.decode(BaseStringCipherExecutor.java:124)

        at org.jasig.cas.util.BaseStringCipherExecutor.decode(BaseStringCipherExecutor.java:42)

        at org.jasig.cas.web.support.DefaultCasCookieValueManager.obtainCookieValue(DefaultCasCookieValueManager.java:89)

        at org.jasig.cas.web.support.CookieRetrievingCookieGenerator.retrieveCookieValue(CookieRetrievingCookieGenerator.java:116)

        at org.jasig.cas.web.flow.InitialFlowSetupAction.doExecute(InitialFlowSetupAction.java:98)

        at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)

        at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)

        at org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:77)

        at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)

        at org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145)

        at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)

        at org.springframework.webflow.engine.ActionList.execute(ActionList.java:154)

        at org.springframework.webflow.engine.Flow.start(Flow.java:526)

        at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:368)

        at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:223)

        at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140)

        at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:238)

 

 

 

        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Unknown Source)

        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(Unknown Source)

        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(Unknown Source)

        at java.lang.Thread.run(Thread.java:745)

Caused by: org.jose4j.lang.JoseException: A JWS Compact Serialization must have exactly 3 parts separated by period ('.') characters

        at org.jose4j.jws.JsonWebSignature.setCompactSerializationParts(JsonWebSignature.java:61)

        at org.jose4j.jwx.JsonWebStructure.setCompactSerialization(JsonWebStructure.java:88)

        at org.jasig.cas.util.AbstractCipherExecutor.verifySignature(AbstractCipherExecutor.java:89)

        ... 63 more

> 

2016-04-22 20:59:42,051 DEBUG [org.jasig.cas.web.support.CasArgumentExtractor] - <Extractor generated service for: https://lbqacas.qa.medplus.com/cas-admin/j_spring_cas_security_check>

2016-04-22 20:59:42,051 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Placing service in context scope: [https://lbqacas.qa.medplus.com/cas-admin/j_spring_cas_security_check]>

2016-04-22 20:59:42,052 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Placing registered service [^https?://[\w\._-]+\.(qdx|questdiagnostics|medplus|care360|care180|cin\.mp-emaxx)\.com(:\d+)?/(cas-admin.*|care360-admin.*)|^http://(localhost|10\.0\.2\.2):\d+(/cas-admin.*|/care360-admin.*|/j_spring_cas_security.*)?] with id [2] in context scope>

2016-04-22 20:59:42,054 DEBUG [org.jasig.cas.web.flow.GenerateLoginTicketAction] - <Generated login ticket LT-3-FsXfZ75tdYWn5a6O2mMNDUiOKGbcr5-qacas01.qa.medplus.com >

 

Misagh Moayyed

unread,
Apr 22, 2016, 9:23:19 PM4/22/16
to CAS Community

It refers to the ticket-granting cookie. Its value cannot be parsed.

 

--
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.
To post to this group, send email to cas-...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/8e6d17fa-fce7-4d36-95b4-661b61557154%40apereo.org.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.

Yan Zhou

unread,
Apr 22, 2016, 10:26:55 PM4/22/16
to Misagh Moayyed, CAS Community
Can you point me to the right direction as to where this problem can be fixed?  Is this some configuration issue I missed?  Or, it this outside of CAS, such as a browser issue?

Yan

Misagh Moayyed

unread,
Apr 26, 2016, 8:26:53 PM4/26/16
to CAS Community

The cookie value is signed and linked to the remote ip, browser agent and and the TGT. If there is a mismatch, you will see that entry.

 

rheman puewe

unread,
Apr 21, 2017, 8:11:29 AM4/21/17
to CAS Community, mmoa...@unicon.net
Hi.

I have the same problem with the same version of cas. Please what can I do in order to solve this problem ???
Reply all
Reply to author
Forward
0 new messages