NIFI-6740: Add configuration options to specify NiFi/Bootstrap communication ports#5746
NIFI-6740: Add configuration options to specify NiFi/Bootstrap communication ports#5746stevedlawrence wants to merge 2 commits intoapache:mainfrom stevedlawrence:NIFI-6740
Conversation
…ication ports The NiFi and NiFi Bootstrap processes both bind to random ephemeral ports to allow for inter-process communication (e.g. shutdown, port, ping, etc.). However, the randomness of these ephemeral ports can pose challenges for some security policies and firewall rules. This adds two configuration options, nifi.bootstrap.listen.port and nifi.listener.bootstrap.port, that allow an administrator to define which ports the two processes should bind to for this communication, making it easier to define security policies. The options default to zero to maintain the current ephemeral port behavior.
| # nifi.security.group.mapping.transform.anygroup=LOWER | ||
|
|
||
| # listener bootstrap properties | ||
| nifi.listener.bootstrap.port=${nifi.listener.bootstrap.port} |
There was a problem hiding this comment.
This always has to match the one in bootstrap, right? It will get sent to the NiFi process when the bootstrap starts it, so I don't think we need the property on the NiFi side.
There was a problem hiding this comment.
My understanding is that they must be different.
Bootstrap will start and listen on nifi.bootstrap.listen.port. It will then start the main NiFi process and pass an argument that tells that main NiFi process what port Bootstrap is listening on.
Then when NiFi starts, it will start listening on nifi.listener.bootstrap.port, and send a message to Bootstrap (to the port bootstrap is listening on, i.e. nifi.bootstrap.listen.port) telling it what this port it started listening on. At this point, each process is listening on a different port and knows which port the other is listening on to send commands.
By default these ports are random ephemeral ports, hence this communication needed to tell each other what the ports the other is listening on. This patch just makes it so you can optionally specify non-random ports.
There was a problem hiding this comment.
Ah I conflated the names nifi.bootstrap.listen.port and nifi.listener.bootstrap.port, my bad
There was a problem hiding this comment.
Maybe more detail in the comment about what the port property means/does?
There was a problem hiding this comment.
Yeah, the names are a bit confusing, I'm open to other suggestions that might be more clear.
I've added a comment as suggested.
… communication ports
|
+1 LGTM, verified the expected behavior. Thanks for the improvement! Merged to main |
…ication ports The NiFi and NiFi Bootstrap processes both bind to random ephemeral ports to allow for inter-process communication (e.g. shutdown, port, ping, etc.). However, the randomness of these ephemeral ports can pose challenges for some security policies and firewall rules. This adds two configuration options, nifi.bootstrap.listen.port and nifi.listener.bootstrap.port, that allow an administrator to define which ports the two processes should bind to for this communication, making it easier to define security policies. The options default to zero to maintain the current ephemeral port behavior. NIFI-6740: Add configuration options to specify NiFi/Bootstrap communication ports Signed-off-by: Matthew Burgess <mattyb149@apache.org> This closes apache#5746
…ication ports The NiFi and NiFi Bootstrap processes both bind to random ephemeral ports to allow for inter-process communication (e.g. shutdown, port, ping, etc.). However, the randomness of these ephemeral ports can pose challenges for some security policies and firewall rules. This adds two configuration options, nifi.bootstrap.listen.port and nifi.listener.bootstrap.port, that allow an administrator to define which ports the two processes should bind to for this communication, making it easier to define security policies. The options default to zero to maintain the current ephemeral port behavior. NIFI-6740: Add configuration options to specify NiFi/Bootstrap communication ports Signed-off-by: Matthew Burgess <mattyb149@apache.org> This closes apache#5746
Description of PR
The NiFi and NiFi Bootstrap processes both bind to random ephemeral
ports to allow for inter-process communication (e.g. shutdown, port,
ping, etc.). However, the randomness of these ephemeral ports can pose
challenges for some security policies and firewall rules.
This adds two configuration options, nifi.bootstrap.listen.port and
nifi.listener.bootstrap.port, that allow an administrator to define
which ports the two processes should bind to for this communication,
making it easier to define security policies. The options default to
zero to maintain the current ephemeral port behavior.
fixes bug NIFI-6740
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
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.
Has your PR been rebased against the latest commit within the target branch (typically
main)?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
squashor use--forcewhen pushing to allow for clean monitoring of changes.For code changes:
mvn -Pcontrib-check clean installat the rootnififolder?LICENSEfile, including the mainLICENSEfile undernifi-assembly? not applicableNOTICEfile, including the mainNOTICEfile found undernifi-assembly? not applicable.displayNamein addition to .name (programmatic access) for each of the new properties? not applicableFor documentation related changes: