Question
Labb Ltd
GB
Last activity: 5 Jul 2024 1:42 EDT
AWS Signature Version 4 signing support in Pega
Hi All,
We are trying to implement connect rest to achieve the below API from Pega 8.5.
https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html#API_Encrypt_Examples
We are successful in sending data and get the CMK encrypted cipherblob back with PostMan. But postman does sign using AWS Signature Version 4 hence its working.
Has anyone achieved this in Pega without importing AWS SDK. This could be for any AWS hosted REST APIs.
Only alternative that we have is to build custom library/function using AWS SDKs to implement this instead of REST API.
Please share your thoughts. Thanks in advance.
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 1 Mar 2023 15:42 EST
Deloitte
US
@Murali.Krishnan.D & @ChaithanyaJ9714
We can implement by customizing RULE-CONNECT-REST!INVOKE rule and inserting a step to add AWS V4 signature to header.
I have followed instructions from 2 posts for the java code to create signature
https://www.javaquery.com/2016/01/aws-version-4-signing-process-complete.html
Make sure to include the 3 headers in Connect REST rule. Pega Engine code will ignore them if you just set them in the java step
I have done a POC with GET operations on S3 APIs and ran without issues.
@Murali.Krishnan.D & @ChaithanyaJ9714
We can implement by customizing RULE-CONNECT-REST!INVOKE rule and inserting a step to add AWS V4 signature to header.
I have followed instructions from 2 posts for the java code to create signature
https://www.javaquery.com/2016/01/aws-version-4-signing-process-complete.html
Make sure to include the 3 headers in Connect REST rule. Pega Engine code will ignore them if you just set them in the java step
I have done a POC with GET operations on S3 APIs and ran without issues.
NJ Courts
US
@Murali.Krishnan.D Were you able to find a way to do this? We are looking for a solution to integrate with AWS via REST api as well.
Accepted Solution
Updated: 1 Mar 2023 15:42 EST
Deloitte
US
@Murali.Krishnan.D & @ChaithanyaJ9714
We can implement by customizing RULE-CONNECT-REST!INVOKE rule and inserting a step to add AWS V4 signature to header.
I have followed instructions from 2 posts for the java code to create signature
https://www.javaquery.com/2016/01/aws-version-4-signing-process-complete.html
Make sure to include the 3 headers in Connect REST rule. Pega Engine code will ignore them if you just set them in the java step
I have done a POC with GET operations on S3 APIs and ran without issues.
@Murali.Krishnan.D & @ChaithanyaJ9714
We can implement by customizing RULE-CONNECT-REST!INVOKE rule and inserting a step to add AWS V4 signature to header.
I have followed instructions from 2 posts for the java code to create signature
https://www.javaquery.com/2016/01/aws-version-4-signing-process-complete.html
Make sure to include the 3 headers in Connect REST rule. Pega Engine code will ignore them if you just set them in the java step
I have done a POC with GET operations on S3 APIs and ran without issues.
ANZ
AU
@Gowtham Allu Have you used code from both posts together? I mean to say you used Java libraries and AWS SDK libraries together to generate signature?
If possible, would you be able to share the java step code? (you can mask the client specific values)
Regards,
Venkat
Updated: 28 Feb 2023 16:41 EST
Crum & Forster Solutions For Business Inc
US
@Gowtham Allu We have the similar requirement. Could you please share the code?
Updated: 2 Mar 2023 0:18 EST
Cognitonic
AU
@GowthamA3261 @Murali.Krishnan.D I have similar requirement can you share the steps to be followed.
thanks in advance!
Cisco
IN
@Gowtham Allu Can you please elaborate more on how this can be achieved. We are also having a similar requirement. However we are stuck at the phase where we generate the AWS signature for authentication.
Accenture
IN
Could you please share the java code you have used.. we have the similar requirement..
Cisco
IN
@Murali.Krishnan.DHello Murali, can you please provide the steps to achieve this requirement?