Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): Credentials for popular SecOps services, Part 1 #6775

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
4164da4
Add Alien Vault credentials
agobrech Jun 14, 2023
f797e19
Add PaloAlto credentials
agobrech Jun 14, 2023
b2b2833
Add Cisco merkai credentials
agobrech Jun 14, 2023
c00c9e5
Add Qualys credentials
agobrech Jun 14, 2023
f15d307
Create recordedfuture api
agobrech Jun 14, 2023
fa20d81
Add Carbon black credentials
agobrech Jun 14, 2023
0e75d1e
Add Cisco Umbrella credentials
agobrech Jun 14, 2023
54c7142
Add ElasticSIEM credentials
agobrech Jun 14, 2023
c1c4f1b
Fix ElasticSIEM
agobrech Jun 14, 2023
fa9515e
Add Kibana credentials
agobrech Jun 15, 2023
0085efd
Add Okta Credentials
agobrech Jun 15, 2023
002fe5f
Add Virus Total credentials
agobrech Jun 15, 2023
1766cc4
Add CiscoAMP credentials
agobrech Jun 15, 2023
87ec35c
Add CiscoFirepower credentials
agobrech Jun 15, 2023
146b8da
Add CheckPoint credentials
agobrech Jun 15, 2023
7d61783
Add Microsoft Sentinel OAuth2
agobrech Jun 15, 2023
a3b7b70
Add credentials Azure IAM OAuth2
agobrech Jun 15, 2023
00e72ee
Add Microsoft Defender credentials
agobrech Jun 15, 2023
72f0a8a
Add ArcSight credentials
agobrech Jun 15, 2023
da97c3b
Fix Alien Vault OTX key
agobrech Jun 15, 2023
ee9e24a
Add CrowdStrike OAuth2
agobrech Jun 16, 2023
e6bb6d8
fix wrong expression
agobrech Jun 16, 2023
f69eada
Fix Okta
agobrech Jun 16, 2023
6c5ca5b
Fix Kibana credentials
agobrech Jun 16, 2023
2e2a6b1
Add Cisco Umbrella credentials
agobrech Jun 16, 2023
c22f888
Improve arcsight credentials
agobrech Jun 16, 2023
1f55174
Enable VirusTotal
agobrech Jun 16, 2023
5c4467c
Fix ElasticSIEM
agobrech Jun 16, 2023
b5fdf5d
Fix Elastic testing
agobrech Jun 16, 2023
e2f1ee0
Add icons to tested credentials
agobrech Jun 16, 2023
9b61691
Update more logos
agobrech Jun 16, 2023
43186ba
Enable microsoft and azure based cred
agobrech Jun 16, 2023
4af0bee
Fix Microsoft defender name
agobrech Jun 16, 2023
55262a4
Fix displayName checkpoint
agobrech Jun 19, 2023
5bd9534
Fix displayname carbon black
agobrech Jun 19, 2023
e2ea72a
Fix cisco test credentials
agobrech Jun 19, 2023
6e69b42
Fix wording for Cisco
agobrech Jun 19, 2023
78c9fd6
Fix display name for Crowdstrike
agobrech Jun 19, 2023
ea9c8f8
Fix url default
agobrech Jun 19, 2023
714edfc
Fix display name
agobrech Jun 19, 2023
771a48d
Fix okta display name
agobrech Jun 19, 2023
9b16a69
Capitalize display name
agobrech Jun 19, 2023
f9737cb
Remove Qualys
agobrech Jun 19, 2023
2b3da42
Remove comments
agobrech Jun 19, 2023
139e784
Add IpervaWAFApi
agobrech Jun 27, 2023
a41ea3d
Add Hybrid Analysis
agobrech Jun 27, 2023
3aeec0c
Add sekoia credentials
agobrech Jun 27, 2023
f2dcfbb
Merge branch 'master' of github.com:n8n-io/n8n into node-583-create-c…
Joffcom Jun 28, 2023
65e6c4c
Add Auth0 Management API
Joffcom Jun 28, 2023
dc5d4c3
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 17, 2023
4299a41
:zap: mist token api
michael-radency Jul 17, 2023
e1135a9
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 17, 2023
4d7bee0
:zap: shuffler api credentials
michael-radency Jul 17, 2023
b386d32
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 18, 2023
8088c96
:zap: f5 credentials, clean up
michael-radency Jul 19, 2023
c560341
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 19, 2023
8da27fa
:zap: azura AD update
michael-radency Jul 19, 2023
f8e351e
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 19, 2023
de9d3e8
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 25, 2023
3bd1ad4
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 25, 2023
8ad023a
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 26, 2023
a252fdd
:zap: added qradar, qualys, updated carbonblack, recordedFuture
michael-radency Jul 26, 2023
39ae27d
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 26, 2023
c2ff7d2
:zap: cisco secure ebdpoint credentials
michael-radency Jul 26, 2023
9c48703
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 26, 2023
3c5d42b
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 27, 2023
9412ce1
:zap: added fortiGate, Trellix, updated f5, imperva, cisco meraki
michael-radency Jul 27, 2023
f167b5c
:zap: added opencti
michael-radency Jul 27, 2023
519f2bb
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 27, 2023
c3bb114
:zap: zscaler zia credentials, wazuh credentials WIP
michael-radency Jul 27, 2023
fc82537
Merge branch 'master' of https://github.com/n8n-io/n8n into node-583-…
michael-radency Jul 27, 2023
11f872f
:zap: clean up
michael-radency Jul 28, 2023
e0ef61e
Merge branch 'master' of https://github.com/n8n-io/n8n into node-680-…
michael-radency Jul 28, 2023
cde0e73
:zap: sekoia fix
michael-radency Jul 28, 2023
8fa0838
:zap: excluded PaloAlto
michael-radency Jul 28, 2023
863e765
Merge branch 'master' of https://github.com/n8n-io/n8n into node-680-…
michael-radency Jul 28, 2023
d526182
improve kibana creds required and default port number
maspio Jul 28, 2023
5c5ddb7
Auth0 creds added missing icon and improved required props
maspio Jul 28, 2023
655d17e
kibana creds use url (without port)
maspio Jul 28, 2023
c88ca49
added missing required props
maspio Jul 28, 2023
cb1353d
Merge branch 'master' of https://github.com/n8n-io/n8n into node-680-…
michael-radency Jul 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions packages/nodes-base/credentials/AlienVaultApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';

