You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mark Payne (Jira)" <ji...@apache.org> on 2022/11/30 23:15:00 UTC

[jira] [Commented] (NIFI-10918) If NiFi Registry URL changes, flows containing inner versioned flows cannot be fetched

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

Mark Payne commented on NIFI-10918:
-----------------------------------

Addressed this issue by changing the logic over how to resolve a Registry Client for a given internal versioned flow.

Previously, we asked the client if it was applicable for the Remote Flow's URL. If not, we would not use the client.

We will now create a List of all Registry Clients, and sort them based on whether or not the client reports being able to handle the Remote Flow's URL. This will cause us to use the most appropriate client first, when applicable. However, we will now attempt to fetch the flow from all clients, until one of them succeeds.

This is acceptable because:
 * We will only interact with Registry instances that are have been configured for use
 * Authorization will be performed against all requests
 * We will only fetch the flow if it has the same Bucket ID and Flow ID. So even if it is stored in a different registry, we should have no problem feeling confident that it's the correct flow.

This also provides a few additional benefits, in that we no longer have to rewrite the URLs of flows when any of the following occurs:
 * The hostname of the registry is changes
 * The port that the registry is listening on changes
 * If replicating flows from one registry to another

> If NiFi Registry URL changes, flows containing inner versioned flows cannot be fetched
> --------------------------------------------------------------------------------------
>
>                 Key: NIFI-10918
>                 URL: https://issues.apache.org/jira/browse/NIFI-10918
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Major
>             Fix For: 1.20.0, 1.19.1
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I was performing some testing of integration with NiFi Registry. I started with an insecure registry running on [http://localhost:18080|http://localhost:18080/]
> I created a simple dataflow, called 'Inner Flow'. I then versioned it. Afterwards I put its parent Process Group ('Outer Flow') under Version Control.
> Everything worked as expected. I then wanted to verify that things still worked when secured. I secured my registry, changing the URL to [https://localhost:18443|https://localhost:18443/]
> Unfortunately, this resulted in no longer being able to check out the flow 'Outer Flow'. It failed because when the flow was created, it stored the coordinates of 'Inner Flow' as [http://localhost:18080/....] but now it can no longer find any Registry Client that can handle [http://localhost:18080/...] since the client has now been reconfigured to use the HTTPS based URL.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)