Question
Virtusa
AU
Last activity: 17 Aug 2023 13:28 EDT
JWT Processing using Keystore Reference a URL Issue
Hi All,
I am trying to validating a JWT using keystore location (reference a URL) in one of our Pega Instance (INS-1). I have provided the JWK endpoint, which is our generation token profile in other Pega Instance (INS-2). when i tried to save the keystore in INS-1. First time there is no error, i am able to successfully validate the JWT. But when I upload a new JKS file in INS-2 keystore and update the alias name in token profile. and try to use the newly generated JWT in the request, i am getting below error. PFA of keystore error image.
Keystore source URL— Failed to get JWK Keys.
Error in Logs:
Hi All,
I am trying to validating a JWT using keystore location (reference a URL) in one of our Pega Instance (INS-1). I have provided the JWK endpoint, which is our generation token profile in other Pega Instance (INS-2). when i tried to save the keystore in INS-1. First time there is no error, i am able to successfully validate the JWT. But when I upload a new JKS file in INS-2 keystore and update the alias name in token profile. and try to use the newly generated JWT in the request, i am getting below error. PFA of keystore error image.
Keystore source URL— Failed to get JWK Keys.
Error in Logs:
Unable to process the Json Web Token com.pega.pegarules.pub.PRRuntimeException: Failed to get JWKSet keys at com.pega.pegarules.integration.engine.internal.util.KeyStoreUtilsImpl.getJWKKeyStore(KeyStoreUtilsImpl.java:914) ~[printegrint.jar:?] at com.pega.pegarules.session.internal.authorization.KeyStoreCacheImpl.loadKeyStoretoCache(KeyStoreCacheImpl.java:280) ~[prprivate-session.jar:?] at com.pega.pegarules.session.internal.authorization.KeyStoreCacheImpl.loadKeyStoreIfKeyStoreNotCachedYet(KeyStoreCacheImpl.java:445) ~[prprivate-session.jar:?] at com.pega.pegarules.integration.engine.internal.util.KeyStoreUtilsImpl.getKeystoreData(KeyStoreUtilsImpl.java:823) ~[printegrint.jar:?] at com.pega.pegarules.integration.engine.internal.security.jwt.JWTProcessingTransformer.constructSignatureBean(JWTProcessingTransformer.java:112) ~[printegrint.jar:?]
Failed to get JWKSet keys : Source is Reference to URL java.io.IOException: Server returned HTTP response code: 500 for URL: https://XYZZZZZZZZZZ/prweb/PRRestService/keys/v1/jwt/pega_api_test at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1902) ~[?:1.8.0_362] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1500) ~[?:1.8.0_362] at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268) ~[?:1.8.0_362] at com.pega.pegarules.integration.engine.internal.util.KeyStoreUtilsImpl.getJWKKeyStore(KeyStoreUtilsImpl.java:902) ~[printegrint.jar:?] at com.pega.pegarules.session.internal.authorization.KeyStoreCacheImpl.loadKeyStoretoCache(KeyStoreCacheImpl.java:280) ~[prprivate-session.jar:?] at com.pega.pegarules.session.internal.authorization.KeyStoreCacheImpl.loadKeyStoreIfKeyStoreNotCachedYet(KeyStoreCacheImpl.java:445) ~[prprivate-session.jar:?] at com.pega.pegarules.integration.engine.internal.util.KeyStoreUtilsImpl.getKeystoreData(KeyStoreUtilsImpl.java:823) ~[printegrint.jar:?]
Can someone please help me with this issue.