[GitHub] [nifi] timeabarna commented on pull request #5086: NIFI-8522 NiFi can duplicate controller services when generating temp…

2021-05-24 Thread GitBox


timeabarna commented on pull request #5086:
URL: https://github.com/apache/nifi/pull/5086#issuecomment-847549111


   @gresockj thanks for your help, I've modified the code based on your 
recommendations.


-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] naddym commented on pull request #5095: NIFI-8627: Upgrade apache derby to 10.14.2.0 to mitigate CVE_2015_1832

2021-05-24 Thread GitBox


naddym commented on pull request #5095:
URL: https://github.com/apache/nifi/pull/5095#issuecomment-847522555


   Thank you @mattyb149 for the quick review and merge.


-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] thenatog commented on pull request #5044: NIFI-8462 Refactored PutSyslog and ListenSyslog using Netty

2021-05-24 Thread GitBox


thenatog commented on pull request #5044:
URL: https://github.com/apache/nifi/pull/5044#issuecomment-847488079


   Tested this out using the template found here: 
https://community.cloudera.com/t5/Community-Articles/NiFi-Send-to-syslog/ta-p/248638
 and found that PutSyslog and ListenSyslog are working. Reviewed the code and 
it looks good.


-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Updated] (NIFI-8626) Upgrade okhttp-digest to 2.5

2021-05-24 Thread David Handermann (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Handermann updated NIFI-8626:
---
Status: Patch Available  (was: Open)

> Upgrade okhttp-digest to 2.5
> 
>
> Key: NIFI-8626
> URL: https://issues.apache.org/jira/browse/NIFI-8626
> Project: Apache NiFi
>  Issue Type: Improvement
>Affects Versions: 1.13.2
>Reporter: David Handermann
>Assignee: David Handermann
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The okhttp-digest library provides support for HTTP Digest authentication in 
> InvokeHTTP and RestLookupService.  The library recently moved from JCenter to 
> Maven Central and changed coordinates to {{io.github.rburgst:okhttp-digest}}. 
>  Recent updates also include addressing potential issues with concurrent 
> usage of the digest authenticator.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi] exceptionfactory opened a new pull request #5096: NIFI-8626 Upgraded okhttp-digest to 2.5

2021-05-24 Thread GitBox


exceptionfactory opened a new pull request #5096:
URL: https://github.com/apache/nifi/pull/5096


   Thank you for submitting a contribution to Apache NiFi.
   
   Please provide a short description of the PR here:
   
    Description of PR
   
   NIFI-8626 Upgrades `okhttp-digest` to 2.5 in `nifi-standard-processors` and 
`nifi-lookup-services`, supporting HTTP Digest authentication for `InvokeHTTP` 
and `RestLookupService`.  Version 2.5 changes the library group identifier as 
part of a migration from hosting in JCenter to Maven Central.  Version 2.0 and 
above provide compatibility with OkHttp 4, which is currently used in both 
`InvokeHTTP` and `RestLookupService`.
   
   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-** where  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 `main`)?
   
   - [X] Is your initial contribution a single, squashed commit? _Additional 
commits in response to PR reviewer feedback should be made on this branch and 
pushed to allow change tracking. Do not `squash` or use `--force` when pushing 
to allow for clean monitoring of changes._
   
   ### 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?
   - [ ] Have you written or updated unit tests to verify your changes?
   - [X] Have you verified that the full build is successful on JDK 8?
   - [ ] Have you verified that the full build is successful on JDK 11?
   - [ ] 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:
   - [ ] 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 GitHub Actions CI for 
build issues and submit an update to your PR as soon as possible.
   


-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Comment Edited] (NIFI-8625) ExecuteScript processor always stuck after restart or multi thread

2021-05-24 Thread KevinSky (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17350710#comment-17350710
 ] 

KevinSky edited comment on NIFI-8625 at 5/25/21, 1:20 AM:
--

Hi  [#Otto Fowler]:

[^executeScript_nifi_8625.xml]

^Here is my template, you might modify some configurations in this,like 
filename.^

^It's easy to reproduce,just write any python code in executeScript,and execute 
like this:^
{code:java}
In single thread(concurrent task=1), executeScript just stop and start, flow 
file always stuck in connections.
In multi thread(concurrent task=10).just execute it,executeScript always throw 
exception like is already marked for transfer in or is not known in this 
session.
{code}
 

 


was (Author: kevinsky1093):
[^executeScript_nifi_8625.xml]

^Here is my template, you might modify some configurations in this,like 
filename.^

^It's easy to reproduce,just write any python code in executeScript,and execute 
like this:^

 [#Otto Fowler]
{code:java}
In single thread(concurrent task=1), executeScript just stop and start, flow 
file always stuck in connections.
In multi thread(concurrent task=10).just execute it,executeScript always throw 
exception like is already marked for transfer in or is not known in this 
session.
{code}
 

 

> ExecuteScript processor always stuck after restart or multi thread
> --
>
> Key: NIFI-8625
> URL: https://issues.apache.org/jira/browse/NIFI-8625
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.13.2
>Reporter: KevinSky
>Priority: Critical
>  Labels: ExecuteScript,stcuk
> Attachments: executeScript_nifi_8625.xml, 
> image-2021-05-21-16-22-34-775.png
>
>
> In single thread, executeScript just stop and start, flow file always stuck 
> in connections.
> In multi thread.executeScript always throw exception like is already marked 
> for transfer in or is not known in this session.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (NIFI-8625) ExecuteScript processor always stuck after restart or multi thread

2021-05-24 Thread KevinSky (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17350710#comment-17350710
 ] 

KevinSky edited comment on NIFI-8625 at 5/25/21, 1:20 AM:
--

[^executeScript_nifi_8625.xml]

^Here is my template, you might modify some configurations in this,like 
filename.^

^It's easy to reproduce,just write any python code in executeScript,and execute 
like this:^

 [#Otto Fowler]
{code:java}
In single thread(concurrent task=1), executeScript just stop and start, flow 
file always stuck in connections.
In multi thread(concurrent task=10).just execute it,executeScript always throw 
exception like is already marked for transfer in or is not known in this 
session.
{code}
 

 


was (Author: kevinsky1093):
[^executeScript_nifi_8625.xml]

^Here is my template, you might modify some configurations in this,like 
filename.^

^It's easy to reproduce,just write any python code in executeScript,and execute 
like this:^

 
{code:java}
In single thread(concurrent task=1), executeScript just stop and start, flow 
file always stuck in connections.
In multi thread(concurrent task=10).just execute it,executeScript always throw 
exception like is already marked for transfer in or is not known in this 
session.
{code}
 

 

> ExecuteScript processor always stuck after restart or multi thread
> --
>
> Key: NIFI-8625
> URL: https://issues.apache.org/jira/browse/NIFI-8625
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.13.2
>Reporter: KevinSky
>Priority: Critical
>  Labels: ExecuteScript,stcuk
> Attachments: executeScript_nifi_8625.xml, 
> image-2021-05-21-16-22-34-775.png
>
>
> In single thread, executeScript just stop and start, flow file always stuck 
> in connections.
> In multi thread.executeScript always throw exception like is already marked 
> for transfer in or is not known in this session.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (NIFI-8625) ExecuteScript processor always stuck after restart or multi thread

2021-05-24 Thread KevinSky (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17350710#comment-17350710
 ] 

KevinSky commented on NIFI-8625:


[^executeScript_nifi_8625.xml]

^Here is my template, you might modify some configurations in this,like 
filename.^

^It's easy to reproduce,just write any python code in executeScript,and execute 
like this:^

 
{code:java}
In single thread(concurrent task=1), executeScript just stop and start, flow 
file always stuck in connections.
In multi thread(concurrent task=10).just execute it,executeScript always throw 
exception like is already marked for transfer in or is not known in this 
session.
{code}
 

 

> ExecuteScript processor always stuck after restart or multi thread
> --
>
> Key: NIFI-8625
> URL: https://issues.apache.org/jira/browse/NIFI-8625
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.13.2
>Reporter: KevinSky
>Priority: Critical
>  Labels: ExecuteScript,stcuk
> Attachments: executeScript_nifi_8625.xml, 
> image-2021-05-21-16-22-34-775.png
>
>
> In single thread, executeScript just stop and start, flow file always stuck 
> in connections.
> In multi thread.executeScript always throw exception like is already marked 
> for transfer in or is not known in this session.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (NIFI-8625) ExecuteScript processor always stuck after restart or multi thread

2021-05-24 Thread KevinSky (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-8625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

KevinSky updated NIFI-8625:
---
Attachment: executeScript_nifi_8625.xml

> ExecuteScript processor always stuck after restart or multi thread
> --
>
> Key: NIFI-8625
> URL: https://issues.apache.org/jira/browse/NIFI-8625
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.13.2
>Reporter: KevinSky
>Priority: Critical
>  Labels: ExecuteScript,stcuk
> Attachments: executeScript_nifi_8625.xml, 
> image-2021-05-21-16-22-34-775.png
>
>
> In single thread, executeScript just stop and start, flow file always stuck 
> in connections.
> In multi thread.executeScript always throw exception like is already marked 
> for transfer in or is not known in this session.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi] scottyaslan commented on pull request #5060: NIFI-8520 - Parameter Contexts - Show the wrong information of referencing compon…

2021-05-24 Thread GitBox


scottyaslan commented on pull request #5060:
URL: https://github.com/apache/nifi/pull/5060#issuecomment-847257611


   Thanks @s9514171 I am a +1!


-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (NIFI-8627) Upgrade derby to 10.14.2.0

2021-05-24 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17350573#comment-17350573
 ] 

ASF subversion and git services commented on NIFI-8627:
---

Commit 622507f994002a1716564dafd84236ba160a25d2 in nifi's branch 
refs/heads/main from Mohammed Nadeem
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=622507f ]

NIFI-8627: Upgrade apache derby to 10.14.2.0 to mitigate CVE_2015_1832

Signed-off-by: Matthew Burgess 

This closes #5095


> Upgrade derby to 10.14.2.0
> --
>
> Key: NIFI-8627
> URL: https://issues.apache.org/jira/browse/NIFI-8627
> Project: Apache NiFi
>  Issue Type: Task
>  Components: Security
>Reporter: Nadeem
>Assignee: Nadeem
>Priority: Major
> Fix For: 1.14.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Upgrade Apache Derby dependencies to mitigate CVE_2015_1832



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (NIFI-8627) Upgrade derby to 10.14.2.0

2021-05-24 Thread Matt Burgess (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-8627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Burgess updated NIFI-8627:
---
Fix Version/s: 1.14.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

> Upgrade derby to 10.14.2.0
> --
>
> Key: NIFI-8627
> URL: https://issues.apache.org/jira/browse/NIFI-8627
> Project: Apache NiFi
>  Issue Type: Task
>  Components: Security
>Reporter: Nadeem
>Assignee: Nadeem
>Priority: Major
> Fix For: 1.14.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Upgrade Apache Derby dependencies to mitigate CVE_2015_1832



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi] mattyb149 commented on pull request #5095: NIFI-8627: Upgrade apache derby to 10.14.2.0 to mitigate CVE_2015_1832

2021-05-24 Thread GitBox


mattyb149 commented on pull request #5095:
URL: https://github.com/apache/nifi/pull/5095#issuecomment-847248571


   +1 LGTM, verified with the embedded Derby DB with PutDatabaseRecord and 
PutSQL. Thanks for the improvement! Merging to main


-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 closed pull request #5095: NIFI-8627: Upgrade apache derby to 10.14.2.0 to mitigate CVE_2015_1832

2021-05-24 Thread GitBox


mattyb149 closed pull request #5095:
URL: https://github.com/apache/nifi/pull/5095


   


-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on pull request #5095: NIFI-8627: Upgrade apache derby to 10.14.2.0 to mitigate CVE_2015_1832

2021-05-24 Thread GitBox


mattyb149 commented on pull request #5095:
URL: https://github.com/apache/nifi/pull/5095#issuecomment-847247688


   Reviewing. These are almost all test usages but there is an instance in 
nifi-dbcp-service as an in-mem DB option


-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (NIFI-8625) ExecuteScript processor always stuck after restart or multi thread

2021-05-24 Thread Otto Fowler (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17350560#comment-17350560
 ] 

Otto Fowler commented on NIFI-8625:
---

Can you provide a template or steps to reproduce?

> ExecuteScript processor always stuck after restart or multi thread
> --
>
> Key: NIFI-8625
> URL: https://issues.apache.org/jira/browse/NIFI-8625
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.13.2
>Reporter: KevinSky
>Priority: Critical
>  Labels: ExecuteScript,stcuk
> Attachments: image-2021-05-21-16-22-34-775.png
>
>
> In single thread, executeScript just stop and start, flow file always stuck 
> in connections.
> In multi thread.executeScript always throw exception like is already marked 
> for transfer in or is not known in this session.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi] markap14 commented on pull request #5065: NIFI-8528 Migrate NiFi Registry into NiFi codebase

