Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth without using FlowFuse #638

Open
fullmetal-fred opened this issue Mar 1, 2024 · 14 comments
Open

Auth without using FlowFuse #638

fullmetal-fred opened this issue Mar 1, 2024 · 14 comments
Labels
feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do

Comments

@fullmetal-fred
Copy link
Contributor

Description

Hi team FlowFuse!

Congrats on the recent release and on the awesome demo of multi-user dashboards!

In light of that I have a request: could we allow an auth workflow for dashboard on standard OSS Node-Red? I love using FlowFuse, don't get me wrong, but I teach at tradeshows where I don't have a reliable internet connection. I could perhaps self-host FlowFuse and run it on prem, and I'm open to that, but I'd also just love to be able to use a simple local auth flow.

This could be basic auth...storing the username & password as a cookie and passing them via headers on every request. This could also be something more like a session token / JWT...where the user authenticates, a flow validates the auth, then sends a JWT as a cookie back to the user...then every subsequent request from that client would include additional session & user id information in the ._client object.

I'm not particularly picky how...but I do need a unique way to authenticate & keep track of a unique user. It does seem that this could be done with a dashboard-2 plugin...and I'm also open to working on that if we feel that's the right approach. But I wanted to ask first if this should be native functionality in the opinion of the maintainers.

Then again, you tell me: if I can do this with self-hosted FlowFuse, I'll look to do that for now.

Thanks!!

Have you provided an initial effort estimate for this issue?

I am no FlowFuse team member

@fullmetal-fred fullmetal-fred added feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do labels Mar 1, 2024
@wazzaarr
Copy link

wazzaarr commented Mar 2, 2024

I agree, while I do want to support flowfuse, pay walling out this feature in particular doesn't seem right.
It's so highly requested in Node-RED.
Also making it only available at $125 a month, skipping the $15 a month doesn't push Node-RED users into Flowfuse.

@joepavitt
Copy link
Collaborator

In light of that I have a request: could we allow an auth workflow for dashboard on standard OSS Node-Red? I love using FlowFuse, don't get me wrong, but I teach at tradeshows where I don't have a reliable internet connection. I could perhaps self-host FlowFuse and run it on prem, and I'm open to that, but I'd also just love to be able to use a simple local auth flow.

@fullmetal-fred When you're teaching at the tradeshows, does that mean you're allowing access to all of your users/students to your own Dashboard?

@joepavitt
Copy link
Collaborator

While I do want to support flowfuse, pay walling out this feature in particular doesn't seem right.
It's so highly requested in Node-RED.

@wazzaarr I'd be very interested to know more about your use case. Our current decision is based on a case that those wanting authenticated multi-user authenticated Dashboards would be a professional/industry/enterprise requirement, running with a team of users wanting access.

@fullmetal-fred
Copy link
Contributor Author

fullmetal-fred commented Mar 5, 2024

@fullmetal-fred When you're teaching at the tradeshows, does that mean you're allowing access to all of your users/students to your own Dashboard?

@joepavitt thanks for the question! Yes, the idea is to have a "student" instance that is shared between all students which is authenticated...I use a backend to store state, credentials, etc. Each student needs to log into the dashboard, and only get data that they're supposed to get, and only get responses from the Node-RED backend that are intended for their client connection.

My alternatives at this point are to build a bespoke front end, or to use things like Appsmith to get a low-code option. I could also continue using NR and UiBuilder...but while that project is incredibly well documented, it just doesn't have the same "batteries included" feel of D2.0, and it ends up slowing me down.

@wazzaarr
Copy link

wazzaarr commented Mar 5, 2024

Node-RED has become so much more, due to your work on dashboard 2. Where it was really more applicable to IOT in the past, is now really opened up to being one of the best low-code web app development platforms. Fundamentally, multi user is a requirement of web app development.

@joelvandal
Copy link
Contributor

I've successfully implemented basic authentication using ui-event and ui-control, allowing for single-user access where visibility of certain pages or groups depends on the login credentials. This setup is functioning well for the moment, but it has a limitation: all users see the same content. For example, when one user navigates to a different page, the change is reflected for all users.

I explored a multi-user approach utilizing socket connections and client IDs, where I stored details like username, connection timestamp, and socket ID for each connection. This method showed promise in differentiating user experiences, but I haven't had enough time to fully integrate it.

@wazzaarr
Copy link

wazzaarr commented Mar 31, 2024 via email

@joepavitt
Copy link
Collaborator

I've actually started using WeWeb as the front end

Is that in-place of Dashboard 2.0, or supplementary to?

@wazzaarr
Copy link

wazzaarr commented Apr 1, 2024 via email

@uschmelmer
Copy link

I would say multi-user or multi-dashboard capability is an absolute need, also for the selfhosted users.
Without these features i can't find any advantage of DB 2.0 compared to the original version.

Kind Regards

@mman
Copy link

mman commented May 6, 2024

Without these features i can't find any advantage of DB 2.0 compared to the original version.

Like for example that DB 2.0 is actively maintained, does not use deprecated, and unsupported, and possibly insecure Angular 1. 😉

@joepavitt
Copy link
Collaborator

I would say multi-user or multi-dashboard capability is an absolute need, also for the selfhosted users.

In which case, FlowFuse is available to support this use-case.

@uschmelmer
Copy link

I would say multi-user or multi-dashboard capability is an absolute need, also for the selfhosted users.

In which case, FlowFuse is available to support this use-case.

We se need for Industral Control, for example you have some machine/productionline controlpanl with three levels of access:

  1. Normal Worker: Monitoring Machine Progress and simple controls like start/stop, tool change
  2. Machine Operator: Changing machine settings, error clearing
  3. Service: Chaning lowlevel settings, detailed error log

Same for building automation, example hotel rooms:

  1. Guest Accounts: Change Light, Sound Volume
  2. Advanced settings: like HVAC, Timers

Best Regards

@joepavitt
Copy link
Collaborator

Thanks for the details @uschmelmer - that's exactly the kind of use cases we have in mind. If you're interested in FlowFuse as a solution here, I'm happy to put you in touch with someone that can provide more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do
Projects
Status: Backlog
Development

No branches or pull requests

6 participants