Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Certificate Expiration Validation fails with non-English locale

SA-86502

Summary



On configuring an Authentication Service with signing certificates, the Certificate Expiration validation fails at runtime with an invalid Date exception.


Error Messages



Unable to process the SAML WebSSO request : Exception in parsing the expiry date to stringUnparseable date: %22Wed Oct 23 14:26:00 UTC 2019%22


Steps to Reproduce



Review Step 9 of the pySAMLWebSSOAuthenticationActivity which manipulates the Date in String format. This fails if the user.country and the user.language are non-English.

To simulate, use the below code to create the activity with the Java step:

String pyIDPSigningCertificateExpiry = "Thu Mar 09 13:27:30 UTC 2028";
String pySPDecryptionCertificateExpiry = "Wed Oct 23 14:26:00 UTC 2019";
String sigexpirydate = pyIDPSigningCertificateExpiry;
String decexpirydate = pySPDecryptionCertificateExpiry;
java.util.Date currentDate = new java.util.Date();
java.util.Date expiredDateSignature = new java.util.Date();
java.util.Date expiredDateDecryption = new java.util.Date();
try {
//            java.util.Locale locale = new java.util.Locale("nl", "NL"); // if you uncomment this line then we get an error
            java.util.Locale locale = new java.util.Locale("en", "US"); // if you uncomment this line then the parsing is correct
            expiredDateSignature = new java.text.SimpleDateFormat("E MMMM d HH:mm:ss z yyyy", locale)
                    .parse(sigexpirydate);
            expiredDateDecryption = new java.text.SimpleDateFormat("E MMMM d HH:mm:ss z yyyy", locale)
                    .parse(decexpirydate);
            oLog.infoForced("t1: " + expiredDateSignature);
            oLog.infoForced("t2: " + expiredDateDecryption);
        } catch (java.text.ParseException e) {
            oLog.infoForced ("ex: " + e );
        } The code works for en_US. However, it fails for nl_NL.


Root Cause



A defect in Pegasystems’ code or rules.


Resolution



Update to either of the following:
  • Pega Platform 8.1.6
  • Pega Platform 8.2.2
  • Pega Platform 8.3

Published October 18, 2019 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us