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

David Handermann commented on NIFI-16653:
-----------------------------------------

[~jimhalfpenny] Thanks raising this issue for consideration.

Following on from the pull request comments, the core question is one of secure 
introduction.

There are several precedents in other systems for this kind of behavior, so 
I've started to consider options to put together something in the form of a 
NiFi Improvement Proposal.

Based on the fact that NiFi already uses mutual TLS, one of the more 
straightforward options would be adding something to node certificates. Such 
options include a URI Subject Alternative Name, which each cluster member 
certificate would have, and each could verify without additional configuration. 
Another similar option would be a common DNS Subject Alternative Name base.

There are other possibilities such as a shared secret that could be used to 
determine membership, but that would be more involved in terms of 
implementation.

If you have any additional thoughts on a certificate-based solution, that would 
be helpful.

> Add optional sender verification for cluster protocol node requests
> -------------------------------------------------------------------
>
>                 Key: NIFI-16653
>                 URL: https://issues.apache.org/jira/browse/NIFI-16653
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 2.13.0
>            Reporter: Jim Halfpenny
>            Priority: Minor
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The cluster protocol listener accepts connections from any client presenting 
> a certificate trusted by the configured trust store. Cluster nodes process 
> flow, reconnection, disconnection and offload requests without checking which 
> node sent them, although only the elected Cluster Coordinator sends these 
> requests. Reconnection requests include the complete flow that the receiving 
> node applies.
>  
> An optional verification step should allow nodes to reject these requests 
> unless the sender certificate identifies a cluster node: * New property 
> `nifi.cluster.protocol.sender.verification.enabled`, default `false`, so 
> existing clusters are unaffected.
>  * When enabled and TLS is configured, flow, reconnection, disconnection and 
> offload requests are accepted only when a DNS Subject Alternative Name of the 
> sender certificate matches the address of the elected Cluster Coordinator, as 
> published through leader election, or the cluster protocol or API address of 
> a node known to the receiving node.
>  * Wildcard Subject Alternative Names match a single leftmost label, 
> consistent with TLS hostname verification.
>  * Requests from other senders are rejected with a `ProtocolException`.
>  * The matching follows the approach of `ClusterLoadBalanceAuthorizer` for 
> load-balanced connections.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to