Safe use of Workflows from Wordpress without exposing user/pass

Hi there :slight_smile:

I am at the moment trying to find a way, that users from WordPress can use workflows in n8n, without exposing user/application password and also, without creating credentials directly in n8n.

In WordPress I have my user and application password.
I have a REST API in WordPress, that is communicating with a HTTP Request to receive data.
With my credentials that I have in n8n, it works great and I dont expose my data.

But now - if I want another user to be able to use the workflow, I need to send the authentication over the headers - so I have a BAERER and also for testing, added my user/pass.
That works - but of course, at one point I have to encode in n8n to be able, to talk to the REST API in WordPress.
And exactly there I dont find a solution - how can I use for example WordPress credentials by giving them an activation key for n8n - but also, how to make sure, that in n8n I dont get any information of the user, when sending the data back to WordPress?
Maybe I am overcomplicating the things again - but I just want to make sure, that everything is 100% waterproof and there is zero chance, that anything of the private data from a wordpress user is exposed in n8n.
Thank you very much! :slight_smile:

Edit: Only a direction what keywords to search for would help perfectly!

Information on your n8n setup

  • n8n version: 1.45.1
  • Database: SQLite
  • n8n EXECUTIONS_PROCESS: main
  • Running n8n via: Docker
  • Operating system: Ubuntu

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Sometimes just writing here already gives the solution.
Please correct me if I am wrong - but I solved it that way:

I en- and decrypt the user/pass directly in WordPress - means, instead of sending the real application password, I send an encrypted version.
The HTTP request node than is going to send the same encrypted password back to wordpress, where the password will be decrypted and thats it.
Means, in n8n I only see the encrypted version but never even once the real password.

Am I am on the correct path?

Well… usually the JWT is used for interoperations between two applications, so maybe it’s what you need.

Thank you!

At the moment I am building a workflow, that works insanly good.
And since there is a small group of people, who are interested to use that wokflow, I am at the moment actually just looking for a way, to make it available for them without exposing the workflow and without them, exposing any sensible data in the workflow.

Actually, I am looking for a best practuce way, how to first send and trigger data from WordPress to the n8n webhook - than manipulating these data and finally send it back to the REST API in WordPress - all that, without having any chance, to see personal data from the user and also, that the users cannot use the workflow without propper authentication.

Is JWT the way to go for that?
Or OAuth2? Or something else?

Again, thank you for your help!

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