There is any way to use certificates to make Http requests with this node?
like we can do in Postman certificates option.
There is any way to use certificates to make Http requests with this node?
like we can do in Postman certificates option.
Currently that is no possible. You can make a feature request.
Hey @rodrigoscdc!
Iāve turned this into a feature request. Donāt forget to vote it
Hi, harshil, i have the same problem. I use a nginx proxy on the same server for that that works.
https://serverfault.com/questions/622855/nginx-proxy-to-back-end-with-ssl-client-certificate-authentication
Thanks,
Stefan
Hello, any update about this feature? Is it in your roadmap of development?
I do not think so but not completely sure. @David has a better view of what is on our internal roadmap. Perhaps, this is something we add to the HTTP node V2 which is probably somewhere in our roadmap.
Just for future reference, we probably have to set the agentOptions to achieve this.
@sirdavidoff Do you have any update if this feature request is in your scope of development?
Thanks for your attention.
I am very interested in this feature and have already voted on the feature request.
Here in Brazil, open banking is being implemented and there is a bank that has provided api that requires access with crt and key.
Weāre going to tackle the HTTP node once we have the public API out, at which point weāll take a decision on this. But can very much see why it would be useful.
In my case, it will be very useful to access the government soap apis from here. Iām an accountant, and through that I could integrate these requests from my clients through n8n, and a .pfx certification is required.
This will be an important feture for the Cloud vertion too
Voted!
We think this feature will be very interesting also for n8n cloud as there are other solutions that already have it. aka make.com (integromat.com). Examples below.
It is interesting the way the handle the cert and key files. They have a helper, that extracts the key which is what actually gets saved in the credentials module.
Now, to be able to use it in the meantime, some post above suggests to import using npm request (request - npm) but I see this is deprecated. Any idea on new npm option that is not deprecated? @RicardoE105
Thanks!
Andres
Hey @pradilla,
You could use Axios and pass it a nodejs https.agent that is configured to use a cert and key.
Great @Jon !!! Any chance you can share just a short snippet or workflow node code to copy and paste with an example please?
Also. I can use this on one of my hosted n8n, but would really need it in my cloud version. So, can the axios lib be added to cloud? same as you guys added the crypto one? @maxT
Found this, can any of you guys help me modify to fit n8n function syntax and return the json body?
Thanks in advance!! =)
const agent = new https.Agent({
key: fs.readFileSync(__dirname + ā/path/to/keyfile.keyā),
cert: fs.readFileSync(__dirname + ā/path/to/certfile.certā),
rejectUnauthorized: false
keepAlive: true
});
const data = JSON.stringify({
ā¦
});
const axiosConfig = {
httpsAgent: agent,
headers: {
āContent-Typeā: āapplication/jsonā,
āContent-Lengthā: data.length,
}
};
const response = await axios.post(āhttps://someendpointā, data, axiosConfig).then(r => {
console.log(ārā, r);
})
n8n functions use JavaScript so what you have would in theory work if the paths are valid. You might need to pop in a couple of require lines to use the Axios config and https agent, when trying to run it you should get some errors that would help adapt it as needed.
Got it working!
Thanks!
Needed these 3 modules and for now can not run on n8n cloud (https,axios,fs). If any ideas arise these would be more than welcome. @Jon @maxT
const https = require(āhttpsā)
const axios = require(āaxiosā);
const fs = require(āfsā);
Running axios like this:
const response = await axios(options)
Then in the options new Agent like this:
httpsAgent : new https.Agent(agent),
And the cert files pulled from local storage like this (documentation does say it can be a path or a URL:
ākeyfileā: fs.readFileSync(āpath/keyfile.keyā),
Hi All:
I woud like to resume about this topic: SSL Certificate for HTTP Request on Cloud Vertion.
Iām not sure if In this post we have all the elements about the relevance, oportunities and possible approaches to send to de Product Team for their estimates. But one thing Iām sure is that this feature will add big value for the Cloud Vertion.
#cloud #feature-requests #security
I want to add SSL Certificate for Http Request on Cloud Version
Hey Guys.
For all people following this topic SSL Certificates for Http Request on Cloud Vertion, this guy @pradilla is showing us a very nice /affordable way to implement it as an extension of current Oauth2 module bypassing the files handling in a clever way .
Letās check it : HTTP with client certificate auth request
With this⦠my hope for christmas
is to see this topic climbing to the top of the backlog tree
#cloud #feature-requests #core #security
Hey @maxT, hope all is well! I just wanted to come here and see if there can be some traction with this FR that has 16 votes. some time back I got an answer from Ricardo who understood that this should not be so difficult. Placing that thread here for reference: HTTP with client certificate auth request - Questions - n8n @Jose_Alejandro_Diaz1
Thanks,
Andres