Skip to content

Add documentation for OWASP ModSecurity#413

Open
weiiwang01 wants to merge 5 commits into
mainfrom
owasp-docs
Open

Add documentation for OWASP ModSecurity#413
weiiwang01 wants to merge 5 commits into
mainfrom
owasp-docs

Conversation

@weiiwang01
Copy link
Copy Markdown
Contributor

Applicable spec:

Overview

Add documentation for OWASP ModSecurity related charm configurations.

Rationale

Juju events changes

Module changes

Library changes

Checklist

@weiiwang01 weiiwang01 requested a review from a team as a code owner May 29, 2026 12:47
@weiiwang01 weiiwang01 requested review from alithethird and f-atwi and removed request for a team May 29, 2026 12:47
@weiiwang01 weiiwang01 added documentation Improvements or additions to documentation no-release-note This PR does not require a change artifact labels May 29, 2026
@weiiwang01 weiiwang01 requested a review from erinecon June 1, 2026 06:38
Copy link
Copy Markdown
Collaborator

@erinecon erinecon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this guide! Mostly nits, but the PR preview of the how-to landing page currently contains three entries for the new how-to guide, so I won't give an approval until the headers are updated :)

`owasp-modsecurity-crs` and `owasp-modsecurity-custom-rules` charm
configuration options.

# Enable OWASP ModSecurity with core rule set
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Enable OWASP ModSecurity with core rule set
## Enable OWASP ModSecurity with core rule set

juju config nginx-ingress-integrator owasp-modsecurity-crs=true
```

# Customize ModSecurity rules
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Customize ModSecurity rules
## Customize ModSecurity rules

Comment on lines +7 to +8
and Nginx that is developed by OWASP. You can enable the ModSecurity
firewall in the Nginx ingress integrator charm using the
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and Nginx that is developed by OWASP. You can enable the ModSecurity
firewall in the Nginx ingress integrator charm using the
and NGINX that is developed by OWASP. You can enable the ModSecurity
firewall in the NGINX ingress integrator charm using the

My understanding is that "NGINX" should be formatted in all caps


The OWASP ModSecurity Core Rule Set (CRS) is a set of generic attack
detection rules for use with ModSecurity or compatible web application
firewalls. You can enable OWASP ModSecurity and the core rule set by
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
firewalls. You can enable OWASP ModSecurity and the core rule set by
firewalls. Enable OWASP ModSecurity and the core rule set by

Nitpick, but I think we should drop the "You can..." framing in the subsections. I think it's fine to use "You can..." in the introduction, as a way of introducing the content in the guide as an optional task that users can do for their deployment. But now that we're in the subsections and discussing the tasks, we should be more authoritative about the user's actions.

Comment on lines +17 to +18
setting the `owasp-modsecurity-crs` charm configuration to `true`. For
example:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: "For example" reads like there's some other way to set this configuration to true. I understand that the user might rename their deployed nginx-ingress-integrator, so the command could be different for their setup, but for conciseness, I think we can drop "For example".

Suggested change
setting the `owasp-modsecurity-crs` charm configuration to `true`. For
example:
setting the `owasp-modsecurity-crs` charm configuration to `true`:

Comment on lines +26 to +30
You can also enable additional rules outside the core rule set by
setting the `owasp-modsecurity-custom-rules` charm configuration option.
The `owasp-modsecurity-custom-rules` configuration option will be put in
the `nginx.ingress.kubernetes.io/modsecurity-snippet` Nginx ingress
annotation with other charm-generated configuration snippets.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can also enable additional rules outside the core rule set by
setting the `owasp-modsecurity-custom-rules` charm configuration option.
The `owasp-modsecurity-custom-rules` configuration option will be put in
the `nginx.ingress.kubernetes.io/modsecurity-snippet` Nginx ingress
annotation with other charm-generated configuration snippets.
Enable additional rules outside the core rule set by
setting the `owasp-modsecurity-custom-rules` charm configuration option.
This configuration option will be put in
the `nginx.ingress.kubernetes.io/modsecurity-snippet` NGINX ingress
annotation with other charm-generated configuration snippets.

Nits around authoritative writing, NGINX capitalization, conciseness

Comment on lines +35 to +36
This option is only effective when `owasp-modsecurity-crs` is set to
`true`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Consider placing this text into a warning admonition so that it's highlighted more, e.g.

```{warning}
This option is only effective when `owasp-modsecurity-crs` is set to
`true`.
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation Libraries: Out of sync no-release-note This PR does not require a change artifact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants