Skip to content

Feature: add settings flag to disable inbound TCP/UDP nodes #3902

Description

@knolleary

In some hosted environments it isn't desirable to expose the core TCP/UDP nodes that allow inbound connections. However, those nodes also support outbound connections - which is supported in hosted environments.

For example, the IBM Cloud hosted instance disabled the TCP/UDP nodes and replaced them with custom nodes that used the same node types, but only supported outbound connections. Those forked nodes then inevitably fell behind the core nodes.

It would be better if the core nodes supported this use case and provided a means (via the settings file) to disable their inbound modes.

Activity

  1. sammachin commented on Sep 28, 2022

    @sammachin
    Contributor

    Ideally this setting should also be available to other nodes to query that may also expose their own TCP/UDP ports for example the Email MTA node

  2. dceejay commented on Sep 30, 2022

    @dceejay
    Member

    Is this intended to be a global indicator of "don't bother to offer this node if inbound connection isn't allowed" - or a specific flag per node (one for udp, one for tcp, one for email - etc ) ?

    In the first case as it is then down to individual nodes to implement the flag needs to make clear it is more of an indication that can be followed rather than a hard rule.
    In the second - is there a proposed naming convention ? disallowInboundXxx ? or something ?

  3. hardillb commented on Sep 30, 2022

    @hardillb
    Member

    I think a single global flag indicating that the environment doesn't support inbound connections are not available is the right approach.

  4. dceejay commented on Sep 30, 2022

    @dceejay
    Member

    I agree (with @hardillb ) - though is it true all the time ? can I have internal (localhost) connections from another process ? Or is that sufficiently edge-case that it doesn't matter ? (I suppose worst case the setting could be turned off :-) even if the external firewall blocked any external connections)

    And would I maybe want to deny all raw tcp/udp but allow email (as per above? )

  5. sammachin commented on Sep 30, 2022

    @sammachin
    Contributor

    The flag is just informational about the node-red environment it would still be up to the node developer to decide what to do with that information.
    The intention is to indicate environments where there is only http (hostname based) access, but it will be up to the admin deploying Node-RED if to set this or not.

    In terms of localhost I think that would always be allowed but again this is up to the node developer, if the node just listens on localhost they may not even consult the flag.

    The email example I was using was that it listens on port25 as an SMTP server, so although it doesn't explicitly say in the node that its a TCP server the developer would know that it is.

  6. knolleary commented on Sep 30, 2022

    @knolleary
    MemberAuthor

    The main requirement is a way to disable (non-http) inbound connections in the core nodes. We have other ways of disabling/blocking extra modules that can be done administratively (and doesn't require the node author to had adopted this setting).

    The scenario of allowing some connections but not others is out of scope of what is being proposed here.That would require the node UI to allow inbound to be configured, but then have additional validation to allow only certain values.

  7. dceejay commented on Sep 30, 2022

    @dceejay
    Member

    ok - so more of http(s) connections only flag.

    Aha - as Nick just said - "disable (non-http) inbound connections"

  8. dceejay commented on Sep 30, 2022

    @dceejay
    Member

    So does this just disable them ? or stop them appearing in the editor palette (IE can't be used) ? EG if I import a flow with existing (or new) tcp in node in - will it somehow get disabled (dotted) ? or be "unknown".
    (I'd assume the actual cloud instance would stop it actually working/doing anything so no danger per se - so purely visual)

  9. knolleary commented on Sep 30, 2022

    @knolleary
    MemberAuthor

    or stop them appearing in the editor palette (I

    The problem we have is the TCP nodes can act in both inbound and outbound mode - we don't have separate nodes for the different 'directions'. So it isn't just a case of disabling a node (which we could already do). The purpose of the flag would be to tell the TCP/UDP nodes not to offer the inbound configuration options.

    In terms of importing a flow with a node configured for inbound connections - the node validation logic in the editor would be able to flag it as an invalid configuration.

  10. added this to the 3.1 milestone on Oct 31, 2022
  11. modified the milestones: 3.1, 4.0 on Jan 19, 2024
  12. removed this from the 4.0 milestone on Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions