-
Notifications
You must be signed in to change notification settings - Fork 9
feat: Run Device Agent in container as unpriviledged user #565
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
base: main
Are you sure you want to change the base?
Conversation
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
|
Need to think about this, mainly how it will impact things with mounted volumes as any files written will previously have been owned by root. Will have to test |
Co-authored-by: Ben Hardill <ben@flowforge.com>
hardillb
left a comment
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.
My problem with this is it is potentially a breaking change, so we should merge and apply it the same time we change the default NodeJS version (to 20) at the next major release (4.0.0?).
I'm pretty sure this will break users that are extending the flowfuse/device-agent container (e.g. "windows") as the active user will change from root to a user that can not install apk packages or create new directories.
There is a workaround for the existing container which is to pass -u 1000:1000 to set the uid and gid to 1000 so as not to run as root.
Need to think about this some more
|
NodeJS v20 has been in maintenance for a long time, and EOL is scheduled for April/May this year. IMO if we are thinking about a breaking change release, we should aim for at least NodeJS v22 (v24 preferably) to avoid having another breaking change release in the middle of 2026. |
Description
This pull request changes the way how the device-agent runs inside a container. Instead of using a root user, a custom
flowfuseone is created during the container build process.Additionally, it:
Related Issue(s)
Closes #562
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel