n8n-nodes-bitwarden 1.0.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 +46 -0
- package/README.md +425 -0
- package/dist/credentials/BitwardenApi.credentials.d.ts +10 -0
- package/dist/credentials/BitwardenApi.credentials.d.ts.map +1 -0
- package/dist/credentials/BitwardenApi.credentials.js +85 -0
- package/dist/credentials/BitwardenApi.credentials.js.map +1 -0
- package/dist/nodes/Bitwarden/Bitwarden.node.d.ts +6 -0
- package/dist/nodes/Bitwarden/Bitwarden.node.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/Bitwarden.node.js +1484 -0
- package/dist/nodes/Bitwarden/Bitwarden.node.js.map +1 -0
- package/dist/nodes/Bitwarden/BitwardenTrigger.node.d.ts +16 -0
- package/dist/nodes/Bitwarden/BitwardenTrigger.node.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/BitwardenTrigger.node.js +288 -0
- package/dist/nodes/Bitwarden/BitwardenTrigger.node.js.map +1 -0
- package/dist/nodes/Bitwarden/actions/collection/index.d.ts +42 -0
- package/dist/nodes/Bitwarden/actions/collection/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/actions/collection/index.js +180 -0
- package/dist/nodes/Bitwarden/actions/collection/index.js.map +1 -0
- package/dist/nodes/Bitwarden/actions/directorySync/index.d.ts +18 -0
- package/dist/nodes/Bitwarden/actions/directorySync/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/actions/directorySync/index.js +125 -0
- package/dist/nodes/Bitwarden/actions/directorySync/index.js.map +1 -0
- package/dist/nodes/Bitwarden/actions/event/index.d.ts +18 -0
- package/dist/nodes/Bitwarden/actions/event/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/actions/event/index.js +113 -0
- package/dist/nodes/Bitwarden/actions/event/index.js.map +1 -0
- package/dist/nodes/Bitwarden/actions/group/index.d.ts +42 -0
- package/dist/nodes/Bitwarden/actions/group/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/actions/group/index.js +171 -0
- package/dist/nodes/Bitwarden/actions/group/index.js.map +1 -0
- package/dist/nodes/Bitwarden/actions/importExport/index.d.ts +18 -0
- package/dist/nodes/Bitwarden/actions/importExport/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/actions/importExport/index.js +153 -0
- package/dist/nodes/Bitwarden/actions/importExport/index.js.map +1 -0
- package/dist/nodes/Bitwarden/actions/member/index.d.ts +46 -0
- package/dist/nodes/Bitwarden/actions/member/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/actions/member/index.js +163 -0
- package/dist/nodes/Bitwarden/actions/member/index.js.map +1 -0
- package/dist/nodes/Bitwarden/actions/organization/index.d.ts +26 -0
- package/dist/nodes/Bitwarden/actions/organization/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/actions/organization/index.js +88 -0
- package/dist/nodes/Bitwarden/actions/organization/index.js.map +1 -0
- package/dist/nodes/Bitwarden/actions/policy/index.d.ts +14 -0
- package/dist/nodes/Bitwarden/actions/policy/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/actions/policy/index.js +112 -0
- package/dist/nodes/Bitwarden/actions/policy/index.js.map +1 -0
- package/dist/nodes/Bitwarden/actions/project/index.d.ts +30 -0
- package/dist/nodes/Bitwarden/actions/project/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/actions/project/index.js +101 -0
- package/dist/nodes/Bitwarden/actions/project/index.js.map +1 -0
- package/dist/nodes/Bitwarden/actions/secret/index.d.ts +26 -0
- package/dist/nodes/Bitwarden/actions/secret/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/actions/secret/index.js +104 -0
- package/dist/nodes/Bitwarden/actions/secret/index.js.map +1 -0
- package/dist/nodes/Bitwarden/actions/serviceAccount/index.d.ts +34 -0
- package/dist/nodes/Bitwarden/actions/serviceAccount/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/actions/serviceAccount/index.js +115 -0
- package/dist/nodes/Bitwarden/actions/serviceAccount/index.js.map +1 -0
- package/dist/nodes/Bitwarden/actions/sso/index.d.ts +18 -0
- package/dist/nodes/Bitwarden/actions/sso/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/actions/sso/index.js +148 -0
- package/dist/nodes/Bitwarden/actions/sso/index.js.map +1 -0
- package/dist/nodes/Bitwarden/bitwarden.svg +4 -0
- package/dist/nodes/Bitwarden/transport/index.d.ts +35 -0
- package/dist/nodes/Bitwarden/transport/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/transport/index.js +221 -0
- package/dist/nodes/Bitwarden/transport/index.js.map +1 -0
- package/dist/nodes/Bitwarden/types/BitwardenTypes.d.ts +217 -0
- package/dist/nodes/Bitwarden/types/BitwardenTypes.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/types/BitwardenTypes.js +58 -0
- package/dist/nodes/Bitwarden/types/BitwardenTypes.js.map +1 -0
- package/dist/nodes/Bitwarden/utils/index.d.ts +94 -0
- package/dist/nodes/Bitwarden/utils/index.d.ts.map +1 -0
- package/dist/nodes/Bitwarden/utils/index.js +288 -0
- package/dist/nodes/Bitwarden/utils/index.js.map +1 -0
- package/dist/test/integration/bitwarden.test.d.ts +12 -0
- package/dist/test/integration/bitwarden.test.d.ts.map +1 -0
- package/dist/test/integration/bitwarden.test.js +218 -0
- package/dist/test/integration/bitwarden.test.js.map +1 -0
- package/dist/test/unit/utils.test.d.ts +12 -0
- package/dist/test/unit/utils.test.d.ts.map +1 -0
- package/dist/test/unit/utils.test.js +225 -0
- package/dist/test/unit/utils.test.js.map +1 -0
- package/package.json +79 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
License text copyright (c) 2017 MariaDB Corporation Ab.
|
|
4
|
+
|
|
5
|
+
Licensor:
|
|
6
|
+
Velocity BPA, LLC
|
|
7
|
+
https://velobpa.com
|
|
8
|
+
|
|
9
|
+
Licensed Work:
|
|
10
|
+
This repository and all source code, documentation, and associated artifacts
|
|
11
|
+
contained herein, including all n8n community nodes published by Velocity BPA.
|
|
12
|
+
|
|
13
|
+
Additional Use Grant:
|
|
14
|
+
You may use, modify, and run the Licensed Work free of charge for:
|
|
15
|
+
- Personal use
|
|
16
|
+
- Educational use
|
|
17
|
+
- Research use
|
|
18
|
+
- Internal business use, provided such use does not involve resale,
|
|
19
|
+
redistribution, or offering the Licensed Work as part of a commercial
|
|
20
|
+
product or service.
|
|
21
|
+
|
|
22
|
+
Commercial Use Restriction:
|
|
23
|
+
Commercial Use of the Licensed Work is prohibited without a valid
|
|
24
|
+
Commercial License issued by the Licensor.
|
|
25
|
+
|
|
26
|
+
Commercial Use includes, but is not limited to:
|
|
27
|
+
- Use of the Licensed Work within any Software-as-a-Service (SaaS),
|
|
28
|
+
Platform-as-a-Service (PaaS), or hosted application that is sold,
|
|
29
|
+
licensed, or monetized in any form
|
|
30
|
+
- Offering the Licensed Work as part of a managed services engagement
|
|
31
|
+
- Bundling or redistributing the Licensed Work with a paid product
|
|
32
|
+
- Reselling, sublicensing, or white-labeling the Licensed Work
|
|
33
|
+
- Embedding the Licensed Work into any commercial automation platform,
|
|
34
|
+
integration product, or solution offering
|
|
35
|
+
|
|
36
|
+
Change Date:
|
|
37
|
+
January 1, 2030
|
|
38
|
+
|
|
39
|
+
Change License:
|
|
40
|
+
Apache License, Version 2.0
|
|
41
|
+
|
|
42
|
+
For commercial licensing inquiries:
|
|
43
|
+
licensing@velobpa.com
|
|
44
|
+
|
|
45
|
+
Business Source License 1.1 full text:
|
|
46
|
+
https://mariadb.com/bsl11/
|
package/README.md
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
# n8n-nodes-bitwarden
|
|
2
|
+
|
|
3
|
+
> [Velocity BPA Licensing Notice]
|
|
4
|
+
>
|
|
5
|
+
> This n8n node is licensed under the Business Source License 1.1 (BSL 1.1).
|
|
6
|
+
>
|
|
7
|
+
> Use of this node by for-profit organizations in production environments requires a commercial license from Velocity BPA.
|
|
8
|
+
>
|
|
9
|
+
> For licensing information, visit https://velobpa.com/licensing or contact licensing@velobpa.com.
|
|
10
|
+
|
|
11
|
+
A comprehensive n8n community node for Bitwarden, the open-source password manager and secrets management platform. This node enables workflow automation for organization management, member provisioning, collection administration, SSO configuration, directory sync, and Secrets Manager integration through Bitwarden's Public API.
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+

