-
Notifications
You must be signed in to change notification settings - Fork 59
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
Remote device access, editing and snapshotting with Auth enabled #2042
Conversation
to get positive response to a command (ie not fire and forget) necessary for interlocking and correct representation of tunnel state before user attempts access Done in a generic way to permit future command/response opportunities Adds callback to MQTT publish and `device.sendCommand` Adds response topic to device MQTT Updates MQTT ACLs for response topic Adds `comms.device` > `sendCommandAsync()` and `sendCommandAwaitReply()`
Adds mode flag and API for setting Device Mode (autonomous/programmer) Updates device view to include mode and tunnel info Add permissions preHandlers Make the whole process more interlocked by using the new TunnelManager and utelising the new Cmnd/Resp MQTT calls Document the 12 steps to connection (please keep comments for future ref Ensure WS connections close on error (add include WS error codes) Document APIs
support head and options dont look for `projectSettings` on a tunnelled device (fixes crash) improve tracing (through comments) of the 12 steps to achieve a tunnel fix auth by switching to x-access-token
non enterprise should not show elements of this feature add Developer Mode Only adjacent to the section title flask tooltip to read "Developer Mode" re-word "Device Mode" choice dialog
Following dev-demo live (p)review, additional pushes have been made to address ui/ux and security. Security
Enterprise Only
UI / UX
Still todo (either this or later iteration)
|
I think we definitely need something in the first iteration then ensures the state doesn't get out of sync if the device is offline. Otherwise it will say the editor is enabled, but the button never comes active - without any indication what is wrong. |
…into device-editor
New Tests passing (except the common |
Is there a summary of all of the new api routes this PR adds? It's quite hard to get the big picture trying to pick them all out individually and the external apis are a key part of the design. PRs of this size and complexity should ideally summarise their key changes in the description, including db changes, api changes etc. Given this is EE licensed functionality, some of this should be under the
Has this been resolved in the subsequent commits? |
Refactor device editor endpoints and move under ee code tree
I have merged and performed local testing (approx 1hr, enable, disable, with MQTT down, with device up/down etc) fixed up button text wrapping in f82ad24 Other than that, ready for review/merge. |
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
reply.send(app.db.views.ProjectSnapshot.snapshot(snapShot)) | ||
}) | ||
|
||
async function assignDeviceToProject (device, project) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async function assignDeviceToProject (device, project) { | |
// #region Helpers | |
async function assignDeviceToProject (device, project) { |
Missing #region
marker
Description
Support remote device access, editing and snapshotting with NR token Auth to prevent local access
TODO:
Notes for debugging and comprehension
Related PRs
FlowFuse/device-agent#77
Related Issue(s)
#1821
Checklist
flowforge.yml
?flowforge/helm
to update ConfigMap Templateflowforge/CloudProject
to update values for Staging/ProductionLabels
backport
labelarea:migration
label