Skip to content

Commit

Permalink
Destination MongoDB: use SHA256 instead of MD5 (#14561)
Browse files Browse the repository at this point in the history
* fix: use sha256 instead of md5

* bump connector version

* match strict-encrypt version with oss

* auto-bump connector version [ci skip]

Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 27, 2022
1 parent 7cefe22 commit bb66bc7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
- name: MongoDB
destinationDefinitionId: 8b746512-8c2e-6ac1-4adc-b59faafd473c
dockerRepository: airbyte/destination-mongodb
dockerImageTag: 0.1.4
dockerImageTag: 0.1.5
documentationUrl: https://docs.airbyte.io/integrations/destinations/mongodb
icon: mongodb.svg
releaseStage: alpha
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,7 @@
supported_destination_sync_modes:
- "overwrite"
- "append"
- dockerImage: "airbyte/destination-mongodb:0.1.4"
- dockerImage: "airbyte/destination-mongodb:0.1.5"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/destinations/mongodb"
connectionSpecification:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ ENV APPLICATION destination-mongodb-strict-encrypt

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=0.1.1
LABEL io.airbyte.version=0.1.5
LABEL io.airbyte.name=airbyte/destination-mongodb-strict-encrypt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ ENV APPLICATION destination-mongodb

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=0.1.4
LABEL io.airbyte.version=0.1.5
LABEL io.airbyte.name=airbyte/destination-mongodb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private void insertRecordToTmpCollection(final MongodbWriteConfig writeConfig,
try {
final AirbyteRecordMessage recordMessage = message.getRecord();
final Map<String, Object> result = objectMapper.convertValue(recordMessage.getData(), new TypeReference<>() {});
final var newDocumentDataHashCode = UUID.nameUUIDFromBytes(DigestUtils.md5Hex(Jsons.toBytes(recordMessage.getData())).getBytes(
final var newDocumentDataHashCode = UUID.nameUUIDFromBytes(DigestUtils.sha256Hex(Jsons.toBytes(recordMessage.getData())).getBytes(
Charset.defaultCharset())).toString();
final var newDocument = new Document();
newDocument.put(AIRBYTE_DATA, new Document(result));
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/destinations/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Collection names should begin with an underscore or a letter character, and cann

| Version | Date | Pull Request | Subject |
| :--- | :--- | :--- | :--- |
| 0.1.5 | 2022-07-27 | [14561](https://github.com/airbytehq/airbyte/pull/14561) | Change Airbyte Id from MD5 to SHA256 |
| 0.1.4 | 2022-02-14 | [10256](https://github.com/airbytehq/airbyte/pull/10256) | (unpublished) Add `-XX:+ExitOnOutOfMemoryError` JVM option |
| 0.1.3 | 2021-12-30 | [8809](https://github.com/airbytehq/airbyte/pull/8809) | Update connector fields title/description |
| 0.1.2 | 2021-10-18 | [6945](https://github.com/airbytehq/airbyte/pull/6945) | Create a secure-only MongoDb destination |
Expand Down

0 comments on commit bb66bc7

Please sign in to comment.