|
|
15
|
+

|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
- **Member Management**: Invite, confirm, update, revoke, and restore organization members with collection and group access control
|
|
21
|
+
- **Collection Administration**: Create, update, delete collections with granular member and group access permissions
|
|
22
|
+
- **Group Management**: Organize members into groups with bulk operations and collection access configuration
|
|
23
|
+
- **Policy Configuration**: Configure organization security policies including 2FA, master password requirements, SSO, and vault timeout
|
|
24
|
+
- **Event Monitoring**: Query and filter organization audit events by date range, member, or event type
|
|
25
|
+
- **Organization Settings**: Manage organization details, billing, subscription, and API keys
|
|
26
|
+
- **SSO Configuration**: Configure OpenID Connect and SAML 2.0 single sign-on with Key Connector support
|
|
27
|
+
- **Directory Sync**: Configure and trigger directory synchronization with Azure AD, Okta, OneLogin, GSuite, and more
|
|
28
|
+
- **Secrets Manager**: Manage secrets, projects, and service accounts for DevOps credential management
|
|
29
|
+
- **Import/Export**: Bulk import and export organization vault data and member lists
|
|
30
|
+
- **Multi-Environment Support**: Works with Bitwarden Cloud (US/EU) and self-hosted instances
|
|
31
|
+
- **Trigger Node**: Poll for organization events with configurable event type filtering
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
### Community Nodes (Recommended)
|
|
36
|
+
|
|
37
|
+
1. Open n8n
|
|
38
|
+
2. Go to **Settings** > **Community Nodes**
|
|
39
|
+
3. Select **Install**
|
|
40
|
+
4. Enter `n8n-nodes-bitwarden` in the input field
|
|
41
|
+
5. Click **Install**
|
|
42
|
+
|
|
43
|
+
### Manual Installation
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Navigate to your n8n installation directory
|
|
47
|
+
cd ~/.n8n
|
|
48
|
+
|
|
49
|
+
# Install the package
|
|
50
|
+
npm install n8n-nodes-bitwarden
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Development Installation
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Clone the repository
|
|
57
|
+
git clone https://github.com/Velocity-BPA/n8n-nodes-bitwarden.git
|
|
58
|
+
cd n8n-nodes-bitwarden
|
|
59
|
+
|
|
60
|
+
# Install dependencies
|
|
61
|
+
npm install
|
|
62
|
+
|
|
63
|
+
# Build the project
|
|
64
|
+
npm run build
|
|
65
|
+
|
|
66
|
+
# Create symlink to n8n custom nodes directory
|
|
67
|
+
mkdir -p ~/.n8n/custom
|
|
68
|
+
ln -s $(pwd) ~/.n8n/custom/n8n-nodes-bitwarden
|
|
69
|
+
|
|
70
|
+
# Restart n8n
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Credentials Setup
|
|
74
|
+
|
|
75
|
+
### Bitwarden API Credentials
|
|
76
|
+
|
|
77
|
+
| Property | Type | Required | Description |
|
|
78
|
+
|----------|------|----------|-------------|
|
|
79
|
+
| Client ID | String | Yes | Organization API Client ID from Admin Console |
|
|
80
|
+
| Client Secret | String | Yes | Organization API Client Secret |
|
|
81
|
+
| Environment | Options | Yes | Cloud US, Cloud EU, or Self-hosted |
|
|
82
|
+
| Self-Hosted URL | String | Conditional | Required if using Self-hosted environment |
|
|
83
|
+
|
|
84
|
+
### Obtaining API Credentials
|
|
85
|
+
|
|
86
|
+
1. Log into the Bitwarden Web Vault as an organization owner
|
|
87
|
+
2. Navigate to **Admin Console** > **Settings** > **Organization info**
|
|
88
|
+
3. Scroll to the **API Key** section
|
|
89
|
+
4. Click **View API Key** or **Rotate API Key**
|
|
90
|
+
5. Copy the `client_id` and `client_secret` values
|
|
91
|
+
|
|
92
|
+
**Note**: The client_id format is `organization.{uuid}`
|
|
93
|
+
|
|
94
|
+
## Resources & Operations
|
|
95
|
+
|
|
96
|
+
### Members
|
|
97
|
+
|
|
98
|
+
| Operation | Description |
|
|
99
|
+
|-----------|-------------|
|
|
100
|
+
| Get All | List all organization members |
|
|
101
|
+
| Get | Get member by ID |
|
|
102
|
+
| Create | Invite new member to organization |
|
|
103
|
+
| Update | Update member details and permissions |
|
|
104
|
+
| Delete | Remove member from organization |
|
|
105
|
+
| Reinvite | Resend invitation to pending member |
|
|
106
|
+
| Confirm | Confirm an accepted member |
|
|
107
|
+
| Update Groups | Update member group assignments |
|
|
108
|
+
| Update Collections | Update member collection access |
|
|
109
|
+
| Revoke | Revoke member access |
|
|
110
|
+
| Restore | Restore a revoked member |
|
|
111
|
+
|
|
112
|
+
### Collections
|
|
113
|
+
|
|
114
|
+
| Operation | Description |
|
|
115
|
+
|-----------|-------------|
|
|
116
|
+
| Get All | List all collections |
|
|
117
|
+
| Get | Get collection by ID |
|
|
118
|
+
| Create | Create new collection |
|
|
119
|
+
| Update | Update collection |
|
|
120
|
+
| Delete | Delete collection |
|
|
121
|
+
| Get Members | Get members with access |
|
|
122
|
+
| Add Member | Add member to collection |
|
|
123
|
+
| Remove Member | Remove member from collection |
|
|
124
|
+
| Get Groups | Get groups with access |
|
|
125
|
+
| Update Groups | Update group access |
|
|
126
|
+
|
|
127
|
+
### Groups
|
|
128
|
+
|
|
129
|
+
| Operation | Description |
|
|
130
|
+
|-----------|-------------|
|
|
131
|
+
| Get All | List all groups |
|
|
132
|
+
| Get | Get group by ID |
|
|
133
|
+
| Create | Create new group |
|
|
134
|
+
| Update | Update group |
|
|
135
|
+
| Delete | Delete group |
|
|
136
|
+
| Get Members | Get members in group |
|
|
137
|
+
| Add Members | Add members to group |
|
|
138
|
+
| Remove Members | Remove members from group |
|
|
139
|
+
| Get Collections | Get collection access |
|
|
140
|
+
| Update Collections | Update collection access |
|
|
141
|
+
|
|
142
|
+
### Policies
|
|
143
|
+
|
|
144
|
+
| Operation | Description |
|
|
145
|
+
|-----------|-------------|
|
|
146
|
+
| Get All | List all policies |
|
|
147
|
+
| Get | Get policy by type |
|
|
148
|
+
| Update | Update policy configuration |
|
|
149
|
+
|
|
150
|
+
**Supported Policy Types**: Two-Factor Authentication, Master Password, Password Generator, Single Organization, Require SSO, Personal Ownership, Disable Send, Send Options, Reset Password, Maximum Vault Timeout, Disable Personal Vault Export, Activate Autofill
|
|
151
|
+
|
|
152
|
+
### Events
|
|
153
|
+
|
|
154
|
+
| Operation | Description |
|
|
155
|
+
|-----------|-------------|
|
|
156
|
+
| Get All | List organization events |
|
|
157
|
+
| Get By Date Range | Get events within date range |
|
|
158
|
+
| Get By Member | Get events for a specific member |
|
|
159
|
+
| Get By Type | Filter events by event type |
|
|
160
|
+
|
|
161
|
+
### Organization
|
|
162
|
+
|
|
163
|
+
| Operation | Description |
|
|
164
|
+
|-----------|-------------|
|
|
165
|
+
| Get | Get organization details |
|
|
166
|
+
| Update | Update organization settings |
|
|
167
|
+
| Get Billing | Get billing information |
|
|
168
|
+
| Get Subscription | Get subscription details |
|
|
169
|
+
| Get License | Get organization license |
|
|
170
|
+
| Rotate API Key | Rotate the organization API key |
|
|
171
|
+
|
|
172
|
+
### SSO Configuration
|
|
173
|
+
|
|
174
|
+
| Operation | Description |
|
|
175
|
+
|-----------|-------------|
|
|
176
|
+
| Get | Get SSO configuration |
|
|
177
|
+
| Update | Update SSO configuration |
|
|
178
|
+
| Get Metadata | Get SSO metadata |
|
|
179
|
+
| Test Connection | Test SSO connection |
|
|
180
|
+
|
|
181
|
+
**Supported SSO Types**: OpenID Connect, SAML 2.0
|
|
182
|
+
|
|
183
|
+
### Directory Sync
|
|
184
|
+
|
|
185
|
+
| Operation | Description |
|
|
186
|
+
|-----------|-------------|
|
|
187
|
+
| Get | Get directory configuration |
|
|
188
|
+
| Update | Update directory configuration |
|
|
189
|
+
| Sync | Trigger directory sync |
|
|
190
|
+
| Get Sync History | Get sync history |
|
|
191
|
+
|
|
192
|
+
**Supported Directory Types**: Azure Active Directory, Okta, OneLogin, GSuite, JumpCloud, Generic LDAP
|
|
193
|
+
|
|
194
|
+
### Secrets Manager - Secrets
|
|
195
|
+
|
|
196
|
+
| Operation | Description |
|
|
197
|
+
|-----------|-------------|
|
|
198
|
+
| Get All | List all secrets |
|
|
199
|
+
| Get | Get secret by ID |
|
|
200
|
+
| Create | Create new secret |
|
|
201
|
+
| Update | Update secret |
|
|
202
|
+
| Delete | Delete secret |
|
|
203
|
+
| Get By Project | Get secrets in project |
|
|
204
|
+
|
|
205
|
+
*Note: Requires Secrets Manager subscription*
|
|
206
|
+
|
|
207
|
+
### Secrets Manager - Projects
|
|
208
|
+
|
|
209
|
+
| Operation | Description |
|
|
210
|
+
|-----------|-------------|
|
|
211
|
+
| Get All | List all projects |
|
|
212
|
+
| Get | Get project by ID |
|
|
213
|
+
| Create | Create new project |
|
|
214
|
+
| Update | Update project |
|
|
215
|
+
| Delete | Delete project |
|
|
216
|
+
| Get Secrets | Get secrets in project |
|
|
217
|
+
| Get Service Accounts | Get service accounts with access |
|
|
218
|
+
|
|
219
|
+
### Secrets Manager - Service Accounts
|
|
220
|
+
|
|
221
|
+
| Operation | Description |
|
|
222
|
+
|-----------|-------------|
|
|
223
|
+
| Get All | List all service accounts |
|
|
224
|
+
| Get | Get service account by ID |
|
|
225
|
+
| Create | Create service account |
|
|
226
|
+
| Update | Update service account |
|
|
227
|
+
| Delete | Delete service account |
|
|
228
|
+
| Get Access Tokens | List access tokens |
|
|
229
|
+
| Create Access Token | Create new access token |
|
|
230
|
+
| Revoke Access Token | Revoke access token |
|
|
231
|
+
|
|
232
|
+
### Import/Export
|
|
233
|
+
|
|
234
|
+
| Operation | Description |
|
|
235
|
+
|-----------|-------------|
|
|
236
|
+
| Import Organization | Import organization vault data |
|
|
237
|
+
| Export Organization | Export organization vault |
|
|
238
|
+
| Import Members | Import members from CSV |
|
|
239
|
+
| Export Members | Export members to CSV |
|
|
240
|
+
|
|
241
|
+
## Trigger Node
|
|
242
|
+
|
|
243
|
+
The Bitwarden Trigger node polls for organization events at configurable intervals.
|
|
244
|
+
|
|
245
|
+
### Supported Events
|
|
246
|
+
|
|
247
|
+
- All Events
|
|
248
|
+
- Member Invited
|
|
249
|
+
- Member Accepted
|
|
250
|
+
- Member Confirmed
|
|
251
|
+
- Member Updated
|
|
252
|
+
- Member Removed
|
|
253
|
+
- Collection Created
|
|
254
|
+
- Collection Updated
|
|
255
|
+
- Collection Deleted
|
|
256
|
+
- Group Created
|
|
257
|
+
- Group Updated
|
|
258
|
+
- Group Deleted
|
|
259
|
+
- Policy Updated
|
|
260
|
+
- Organization Updated
|
|
261
|
+
|
|
262
|
+
### Configuration
|
|
263
|
+
|
|
264
|
+
| Property | Description |
|
|
265
|
+
|----------|-------------|
|
|
266
|
+
| Event | The event type to trigger on |
|
|
267
|
+
| Include Acting User Details | Optionally include details about the user who triggered the event |
|
|
268
|
+
|
|
269
|
+
## Usage Examples
|
|
270
|
+
|
|
271
|
+
### Invite a New Member
|
|
272
|
+
|
|
273
|
+
```javascript
|
|
274
|
+
// Workflow: HR System Integration
|
|
275
|
+
// When a new employee is added to HR system, invite them to Bitwarden
|
|
276
|
+
|
|
277
|
+
// Bitwarden Node Configuration
|
|
278
|
+
{
|
|
279
|
+
"resource": "member",
|
|
280
|
+
"operation": "create",
|
|
281
|
+
"email": "{{$json.employeeEmail}}",
|
|
282
|
+
"type": 2, // User
|
|
283
|
+
"accessAll": false,
|
|
284
|
+
"collections": [
|
|
285
|
+
{
|
|
286
|
+
"id": "department-collection-id",
|
|
287
|
+
"readOnly": false,
|
|
288
|
+
"hidePasswords": false,
|
|
289
|
+
"manage": false
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Sync Groups with Directory
|
|
296
|
+
|
|
297
|
+
```javascript
|
|
298
|
+
// Workflow: Nightly Directory Sync
|
|
299
|
+
// Trigger directory sync and check results
|
|
300
|
+
|
|
301
|
+
// Bitwarden Node Configuration - Trigger Sync
|
|
302
|
+
{
|
|
303
|
+
"resource": "directorySync",
|
|
304
|
+
"operation": "sync",
|
|
305
|
+
"syncType": "incremental"
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// Bitwarden Node Configuration - Get History
|
|
309
|
+
{
|
|
310
|
+
"resource": "directorySync",
|
|
311
|
+
"operation": "getSyncHistory"
|
|
312
|
+
}
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### Monitor Security Events
|
|
316
|
+
|
|
317
|
+
```javascript
|
|
318
|
+
// Workflow: Security Alerting
|
|
319
|
+
// Send alerts for security-related events
|
|
320
|
+
|
|
321
|
+
// Bitwarden Trigger Configuration
|
|
322
|
+
{
|
|
323
|
+
"event": "policyUpdated"
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// Then route to Slack/Email for alerting
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
## Environment Support
|
|
330
|
+
|
|
331
|
+
| Environment | API Base URL | Identity URL |
|
|
332
|
+
|-------------|--------------|--------------|
|
|
333
|
+
| Cloud US | https://api.bitwarden.com | https://identity.bitwarden.com |
|
|
334
|
+
| Cloud EU | https://api.bitwarden.eu | https://identity.bitwarden.eu |
|
|
335
|
+
| Self-hosted | https://your.domain.com/api | https://your.domain.com/identity |
|
|
336
|
+
|
|
337
|
+
## Error Handling
|
|
338
|
+
|
|
339
|
+
The node handles common Bitwarden API errors:
|
|
340
|
+
|
|
341
|
+
| Error Code | Description | Handling |
|
|
342
|
+
|------------|-------------|----------|
|
|
343
|
+
| 400 | Bad Request | Validation error details returned |
|
|
344
|
+
| 401 | Unauthorized | Automatic token refresh and retry |
|
|
345
|
+
| 403 | Forbidden | Insufficient permissions error |
|
|
346
|
+
| 404 | Not Found | Resource not found error |
|
|
347
|
+
| 409 | Conflict | Resource conflict error |
|
|
348
|
+
| 429 | Rate Limited | Automatic retry with exponential backoff |
|
|
349
|
+
|
|
350
|
+
## Security Best Practices
|
|
351
|
+
|
|
352
|
+
1. **Credential Security**: Store API credentials securely in n8n's credential system
|
|
353
|
+
2. **Principle of Least Privilege**: Use organization accounts with minimal required permissions
|
|
354
|
+
3. **Audit Logging**: Monitor the Events resource for security-relevant activities
|
|
355
|
+
4. **Secure Self-Hosted**: If using self-hosted Bitwarden, ensure HTTPS is properly configured
|
|
356
|
+
5. **Rotate API Keys**: Periodically rotate organization API keys using the Organization resource
|
|
357
|
+
|
|
358
|
+
## Development
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
# Install dependencies
|
|
362
|
+
npm install
|
|
363
|
+
|
|
364
|
+
# Build the project
|
|
365
|
+
npm run build
|
|
366
|
+
|
|
367
|
+
# Watch mode for development
|
|
368
|
+
npm run dev
|
|
369
|
+
|
|
370
|
+
# Run linting
|
|
371
|
+
npm run lint
|
|
372
|
+
|
|
373
|
+
# Fix linting issues
|
|
374
|
+
npm run lint:fix
|
|
375
|
+
|
|
376
|
+
# Run tests
|
|
377
|
+
npm test
|
|
378
|
+
|
|
379
|
+
# Run tests with coverage
|
|
380
|
+
npm run test:coverage
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
## Author
|
|
384
|
+
|
|
385
|
+
**Velocity BPA**
|
|
386
|
+
- Website: [velobpa.com](https://velobpa.com)
|
|
387
|
+
- GitHub: [Velocity-BPA](https://github.com/Velocity-BPA)
|
|
388
|
+
|
|
389
|
+
## Licensing
|
|
390
|
+
|
|
391
|
+
This n8n community node is licensed under the **Business Source License 1.1**.
|
|
392
|
+
|
|
393
|
+
### Free Use
|
|
394
|
+
|
|
395
|
+
Permitted for personal, educational, research, and internal business use.
|
|
396
|
+
|
|
397
|
+
### Commercial Use
|
|
398
|
+
|
|
399
|
+
Use of this node within any SaaS, PaaS, hosted platform, managed service, or paid automation offering requires a commercial license.
|
|
400
|
+
|
|
401
|
+
For licensing inquiries: **licensing@velobpa.com**
|
|
402
|
+
|
|
403
|
+
See [LICENSE](LICENSE), [COMMERCIAL_LICENSE.md](COMMERCIAL_LICENSE.md), and [LICENSING_FAQ.md](LICENSING_FAQ.md) for details.
|
|
404
|
+
|
|
405
|
+
## Contributing
|
|
406
|
+
|
|
407
|
+
Contributions are welcome! Please ensure all contributions comply with the BSL 1.1 license terms.
|
|
408
|
+
|
|
409
|
+
1. Fork the repository
|
|
410
|
+
2. Create a feature branch
|
|
411
|
+
3. Commit your changes
|
|
412
|
+
4. Push to the branch
|
|
413
|
+
5. Open a Pull Request
|
|
414
|
+
|
|
415
|
+
## Support
|
|
416
|
+
|
|
417
|
+
- **Documentation**: [Bitwarden Public API Documentation](https://bitwarden.com/help/public-api/)
|
|
418
|
+
- **Issues**: [GitHub Issues](https://github.com/Velocity-BPA/n8n-nodes-bitwarden/issues)
|
|
419
|
+
- **Commercial Support**: licensing@velobpa.com
|
|
420
|
+
|
|
421
|
+
## Acknowledgments
|
|
422
|
+
|
|
423
|
+
- [Bitwarden](https://bitwarden.com/) for their excellent password management platform and API
|
|
424
|
+
- [n8n](https://n8n.io/) for the workflow automation platform
|
|
425
|
+
- The open-source community for continuous support and feedback
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class BitwardenApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=BitwardenApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitwardenApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/BitwardenApi.credentials.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,qBAAa,YAAa,YAAW,eAAe;IAClD,IAAI,SAAkB;IACtB,WAAW,SAAmB;IAC9B,gBAAgB,SAA4C;IAE5D,UAAU,EAAE,eAAe,EAAE,CAwD3B;IAEF,YAAY,EAAE,oBAAoB,CAGhC;IAEF,IAAI,EAAE,sBAAsB,CAM1B;CACH"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) Velocity BPA, LLC
|
|
4
|
+
* Licensed under the Business Source License 1.1
|
|
5
|
+
* Commercial use requires a separate commercial license.
|
|
6
|
+
* See LICENSE file for details.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.BitwardenApi = void 0;
|
|
10
|
+
class BitwardenApi {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.name = 'bitwardenApi';
|
|
13
|
+
this.displayName = 'Bitwarden API';
|
|
14
|
+
this.documentationUrl = 'https://bitwarden.com/help/public-api/';
|
|
15
|
+
this.properties = [
|
|
16
|
+
{
|
|
17
|
+
displayName: 'Client ID',
|
|
18
|
+
name: 'clientId',
|
|
19
|
+
type: 'string',
|
|
20
|
+
default: '',
|
|
21
|
+
required: true,
|
|
22
|
+
description: 'Organization API Client ID from Admin Console > Settings > Organization info > API Key',
|
|
23
|
+
placeholder: 'organization.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
displayName: 'Client Secret',
|
|
27
|
+
name: 'clientSecret',
|
|
28
|
+
type: 'string',
|
|
29
|
+
typeOptions: {
|
|
30
|
+
password: true,
|
|
31
|
+
},
|
|
32
|
+
default: '',
|
|
33
|
+
required: true,
|
|
34
|
+
description: 'Organization API Client Secret from Admin Console',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
displayName: 'Environment',
|
|
38
|
+
name: 'environment',
|
|
39
|
+
type: 'options',
|
|
40
|
+
default: 'cloudUS',
|
|
41
|
+
options: [
|
|
42
|
+
{
|
|
43
|
+
name: 'Cloud US',
|
|
44
|
+
value: 'cloudUS',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Cloud EU',
|
|
48
|
+
value: 'cloudEU',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'Self-Hosted',
|
|
52
|
+
value: 'selfHosted',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
description: 'The Bitwarden environment to connect to',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
displayName: 'Self-Hosted URL',
|
|
59
|
+
name: 'selfHostedUrl',
|
|
60
|
+
type: 'string',
|
|
61
|
+
default: '',
|
|
62
|
+
placeholder: 'https://bitwarden.example.com',
|
|
63
|
+
description: 'The base URL of your self-hosted Bitwarden instance',
|
|
64
|
+
displayOptions: {
|
|
65
|
+
show: {
|
|
66
|
+
environment: ['selfHosted'],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
this.authenticate = {
|
|
72
|
+
type: 'generic',
|
|
73
|
+
properties: {},
|
|
74
|
+
};
|
|
75
|
+
this.test = {
|
|
76
|
+
request: {
|
|
77
|
+
baseURL: '={{$credentials.environment === "cloudEU" ? "https://api.bitwarden.eu" : $credentials.environment === "selfHosted" ? $credentials.selfHostedUrl + "/api" : "https://api.bitwarden.com"}}',
|
|
78
|
+
url: '/public/organizations/self',
|
|
79
|
+
method: 'GET',
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.BitwardenApi = BitwardenApi;
|
|
85
|
+
//# sourceMappingURL=BitwardenApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitwardenApi.credentials.js","sourceRoot":"","sources":["../../credentials/BitwardenApi.credentials.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AASH,MAAa,YAAY;IAAzB;QACE,SAAI,GAAG,cAAc,CAAC;QACtB,gBAAW,GAAG,eAAe,CAAC;QAC9B,qBAAgB,GAAG,wCAAwC,CAAC;QAE5D,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EACT,wFAAwF;gBAC1F,WAAW,EAAE,mDAAmD;aACjE;YACD;gBACE,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,mDAAmD;aACjE;YACD;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,SAAS;gBAClB,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,UAAU;wBAChB,KAAK,EAAE,SAAS;qBACjB;oBACD;wBACE,IAAI,EAAE,UAAU;wBAChB,KAAK,EAAE,SAAS;qBACjB;oBACD;wBACE,IAAI,EAAE,aAAa;wBACnB,KAAK,EAAE,YAAY;qBACpB;iBACF;gBACD,WAAW,EAAE,yCAAyC;aACvD;YACD;gBACE,WAAW,EAAE,iBAAiB;gBAC9B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,+BAA+B;gBAC5C,WAAW,EAAE,qDAAqD;gBAClE,cAAc,EAAE;oBACd,IAAI,EAAE;wBACJ,WAAW,EAAE,CAAC,YAAY,CAAC;qBAC5B;iBACF;aACF;SACF,CAAC;QAEF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,EAAE;SACf,CAAC;QAEF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,0LAA0L;gBACnM,GAAG,EAAE,4BAA4B;gBACjC,MAAM,EAAE,KAAK;aACd;SACF,CAAC;IACJ,CAAC;CAAA;AA3ED,oCA2EC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class Bitwarden implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=Bitwarden.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Bitwarden.node.d.ts","sourceRoot":"","sources":["../../../nodes/Bitwarden/Bitwarden.node.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EACrB,MAAM,cAAc,CAAC;AA8BtB,qBAAa,SAAU,YAAW,SAAS;IACzC,WAAW,EAAE,oBAAoB,CAglC/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAgUxE"}
|