From issues-return-63875-archive-asf-public=cust-asf.ponee.io@nifi.apache.org Tue Sep 4 03:41:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B22FB180647 for ; Tue, 4 Sep 2018 03:41:05 +0200 (CEST) Received: (qmail 48832 invoked by uid 500); 4 Sep 2018 01:41:04 -0000 Mailing-List: contact issues-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list issues@nifi.apache.org Received: (qmail 48823 invoked by uid 99); 4 Sep 2018 01:41:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2018 01:41:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 63D481809CE for ; Tue, 4 Sep 2018 01:41:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.251 X-Spam-Level: X-Spam-Status: No, score=-109.251 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id EfKa8yjnbhZb for ; Tue, 4 Sep 2018 01:41:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 29B295F536 for ; Tue, 4 Sep 2018 01:41:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 708B8E0F4C for ; Tue, 4 Sep 2018 01:41:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 7689F26B5A for ; Tue, 4 Sep 2018 01:41:00 +0000 (UTC) Date: Tue, 4 Sep 2018 01:41:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (NIFI-5566) Bring HashContent inline with HashService and rename legacy components MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NIFI-5566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16602530#comment-16602530 ] ASF GitHub Bot commented on NIFI-5566: -------------------------------------- GitHub user alopresto opened a pull request: https://github.com/apache/nifi/pull/2983 NIFI-5566 Improve HashContent processor and standardize HashAttribute processor ### This PR should not be merged before [PR 2980](https://github.com/apache/nifi/pull/2980) This PR introduces two new processors `CryptographicHashContent` and `CryptographicHashAttribute` (renamed from `CalculateAttributeHash` in PR 2980), deprecates `HashContent`, and adds documentation to `HashAttribute` indicating the new processor performs the expected behavior. Thank you for submitting a contribution to Apache NiFi. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [x] Has your PR been rebased against the latest commit within the target branch (typically master)? - [ ] Is your initial contribution a single, squashed commit? ### For code changes: - [x] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder? - [x] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly? - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly? - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties? ### For documentation related changes: - [x] Have you ensured that format looks appropriate for the output in which it is rendered? ### Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. You can merge this pull request into a Git repository by running: $ git pull https://github.com/alopresto/nifi NIFI-5566 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/2983.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2983 ---- commit e2cf56994edd3c72baa346c46c4fab2c03a654fa Author: Otto Fowler Date: 2018-06-18T15:00:38Z NIFI-5147 Add CalculateAttributeHash processor commit 81d7e794e11855b0d44521c55baaae0771c9de44 Author: Otto Fowler Date: 2018-06-26T18:51:06Z add warning and recommendation link commit 808b9b22e4137ce26e7361015a4953dacc0296a1 Author: Otto Fowler Date: 2018-07-01T16:18:08Z per review - added properties to control behavior when attributes that are configured are partially or completely missing - set charset with a property - added tests commit a05de1c62710acf7f91855d5492f01e2ed46e155 Author: Otto Fowler Date: 2018-07-01T16:25:24Z fix assert parameter order commit 66577ddb57ae4fff198608d29ed4490b1543e424 Author: Andy LoPresto Date: 2018-08-31T02:26:53Z NIFI-5147 Added HashAlgorithm enum for CalculateHashAlgorithm and HashContent. Added unit tests. commit 8a594e5b1ec9f189a14d933e7e586e9bc1e04432 Author: Andy LoPresto Date: 2018-08-31T03:07:18Z NIFI-5147 [WIP] Used HashAlgorithm enum in CalculateHashAttribute. Cleaned up typos and descriptions. Added unit test demonstrating missing Blake2 algorithm. commit 39e9cd2325f5f2312daa19d1ccb66664128de384 Author: Andy LoPresto Date: 2018-08-31T03:18:44Z NIFI-5147 [WIP] Added logic for Blake2 algorithms (needs refactoring). commit 68db917487c009eb9a3b75ed50d174f809c51e3a Author: Andy LoPresto Date: 2018-08-31T03:31:27Z NIFI-5147 Blake2b limited to 160, 256, 384, and 512 in Bouncy Castle implementation. Updated unit test. commit 5165a41bdb90e32e0e81ae402cbff8a61669dd8b Author: Andy LoPresto Date: 2018-08-31T03:34:28Z NIFI-5147 Finished implementing Blake2 logic. Unit test for all default test vectors passes. commit 6f91e6f9ec3cbbceac5609ca9d495ec259dbc517 Author: Andy LoPresto Date: 2018-08-31T03:44:10Z NIFI-5147 Added unit test demonstrating empty values fail. commit afd6a0cbf4d1b09f8109150051bd28a90d4fda6a Author: Andy LoPresto Date: 2018-08-31T03:45:08Z NIFI-5147 Implemented logic for empty input values. commit 9a47353adc439ca6c6ed4976dfb8327450400f74 Author: Andy LoPresto Date: 2018-08-31T04:17:54Z NIFI-5147 Implemented HashService. Added unit tests. commit 82a213904bcf81845b21ef35a41849b7564d2475 Author: Andy LoPresto Date: 2018-08-31T04:31:46Z NIFI-5147 Implemented unit tests for test vectors, convenience methods, character encoding, and defaults. commit b0f8f23d7b4e79d7aa9c635f7f5e6e61f6dade6a Author: Andy LoPresto Date: 2018-08-31T04:33:01Z NIFI-5147 Refactored CalculateAttributeHash to use HashService. All unit tests pass. commit e0847fb6e09d494536f7fef83fe75656a977144e Author: Andy LoPresto Date: 2018-08-31T05:01:14Z NIFI-5147 Added #clearProperties() to TestRunner, StandardProcessorTestRunner, and MockProcessContext. commit 040f14ebac33501e5f4b630dca9f007d93adcfef Author: Andy LoPresto Date: 2018-08-31T05:46:59Z NIFI-5147 Added HashAttribute#fromName() method to be more generous on name matching. Added unit test. commit 73e7142d4d1693c9aba7eed59469c6c495a9538f Author: Andy LoPresto Date: 2018-08-31T06:19:21Z NIFI-5147 Handled edge cases. Added unit tests. commit 1d45d68952b41224b194733fa47ea75bf417340b Author: Andy LoPresto Date: 2018-08-31T06:19:51Z NIFI-5147 Removed old unit tests. commit f0281aa94fa41b419cafe1e94fe60a1ba71f2696 Author: Andy LoPresto Date: 2018-08-31T06:59:02Z NIFI-5147 Fixed checkstyle issues. commit 4dd248f579a4eaea9f45e9c7fb7ba15cd0113a01 Author: Andy LoPresto Date: 2018-08-31T07:16:16Z NIFI-5147 Added full algorithm description to AllowableValue. commit 36acaaffeb359d07d8ae234248a4755d982620e4 Author: Andy LoPresto Date: 2018-09-01T02:28:49Z NIFI-5147 Added buildHashAlgorithmAllowableValues() and hashValueStreaming() methods to HashService. Added unit tests. commit 8d882c9713ddcb24f89aee8f9f8b78412f6d3b9b Author: Andy LoPresto Date: 2018-09-01T03:30:05Z NIFI-5566 Moved HashContent to HashContentLegacy. Moved TestHashContent to TestHashContentLegacy. Implemented "modern" HashContent. Added unit tests as HashContentTest. Updated processor manifest. Updated Javadoc. commit b4471c7a5ed658f9e542e62747c656f8cdec9e65 Author: Andy LoPresto Date: 2018-09-01T04:12:48Z NIFI-5147 Moved HashAttribute to HashAttributeLegacy. Moved TestHashAttribute to TestHashAttributeLegacy. Moved CalculateAttributeHash to HashAttribute. Moved CalculateAttributeHashTest to HashAttributeTest. Updated processor manifest. Updated Javadoc. commit 9d243e9db6e11e3507b50fc241c6883c4f18bc54 Author: Andy LoPresto Date: 2018-09-04T01:34:30Z NIFI-5566 Renamed new components to CryptographicHashAttribute and CryptographicHashContent. Added documentation about deprecated/renamed components. Fixed unit test resource path. ---- > Bring HashContent inline with HashService and rename legacy components > ---------------------------------------------------------------------- > > Key: NIFI-5566 > URL: https://issues.apache.org/jira/browse/NIFI-5566 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions > Affects Versions: 1.7.1 > Reporter: Andy LoPresto > Assignee: Andy LoPresto > Priority: Major > Labels: backwards-compatibility, hash, security > > As documented in [NIFI-5147|https://issues.apache.org/jira/browse/NIFI-5147] and [PR 2980|https://github.com/apache/nifi/pull/2980], the {{HashAttribute}} processor and {{HashContent}} processor are lacking some features, do not offer consistent algorithms across platforms, etc. > I propose the following: > * Rename {{HashAttribute}} (which does not provide the service of calculating a hash over one or more attributes) to {{HashAttributeLegacy}} > * Renamed {{CalculateAttributeHash}} to {{HashAttribute}} to make semantic sense > * Rename {{HashContent}} to {{HashContentLegacy}} for users who need obscure digest algorithms which may or may not have been offered on their platform > * Implement a processor {{HashContent}} with similar semantics to the existing processor but with consistent algorithm offerings and using the common {{HashService}} offering > With the new component versioning features provided as part of the flow versioning behavior, silently disrupting existing flows which use these processors is no longer a concern. Rather, Any flow currently using the existing processors will either: > 1. continue normal operation > 1. require flow manager interaction and provide documentation about the change > 1. migration notes and upgrade instructions will be provided -- This message was sent by Atlassian JIRA (v7.6.3#76005)