Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

INT-6697 - Initial implementation #1

Merged
merged 20 commits into from
Mar 13, 2023
Merged

Conversation

adam-in-ict
Copy link
Contributor

@adam-in-ict adam-in-ict commented Mar 10, 2023

Description

Thank you for contributing to a JupiterOne integration!

Please include a summary of the change and which issue is fixed. Please also
include relevant motivation and context. List any dependencies that are required
for this change.

Summary

Initial BigID implementation

Entities

The following entities are created:

Resources Entity _type Entity _class
Account bigid_account Account
Data Source bigid_datasource DataCollection
PII Object bigid_pii_object Record
User bigid_user User

Relationships

The following relationships are created:

Source Entity _type Relationship _class Target Entity _type
bigid_account HAS bigid_user
bigid_account SCANS bigid_datasource
bigid_datasource HAS bigid_pii_object

Type of change

Please leave any irrelevant options unchecked.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update

Checklist

General Development Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Integration Development Checklist:

Please leave any irrelevant options unchecked.

  • I have checked for additional permissions required to call any new API
    endpoints, and have documented any additional permissions in
    jupiterone.md, where necessary.
  • My changes properly paginate the target service provider's API
  • My changes properly handle rate limiting of the target service provider's
    API
  • My new integration step is instrumented to execute in the correct order
    using dependsOn
  • I have referred to the
    JupiterOne data model
    to ensure that any new entities/relationships, and relevant properties,
    match the recommended model for this class of data
  • I have updated the CHANGELOG.md file to describe my changes
  • When changes include modifications to existing graph data ingestion, I've
    reviewed all existing managed questions referencing the entities,
    relationships, and their property names, to ensure those questions still
    function with my changes.

@adam-in-ict adam-in-ict requested a review from a team March 10, 2023 19:49
@adam-in-ict adam-in-ict added minor Increment the minor version when merged release Create a release when this pr is merged labels Mar 13, 2023
.env.example Outdated
BASE_URL=
USERNAME=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't use USERNAME anymore:
JupiterOne/sdk#817

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch! Updated in latest commits.

@@ -24,9 +24,10 @@ jobs:
with:
node-version: 14.x
cache: yarn
cache-dependency-path: '**/yarn.lock'
Copy link
Contributor

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?

Copy link
Contributor Author

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.

src/config.ts Outdated
type: 'string',
},
clientSecret: {
username: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as other comment above.

// The owners array contains complex objects we can't directly map
// to a property, so reduce it down to an array of email addresses.
owners: source.owners_v2?.map((item) => item.email),
// the API doesn't provide a classification, but this is a required field
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that, but it's technically an array of multiple owners, so I wasn't sure if it'd be false advertising to make it a singular owner field.

export function createFindingEntity(finding: FindingRow): Entity {
return createIntegrationEntity({
entityData: {
source: [],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also intentionally leaving out rawData here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Their documentation made me unsure if we could guarantee there'd never be sensitive information passed back.

src/steps/findings/index.ts Outdated Show resolved Hide resolved
@adam-in-ict adam-in-ict merged commit 73cc48c into main Mar 13, 2023
@adam-in-ict adam-in-ict deleted the INT-6697-initial-implementation branch March 13, 2023 21:10
@j1-internal-automation
Copy link
Collaborator

🚀 PR was released in v0.2.0 🚀

@j1-internal-automation j1-internal-automation added the released This issue/pull request has been released. label Mar 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
minor Increment the minor version when merged release Create a release when this pr is merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants