This repository has been archived by the owner on Jun 25, 2024. It is now read-only.
generated from JupiterOne-Archives/integration-template
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from JupiterOne/key-support
Support for ingesting KSM crypto key rings and crypto keys
- Loading branch information
Showing
16 changed files
with
8,915 additions
and
0 deletions.
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
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
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
4,236 changes: 4,236 additions & 0 deletions
4,236
src/steps/kms/__recordings__/fetchKmsCryptoKeys_2580116173/recording.har
Large diffs are not rendered by default.
Oops, something went wrong.
3,880 changes: 3,880 additions & 0 deletions
3,880
src/steps/kms/__recordings__/fetchKmsKeyRings_3543545506/recording.har
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`#createKmsCryptoKeyEntity should convert to entity 1`] = ` | ||
Object { | ||
"_class": Array [ | ||
"Key", | ||
"CryptoKey", | ||
], | ||
"_key": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key", | ||
"_rawData": Array [ | ||
Object { | ||
"name": "default", | ||
"rawData": Object { | ||
"createTime": "2020-07-28T18:59:59.513564921Z", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key", | ||
"nextRotationTime": "2020-10-04T19:01:14.428484Z", | ||
"primary": Object { | ||
"algorithm": "GOOGLE_SYMMETRIC_ENCRYPTION", | ||
"createTime": "2020-10-03T19:01:13.428484662Z", | ||
"generateTime": "2020-10-03T19:01:13.428484662Z", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key/cryptoKeyVersions/68", | ||
"protectionLevel": "SOFTWARE", | ||
"state": "ENABLED", | ||
}, | ||
"purpose": "ENCRYPT_DECRYPT", | ||
"rotationPeriod": "86401s", | ||
"versionTemplate": Object { | ||
"algorithm": "GOOGLE_SYMMETRIC_ENCRYPTION", | ||
"protectionLevel": "SOFTWARE", | ||
}, | ||
}, | ||
}, | ||
], | ||
"_type": "google_kms_crypto_key", | ||
"algorithm": "GOOGLE_SYMMETRIC_ENCRYPTION", | ||
"createdOn": 1595962799513, | ||
"displayName": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key", | ||
"keyUsage": "ENCRYPT_DECRYPT", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key", | ||
"nextRotationTime": 1601838074428, | ||
"primaryAlgorithm": "GOOGLE_SYMMETRIC_ENCRYPTION", | ||
"primaryCreateTime": 1601751673428, | ||
"primaryGenerateTime": 1601751673428, | ||
"primaryName": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key/cryptoKeyVersions/68", | ||
"primaryProtectionLevel": "SOFTWARE", | ||
"primaryState": "ENABLED", | ||
"protectionLevel": "SOFTWARE", | ||
"purpose": "ENCRYPT_DECRYPT", | ||
"rotationPeriod": 86401, | ||
"webLink": "https://console.cloud.google.com/security/kms/key/manage/us/j1-gc-integration-dev-bucket-ring/projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key?project=j1-gc-integration-dev", | ||
} | ||
`; | ||
|
||
exports[`#createKmsKeyRingEntity should convert to entity 1`] = ` | ||
Object { | ||
"_class": Array [ | ||
"Vault", | ||
], | ||
"_key": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
"_rawData": Array [ | ||
Object { | ||
"name": "default", | ||
"rawData": Object { | ||
"createTime": "2020-07-28T18:34:26.034565002Z", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
}, | ||
}, | ||
], | ||
"_type": "google_kms_key_ring", | ||
"createdOn": 1595961266034, | ||
"displayName": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
"location": "us", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
"projectId": "j1-gc-integration-dev", | ||
"shortName": "j1-gc-integration-dev-bucket-ring", | ||
"webLink": "https://console.cloud.google.com/security/kms/keyring/manage/us/j1-gc-integration-dev-bucket-ring/key?project=j1-gc-integration-dev", | ||
} | ||
`; |
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,178 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`#fetchKmsCryptoKeys should collect data 1`] = ` | ||
Object { | ||
"collectedEntities": Array [ | ||
Object { | ||
"_class": Array [ | ||
"Vault", | ||
], | ||
"_key": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
"_rawData": Array [ | ||
Object { | ||
"name": "default", | ||
"rawData": Object { | ||
"createTime": "2020-07-28T18:34:26.034565002Z", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
}, | ||
}, | ||
], | ||
"_type": "google_kms_key_ring", | ||
"createdOn": 1595961266034, | ||
"displayName": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
"location": "us", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
"projectId": "j1-gc-integration-dev", | ||
"shortName": "j1-gc-integration-dev-bucket-ring", | ||
"webLink": "https://console.cloud.google.com/security/kms/keyring/manage/us/j1-gc-integration-dev-bucket-ring/key?project=j1-gc-integration-dev", | ||
}, | ||
Object { | ||
"_class": Array [ | ||
"Vault", | ||
], | ||
"_key": "projects/j1-gc-integration-dev/locations/us/keyRings/j1dev-bucket-ring", | ||
"_rawData": Array [ | ||
Object { | ||
"name": "default", | ||
"rawData": Object { | ||
"createTime": "2020-07-28T18:30:53.453045041Z", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1dev-bucket-ring", | ||
}, | ||
}, | ||
], | ||
"_type": "google_kms_key_ring", | ||
"createdOn": 1595961053453, | ||
"displayName": "projects/j1-gc-integration-dev/locations/us/keyRings/j1dev-bucket-ring", | ||
"location": "us", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1dev-bucket-ring", | ||
"projectId": "j1-gc-integration-dev", | ||
"shortName": "j1dev-bucket-ring", | ||
"webLink": "https://console.cloud.google.com/security/kms/keyring/manage/us/j1dev-bucket-ring/key?project=j1-gc-integration-dev", | ||
}, | ||
Object { | ||
"_class": Array [ | ||
"Key", | ||
"CryptoKey", | ||
], | ||
"_key": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key", | ||
"_rawData": Array [ | ||
Object { | ||
"name": "default", | ||
"rawData": Object { | ||
"createTime": "2020-07-28T18:59:59.513564921Z", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key", | ||
"nextRotationTime": "2020-10-04T19:01:14.428484Z", | ||
"primary": Object { | ||
"algorithm": "GOOGLE_SYMMETRIC_ENCRYPTION", | ||
"createTime": "2020-10-03T19:01:13.428484662Z", | ||
"generateTime": "2020-10-03T19:01:13.428484662Z", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key/cryptoKeyVersions/68", | ||
"protectionLevel": "SOFTWARE", | ||
"state": "ENABLED", | ||
}, | ||
"purpose": "ENCRYPT_DECRYPT", | ||
"rotationPeriod": "86401s", | ||
"versionTemplate": Object { | ||
"algorithm": "GOOGLE_SYMMETRIC_ENCRYPTION", | ||
"protectionLevel": "SOFTWARE", | ||
}, | ||
}, | ||
}, | ||
], | ||
"_type": "google_kms_crypto_key", | ||
"algorithm": "GOOGLE_SYMMETRIC_ENCRYPTION", | ||
"createdOn": 1595962799513, | ||
"displayName": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key", | ||
"keyUsage": "ENCRYPT_DECRYPT", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key", | ||
"nextRotationTime": 1601838074428, | ||
"primaryAlgorithm": "GOOGLE_SYMMETRIC_ENCRYPTION", | ||
"primaryCreateTime": 1601751673428, | ||
"primaryGenerateTime": 1601751673428, | ||
"primaryName": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key/cryptoKeyVersions/68", | ||
"primaryProtectionLevel": "SOFTWARE", | ||
"primaryState": "ENABLED", | ||
"protectionLevel": "SOFTWARE", | ||
"purpose": "ENCRYPT_DECRYPT", | ||
"rotationPeriod": 86401, | ||
"webLink": "https://console.cloud.google.com/security/kms/key/manage/us/j1-gc-integration-dev-bucket-ring/projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key?project=j1-gc-integration-dev", | ||
}, | ||
], | ||
"collectedRelationships": Array [ | ||
Object { | ||
"_class": "HAS", | ||
"_fromEntityKey": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
"_key": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring|has|projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key", | ||
"_toEntityKey": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring/cryptoKeys/j1-gc-integration-dev-bucket-key", | ||
"_type": "google_kms_key_ring_has_crypto_key", | ||
"displayName": "HAS", | ||
}, | ||
], | ||
"encounteredTypes": Array [ | ||
"google_kms_key_ring", | ||
"google_kms_crypto_key", | ||
"google_kms_key_ring_has_crypto_key", | ||
], | ||
"numCollectedEntities": 3, | ||
"numCollectedRelationships": 1, | ||
} | ||
`; | ||
|
||
exports[`#fetchKmsKeyRings should collect data 1`] = ` | ||
Object { | ||
"collectedEntities": Array [ | ||
Object { | ||
"_class": Array [ | ||
"Vault", | ||
], | ||
"_key": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
"_rawData": Array [ | ||
Object { | ||
"name": "default", | ||
"rawData": Object { | ||
"createTime": "2020-07-28T18:34:26.034565002Z", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
}, | ||
}, | ||
], | ||
"_type": "google_kms_key_ring", | ||
"createdOn": 1595961266034, | ||
"displayName": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
"location": "us", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1-gc-integration-dev-bucket-ring", | ||
"projectId": "j1-gc-integration-dev", | ||
"shortName": "j1-gc-integration-dev-bucket-ring", | ||
"webLink": "https://console.cloud.google.com/security/kms/keyring/manage/us/j1-gc-integration-dev-bucket-ring/key?project=j1-gc-integration-dev", | ||
}, | ||
Object { | ||
"_class": Array [ | ||
"Vault", | ||
], | ||
"_key": "projects/j1-gc-integration-dev/locations/us/keyRings/j1dev-bucket-ring", | ||
"_rawData": Array [ | ||
Object { | ||
"name": "default", | ||
"rawData": Object { | ||
"createTime": "2020-07-28T18:30:53.453045041Z", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1dev-bucket-ring", | ||
}, | ||
}, | ||
], | ||
"_type": "google_kms_key_ring", | ||
"createdOn": 1595961053453, | ||
"displayName": "projects/j1-gc-integration-dev/locations/us/keyRings/j1dev-bucket-ring", | ||
"location": "us", | ||
"name": "projects/j1-gc-integration-dev/locations/us/keyRings/j1dev-bucket-ring", | ||
"projectId": "j1-gc-integration-dev", | ||
"shortName": "j1dev-bucket-ring", | ||
"webLink": "https://console.cloud.google.com/security/kms/keyring/manage/us/j1dev-bucket-ring/key?project=j1-gc-integration-dev", | ||
}, | ||
], | ||
"collectedRelationships": Array [], | ||
"encounteredTypes": Array [ | ||
"google_kms_key_ring", | ||
], | ||
"numCollectedEntities": 2, | ||
"numCollectedRelationships": 0, | ||
} | ||
`; |
Oops, something went wrong.