Question
Cigna - EverNorth
US
Last activity: 7 Jul 2017 15:32 EDT
How to integrate REST connector wih OAuth 1.0 for SHA-256
While attempting to connect to the client's OAuth service to get the security token, we found that the client requires us to use SHA-256 but that is not supported with the current OAuth profile.
The option we are thinking is to customize the Pega OOTB to pass the SHA-256 method in the Authorization header to retrieve the token. Not sue Pega will support just by changing the signature method with security features.
Is there any other better way, the Rest Integration can work for SHA-256.
Your suggestion are welcome.
***Edited by Moderator: Marissa to update categories & update SR Details***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
What version of Pega are you on? Check out pzGenerateOauthSignature. That is where you would need to start,
Pegasystems Inc.
US
Based on the SR that was raised and redirected to the support community (here), he's on Pega 7.2.1
I looked at the code of pzGenerateOauthSignature, and it appears to only call HMAC SHA-1, with no option to use SHA-256 or SHA-512.
Pegasystems Inc.
US
That is the basic problem. The OOTB authentication profile only supports SHA-1, so we are having to do a work around in order to use 256 or higher. We are basically having to reverse engineer the whole Oauth process in order to make this work. Isn't there some way to get a patch so that could be done automatically?
Pegasystems
Cigna - EverNorth
US
Hi Dass, in our scenario the OAuthProfile is used to store the OAuth1.0 details. What we found is that the pega default activity called in during the runtime is pyConnectOAuthProvider, which is not completely doing the job for getting the request token and access token to go for the protected resource.
Few things we did similar to mention above to generate the signature value for SHA256 and pass the method SHA26 by modifying the below activites.
1. pyConnectOAuthProvider - Modified to call the wrapper activity to get the request token and access token. This activity also check for the token exist from clientToken instance to avoid calling the Authinator again. So we customized to store the expiry time and valid during the open instance to reuse/request for new key.
2. pyGetRequestToken - Modified the JAVA step to pass the method and updated the function to call for SHA256.
3. pyGetAccessToken - With the same above modifications, added a new property to store the token expiry time to validate for re-use of token.
The challenge we faced is during the Access token retrieval and protected resource calling, the TokenSecret that pega sending is not working with in our boundary of the signature validation, so we used the function @decodeURLParameter to decode and then generate the signature.
Regards,
DJ