FlowFuse / FlowFuse/node-red-dashboard

Socket/user data not propagating/filtering correctly in multitenant.

Open
#1,924 0 comments 0 reactions 0 assignees View on GitHub
needs-triage type:bug
Dominant language
HTML
Stars
355
Forks
82
Avg merge
4d 20h
Merged PRs (30d)
24

Description

### Current Behavior

This started as a follow on to #1371 and my gut still says they are linked:

-------ORIGINAL RESPONSE TO 1371-------

I will add that there seems to be multi-tenant issues with these two nodes as well - very possibly related.

I'm not able to dig too deep due to deadlines but while trying to troubleshoot the above I also saw multitenant failing with data from one window polluting another with respect to logins as well as filtering by login (i.e. _client.user.email for Cloudflare auth) failing outright. When these nodes were removed from accept client data things worked fine in a non-multi-tenant way.

Will reply in the future with more details if time allows - but for now just wanted to add this possibly related data/FYI.

------ADDITION------

Possibly a clue: Setup as it's own issue.

With accept client data enabled and event node feeding straight into template node:

USER: {{ msg._client.user.userId }} | {{ msg._client.socketIp }} (India, Papa)
GIVES: USER: [user@user.com](mailto:user@user.com) | 10.101.1.22

USER: {{ msg._client.user.userId }} | {{ msg._client.socketId }} (India, Delta)
GIVES: USER: [user@user.com](mailto:user@user.com) |

Associated debug node shows correct data (i.e. socketId intact) coming out of event node regardless.

So, possibly: Are nodes set to accept client data filtering out the sessionId a bit too aggressively or in the wrong place.

### Expected Behavior

socketId available in template node; multitenant behavior as shown in the videos/tutorials.

### Steps To Reproduce

_No response_

### Environment

- Dashboard version:
- Node-RED version:
- Node.js version:
- npm version:
- Platform/OS:
- Browser:

### Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or reproducible steps are provided. Start by tracing the accept-client-data path between the event and template nodes, then compare socketId and user data across tenants; done means socketId is available in the template and tenant data remains isolated.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.