st2actionrunner doesn't respect system user when doing private repo pack installs
SUMMARY
I have a special user on my st2 machines that has permissions for installing packs. This is also the same user listed in the st2.conf file as the system user (replacing stanley). When doing an install from a private repo the st2actionrunner is continues to run as root and therefore none of the ssh keys are setup for this.
STACKSTORM VERSION
Paste the output of st2 --version:
st2 3.5.0, on Python 3.6.8
OS, environment, install method
HA cluster (non-k8s): 2 app nodes and 1 controller
Steps to reproduce the problem
As a non-root user try to install a package from a private git repo
Expected Results
The package to install using the system user specified in the st2.conf file so it would use that user's keys.
Actual Results
st2actionrunner runs as the root user instead of the system user specified in st2.conf.
Looking at source the install only happens as the current user that is running the pid. In this case st2actionrunner runs as the root user only while all the other services run as the system user specified in st2.conf.
Thinking of ways to work around this one without adding keys to the root user.
Thanks!
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.