-
Notifications
You must be signed in to change notification settings - Fork 370
Official Docker of IRI runs as user root #1519
Comments
In fact, it is often recommended to use an unprivileged user. However, this is rarely done in practice and many companies even consciously choose this way because it brings advantages and the risk is rather low. |
So, maybe there should be a feature switch for behavior? |
I completely agree that a user should be configured by default. This minimizes security risks. With the iri-playbook I have specifically created an unprivileged user I agree that it should be taken care of by the official image. |
Maybe the same could be used for IRI? |
@rajivshah3 what I have done yesterday is add some information to the already pending PR I have for the Dockerfile/docs: #1496 Nevertheless, consider that without having to go into manual setup of user remapping (docker<->host) a user that is created and assigned a UID within the container is the same UID on the host. In some cases this could end up being an already existing user on the system. And, the slightest chance that this user has some privileges on the host system: that might not be a desired situation. My proposal is to set default ARGS in the Dockerfile using some arbitrary high UID/GID, e.g. 14265, and create the user within the container using these. In any case, it is always possible to pass In the example/proposal below I have added the
One caveat here is that a user must chown the directories that get mounted in to the container using the same UID (or create a user on the host with this UID, and grant permissions on the required directories). Due to this extra "complexity", for now, I thought it would have been better to simply make note of recommended way to run docker with |
Solved in #1496 by Nuriel. Changed the user and added security considerations section describing it. Thanks.
|
Bug description
Official docker image uses account
root
to run IOTA IRIIRI version
1.8.0-RELEASE
Hardware Spec
CentOS 7
Steps To Reproduce
docker pull iotaledger/iri
docker run [...]
Expected behaviour
IRI daemon should run at dedicated user with high UID
Actual behaviour
IRI daemon is started as root
The text was updated successfully, but these errors were encountered: