Monday 20 November 2017

How would I run a specific node service with elevated privileges Linux environment?

This is a question that is probably as much Linux-related as it is node-related, but I think this may be the best place to ask..I'm developing an app that is targeted at Raspberry Pi 3 running Raspbian Stretch-Lite (Ubuntu). For the most part, it's a straightforward web app, but I want my users to be able to configure the device's network settings and system time from the web app.It's going to be running in somewhat sensitive environments, so security is a big concern. What I'm thinking is that I write all of the standard CRUD stuff in one app, but have a second microservice running with elevated privileges that will be responsible only for the time/network configuration, minimizing the api surface area that is exposed with elevated privileges. I'd have both behind an Nginx reverse proxy to route requests to the correct instance.I'm planning on starting up my app instances with pm2. Is there a way that anyone knows of to use pm2 to spin up apps with different privilege levels? Is there a better way I can be going about this?Thanks in advance for any advice.

Submitted November 21, 2017 at 04:54AM by LetReasonRing

No comments:

Post a Comment