Question
Morgan Stanley
IN
Last activity: 26 Apr 2022 3:04 EDT
JWT processing error Certificate does not exist, Keystore Entry is not either PrivateKeyEntry or TrustedCertificateEntry
Though the keyid and thumbprint in token match with that of JWK for some reason the validation (pxProcessJWT) is failing with below error.
Though the keyid and thumbprint in token match with that of JWK for some reason the validation (pxProcessJWT) is failing with below error.
( internal.jwt.JWTProcessorImpl) DEBUG - inside processGeneratedJsonWebToken ( internal.jwt.JWTProcessorImpl) DEBUG - Setting JWSVerifierFactory with PegaConfigurableJWSVerifierFactory instance ( internal.jwt.JWTProcessorImpl) DEBUG - Parsing generated JWT - <ACTUAL TOKEN> ( internal.jwt.JWTProcessorImpl) DEBUG - jwt is signed JWT. So validating signature (ernal.jwt.JWTSignatureVerifier) DEBUG - JWT is Signed (ernal.jwt.JWTSignatureVerifier) DEBUG - Validating signature for signed JWT (ernal.jwt.JWTSignatureVerifier) DEBUG - Validating signature using secret key (ernal.jwt.JWTSignatureVerifier) DEBUG - signature bean is not null (ernal.jwt.JWTSignatureVerifier) DEBUG - inside method to get JWSKeyselector (ernal.jwt.JWTSignatureVerifier) DEBUG - Trying to get JwkURI from header (ernal.jwt.JWTSignatureVerifier) DEBUG - public key is null (ritycore.jwt.KeystoreEntryData) ERROR - Certificate does not exist, Keystore Entry is not either PrivateKeyEntry or TrustedCertificateEntry (ta_Admin_Security_Token.Action) ERROR - Unable to process the Json Web Token com.pega.pegarules.pub.PRRuntimeException: The thumbprint match failed against trust store at com.pega.platform.securitycore.internal.jwt.JWTSignatureVerifier.getJWSKeySelectorFromPubKey(JWTSignatureVerifier.java:250) ~[security-core.jar:?] at com.pega.platform.securitycore.internal.jwt.JWTSignatureVerifier.getJWSKeySelector(JWTSignatureVerifier.java:217) ~[security-core.jar:?] at com.pega.platform.securitycore.internal.jwt.JWTSignatureVerifier.validateSignature(JWTSignatureVerifier.java:194) ~[security-core.jar:?] at com.pega.platform.securitycore.internal.jwt.JWTProcessorImpl.processGeneratedJsonWebToken(JWTProcessorImpl.java:174) ~[security-core.jar:?] at com.pega.pegarules.integration.engine.internal.security.jwt.JWTUtilsImpl.processJSONWebToken(JWTUtilsImpl.java:245) ~[printegrint.jar:?] at com.pegarules.generated.activity.sh_action_pxprocessjwt_2cb41f4eb15784dd017f0940ed75124f.step3_circum0(sh_action_pxprocessjwt_2cb41f4eb15784dd017f0940ed75124f.java:393) ~[?:?] at com.pegarules.generated.activity.sh_action_pxprocessjwt_2cb41f4eb15784dd017f0940ed75124f.perform(sh_action_pxprocessjwt_2cb41f4eb15784dd017f0940ed75124f.java:115) ~[?:?] at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2850) ~[prprivate-session.jar:?] ....... Caused by: java.io.IOException: Certificate does not exist, Keystore Entry is not either PrivateKeyEntry or TrustedCertificateEntry at com.pega.platform.securitycore.internal.jwt.JWTSignatureVerifier.getCertificateUsingThumbprint(JWTSignatureVerifier.java:322) ~[security-core.jar:?] at com.pega.platform.securitycore.internal.jwt.JWTSignatureVerifier.getJWSKeySelectorFromPubKey(JWTSignatureVerifier.java:245) ~[security-core.jar:?] ... 72 more