Skip to content
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

[docker] Run tomcat as non-root user #442

Closed

Conversation

jeanpommier
Copy link
Member

All georchestra images run as a non-privileged user (uid 999). For a better consistency, and better security practices, I propose we do the same here, run the tomcat server as non-privileged user 999

Addresses #403

@jeanpommier jeanpommier changed the title Run tomcat as non-root user [docker] Run tomcat as non-root user Dec 8, 2021
@pierrejego
Copy link
Member

@jeanpommier can we merge ? how to test ?

@jeanpommier
Copy link
Member Author

Regarding testing, I have no testing proposal for that, except deploy an image configured that way and check it works well on a georchestra from scratch.

About merging, the fun thing is that since previous mapstore containers will have run as root, this will need to chmod the data volumes, otherwise the tomcat 999 user won't be able to write anything. So if we do that, it would be good to do it jointly with a release and add instructions in the upgrade doc.

But security-wise, yes, it would be nice to follow the same security policy as the rest of the platform: don't run the containers as root, at least when we don't need it

@jeanpommier
Copy link
Member Author

jeanpommier commented Mar 28, 2023

I'm testing it right now, it seems to be working well, provided that your mapstore datadir is writable by user 999.

I can see a small change that may be unwanted in this PR, I'm going to update it's code, it might interfer with the GH action build process

@jeanpommier
Copy link
Member Author

Closing this one, you can merge the update one, #612

jeanpommier added a commit to pi-geosolutions/mapstore2-georchestra that referenced this pull request Oct 30, 2024
Based on PR georchestra#442
Updated according to suggestions from @edevos on PR georchestra#612
jeanpommier added a commit to pi-geosolutions/mapstore2-georchestra that referenced this pull request Oct 30, 2024
Based on PR georchestra#442
Updated according to suggestions from @edevosc2c on PR georchestra#612
@jeanpommier jeanpommier deleted the non-root-tomcat-user branch October 30, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants