-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
DRAFT GNIP 101 : Reduce docker attack surface #12769
Comments
Thanks Florian! I remember a PSC thread regarding this topic some time ago. Rootles would be great, if I remember correclty I cut permissions with AppAmor in one project. Will see what has been done there … maybe something can be reused. Even if not requested my +1! Thanks! |
+1 |
Thank you @gannebamm! We're hard workinng on it. We are finishing a lite image for GeoNode 4. In FOSS4G 2022 we discussed about application of these practices. Now we are porting some of them to our GeoNode Project. Soon I will propose this lite image for main repo. |
Happy to see contributions on this! We're also discussing the topic here at GeoSolutions, particularly for GeoNode 5. @cmotadev what is your plan for this lite image? What do you mean by "lite"? |
I can summarize "lite image" into these below topics:
|
@cmotadev thanks, looging forward to have a look into your lte image ;) |
GNIP 101 - Improving Docker Security
To PSC: There is nothing to vote upon, yet
Overview
According to docker security pages (https://docs.docker.com/engine/security/) using docker with default settings does provide an attack surface. The basic approach to lower the attack surface is to enable rootless processes inside the containers. The GeoNode docker composition currently uses the root user for starting the container processes. Disabling root and adding other security related functionality could significantly reduce the attack surface.
Proposed By
Florian Hoedt, Thünen-Institute
Assigned to Release
This proposal is not yet scheduled for a release.
State
Motivation
An upcoming talk about GeoNode in production at FOSS4G 2024 which will cover topics like:
sparked my interesst. I see that improving the current security model is an important task but also one which requires an substential amount of ressources. I created this GNIP as an invitation to the downstream project to contribute to the main project. I see people like @cmotadev working on that. Maybe he can post some links to the downstream project´s github as a reference how to achieve the above mentioned goals.
Proposal
The options to achieve the mentioned goal are manifold. The fist level of reducing the attack surface is to enable rootless docker for the containers as done in the geoSGB use-case described above.
Backwards Compatibility
Currently, the amount of changes is not yet known. If those changes do not effect the django code but solely how docker containers are started they could be backwards compatible. If django code needs changes the work of backporting those is likely to big.
Future evolution
Apart from using podman and a rootless docker we could implement AppArmor profiles per container to further reduce the attack surface. An example of this for an nginx container is listed here.
Feedback
Update this section with relevant feedbacks, if any.
Voting
Project Steering Committee:
The text was updated successfully, but these errors were encountered: