Use custom certificate for https request with custom app (or serverless app) with fdk9

Hi all,

We’re updating to fdk 9 and are running into an issue that used to work with the previous fdk version. One of our custom apps needs a custom certificate chain to connect to an external (government) API.

This used to work like mentioned here:

var options = {
  … 
  ca: tlsCaCerts,
  method: 'POST',
  …
}

With tlsCaCerts being a file that I just pack with the rest of the app, and this worked like a charm :slight_smile:

With fdk9 we’re refactoring all our requests as documented for the ‘new’ request method that uses the requests.js; but “ca” seems not to be a valid option in the requests.json for the custom app; and after trying a few other things it seems that “ca” isnt a valid attribute at all in requests.json (no tls options seem to be available?), resulting in validation errors on ‘fdk run’.

So, I moved to plan B: Server Method Invocation. I made a server.js file that uses Axios to make the request and try to make it work though that; but I seem to run into a new issue: To use the custom certificate; I need to create an https agent to set the certificate, but the https module seems to be ‘blocked’ by Freshworks:

“For security reasons, Freshworks restricts some of the core modules where https is one of them.”

To make a long story short: is there any way I can include a custom certificate chain to make a https request to an external API?

small bump, hopefully someone has some suggestions for this issue … :slight_smile:

A new month, a new bump… Still looking for a working solution regarding this.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.