2021-05-24 Thread GitBox


markap14 commented on pull request #5065:
URL: https://github.com/apache/nifi/pull/5065#issuecomment-847198079


   Good catch @kevdoran, I would agree that we should get rid of the husky 
hooks. Looks there are a couple of conflicts that need to be cleaned up as 
well. I'd be a +1 otherwise, as well.


-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Updated] (NIFI-7662) Add unit tests for Java 8 update 262 TLS v1.3 handling for different vendors

2021-05-24 Thread David Handermann (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-7662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Handermann updated NIFI-7662:
---
Fix Version/s: 1.14.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

> Add unit tests for Java 8 update 262 TLS v1.3 handling for different vendors
> 
>
> Key: NIFI-7662
> URL: https://issues.apache.org/jira/browse/NIFI-7662
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Tools and Build
>Affects Versions: 1.11.4
>Reporter: Andy LoPresto
>Assignee: David Handermann
>Priority: Major
>  Labels: build, java8, jdk, jvm, tls, tlsv1.3, unit-test
> Fix For: 1.14.0
>
>
> While NIFI-7660 resolved the new build error due to a failing unit test 
> introduced by Azul Zulu JDK 8.48 (1.8.0_262-b18), the fix does not exercise 
> the new Azul platform. Explicit unit tests should be added for TLS v1.3 
> support on Oracle/AdoptOpenJDK and Azul Zulu. 
> {code}
> openjdk version "1.8.0_262"
> OpenJDK Runtime Environment (Zulu 8.48.0.49-CA-macosx) (build 1.8.0_262-b18)
> OpenJDK 64-Bit Server VM (Zulu 8.48.0.49-CA-macosx) (build 25.262-b18, mixed 
> mode)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (NIFI-8627) Upgrade derby to 10.14.2.0

2021-05-24 Thread Nadeem (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-8627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nadeem updated NIFI-8627:
-
Status: Patch Available  (was: Open)

> Upgrade derby to 10.14.2.0
> --
>
> Key: NIFI-8627
> URL: https://issues.apache.org/jira/browse/NIFI-8627
> Project: Apache NiFi
>  Issue Type: Task
>  Components: Security
>Reporter: Nadeem
>Assignee: Nadeem
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Upgrade Apache Derby dependencies to mitigate CVE_2015_1832



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi] naddym opened a new pull request #5095: NIFI-8627: Upgrade apache derby to 10.14.2.0 to mitigate CVE_2015_1832

2021-05-24 Thread GitBox


naddym opened a new pull request #5095:
URL: https://github.com/apache/nifi/pull/5095


   
   Thank you for submitting a contribution to Apache NiFi.
   
   Please provide a short description of the PR here:
   
    Description of PR
   
   _Enables X functionality; fixes bug 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-** where  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 `main`)?
   
   - [x] Is your initial contribution a single, squashed commit? _Additional 
commits in response to PR reviewer feedback should be made on this branch and 
pushed to allow change tracking. Do not `squash` or use `--force` when pushing 
to allow for clean monitoring of changes._
   
   ### 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?
   - [x] Have you verified that the full build is successful on JDK 8?
   - [ ] Have you verified that the full build is successful on JDK 11?
   - [ ] 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:
   - [ ] 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 GitHub Actions CI for 
build issues and submit an update to your PR as soon as possible.
   


-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Created] (NIFI-8627) Upgrade derby to 10.14.2.0

2021-05-24 Thread Nadeem (Jira)
Nadeem created NIFI-8627:


 Summary: Upgrade derby to 10.14.2.0
 Key: NIFI-8627
 URL: https://issues.apache.org/jira/browse/NIFI-8627
 Project: Apache NiFi
  Issue Type: Task
  Components: Security
Reporter: Nadeem
Assignee: Nadeem


Upgrade Apache Derby dependencies to mitigate CVE_2015_1832



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [nifi] exceptionfactory commented on a change in pull request #5093: NIFI-4344: Improve bulletin messages with exception details.

2021-05-24 Thread GitBox


exceptionfactory commented on a change in pull request #5093:
URL: https://github.com/apache/nifi/pull/5093#discussion_r637902460



##
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/logging/repository/StandardLogRepository.java
##
@@ -82,14 +82,32 @@ public void addLogMessage(final LogLevel level, final 
String format, final Objec
 addLogMessage(level, formattedMessage, t);
 }
 
-private void replaceThrowablesWithMessage(Object[] params) {
+private void replaceThrowablesWithMessage(final Object[] params) {
 for (int i = 0; i < params.length; i++) {
-if(params[i] instanceof Throwable) {
-params[i] = ((Throwable) params[i]).getLocalizedMessage();
+if (params[i] instanceof Throwable) {
+params[i] = getCauses((Throwable) params[i]);
 }
 }
 }
 
+private static String getCauses(final Throwable throwable) {
+final StringBuilder builder = new StringBuilder();
+if (throwable == null || throwable.getLocalizedMessage() == null) {
+return "";
+}
+builder.append(throwable.getLocalizedMessage());
+if (throwable.getCause() != null) {
+builder.append("\n");
+}
+final Throwable firstCause = throwable.getCause();
+for (Throwable t = firstCause; t != null; t = t.getCause()) {
+builder.append("┗━▶ causes: ");
+builder.append(t.getLocalizedMessage());
+builder.append("\n");

Review comment:
   This formatting approach will leave a trailing newline, which does not 
seem optimal for message formatting.

##
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/logging/repository/StandardLogRepository.java
##
@@ -82,14 +82,32 @@ public void addLogMessage(final LogLevel level, final 
String format, final Objec
 addLogMessage(level, formattedMessage, t);
 }
 
-private void replaceThrowablesWithMessage(Object[] params) {
+private void replaceThrowablesWithMessage(final Object[] params) {
 for (int i = 0; i < params.length; i++) {
-if(params[i] instanceof Throwable) {
-params[i] = ((Throwable) params[i]).getLocalizedMessage();
+if (params[i] instanceof Throwable) {
+params[i] = getCauses((Throwable) params[i]);
 }
 }
 }
 
+private static String getCauses(final Throwable throwable) {
+final StringBuilder builder = new StringBuilder();
+if (throwable == null || throwable.getLocalizedMessage() == null) {
+return "";
+}
+builder.append(throwable.getLocalizedMessage());
+if (throwable.getCause() != null) {
+builder.append("\n");
+}
+final Throwable firstCause = throwable.getCause();
+for (Throwable t = firstCause; t != null; t = t.getCause()) {
+builder.append("┗━▶ causes: ");

Review comment:
   The code appears to have a special character prior to `causes:` that 
should be removed and replaced with a standard separator of some kind.

##
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/logging/repository/StandardLogRepository.java
##
@@ -82,14 +82,32 @@ public void addLogMessage(final LogLevel level, final 
String format, final Objec
 addLogMessage(level, formattedMessage, t);
 }
 
-private void replaceThrowablesWithMessage(Object[] params) {
+private void replaceThrowablesWithMessage(final Object[] params) {
 for (int i = 0; i < params.length; i++) {
-if(params[i] instanceof Throwable) {
-params[i] = ((Throwable) params[i]).getLocalizedMessage();
+if (params[i] instanceof Throwable) {
+params[i] = getCauses((Throwable) params[i]);
 }
 }
 }
 
+private static String getCauses(final Throwable throwable) {
+final StringBuilder builder = new StringBuilder();
+if (throwable == null || throwable.getLocalizedMessage() == null) {

Review comment:
   The `throwable` argument should never be null based on how this private 
method is called.

##
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/logging/repository/StandardLogRepository.java
##
@@ -82,14 +82,32 @@ public void addLogMessage(final LogLevel level, final 
String format, final Objec
 addLogMessage(level, formattedMessage, t);
 }
 
-private void replaceThrowablesWithMessage(Object[] params) {
+private void replaceThrowablesWithMessage(final Object[] params) {
 for (int i = 0; i < params.length; i++) {
-if(params[i] instanceof 

[GitHub] [nifi] gresockj commented on a change in pull request #5086: NIFI-8522 NiFi can duplicate controller services when generating temp…

2021-05-24 Thread GitBox


gresockj commented on a change in pull request #5086:
URL: https://github.com/apache/nifi/pull/5086#discussion_r637882602



##
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
##
@@ -299,62 +315,10 @@ public FlowSnippetDTO populateFlowSnippet(final Snippet 
snippet, final boolean r
 return snippetDto;
 }
 
-/**
- * Finds all Controller Services that are referenced in the given Process 
Group (and child Process Groups, recursively), and
- * adds them to the given servicesByGroup map
- *
- * @param group the Process Group to start from
- * @param dto the DTO representation of the Process Group
- * @param allServicesReferenced a Set of all Controller Service DTO's that 
have already been referenced; used to dedupe services
- * @param contentsByGroup a Map of Process Group ID to the Process Group's 
contents
- * @param highestGroupId the UUID of the 'highest' process group in the 
snippet
- */
-private void addControllerServices(final ProcessGroup group, final 
ProcessGroupDTO dto, final Set allServicesReferenced,
-final boolean includeControllerServices, final Set 
visitedGroupIds, final Map contentsByGroup, final 
String highestGroupId) {
-
-final FlowSnippetDTO contents = dto.getContents();
-contentsByGroup.put(dto.getId(), contents);
-if (contents == null) {
-return;
-}
-
-// include this group in the ancestry for this snippet, services only 
get included if the includeControllerServices
-// flag is set or if the service is defined within this groups 
hierarchy within the snippet
-visitedGroupIds.add(group.getIdentifier());
-
-for (final ProcessorNode procNode : group.getProcessors()) {
-// Include all referenced services that are not already included 
in this snippet.
-
getControllerServices(procNode.getEffectivePropertyValues()).stream()
-.filter(allServicesReferenced::add)
-.filter(svc -> includeControllerServices || 
visitedGroupIds.contains(svc.getParentGroupId()))
-.forEach(svc -> {
-final String svcGroupId = svc.getParentGroupId();
-final String destinationGroupId = 
contentsByGroup.containsKey(svcGroupId) ? svcGroupId : highestGroupId;
-svc.setParentGroupId(destinationGroupId);
-final FlowSnippetDTO snippetDto = 
contentsByGroup.get(destinationGroupId);
-if (snippetDto != null) {
-Set services = 
snippetDto.getControllerServices();
-if (services == null) {
-
snippetDto.setControllerServices(Collections.singleton(svc));
-} else {
-services.add(svc);
-snippetDto.setControllerServices(services);
-}
-}
-});
-}
-
-// Map child process group ID to the child process group for easy 
lookup
-final Map childGroupMap = 
contents.getProcessGroups().stream()
-.collect(Collectors.toMap(ComponentDTO::getId, childGroupDto -> 
childGroupDto));
-
-for (final ProcessGroup childGroup : group.getProcessGroups()) {
-final ProcessGroupDTO childDto = 
childGroupMap.get(childGroup.getIdentifier());
-if (childDto == null) {
-continue;
-}
-
-addControllerServices(childGroup, childDto, allServicesReferenced, 
includeControllerServices, visitedGroupIds, contentsByGroup, highestGroupId);
+private void fillContentsByGroupMap(ProcessGroupDTO processGroup, 
Map contentByGroupMap) {
+for (ProcessGroupDTO group: 
processGroup.getContents().getProcessGroups()) {

Review comment:
   final group

##
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
##
@@ -235,23 +234,41 @@ public FlowSnippetDTO populateFlowSnippet(final Snippet 
snippet, final boolean r
 }
 
 // add any process groups
-final Set processGroups = new LinkedHashSet<>();
-if (!snippet.getProcessGroups().isEmpty()) {
-for (final String childGroupId : 
snippet.getProcessGroups().keySet()) {
-final ProcessGroup childGroup = 
processGroup.getProcessGroup(childGroupId);
-if (childGroup == null) {
-throw new IllegalStateException("A process group in this 
snippet could not be found.");
-}
-
-final ProcessGroupDTO childGroupDto = 
dtoFactory.createProcessGroupDto(childGroup, recurse);
-processGroups.add(childGroupDto);
-
-// maintain a listing of visited groups 

[GitHub] [nifi] pvillard31 commented on a change in pull request #5093: NIFI-4344: Improve bulletin messages with exception details.

2021-05-24 Thread GitBox


pvillard31 commented on a change in pull request #5093:
URL: https://github.com/apache/nifi/pull/5093#discussion_r637787323



##
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ConnectableTask.java
##
@@ -251,8 +251,8 @@ public InvocationResult invoke() {
 } catch (final Throwable t) {
 // Use ComponentLog to log the event so that a bulletin will 
be created for this processor
 final ComponentLog procLog = new 
SimpleProcessLogger(connectable.getIdentifier(), 
connectable.getRunnableComponent());
-procLog.error("{} failed to process session due to {}; 
Processor Administratively Yielded for {}",
-new Object[] {connectable.getRunnableComponent(), t, 
schedulingAgent.getAdministrativeYieldDuration()}, t);
+procLog.error("Failed to process session due to {}; Processor 
Administratively Yielded for {}",
+new Object[] {t, 
schedulingAgent.getAdministrativeYieldDuration()}, t);

Review comment:
   Is this change required?




-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org