export class AlienVaultApi implements ICredentialType {
name = 'alienVaultApi';

displayName = 'AlienVault API';

icon = 'file:icons/AlienVault.png';

properties: INodeProperties[] = [
{
displayName: 'OTX Key',
name: 'accessToken',
type: 'string',
typeOptions: { password: true },
required: true,
default: '',
},
];

authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
'X-OTX-API-KEY': '={{$credentials.accessToken}}',
},
},
};

test: ICredentialTestRequest = {
request: {
baseURL: 'https://otx.alienvault.com',
url: '/api/v1/user/me',
},
};
}
85 changes: 85 additions & 0 deletions packages/nodes-base/credentials/Auth0ManagementApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import type {
IAuthenticateGeneric,
ICredentialDataDecryptedObject,
ICredentialTestRequest,
ICredentialType,
IHttpRequestHelper,
INodeProperties,
} from 'n8n-workflow';

export class Auth0ManagementApi implements ICredentialType {
name = 'auth0ManagementApi';

displayName = 'Auth0 Management API';

icon = 'file:icons/Auth0.svg';

properties: INodeProperties[] = [
{
displayName: 'Session Token',
name: 'sessionToken',
type: 'hidden',
typeOptions: {
expirable: true,
},
default: '',
},
{
displayName: 'Auth0 Domain',
name: 'domain',
type: 'string',
required: true,
default: 'your-domain.eu.auth0.com',
},
{
displayName: 'Client ID',
name: 'clientId',
type: 'string',
required: true,
default: '',
},
{
displayName: 'Client Secret',
name: 'clientSecret',
type: 'string',
typeOptions: {
password: true,
},
required: true,
default: '',
},
];

async preAuthentication(this: IHttpRequestHelper, credentials: ICredentialDataDecryptedObject) {
const { access_token } = (await this.helpers.httpRequest({
method: 'POST',
url: `https://${credentials.domain}/oauth/token`,
body: {
client_id: credentials.clientId,
client_secret: credentials.clientSecret,
audience: `https://${credentials.domain}/api/v2/`,
grant_type: 'client_credentials',
},
headers: {
'Content-Type': 'application/json',
},
})) as { access_token: string };
return { sessionToken: access_token };
}

authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.sessionToken}}',
},
},
};

