@tadnt2003/n8n-nodes-infisical 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -0
- package/README.md +198 -69
- package/dist/credentials/InfisicalApi.credentials.js +13 -0
- package/dist/credentials/infisical.png +0 -0
- package/dist/nodes/Infisical/Infisical.node.js +585 -227
- package/dist/nodes/InfisicalSync/InfisicalSync.node.d.ts +10 -0
- package/dist/nodes/InfisicalSync/InfisicalSync.node.js +1057 -0
- package/dist/nodes/InfisicalSync/infisical.png +0 -0
- package/dist/utils/auth.d.ts +5 -0
- package/dist/utils/auth.js +27 -0
- package/dist/utils/folderOperations.d.ts +2 -0
- package/dist/utils/folderOperations.js +103 -0
- package/dist/utils/projectOperations.d.ts +2 -0
- package/dist/utils/projectOperations.js +89 -0
- package/dist/utils/secretOperations.d.ts +2 -0
- package/dist/utils/secretOperations.js +256 -0
- package/dist/utils/syncOperations.d.ts +2 -0
- package/dist/utils/syncOperations.js +750 -0
- package/package.json +6 -4
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# n8n-nodes-infisical
|
|
1
|
+
# @tadnt2003/n8n-nodes-infisical
|
|
2
2
|
|
|
3
3
|
An n8n community node for integrating [Infisical](https://infisical.com/) — the open-source secrets management platform — into your n8n workflows.
|
|
4
4
|
|
|
@@ -10,7 +10,6 @@ An n8n community node for integrating [Infisical](https://infisical.com/) — th
|
|
|
10
10
|
[Installation](#installation)
|
|
11
11
|
[Credentials](#credentials)
|
|
12
12
|
[Operations](#operations)
|
|
13
|
-
[Usage Examples](#usage-examples)
|
|
14
13
|
[Compatibility](#compatibility)
|
|
15
14
|
[Resources](#resources)
|
|
16
15
|
|
|
@@ -20,7 +19,7 @@ An n8n community node for integrating [Infisical](https://infisical.com/) — th
|
|
|
20
19
|
|
|
21
20
|
Follow the [community nodes installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n documentation.
|
|
22
21
|
|
|
23
|
-
Package name:
|
|
22
|
+
Package name: `@tadnt2003/n8n-nodes-infisical`
|
|
24
23
|
|
|
25
24
|
---
|
|
26
25
|
|
|
@@ -39,15 +38,6 @@ Universal Auth uses a Machine Identity's Client ID and Client Secret to obtain a
|
|
|
39
38
|
5. Assign the identity to your project with appropriate roles
|
|
40
39
|
6. Copy the **Client ID** and **Client Secret**
|
|
41
40
|
|
|
42
|
-
**Credential fields:**
|
|
43
|
-
|
|
44
|
-
| Field | Description |
|
|
45
|
-
| --- | --- |
|
|
46
|
-
| API URL | Base URL of your Infisical API (default: `https://app.infisical.com/api`) |
|
|
47
|
-
| Authentication Type | Select **Universal Auth (Machine Identity)** |
|
|
48
|
-
| Client ID | The Machine Identity's Client ID |
|
|
49
|
-
| Client Secret | The Machine Identity's Client Secret |
|
|
50
|
-
|
|
51
41
|
### Service Token (Legacy)
|
|
52
42
|
|
|
53
43
|
Service Tokens are deprecated by Infisical and may be removed in future versions. Use Universal Auth for new integrations.
|
|
@@ -57,14 +47,6 @@ Service Tokens are deprecated by Infisical and may be removed in future versions
|
|
|
57
47
|
3. Create a new Service Token with the required permissions
|
|
58
48
|
4. Copy the token
|
|
59
49
|
|
|
60
|
-
**Credential fields:**
|
|
61
|
-
|
|
62
|
-
| Field | Description |
|
|
63
|
-
| --- | --- |
|
|
64
|
-
| API URL | Base URL of your Infisical API (default: `https://app.infisical.com/api`) |
|
|
65
|
-
| Authentication Type | Select **Service Token (Legacy)** |
|
|
66
|
-
| Service Token | Your Infisical Service Token |
|
|
67
|
-
|
|
68
50
|
> For self-hosted Infisical, set API URL to your instance (e.g., `https://infisical.example.com/api`).
|
|
69
51
|
|
|
70
52
|
---
|
|
@@ -75,15 +57,16 @@ Service Tokens are deprecated by Infisical and may be removed in future versions
|
|
|
75
57
|
|
|
76
58
|
All Secret operations require: **Project ID**, **Environment**, **Secret Path** (default: `/`).
|
|
77
59
|
|
|
78
|
-
| Operation | Description | API |
|
|
79
|
-
| --- | --- | --- |
|
|
80
|
-
| **Get** | Fetch a single secret by key | `GET /
|
|
81
|
-
| **Get Many** | List all secrets in a path | `GET /
|
|
82
|
-
| **Create** | Create a single secret | `POST /
|
|
83
|
-
| **Create Many** | Create multiple secrets in one request | `POST
|
|
84
|
-
| **Update** | Update a single secret | `PATCH
|
|
85
|
-
| **Update Many** | Update multiple secrets in one request | `PATCH
|
|
86
|
-
| **Delete** | Delete a single secret by key | `DELETE /
|
|
60
|
+
| Operation | Description | Method | API endpoint |
|
|
61
|
+
| --- | --- | --- | --- |
|
|
62
|
+
| **Get** | Fetch a single secret by key | `GET` | `/v4/secrets/{key}` |
|
|
63
|
+
| **Get Many** | List all secrets in a path | `GET` | `/v4/secrets` |
|
|
64
|
+
| **Create** | Create a single secret | `POST` | `/v4/secrets/{key}` |
|
|
65
|
+
| **Create Many** | Create multiple secrets in one request | `POST` | `/v4/secrets/batch` |
|
|
66
|
+
| **Update** | Update a single secret | `PATCH` | `/v4/secrets/{key}` |
|
|
67
|
+
| **Update Many** | Update multiple secrets in one request | `PATCH` | `/v4/secrets/batch` |
|
|
68
|
+
| **Delete** | Delete a single secret by key | `DELETE` | `/v4/secrets/{key}` |
|
|
69
|
+
| **Delete Many** | Delete multiple secrets in one request | `DELETE` | `/v4/secrets/batch` |
|
|
87
70
|
|
|
88
71
|
#### Get
|
|
89
72
|
|
|
@@ -105,17 +88,25 @@ Required: **Secret Key**, **Secret Value**
|
|
|
105
88
|
| Skip Multiline Encoding | Disable multiline encoding for the value |
|
|
106
89
|
| Type | `shared` (default) or `personal` |
|
|
107
90
|
|
|
91
|
+
**Secret Metadata (optional):** Add one or more key/value metadata tags to attach to the secret.
|
|
92
|
+
|
|
108
93
|
#### Create Many
|
|
109
94
|
|
|
110
95
|
Add secrets using the repeatable **Secrets** list. Each entry requires **Secret Key** and **Secret Value**.
|
|
111
96
|
|
|
112
|
-
Per-secret optional fields:
|
|
97
|
+
Per-secret optional fields:
|
|
98
|
+
|
|
99
|
+
| Field | Description |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| Secret Comment | Attach a comment to this secret |
|
|
102
|
+
| Skip Multiline Encoding | Disable multiline encoding for this secret's value |
|
|
103
|
+
| Secret Metadata | Key/value metadata tags for this secret |
|
|
113
104
|
|
|
114
105
|
**Additional Fields (optional):**
|
|
115
106
|
|
|
116
107
|
| Field | Description |
|
|
117
108
|
| --- | --- |
|
|
118
|
-
| Secret Path Override | Use a different path than the top-level Secret Path |
|
|
109
|
+
| Secret Path Override | Use a different path than the top-level Secret Path for this batch |
|
|
119
110
|
|
|
120
111
|
Returns each created secret as a separate output item. If a secret protection policy is active, returns an approval object instead.
|
|
121
112
|
|
|
@@ -123,9 +114,9 @@ Returns each created secret as a separate output item. If a secret protection po
|
|
|
123
114
|
|
|
124
115
|
Required: **Secret Key** (identifies the secret to update)
|
|
125
116
|
|
|
126
|
-
All update values are optional — set only what needs to change
|
|
117
|
+
All update values are optional — set only what needs to change.
|
|
127
118
|
|
|
128
|
-
**Additional Fields:**
|
|
119
|
+
**Additional Fields (optional):**
|
|
129
120
|
|
|
130
121
|
| Field | Description |
|
|
131
122
|
| --- | --- |
|
|
@@ -135,73 +126,211 @@ All update values are optional — set only what needs to change:
|
|
|
135
126
|
| Type | `shared` or `personal` |
|
|
136
127
|
| Skip Multiline Encoding | Disable multiline encoding for the value |
|
|
137
128
|
|
|
129
|
+
**Secret Metadata (optional):** Add one or more key/value metadata tags to attach to the secret.
|
|
130
|
+
|
|
138
131
|
#### Update Many
|
|
139
132
|
|
|
140
133
|
Add secrets using the repeatable **Secrets** list. Each entry requires **Secret Key** (the current name).
|
|
141
134
|
|
|
142
|
-
Per-secret optional fields:
|
|
135
|
+
Per-secret optional fields:
|
|
136
|
+
|
|
137
|
+
| Field | Description |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| Secret Value | The new value (leave blank to keep existing) |
|
|
140
|
+
| New Secret Name | Rename this secret |
|
|
141
|
+
| Secret Comment | Update the comment for this secret |
|
|
142
|
+
| Skip Multiline Encoding | Disable multiline encoding for this secret's value |
|
|
143
|
+
| Secret Metadata | Key/value metadata tags for this secret |
|
|
143
144
|
|
|
144
145
|
**Additional Fields (optional):**
|
|
145
146
|
|
|
146
147
|
| Field | Description |
|
|
147
148
|
| --- | --- |
|
|
148
149
|
| Mode | `failOnNotFound` (default) — error if secret missing; `upsert` — create if missing; `ignore` — skip missing secrets |
|
|
149
|
-
| Secret Path Override | Use a different path than the top-level Secret Path |
|
|
150
|
+
| Secret Path Override | Use a different path than the top-level Secret Path for this batch |
|
|
150
151
|
|
|
151
|
-
Returns each updated secret as a separate output item.
|
|
152
|
+
Returns each updated secret as a separate output item. If a secret protection policy is active, returns an approval object instead.
|
|
152
153
|
|
|
153
154
|
#### Delete
|
|
154
155
|
|
|
155
156
|
Required: **Secret Key**
|
|
156
157
|
|
|
157
|
-
|
|
158
|
+
#### Delete Many
|
|
159
|
+
|
|
160
|
+
Add secrets using the repeatable **Secrets** list. Each entry requires **Secret Key** and **Type** (`shared` or `personal`).
|
|
161
|
+
|
|
162
|
+
**Additional Fields (optional):**
|
|
163
|
+
|
|
164
|
+
| Field | Description |
|
|
165
|
+
| --- | --- |
|
|
166
|
+
| Secret Path Override | Use a different path than the top-level Secret Path for this batch |
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
### Project
|
|
171
|
+
|
|
172
|
+
| Operation | Description | Method | API endpoint |
|
|
173
|
+
| --- | --- | --- | --- |
|
|
174
|
+
| **Get** | Fetch a project by ID | `GET` | `/v1/projects/{id}` |
|
|
175
|
+
| **Get by Slug** | Fetch a project by slug | `GET` | `/v1/projects/slug/{slug}` |
|
|
176
|
+
| **Get Many** | List all accessible projects | `GET` | `/v1/projects` |
|
|
177
|
+
| **Get Secret Snapshots** | List secret snapshots for a project environment | `GET` | `/v1/projects/{id}/secret-snapshots` |
|
|
178
|
+
| **Get User Memberships** | List all user memberships in a project | `GET` | `/v1/projects/{id}/memberships` |
|
|
179
|
+
| **Get User by Username** | Fetch a project member by username | `POST` | `/v1/projects/{id}/memberships/details` |
|
|
180
|
+
|
|
181
|
+
#### Get Project
|
|
182
|
+
|
|
183
|
+
Required: **Project ID**
|
|
184
|
+
|
|
185
|
+
#### Get by Slug
|
|
186
|
+
|
|
187
|
+
Required: **Project Slug**
|
|
188
|
+
|
|
189
|
+
#### Get Many Projects
|
|
190
|
+
|
|
191
|
+
No extra required fields. Returns each project as a separate output item.
|
|
192
|
+
|
|
193
|
+
#### Get Secret Snapshots
|
|
194
|
+
|
|
195
|
+
Required: **Project ID**, **Environment**
|
|
196
|
+
|
|
197
|
+
**Additional Fields (optional):**
|
|
198
|
+
|
|
199
|
+
| Field | Description |
|
|
200
|
+
| --- | --- |
|
|
201
|
+
| Secret Path | Filter snapshots by path (default: `/`) |
|
|
202
|
+
| Offset | Number of results to skip (for pagination) |
|
|
203
|
+
| Limit | Maximum number of results to return |
|
|
204
|
+
|
|
205
|
+
Returns each snapshot as a separate output item.
|
|
206
|
+
|
|
207
|
+
#### Get User Memberships
|
|
208
|
+
|
|
209
|
+
Required: **Project ID**
|
|
210
|
+
|
|
211
|
+
Returns each membership as a separate output item.
|
|
212
|
+
|
|
213
|
+
#### Get User by Username
|
|
214
|
+
|
|
215
|
+
Required: **Project ID**, **Username**
|
|
158
216
|
|
|
159
|
-
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
### Folder
|
|
220
|
+
|
|
221
|
+
All Folder operations except **Get Folder by ID** require: **Project ID**, **Environment**, **Folder Path** (default: `/`).
|
|
222
|
+
|
|
223
|
+
| Operation | Description | Method | API endpoint |
|
|
224
|
+
| --- | --- | --- | --- |
|
|
225
|
+
| **Get Folder by ID** | Fetch a folder by its ID | `GET` | `/v2/folders/{id}` |
|
|
226
|
+
| **List Folders** | List all folders at a path | `GET` | `/v2/folders` |
|
|
227
|
+
| **Create** | Create a new folder | `POST` | `/v2/folders` |
|
|
228
|
+
| **Update** | Rename or update a folder | `PATCH` | `/v2/folders/{id}` |
|
|
229
|
+
| **Delete** | Delete a folder | `DELETE` | `/v2/folders/{id}` |
|
|
230
|
+
|
|
231
|
+
#### Get Folder by ID
|
|
232
|
+
|
|
233
|
+
Required: **Folder ID**
|
|
234
|
+
|
|
235
|
+
#### List Folders
|
|
236
|
+
|
|
237
|
+
Required: **Project ID**, **Environment**, **Folder Path**
|
|
238
|
+
|
|
239
|
+
**Additional Fields (optional):**
|
|
240
|
+
|
|
241
|
+
| Field | Description |
|
|
160
242
|
| --- | --- |
|
|
161
|
-
|
|
|
243
|
+
| Recursive | Return all nested subfolders as well |
|
|
244
|
+
| Last Secret Modified | Filter folders by last secret modification time |
|
|
245
|
+
|
|
246
|
+
Returns each folder as a separate output item.
|
|
247
|
+
|
|
248
|
+
#### Create Folder
|
|
249
|
+
|
|
250
|
+
Required: **Project ID**, **Environment**, **Folder Path** (parent path), **Folder Name**
|
|
251
|
+
|
|
252
|
+
**Additional Fields (optional):**
|
|
253
|
+
|
|
254
|
+
| Field | Description |
|
|
255
|
+
| --- | --- |
|
|
256
|
+
| Description | A description for the folder |
|
|
257
|
+
|
|
258
|
+
#### Update Folder
|
|
259
|
+
|
|
260
|
+
Required: **Project ID**, **Environment**, **Folder Path**, **Folder ID**, **Folder Name** (new name)
|
|
261
|
+
|
|
262
|
+
**Additional Fields (optional):**
|
|
263
|
+
|
|
264
|
+
| Field | Description |
|
|
265
|
+
| --- | --- |
|
|
266
|
+
| Description | A description for the folder |
|
|
267
|
+
|
|
268
|
+
#### Delete Folder
|
|
269
|
+
|
|
270
|
+
Required: **Project ID**, **Environment**, **Folder Path**, **Folder ID or Name**
|
|
271
|
+
|
|
272
|
+
**Additional Fields (optional):**
|
|
273
|
+
|
|
274
|
+
| Field | Description |
|
|
275
|
+
| --- | --- |
|
|
276
|
+
| Force Delete | Delete the folder even if it contains secrets or subfolders |
|
|
162
277
|
|
|
163
278
|
---
|
|
164
279
|
|
|
165
|
-
##
|
|
280
|
+
## InfisicalSync
|
|
281
|
+
|
|
282
|
+
The **InfisicalSync** node provides bidirectional sync between n8n credentials and Infisical secrets. It requires an **InfisicalApi** credential (to authenticate to Infisical) and optionally an **n8nApi** credential (to read and write n8n credentials via the REST API).
|
|
166
283
|
|
|
167
|
-
###
|
|
284
|
+
### Sync Operations
|
|
168
285
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
286
|
+
| Operation | Direction | Description |
|
|
287
|
+
| --- | --- | --- |
|
|
288
|
+
| **Sync to Infisical** | n8n → Infisical | Push an n8n credential as a folder of secrets in Infisical. Each field becomes a secret; a `n8n_credential_type` metadata tag is attached to every secret for auto-discovery. Supports **Form** mode (select credential type from a dropdown and fill individual fields) and **JSON** mode (paste any credential type as a raw JSON object). When an n8nApi credential is configured, the input is validated against the n8n schema before any Infisical write occurs. |
|
|
289
|
+
| **Sync from Infisical** | Infisical → n8n | Pull all secrets from a named Infisical folder and update an existing n8n credential by ID. |
|
|
290
|
+
| **Auto Sync from Infisical** | Infisical → n8n | Discover all subfolders under a root Infisical path, read the `n8n_credential_type` metadata tag from each folder's secrets, then create or update the matching n8n credentials automatically. Uses the n8n REST API and validates credential data against each type's JSON Schema before saving. |
|
|
173
291
|
|
|
174
|
-
###
|
|
292
|
+
### Supported Credential Types (Form Mode)
|
|
175
293
|
|
|
176
|
-
|
|
177
|
-
2. Fill in **Project ID**, **Environment**, **Secret Path**
|
|
178
|
-
3. Each secret is output as a separate item
|
|
294
|
+
Form mode supports **31 credential types**. JSON mode accepts any type registered in n8n.
|
|
179
295
|
|
|
180
|
-
|
|
296
|
+
#### AI / LLM
|
|
181
297
|
|
|
182
|
-
|
|
183
|
-
2. Fill in **Project ID**, **Environment**, **Secret Path**, **Secret Key**, **Secret Value**
|
|
184
|
-
3. Optionally add a comment or set the type via **Additional Fields**
|
|
298
|
+
`anthropicApi`, `openAiApi`, `groqApi`, `cohereApi`, `huggingFaceApi`, `mistralCloudApi`
|
|
185
299
|
|
|
186
|
-
|
|
300
|
+
#### Productivity / Project Management
|
|
187
301
|
|
|
188
|
-
|
|
189
|
-
2. Fill in **Project ID**, **Environment**, **Secret Path**
|
|
190
|
-
3. Click **Add Secret** to add each key/value pair
|
|
191
|
-
4. Each created secret is returned as an output item
|
|
302
|
+
`jiraSoftwareCloudApi`
|
|
192
303
|
|
|
193
|
-
|
|
304
|
+
#### Messaging / Webhooks
|
|
194
305
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
306
|
+
`discordBotApi`, `discordWebhookApi`
|
|
307
|
+
|
|
308
|
+
#### Google
|
|
309
|
+
|
|
310
|
+
`googleApi`, `googleOAuth2Api`, `googleSheetsOAuth2Api`, `googleDriveOAuth2Api`, `googleDocsOAuth2Api`
|
|
311
|
+
|
|
312
|
+
#### Databases
|
|
313
|
+
|
|
314
|
+
`mySql`, `postgres`, `mongoDb`, `microsoftSql`, `redis`
|
|
315
|
+
|
|
316
|
+
#### Infrastructure
|
|
317
|
+
|
|
318
|
+
`n8nApi`, `infisicalApi`
|
|
319
|
+
|
|
320
|
+
#### Generic HTTP Auth
|
|
321
|
+
|
|
322
|
+
`httpBearerAuth`, `httpBasicAuth`, `httpDigestAuth`, `httpHeaderAuth`, `httpQueryAuth`, `httpCustomAuth`, `httpSslAuth`, `oAuth1Api`, `oAuth2Api`, `jwtAuth`
|
|
323
|
+
|
|
324
|
+
> **Note**: `httpMultipleHeadersAuth` is not supported in form mode because its `headers` field is a `fixedCollection` that cannot be serialised to flat Infisical key-value secrets. Use JSON mode for that type.
|
|
325
|
+
|
|
326
|
+
---
|
|
198
327
|
|
|
199
|
-
|
|
328
|
+
## API behaviour notes
|
|
200
329
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
330
|
+
- All operations use **Infisical API v4** for single-secret endpoints (`/api/v4/secrets/…`) and batch secret endpoints (`/api/v4/secrets/batch`).
|
|
331
|
+
- Project operations use **Infisical API v1** (`/api/v1/projects/…`).
|
|
332
|
+
- Folder operations use **Infisical API v2** (`/api/v2/folders/…`).
|
|
333
|
+
- When a **secret protection policy** is active on the project, create/update/delete endpoints return an approval object (`{ approval: { id, status, … } }`) instead of the secret directly.
|
|
205
334
|
|
|
206
335
|
---
|
|
207
336
|
|
|
@@ -209,9 +338,9 @@ Required: **Secret Key**
|
|
|
209
338
|
|
|
210
339
|
| Component | Version |
|
|
211
340
|
| --- | --- |
|
|
212
|
-
| n8n |
|
|
341
|
+
| n8n | v2.21.5 |
|
|
213
342
|
| Infisical | Cloud and Community Edition |
|
|
214
|
-
| Infisical API |
|
|
343
|
+
| Infisical API | v4 |
|
|
215
344
|
| n8n Nodes API | v1 |
|
|
216
345
|
|
|
217
346
|
---
|
|
@@ -64,6 +64,19 @@ class InfisicalApi {
|
|
|
64
64
|
required: true,
|
|
65
65
|
description: 'The Client Secret of your Infisical Machine Identity (Universal Auth)',
|
|
66
66
|
},
|
|
67
|
+
{
|
|
68
|
+
displayName: 'Organization Slug',
|
|
69
|
+
name: 'organizationSlug',
|
|
70
|
+
type: 'string',
|
|
71
|
+
displayOptions: {
|
|
72
|
+
show: {
|
|
73
|
+
authType: ['universalAuth'],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
default: '',
|
|
77
|
+
description: 'Optional. Scope the access token to a specific organization. Leave blank to use the organization the machine identity was created in. ' +
|
|
78
|
+
'To restrict this credential to a specific project, assign the machine identity to that project with the appropriate role in Infisical (Organization Settings → Machine Identities → your identity → Project Access).',
|
|
79
|
+
},
|
|
67
80
|
{
|
|
68
81
|
displayName: 'Service Token',
|
|
69
82
|
name: 'apiKey',
|
|
Binary file
|