You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "pvillard31 (via GitHub)" <gi...@apache.org> on 2026/01/08 11:51:16 UTC
[PR] NIFI-14969 - Add Content MD5 checksum validation for PutAzureBlobStorage_v12 and PutAzureDataLakeStorage [nifi]
pvillard31 opened a new pull request, #10746:
URL: https://github.com/apache/nifi/pull/10746
# Summary
NIFI-14969 - Add Content MD5 checksum validation for PutAzureBlobStorage_v12 and PutAzureDataLakeStorage
<img width="500" height="853" alt="Screenshot 2026-01-08 at 12 39 46" src="https://github.com/user-attachments/assets/866feb16-7511-4714-acdc-c6ac1d5290b3" />
<img width="500" height="853" alt="Screenshot 2026-01-08 at 12 39 37" src="https://github.com/user-attachments/assets/7830d59f-8b03-4455-8d51-466ab1e847bd" />
<img width="500" height="546" alt="Screenshot 2026-01-08 at 12 39 27" src="https://github.com/user-attachments/assets/4bf2d2f9-2528-4b54-8464-fe6b7e9ec783" />
# Tracking
Please complete the following tracking steps prior to pull request creation.
### Issue Tracking
- [ ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
### Pull Request Tracking
- [ ] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
- [ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
- [ ] Pull request contains [commits signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) with a registered key indicating `Verified` status
### Pull Request Formatting
- [ ] Pull Request based on current revision of the `main` branch
- [ ] Pull Request refers to a feature branch with one commit containing changes
# Verification
Please indicate the verification steps performed prior to pull request creation.
### Build
- [ ] Build completed using `./mvnw clean install -P contrib-check`
- [ ] JDK 21
- [ ] JDK 25
### Licensing
- [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
- [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
### Documentation
- [ ] Documentation formatting appears as expected in rendered files
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14969 - Add Content MD5 checksum validation for PutAzureBlobStorage_v12 [nifi]
Posted by "asf-gitbox-commits (via GitHub)" <gi...@apache.org>.
asf-gitbox-commits closed pull request #10746: NIFI-14969 - Add Content MD5 checksum validation for PutAzureBlobStorage_v12
URL: https://github.com/apache/nifi/pull/10746
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14969 - Add Content MD5 checksum validation for PutAzureBlobStorage_v12 and PutAzureDataLakeStorage [nifi]
Posted by "turcsanyip (via GitHub)" <gi...@apache.org>.
turcsanyip commented on code in PR #10746:
URL: https://github.com/apache/nifi/pull/10746#discussion_r2678905459
##########
nifi-extension-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/AzureStorageUtils.java:
##########
@@ -192,6 +193,21 @@ public final class AzureStorageUtils {
.description("Specifies whether an existing blob will have its contents replaced upon conflict.")
.build();
+ public static final PropertyDescriptor CONTENT_MD5 = new PropertyDescriptor.Builder()
+ .name("Content MD5")
+ .displayName("Content MD5")
+ .description("""
+ The MD5 hash of the content. When this property is set, Azure will validate
+ the uploaded content against this checksum and reject the upload if it doesn't match. This provides
Review Comment:
ADLS does not seem to validate the checksum, just stores whatever passed in. It may be worth mentioning it in the description of the property on the ADLS processor in order to avoid confusion and set expectations. The current description is appropriate for blob storage.
##########
nifi-extension-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/AzureStorageUtils.java:
##########
@@ -354,6 +370,28 @@ private static ProxyOptions.Type getProxyType(ProxyConfiguration proxyConfigurat
}
}
+ /**
+ * Converts an MD5 checksum string to bytes. Accepts both hexadecimal format (as output by CryptographicHashContent)
+ * and Base64 format.
+ *
+ * @param md5String the MD5 checksum as hex (32 chars) or Base64 (24 chars with padding)
+ * @return the MD5 as a 16-byte array
+ */
+ public static byte[] convertMd5ToBytes(final String md5String) {
+ // MD5 in hex format is 32 characters (128 bits = 16 bytes, 2 hex chars per byte)
+ if (md5String.length() == 32 && md5String.matches("[0-9a-fA-F]+")) {
+ // Convert hex to bytes
+ final byte[] bytes = new byte[16];
+ for (int i = 0; i < 16; i++) {
+ bytes[i] = (byte) Integer.parseInt(md5String.substring(i * 2, i * 2 + 2), 16);
+ }
+ return bytes;
Review Comment:
`java.util.HexFormat` could be used:
```suggestion
return HexFormat.of().parseHex(md5String);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14969 - Add Content MD5 checksum validation for PutAzureBlobStorage_v12 and PutAzureDataLakeStorage [nifi]
Posted by "pvillard31 (via GitHub)" <gi...@apache.org>.
pvillard31 commented on PR #10746:
URL: https://github.com/apache/nifi/pull/10746#issuecomment-3738451891
Thanks for the review @turcsanyip ! I made the suggested change for `parseHex` and completely removed the new property for the ADLS processor given that it does not really provide any value as you pointed out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org