test: ICredentialTestRequest = {
request: {
baseURL: '=https://{{$credentials.domain}}',
url: '/api/v2/clients',
},
};
}
2 changes: 1 addition & 1 deletion packages/nodes-base/credentials/Aws.credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class Aws implements ICredentialType {

documentationUrl = 'aws';

icon = 'file:AWS.svg';
icon = 'file:icons/AWS.svg';

properties: INodeProperties[] = [
{
Expand Down
45 changes: 45 additions & 0 deletions packages/nodes-base/credentials/CarbonBlackApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';

export class CarbonBlackApi implements ICredentialType {
name = 'carbonBlackApi';

displayName = 'Carbon Black API';

icon = 'file:icons/vmware.svg';

documentationUrl = 'carbonblack';

properties: INodeProperties[] = [
{
displayName: 'URL',
name: 'apiUrl',
type: 'string',
placeholder: 'https://defense.conferdeploy.net/',
default: '',
},
{
displayName: 'Access Token',
name: 'accessToken',
type: 'string',
typeOptions: { password: true },
required: true,
default: '',
},
];

authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
'X-Auth-Token': '={{$credentials.accessToken}}',
},
},
};

// test: ICredentialTestRequest = {
// request: {
// baseURL: '={{$credentials.apiUrl}}',
// url: 'integrationServices/v3/auditlogs',
// },
// };
}
36 changes: 36 additions & 0 deletions packages/nodes-base/credentials/CiscoMerakiApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';

export class CiscoMerakiApi implements ICredentialType {
name = 'ciscoMerakiApi';

displayName = 'Cisco Meraki API';

icon = 'file:icons/Cisco.svg';

properties: INodeProperties[] = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: { password: true },
required: true,
default: '',
},
];

authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
'X-Cisco-Meraki-API-Key': '={{$credentials.apiKey}}',
},
},
};

// test: ICredentialTestRequest = {
// request: {
// baseURL: 'https://api.meraki.com/api/v1',
// url: '/organizations',
// },
// };
}
115 changes: 115 additions & 0 deletions packages/nodes-base/credentials/CiscoSecureEndpointApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import type {
ICredentialDataDecryptedObject,
ICredentialTestRequest,
ICredentialType,
IHttpRequestOptions,
INodeProperties,
} from 'n8n-workflow';

import axios from 'axios';

export class CiscoSecureEndpointApi implements ICredentialType {
name = 'ciscoSecureEndpointApi';

displayName = 'Cisco Secure Endpoint (AMP) API';

icon = 'file:icons/Cisco.svg';

properties: INodeProperties[] = [
{
displayName: 'Region',
name: 'region',
type: 'options',
options: [
{
name: 'Asia Pacific, Japan, and China',
value: 'apjc.amp',
},
{
name: 'Europe',
value: 'eu.amp',
},
{
name: 'North America',
value: 'amp',
},
],
default: 'amp',
},
{
displayName: 'Client ID',
name: 'clientId',
type: 'string',
default: '',
required: true,
},
{
displayName: 'Client Secret',
name: 'clientSecret',
type: 'string',
typeOptions: {
password: true,
},
default: '',
required: true,
},
];

async authenticate(
credentials: ICredentialDataDecryptedObject,
requestOptions: IHttpRequestOptions,
): Promise<IHttpRequestOptions> {
const clientId = credentials.clientId as string;
const clientSecret = credentials.clientSecret as string;
const region = credentials.region as string;

const secureXToken = await axios({
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Accept: 'application/json',
},
auth: {
username: clientId,
password: clientSecret,
},
method: 'POST',
data: new URLSearchParams({
grant_type: 'client_credentials',
}).toString(),
url: `https://visibility.${region}.cisco.com/iroh/oauth2/token`,
});

const secureEndpointToken = await axios({
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Accept: 'application/json',
Authorization: `Bearer ${secureXToken.data.access_token}`,
},
method: 'POST',
data: new URLSearchParams({
grant_type: 'client_credentials',
}).toString(),
url: `https://api.${region}.cisco.com/v3/access_tokens`,
});

const requestOptionsWithAuth: IHttpRequestOptions = {
...requestOptions,
headers: {
...requestOptions.headers,
Authorization: `Bearer ${secureEndpointToken.data.access_token}`,
},
};

return requestOptionsWithAuth;
}

test: ICredentialTestRequest = {
request: {
baseURL: '=https://api.{{$credentials.region}}.cisco.com',
url: '/v3/organizations',
qs: {
size: 10,
},
},
};
}
Loading
Loading