How to encrypt a JSON request with Blowfish encryption before sending the request?

How to encrypt a JSON request with Blowfish encryption before sending the request?

  

Hi all,

I have one request from a third party app to send  a JSON request encrypted with Blowfish encryption using a REST API they provide. 

First Question: I was thinking using a "OnBeforeRequestAdvanced" action so I can  encrypt the JSON there before the request been sent, but i'm not sure what steps I should implement inside that action. 

Does anyone already implemented something similar that can give me some guidelines please?

Second Question: I look at the forge but I couldn't find nothing related with Blowfish encryption. Can someone tell me if exist any forge extension that I can use to implement the Blowfish encryption or I need to create a specific extension for that?


Thank you in advance for your help.


Cheers

Goncalo

Hi,

If you did not found anything in the forge you probably have to make the extension yourself.

I.e. https://defuse.ca/blowfish.htm or some differentt implementations..


On your other questions, it depends what is actually needed...so better to give us a proper example what you need to achieve.


Hi J,


thank you for your answer.


What they ask to implement is to encrypt the JSON request before we send the request. I assume they want to encrypt the all body content request, then they will decrypt on their side and deserialize  the JSON after. What I was doing at the moment it was just consuming the REST API, filling the inputs of the methods and get the response, normal REST API use in OS, but encrypt the JSON request of REST API methods is new for me, I never did it, that I'm asking if someone already had to build something similar and if yes, what were the tools used for that.

If more specific information it's needed I'm glad to ask them.


Thank you for your help.


Cheers

Hi Gonçalo

You can take a look at the implementation of Twitter Connector, it uses an OnBeforeRequestAdvanced to calculate a signature based on the request body. Not exactly what you are looking for, but should point you in the right direction.

Cheers

João Amorim wrote:

Hi Gonçalo

You can take a look at the implementation of Twitter Connector, it uses an OnBeforeRequestAdvanced to calculate a signature based on the request body. Not exactly what you are looking for, but should point you in the right direction.

Cheers


Hi Joao,


thank you for your help.

I will have a look and try to understand how can apply a similar logic to my case.


Cheers