Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
/plugins/Ivanti-ITSM/ @shawn149
/plugins/LaunchDarkly/ @clarkd
/plugins/MetOffice/ @blackgrouse
/plugins/ngrok/ @clarkd
/plugins/Notion/ @clarkd
/plugins/OctopusDeploy/ @clarkd
/plugins/Phare/ @vinbab
Expand Down
11 changes: 11 additions & 0 deletions plugins/ngrok/v1/configValidation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"steps": [
{
"displayName": "Authenticate",
"dataStream": { "name": "apiKeys" },
"required": true,
"error": "Could not authenticate with ngrok. Check that the value is an API key (not an agent authtoken) and that it has not been deleted.",
"success": "Connected to ngrok successfully."
}
]
}
30 changes: 30 additions & 0 deletions plugins/ngrok/v1/custom_types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[
{
"name": "Endpoint",
"sourceType": "Endpoint",
"icon": "plug",
"singular": "Endpoint",
"plural": "Endpoints"
},
{
"name": "Reserved Domain",
"sourceType": "Reserved Domain",
"icon": "globe",
"singular": "Reserved Domain",
"plural": "Reserved Domains"
},
{
"name": "TLS Certificate",
"sourceType": "TLS Certificate",
"icon": "certificate",
"singular": "TLS Certificate",
"plural": "TLS Certificates"
},
{
"name": "Reserved Address",
"sourceType": "Reserved Address",
"icon": "network-wired",
"singular": "Reserved Address",
"plural": "Reserved Addresses"
}
]
79 changes: 79 additions & 0 deletions plugins/ngrok/v1/dataStreams/agentSessions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"name": "agentSessions",
"displayName": "Agent Sessions",
"description": "ngrok agents currently connected to the account, with version, OS, IP and region",
"tags": [
"Network"
],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "tunnel_sessions",
"expandInnerObjects": true,
"pathToData": "tunnel_sessions",
"paging": {
"mode": "nextUrl",
"pageSize": {
"realm": "queryArg",
"path": "limit",
"value": "100"
},
"in": {
"realm": "payload",
"path": "next_page_uri"
}
},
"errorHandling": {
"type": "path",
"realm": "payload",
"path": "msg"
}
},
"matches": "none",
"metadata": [
{
"name": "id",
"displayName": "Agent session ID",
"role": "id",
"visible": false
},
{
"name": "ip",
"displayName": "IP address",
"role": "label"
},
{
"name": "agent_version",
"displayName": "Agent version"
},
{
"name": "os",
"displayName": "OS"
},
{
"name": "region",
"displayName": "Region"
},
{
"name": "transport",
"displayName": "Transport"
},
{
"name": "started_at",
"displayName": "Started",
"shape": "date"
},
{
"name": "uptime",
"displayName": "Uptime",
"computed": true,
"shape": "seconds",
"valueExpression": "{{ $['started_at'] ? Math.floor((Date.now() - new Date($['started_at']).getTime()) / 1000) : null }}"
},
{
"name": "credential.id",
"displayName": "Authtoken ID"
}
],
"timeframes": false
}
23 changes: 23 additions & 0 deletions plugins/ngrok/v1/dataStreams/apiKeys.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "apiKeys",
"displayName": "API Keys",
"description": "API keys in the ngrok account (first page only)",
"tags": ["Security"],
"baseDataSourceName": "httpRequestUnscoped",
"visibility": { "type": "hidden" },
"config": {
"httpMethod": "get",
"endpointPath": "api_keys",
"getArgs": [{ "key": "limit", "value": "1" }],
"pathToData": "keys",
"paging": { "mode": "none" },
"errorHandling": { "type": "path", "realm": "payload", "path": "msg" }
},
"matches": "none",
"metadata": [
{ "name": "id", "displayName": "ID", "role": "id" },
{ "name": "description", "displayName": "Description", "role": "label" },
{ "name": "created_at", "displayName": "Created", "shape": "date" }
],
"timeframes": false
}
60 changes: 60 additions & 0 deletions plugins/ngrok/v1/dataStreams/authtokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "authtokens",
"displayName": "Authtokens",
"description": "Agent authtokens in the ngrok account with their description and creation date (token values excluded)",
"tags": [
"Security"
],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "credentials",
"postRequestScript": "authtokens.js",
"paging": {
"mode": "nextUrl",
"pageSize": {
"realm": "queryArg",
"path": "limit",
"value": "100"
},
"in": {
"realm": "payload",
"path": "next_page_uri"
}
},
"errorHandling": {
"type": "path",
"realm": "payload",
"path": "msg"
}
},
"matches": "none",
"metadata": [
{
"name": "id",
"displayName": "Authtoken ID",
"role": "id"
},
{
"name": "description",
"displayName": "Description",
"role": "label"
},
{
"name": "hasAcl",
"displayName": "Restricted by ACL",
"shape": "boolean"
},
{
"name": "ownerId",
"displayName": "Owner ID",
"visible": false
},
{
"name": "created_at",
"displayName": "Created",
"shape": "date"
}
],
"timeframes": false
}
97 changes: 97 additions & 0 deletions plugins/ngrok/v1/dataStreams/certificateAuthorities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"name": "certificateAuthorities",
"displayName": "Certificate Authorities",
"description": "Certificate authorities used for mutual TLS, with days until expiry",
"tags": [
"Certificates",
"Security"
],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "certificate_authorities",
"pathToData": "certificate_authorities",
"paging": {
"mode": "nextUrl",
"pageSize": {
"realm": "queryArg",
"path": "limit",
"value": "100"
},
"in": {
"realm": "payload",
"path": "next_page_uri"
}
},
"errorHandling": {
"type": "path",
"realm": "payload",
"path": "msg"
}
},
"matches": "none",
"metadata": [
{
"name": "id",
"displayName": "CA ID",
"role": "id",
"visible": false
},
{
"name": "subject_common_name",
"displayName": "Common name",
"role": "label"
},
{
"name": "description",
"displayName": "Description"
},
{
"name": "not_before",
"displayName": "Valid from",
"shape": "date"
},
{
"name": "not_after",
"displayName": "Expires",
"shape": "date"
},
{
"name": "daysUntilExpiry",
"displayName": "Days until expiry",
"computed": true,
"shape": "number",
"role": "value",
"valueExpression": "{{ $['not_after'] ? Math.floor((new Date($['not_after']).getTime() - Date.now()) / 86400000) : null }}"
},
{
"name": "expiryStatus",
"displayName": "Expiry status",
"computed": true,
"valueExpression": "{{ !$['not_after'] ? null : (new Date($['not_after']).getTime() - Date.now()) < 0 ? 'Expired' : (new Date($['not_after']).getTime() - Date.now()) <= 7 * 86400000 ? 'Expires within 7 days' : (new Date($['not_after']).getTime() - Date.now()) <= 30 * 86400000 ? 'Expires within 30 days' : 'Valid' }}",
"shape": [
"state",
{
"map": {
"error": [
"Expired",
"Expires within 7 days"
],
"warning": [
"Expires within 30 days"
],
"success": [
"Valid"
]
}
}
]
},
{
"name": "created_at",
"displayName": "Created",
"shape": "date"
}
],
"timeframes": false
}
Loading
Loading