-
Notifications
You must be signed in to change notification settings - Fork 71
Consolidate development of Docker images #32
Comments
|
Planned tasks to refactor
|
This is a very sane approach and I think the CRS projects can agree to this. Formal decision (and we think it takes a formal decision) will be on Monday during the CRS chat. |
For the sake of transparency, a detail that guides us now in implementing this change: @csanders-git explained his motivation that led to the change of the CRS setup directory structure in SpiderLabs/owasp-modsecurity-crs#1420 (comment). It is essentially, to get rid of distro based images (ubuntu, fedora, alpine) and rely solely on the official upstream images of the web proxies. In alignment with that we will create a repository structure and automated builds for the following combinations:
... with v2/v3 referring to the latest ModSecurity version 2 and 3 As by the default of the upstream images those will be |
@zimmerle from SpiderLabs recommends using ModSecurity v3 with Nginx and using v2 only with Apache. Does that mean that we can assume those as defaults? i.e.
This would simplify the build matrix for the Docker images. But is this a good idea? Any thoughts? |
I think it makes perfect sense. |
Agreed, this was the route that we wanted to take. |
@csanders-git and I just clarified this on the OWASP Slack in addition. We will configure automatic builds for the tags
The builds for all other tags will remain unaffected for the moment, they will continue to run separately. Afterwards, everyone should take a look at how they like the result. Later in 2020, we can look into how to allow v3 to be built with any supported Web proxy other than Nginx in addition. Apache will remain the only supported Web proxy for ModSecurity v2. |
Automatic builds of the owasp/modsecurity Docker image are now working. They are not configured as Docker Hub Automated Builds but implemented via GitHub Actions, which provides good integration with the repository, transparency, more flexibility (e.g. we can put several tags onto one image being built) and ultimately more build speed. The README, seemingly maintained manually on Docker Hub, is now also under version control in the Your feedback, please!I would like to invite everyone now to revisit the achievemements on this repository.
If everything looks good we may start to deprecate the other branches and their related image tags. |
A quick update: We are continuing our consolidation efforts. In PR #34 we've tried to make the inclusion of configuration related to ModSecurity more clearly isolated. Yet, there are some issues we still left unaddressed in the "ModSecurity 2 + Apache" image:
Any ideas that help to make this cleaner or more elegant are very welcome! |
We are considering using the modsecurity v3 docker images built from this repository to implement a setup for a customer where the customer provides a small set of custom modsecurity rules and we load those rules into the modsecurity docker image at runtime. The customer is not interested in using the core rule set at this time, so we're looking for a plain modsecurity v3 image without any rules preconfigured. However, the images built from this repository are not flexible enough for our use case (running modsecurity v3 on OpenShift in proxy mode, listening on a custom port), as they don't allow any runtime configuration and very limited build time configuration. Even if there was enough build time configuration options, we'd still have to build our own plain modsecurity v3 docker image to configure proxy mode and the a listen port which is compatible with running the image on OpenShift. I've seen that there is some work to make the CRS docker image expose more configuration options at runtime (coreruleset/modsecurity-crs-docker#7), and I'm wondering whether it wouldn't make more sense to expose the configuration options related to modsecurity itself and the webserver (Apache in the mentioned PR, or nginx for our use case) in the image built from this repository, rather than the image which includes the core rule set since those options may be interesting also for users who don't want to use the core rule set. |
That totally makes sense! -- The underlying idea of the current architecture was based on the understanding that no-one would or should ever use plain ModSecurity w/o the CRS. Hence the configuration options would have been fine in the image that adds the CRS. Your use case changes that view. It should be fairly easy to move the work that we have started in coreruleset/modsecurity-crs-docker#7 to this repository, which would also improve the focus on adding "just CRS" in the former. Any other thoughts? @csanders-git @dune73 @lifeforms @srueg @zugao |
I totally agree. Ideally the base image (non CRS) provides all the config options for Apache/nginx & ModSecurity and the CRS image really only adds the core rule set. |
PR #38 is now ready for review. Please, take a look! |
@bittner Do you think we can close this one? |
This is up to @coreruleset/vshn-ag to decide. I don't work for them anymore. |
I'm deciding then. Closing. |
I'm working with colleagues on operating ModSecurity+CRS on modern infrastructure for some months, and we've seen a few challenges that make it hard to do sustainable software development.
What's wrong?
The industry needs a set of official images that are both trustworthy and easy to work with. Modern software development requires us to react quickly, hence we need sane defaults and convenient ways to override the default configuration. Container security is a growing concern, hence we must ensure the smallest attack surface possible -- without compromising development and operation convenience.
We need to:
How can we help?
We have some capacity (and need) to work on consolidating the existing container image efforts. You can see our efforts in the related images on Docker Hub (e.g. vshn/modsecurity, vshn/modsecurity-crs).
My colleagues and I have extensive experience with crafting and running container images. If we could help maintain the Docker images in https://github.com/CRS-support (e.g. modsecurity-docker and modsecurity-crs-docker) that may free some of your resources for maintaining the CRS rules.
Can we help maintaining? Would that be possible?
The text was updated successfully, but these errors were encountered: