150
Views
3
Comments
Need to send SSL certificate (.csr and .key file) while consuming the rest API
Application Type
Reactive
Service Studio Version
11.53.24 (Build 61544)
Platform Version
11.15.0 (Build 34858)

I have an requirement to send SSL certificate (.csr and .key) file while consuming rest api. I searched on forums but there they have provided to add some .pfx certificate but not .csr.

Can someone help me to understand the steps how and where i can add/import SSL certificate and test the API in outsystems. 






2022-08-03 04-32-50
Ravi Punjwani

Hi Shahrukh,

It would be worth trying out your use case with Postman first. If your API works well with Postman, then try implementing the same here in Outsystems.

See what options give you the desired results in calling API from Postman with different file formats and headers. Just makes it a bit handy, in my opinion.

If possible please share here the links of forums where you found that you should add pfx and not csr, so we can understand the context more clearly.

UserImage.jpg
Shahrukh Barmaky

Hi Ravi,
I have tested in postman, under certificate I have uploaded .cer and .key SSL certificate. it is working in postman.
How can now add the same certificate in outsystems while consuming the Rest API.
reference for doing the same I am posting below where they have shown to add .pfx file with password. 

https://www.outsystems.com/forums/discussion/44537/https-consumer-how-to-use-https-consumer/

In Postman added certificate under setting > Certificate > add certificate

2022-08-03 04-32-50
Ravi Punjwani

Hi Shahrukh,

Thanks for the details and confirming about your example working in Postman.

Here's how you can achieve it in Outsystems. Download and install the following forge component:

https://www.outsystems.com/forge/component-overview/3591/https-consumer

Then use the server action AddClientCertificate from this component inside the OnBeforeRequest



Find more details about this feature in the documentation here:

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/REST/Consume_REST_APIs

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/REST/Consume_REST_APIs/Advanced_Customizations


Using the above feature you can add yoiur Client Certificate alongwith your request.


Hope this helps. Cheers!


Ravi

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.