Hi,
I need to use a Mutually Authenticated TLS (mTLS) connection from a Freshdesk serverless application to an external API.
If the external API was to use a TLS certificate signed by a self-signed Certificate Authority (CA) (i.e. not signed by one of the globally trusted CAs built into Node.js), what is the best way to provide the Freshdesk serverless application with the certificate for the external API? I’ve assumed that I will need to provide the CA certificate(s) via an Installation Parameter (iparam).
I’ve assumed (as used in the Freshdesk developer documentation) that the [require(‘request’]) module is the preferred way to go, so I have used in the following example. Please correct me if there is a preferred alternative to [require(‘request’)].
Is the only option to include the following in the options supplied (for example) to the post method of the request object? Note in the below that it’s the tlsCaCerts variable that is supplying the CA certificate(s) and as mentioned above I’ve assumed that I will have to source the value for tlsCaCerts variable from an Installation Parameter (iparam).
var options = {
…
cert: tlsCert,
key: tlsKey,
ca: tlsCaCerts,
method: 'POST',
…
}
request.post(options, (err, res, body) => {
})
Is there any way to set NODE_EXTRA_CA_CERTS for the Freshdesk serverless application?
Paul