This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
generated from JupiterOne-Archives/integration-template
-
Notifications
You must be signed in to change notification settings - Fork 0
INT-6697 - Initial implementation #1
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b05d05f
Initial implementation.
adam-in-ict 1fc22fc
Enabling steps skipped in template. Adding error handling for endpoi…
adam-in-ict 59e6118
Working on issues with piiCount not saving as a number.
adam-in-ict 6b61630
Updating questions.yaml
adam-in-ict 47bc23c
Updating example .env
adam-in-ict a7773d3
Working on failing questions validation test.
adam-in-ict 9019527
Specifying yarn.lock path for questions action.
adam-in-ict e4afe52
Code cleanups and adding development documentation.
adam-in-ict b46474b
Updating documentation.
adam-in-ict e382486
Removing --frozen-lockfile
adam-in-ict af2b372
Adding back in specifying cache-dependency-path.
adam-in-ict c1c496d
Specifying default working directory
adam-in-ict 746c377
Wrapping cache-dependency-path in single quotes
adam-in-ict b445999
Opening up cache path for any yarn.lock file
adam-in-ict 3bc4a28
Removing default working directory
adam-in-ict c2e642f
Switching USERNAME to LOGIN.
adam-in-ict d2a7def
Update src/steps/findings/index.ts
adam-in-ict 34264f6
Merge branch 'INT-6697-initial-implementation' of https://github.com/…
adam-in-ict 85803a7
Adding info log message when we skip source->finding creation.
adam-in-ict 7fce81a
Updating recording mutateEntry call to better handle session token re…
adam-in-ict File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
CLIENT_ID= | ||
CLIENT_SECRET= | ||
BASE_URL= | ||
LOGIN= | ||
PASSWORD= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,19 @@ | ||
# Development | ||
|
||
Add details here to give a brief overview of how to work with the provider APIs. | ||
Please reference any SDKs or API docs used to help build the integration here. | ||
|
||
## Prerequisites | ||
|
||
Supply details about software or tooling (like maybe Docker or Terraform) that | ||
is needed for development here. | ||
|
||
Please supply references to documentation that details how to install those | ||
dependencies here. | ||
|
||
Tools like Node.js and NPM are already covered in the [README](../README.md) so | ||
don't bother documenting that here. | ||
This integration was developed primarily using the documentation provided by | ||
BigID at https://api.bigid.com/. Please reference it for questions specific to | ||
any of their endpoints. | ||
|
||
## Provider account setup | ||
|
||
Please provide information about the steps needed to create an account with a | ||
provider. Images and references to a provider's documentation is very helpful | ||
for new developers picking up your work. | ||
BigID provides a sandbox at https://sandbox.bigid.tools/api/v1/ that can be used | ||
to test any changes to this integration. | ||
|
||
## Authentication | ||
|
||
Supply details here for information on how to authenticate with a provider so | ||
that developers have an idea of what's needed to hit APIs. It may be useful to | ||
provide explanations for each value specified in the | ||
[`IntegrationInstanceConfigFieldMap`](../src/config.ts). | ||
We currently use session tokens for authentication using username and password | ||
for the initial authentication. The session lasts for 24 hours, so it should not | ||
need to be renewed unless we end up with very long running jobs. | ||
|
||
Documentation on session token authentication can be found at | ||
https://api.bigid.com/index-session-tokens.html#post-/sessions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { RelationshipClass, StepSpec } from '@jupiterone/integration-sdk-core'; | ||
import { IntegrationConfig } from '../../../../src/config'; | ||
|
||
export const dataSourceSpec: StepSpec<IntegrationConfig>[] = [ | ||
{ | ||
/** | ||
* ENDPOINT: https://sandbox.bigid.tools/api/v1/ds-connections | ||
* PATTERN: Fetch Entities | ||
*/ | ||
id: 'fetch-data-sources', | ||
name: 'Fetch Sources', | ||
entities: [ | ||
{ | ||
resourceName: 'Data Source', | ||
_type: 'bigid_datasource', | ||
_class: ['DataCollection'], | ||
}, | ||
], | ||
relationships: [ | ||
{ | ||
_type: 'bigid_account_scans_datasource', | ||
sourceType: 'bigid_account', | ||
_class: RelationshipClass.SCANS, | ||
targetType: 'bigid_datasource', | ||
}, | ||
], | ||
dependsOn: ['fetch-account'], | ||
implemented: true, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { RelationshipClass, StepSpec } from '@jupiterone/integration-sdk-core'; | ||
import { IntegrationConfig } from '../../../../src/config'; | ||
|
||
export const findingSpec: StepSpec<IntegrationConfig>[] = [ | ||
{ | ||
/** | ||
* ENDPOINT: https://sandbox.bigid.tools/api/v1/piiRecords/objects/file-download/export | ||
* PATTERN: Fetch Entities | ||
*/ | ||
id: 'fetch-pii-findings', | ||
name: 'Fetch Findings', | ||
entities: [ | ||
{ | ||
resourceName: 'PII Object', | ||
_type: 'bigid_pii_object', | ||
_class: ['Record'], | ||
}, | ||
], | ||
relationships: [ | ||
{ | ||
_type: 'bigid_datasource_has_pii_object', | ||
sourceType: 'bigid_datasource', | ||
_class: RelationshipClass.HAS, | ||
targetType: 'bigid_pii_object', | ||
}, | ||
], | ||
dependsOn: ['fetch-data-sources'], | ||
implemented: true, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
import { IntegrationSpecConfig } from '@jupiterone/integration-sdk-core'; | ||
|
||
import { IntegrationConfig } from '../../../src/config'; | ||
import { accessSpec } from './access'; | ||
import { dataSourceSpec } from './dataSource'; | ||
import { accountSpec } from './account'; | ||
import { findingSpec } from './findings'; | ||
import { userSpec } from './users'; | ||
|
||
export const invocationConfig: IntegrationSpecConfig<IntegrationConfig> = { | ||
integrationSteps: [...accountSpec, ...accessSpec], | ||
integrationSteps: [ | ||
...accountSpec, | ||
...dataSourceSpec, | ||
...findingSpec, | ||
...userSpec, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { RelationshipClass, StepSpec } from '@jupiterone/integration-sdk-core'; | ||
import { IntegrationConfig } from '../../../../src/config'; | ||
|
||
export const userSpec: StepSpec<IntegrationConfig>[] = [ | ||
{ | ||
/** | ||
* ENDPOINT: https://sandbox.bigid.tools/api/v1/access-management/users | ||
* PATTERN: Fetch Entities | ||
*/ | ||
id: 'fetch-users', | ||
name: 'Fetch Users', | ||
entities: [ | ||
{ | ||
resourceName: 'User', | ||
_type: 'bigid_user', | ||
_class: ['User'], | ||
}, | ||
], | ||
relationships: [ | ||
{ | ||
_type: 'bigid_account_has_user', | ||
sourceType: 'bigid_account', | ||
_class: RelationshipClass.HAS, | ||
targetType: 'bigid_user', | ||
}, | ||
], | ||
dependsOn: ['fetch-account'], | ||
implemented: true, | ||
}, | ||
]; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we contribute this to the template?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still can't get the test to pass, so didn't contribute it back in yet.