Unparseable date in SAML Authentication for Zimbra FOSS edition

Please guide me to solve this problem. I'm setting up Zimbra Collaboration Open Source as service provider (SP) and simplesamlphp as Identity Provider (IdP). I have installed samlextn.jar in /opt/zimbra/lib/ext/saml/ and configured SAML authentication for Zimbra server.

Zimbra server environment:

[zimbra@devzimbra ~]$ zmcontrol -v
Release 7.2.0_GA_2669.RHEL6_64_20120410002025 CentOS6_64 FOSS edition.
[zimbra@devzimbra ~]$ java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

The problem is after successfully authenticate in IdP and redirected to http://devzimbra/service/extension/samlreceiver, I'm getting this error in browser:

HTTP ERROR 500
Problem accessing /service/extension/samlreceiver. Reason:

    Unparseable date: "2018-12-13T09:48:09Z"



In /opt/zimbra/log/mailbox.log:
---------------------------
2018-12-14 10:51:31,149 INFO  [btpool0-13://devzimbra/service/extension/samlreceiver] [] extensions - Error in validating SAML response
java.text.ParseException: Unparseable date: "2018-12-14T02:51:14Z"
    at java.text.DateFormat.parse(DateFormat.java:337)
    at com.zimbra.cs.security.saml.SamlResponseHandler.validateSamlAssertion(SamlResponseHandler.java:231)
    at com.zimbra.cs.security.saml.SamlResponseHandler.validateSamlResponse(SamlResponseHandler.java:186)
    at com.zimbra.cs.security.saml.SamlResponseHandler.validateSamlResponse(SamlResponseHandler.java:145)
    at com.zimbra.cs.security.saml.SamlResponseHandler.handleSamlResponse(SamlResponseHandler.java:107)
    at com.zimbra.cs.security.saml.SamlResponseHandler.doPost(SamlResponseHandler.java:89)
    at com.zimbra.cs.extension.ExtensionDispatcherServlet.service(ExtensionDispatcherServlet.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:814)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at com.zimbra.cs.servlet.SetHeaderFilter.doFilter(SetHeaderFilter.java:79)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:81)
    at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:132)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:218)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:422)
    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.handler.rewrite.RewriteHandler.handle(RewriteHandler.java:230)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.handler.DebugHandler.handle(DebugHandler.java:77)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:585)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:988)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:415)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:429)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
2018-12-14 10:51:31,150 WARN  [btpool0-13://devzimbra/service/extension/samlreceiver] [] log - /service/extension/samlreceiver
javax.servlet.ServletException: Unparseable date: "2018-12-14T02:51:14Z"
    at com.zimbra.cs.security.saml.SamlResponseHandler.handleSamlResponse(SamlResponseHandler.java:127)
    at com.zimbra.cs.security.saml.SamlResponseHandler.doPost(SamlResponseHandler.java:89)
    at com.zimbra.cs.extension.ExtensionDispatcherServlet.service(ExtensionDispatcherServlet.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:814)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at com.zimbra.cs.servlet.SetHeaderFilter.doFilter(SetHeaderFilter.java:79)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:81)
    at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:132)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:218)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:422)
    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.handler.rewrite.RewriteHandler.handle(RewriteHandler.java:230)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.handler.DebugHandler.handle(DebugHandler.java:77)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:585)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:988)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:415)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:429)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
LVL 5
badrulnmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

girionisCommented:
Unparseable date: "2018-12-13T09:48:09Z"

The format of the date you receive back is not valid. Do you know what is the expected date format? Maybe there is a configuration that you can change the date format. If not you will have to get in touch with either Zimbra or simplesamlphp.
CEHJCommented:
Odd that they wouldn't fall back to ISO format and find therefore that it would parse
badrulnmAuthor Commented:
I think there is problem with saml extension for Zimbra (version 7.2). I've tested with current Zimbra (version 8.8.10) and no problem authenticating with SAML.

[zimbra@devzimbra2 ~]$ zmcontrol -v
Release 8.8.10_GA_3039.RHEL6_64_20180928094617 RHEL6_64 FOSS edition, Patch 8.8.10_P4.
[zimbra@devzimbra2 ~]$ java -version
openjdk version "1.8.0_172-zimbra"
OpenJDK Runtime Environment (build 1.8.0_172-zimbra-b01)
OpenJDK 64-Bit Server VM (build 25.172-b01, mixed mode)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Security Assertion Markup Language (SAML)

From novice to tech pro — start learning today.