-
Notifications
You must be signed in to change notification settings - Fork 151
N1C WAF Security Dashboard Release #1834
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
Open
sylwang
wants to merge
13
commits into
main
Choose a base branch
from
n1c-waf-dashboard-release
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e6f9369
N1C WAF Security Dashboard Release
sylwang 3806295
add changelog
sylwang 2da665f
update reference links
sylwang 10ad819
Apply suggestions from code review
sylwang 8d182e5
consolidate security dashboard section
sylwang a5851ee
rewrite to follow templates and expand coverage
vrmare dd939d8
fix call-out note
vrmare 7c557d1
renamed for clarity
vrmare 23766af
Apply review feedback from the WAF security monitoring docs walkthrough
vrmare e51026a
addressed more reeview comments
vrmare af39012
addressed more reeview comments
vrmare f77bf17
moved waf api to automation docs
vrmare 363e107
final one.json
vrmare File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
content/nginx-one-console/waf-security-dashboard/_index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| title: F5 WAF for NGINX security monitoring | ||
| description: Monitor security events and review WAF dashboards to assess threats | ||
| weight: 425 | ||
| url: /nginx-one-console/waf-security-dashboard | ||
| --- | ||
|
|
||
| Use the Security Monitoring module in NGINX One Console to monitor data from F5 WAF for NGINX instances. Review the security dashboards to assess potential threats and identify opportunities to fine-tune your policies. | ||
|
|
||
| ## Dashboard metrics overview | ||
|
|
||
| The security dashboard displays key metrics to help you understand attack patterns and threats. Here's an overview of the main metrics: | ||
|
|
||
| - **Attack Counts** - Track the number of attacks with percentage change comparisons against previous periods | ||
| - **Violation Types** - View violations grouped by category (e.g., Protocol Compliance) to understand threat patterns | ||
| - **Signatures** - See specific signatures triggered within each violation type across multiple events | ||
| - **Event Details** - Access Support IDs, raw request data, triggered signatures, and contextual metadata (Original IP, X-Forwarded-For, Violation Context) | ||
| - **Global Filters** - Apply filters by time period, policy, and attack type to instantly update all dashboard widgets |
48 changes: 48 additions & 0 deletions
48
content/nginx-one-console/waf-security-dashboard/default-log-profile.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| --- | ||
| title: Default log profile | ||
| description: Learn about the security dashboard default log profile and how to deploy it | ||
| weight: 200 | ||
| nd-content-type: concept | ||
| nd-product: NONECO | ||
| --- | ||
|
|
||
| The default log profile is a pre-configured F5 WAF for NGINX log profile designed specifically for security event monitoring in NGINX One Console. It captures security violation data in a standardized format optimized for analysis and troubleshooting. | ||
|
|
||
| ## About the default log profile | ||
|
|
||
| The default log profile is similar to [other log profiles]({{< ref "/nginx-one-console/waf-integration/log-profiles/_index.md" >}}) in structure and function, but has these key characteristics: | ||
|
|
||
| - **Immutable** — The default log profile cannot be edited or deleted. This ensures the security monitoring data format remains consistent across your deployment. | ||
| - **Pre-compiled** — NGINX One Console automatically compiles the default log profile for all available WAF compiler versions. This eliminates the need for on-demand compilation during deployment. | ||
| - **Standardized format** — It captures all necessary security telemetry fields for the security dashboard, including support IDs, violation details, signature information, and client context. | ||
|
|
||
| ## When to use the default log profile | ||
|
|
||
| Use the default log profile when you want to: | ||
| - Send security violation data to NGINX One Console for centralized monitoring | ||
| - Analyze attack patterns and trends across your NGINX fleet | ||
| - Review violation details and raw request data for specific security events | ||
| - Generate baseline security metrics and trending reports | ||
|
|
||
| For specialized logging requirements beyond security monitoring, you can create and deploy custom log profiles alongside the default profile. | ||
|
|
||
| ## Deploy the default log profile | ||
|
|
||
| To deploy the default log profile to your NGINX instances or Config Sync Groups, follow the same process described in [Deploy log profiles]({{< ref "/nginx-one-console/waf-integration/log-profiles/deploy-log-profiles.md" >}}). | ||
|
|
||
| The default log profile can be deployed using either of these methods: | ||
|
|
||
| 1. **Direct deployment** — Go to **WAF** > **Log Profiles**, select the default log profile, and use **Actions** > **Deploy** to send it to your target instances or Config Sync Groups. | ||
|
|
||
| 2. **During configuration editing** — When editing an instance or Config Sync Group configuration, you can select the default log profile from **Add File** > **Existing Log Profile** and specify the deployment path. | ||
|
|
||
| Since the default log profile is pre-compiled for all WAF compiler versions, deployment completes immediately without requiring additional compilation. | ||
|
|
||
| For detailed deployment instructions, see [Deploy log profiles]({{< ref "/nginx-one-console/waf-integration/log-profiles/deploy-log-profiles.md" >}}). | ||
|
|
||
| ## Next steps | ||
|
|
||
| After deploying the default log profile: | ||
| - Monitor security events in the [F5 WAF for NGINX security monitoring dashboard]({{< ref "/nginx-one-console/waf-security-dashboard/" >}}) | ||
| - Review security event details and identify attack patterns | ||
| - Fine-tune your F5 WAF for NGINX policies based on observed violations |
293 changes: 293 additions & 0 deletions
293
content/nginx-one-console/waf-security-dashboard/set-up-security-monitoring.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,293 @@ | ||
| --- | ||
| title: Set up security monitoring | ||
| description: Configure NGINX Plus with F5 WAF for NGINX to forward security events to NGINX One Console | ||
| weight: 100 | ||
| nd-content-type: how-to | ||
| nd-product: NONECO | ||
| --- | ||
|
|
||
| This guide walks you through configuring your NGINX Plus data plane to send security telemetry to NGINX One Console. You'll install F5 WAF for NGINX, configure the security dashboard log profile, and set up NGINX Agent to forward security events. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - NGINX Plus installed and running on your data plane | ||
| - Root or sudo access on the data plane system | ||
| - NGINX One Console access with permissions to add instances | ||
|
|
||
| ## Verify NGINX Plus is running | ||
|
|
||
| Before you begin, confirm that NGINX Plus is installed and running on your system. | ||
|
|
||
| 1. Run the following command to check the NGINX Plus service status: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sudo systemctl status nginx | ||
| ``` | ||
|
|
||
| Your output should show that the service is active and running: | ||
|
|
||
| ``` | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ● nginx.service - NGINX Plus - high performance web server | ||
| Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled) | ||
| Active: active (running) since Wed 2026-03-11 17:26:52 UTC; 1 week 1 day ago | ||
| Docs: https://www.nginx.com/resources/ | ||
| Main PID: 3682 (nginx) | ||
| Tasks: 3 (limit: 4586) | ||
| Memory: 4.3M (peak: 4.9M) | ||
| CPU: 807ms | ||
| ``` | ||
| If NGINX Plus is not installed, see the [NGINX Plus installation guide]({{< ref "/nginx/admin-guide/installing-nginx/installing-nginx-plus.md" >}}). | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| ## Install F5 WAF for NGINX | ||
|
|
||
| Install F5 WAF for NGINX on your data plane following the [installation instructions for your operating system]({{< ref "/waf/install/virtual-environment.md" >}}). | ||
|
|
||
| After installation, continue with the next section to configure the security dashboard log profile. | ||
|
|
||
| ## Configure the security dashboard log profile | ||
|
|
||
| The security dashboard uses the default log profile to capture security violations. This is a pre-configured, immutable log profile that is automatically compiled for all available WAF compiler versions. For more information about the default log profile, see [Default log profile]({{< ref "/nginx-one-console/waf-security-dashboard/default-log-profile.md" >}}). | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| To configure the security dashboard, create the `/etc/app_protect/conf/secops_dashboard.json` file with the following content: | ||
|
|
||
| 1. Create the file: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sudo touch /etc/app_protect/conf/secops_dashboard.json | ||
| ``` | ||
|
|
||
| 2. Add the log profile configuration: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sudo tee /etc/app_protect/conf/secops_dashboard.json > /dev/null << 'EOF' | ||
| { | ||
| "filter": { | ||
| "request_type": "illegal" | ||
| }, | ||
| "content": { | ||
| "format": "user-defined", | ||
| "format_string": "%support_id%|%ip_client%|%src_port%|%dest_ip%|%dest_port%|%vs_name%|%policy_name%|%method%|%uri%|%protocol%|%request_status%|%response_code%|%outcome%|%outcome_reason%|%violation_rating%|%blocking_exception_reason%|%is_truncated_bool%|%sig_ids%|%sig_names%|%sig_cves%|%sig_set_names%|%threat_campaign_names%|%sub_violations%|%x_forwarded_for_header_value%|%violations%|%violation_details%|%request%|%geo_location%", | ||
| "max_request_size": "2048", | ||
| "max_message_size": "64k", | ||
| "escaping_characters": [ | ||
| { | ||
| "from": "|", | ||
| "to": "%7C" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| EOF | ||
| ``` | ||
|
|
||
| ## Enable F5 WAF for NGINX in your configuration | ||
|
|
||
| Update your NGINX configuration to enable F5 WAF for NGINX and specify the security dashboard log profile. | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Update the main NGINX configuration | ||
|
|
||
| Edit `/etc/nginx/nginx.conf` and add the `load_module` directive at the top: | ||
|
|
||
| ```nginx | ||
| user nginx; | ||
| worker_processes auto; | ||
| load_module modules/ngx_http_app_protect_module.so; | ||
| error_log /var/log/nginx/error.log notice; | ||
| pid /run/nginx.pid; | ||
|
|
||
| events { | ||
| worker_connections 1024; | ||
| } | ||
|
|
||
| http { | ||
| include /etc/nginx/mime.types; | ||
| default_type application/octet-stream; | ||
|
|
||
| log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
| '$status $body_bytes_sent "$http_referer" ' | ||
| '"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
|
||
| access_log /var/log/nginx/access.log main; | ||
|
|
||
| sendfile on; | ||
| keepalive_timeout 65; | ||
|
|
||
| include /etc/nginx/conf.d/*.conf; | ||
| } | ||
| ``` | ||
|
|
||
| ### Configure a server block with F5 WAF for NGINX | ||
|
|
||
| Edit `/etc/nginx/conf.d/default.conf` to add the F5 WAF for NGINX directives: | ||
|
|
||
| ```nginx | ||
| server { | ||
| listen 80 default_server; | ||
| server_name localhost; | ||
| app_protect_enable on; | ||
| app_protect_policy_file "/etc/app_protect/conf/NginxStrictPolicy.json"; | ||
| app_protect_security_log "/etc/app_protect/conf/secops_dashboard.json" syslog:server=127.0.0.1:1514; | ||
| app_protect_security_log_enable on; | ||
|
|
||
| location / { | ||
| root /usr/share/nginx/html; | ||
| index index.html index.htm; | ||
| } | ||
|
|
||
| error_page 500 502 503 504 /50x.html; | ||
| location = /50x.html { | ||
| root /usr/share/nginx/html; | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Make sure you specify port `1514` for the syslog server. NGINX Agent listens on this port to receive security events. | ||
|
|
||
| ## Verify your NGINX configuration | ||
|
|
||
| Test your NGINX configuration for syntax errors: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sudo nginx -t | ||
| ``` | ||
|
|
||
| You should see output like this: | ||
|
|
||
| ``` | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| nginx: the configuration file /etc/nginx/nginx.conf syntax is ok | ||
| nginx: configuration file /etc/nginx/nginx.conf test is successful | ||
| ``` | ||
|
|
||
| Restart NGINX Plus to apply the changes: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sudo systemctl restart nginx | ||
| ``` | ||
|
|
||
| Verify NGINX Plus is running after the restart: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sudo systemctl status nginx | ||
| ``` | ||
|
|
||
| ## Install NGINX Agent | ||
|
|
||
| NGINX Agent forwards security telemetry from F5 WAF for NGINX to NGINX One Console. | ||
|
|
||
| 1. In NGINX One Console, go to **Instances** and select **Add Instance**. | ||
|
|
||
| 2. Select **Generate new key**. This generates your data plane key and displays a `curl` command for agent installation. | ||
|
|
||
| 3. Copy the `curl` command and run it in your terminal: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| curl <command-shown-in-console> | ||
| ``` | ||
|
|
||
| Wait a few minutes for the system to appear in NGINX One Console. | ||
|
|
||
| 4. Verify the agent is running: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sudo systemctl status nginx-agent | ||
| ``` | ||
|
|
||
| You should see output like this: | ||
|
|
||
| ``` | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ● nginx-agent.service - NGINX Agent | ||
| Loaded: loaded (/etc/systemd/system/nginx-agent.service; enabled; preset: enabled) | ||
| Active: active (running) since Thu 2026-03-19 23:53:00 UTC; 23s ago | ||
| Docs: https://github.com/nginx/agent#readme | ||
| Main PID: 24716 (nginx-agent) | ||
| Tasks: 8 (limit: 4586) | ||
| Memory: 26.0M (peak: 27.2M) | ||
| CPU: 414ms | ||
| ``` | ||
|
|
||
| ## Configure NGINX Agent to forward security events | ||
|
|
||
| Enable NGINX Agent to collect and forward security telemetry from F5 WAF for NGINX. | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. Edit `/etc/nginx-agent/nginx-agent.conf` and add the following telemetry pipeline configuration at the end of the file: | ||
|
|
||
| ```yaml | ||
vrmare marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| collector: | ||
| exporters: | ||
| debug: {} | ||
| processors: | ||
| batch: | ||
| "logs": | ||
| send_batch_size: 1000 | ||
| timeout: 30s | ||
| send_batch_max_size: 1000 | ||
| pipelines: | ||
| logs: | ||
| "default-security-events": | ||
| receivers: ["tcplog/nginx_app_protect"] | ||
| processors: ["batch/logs"] | ||
| exporters: ["debug","otlp/default"] | ||
| ``` | ||
|
|
||
| This configuration batches security events with a 30-second timeout and a maximum batch size of 1000 events. Events are forwarded to NGINX One Console through the `otlp/default` exporter. | ||
|
|
||
| 2. Restart NGINX Agent to apply the changes: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sudo systemctl restart nginx-agent | ||
| ``` | ||
|
|
||
| 3. Verify NGINX Agent is running: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sudo systemctl status nginx-agent | ||
| ``` | ||
|
|
||
| ## Verify the security event pipeline | ||
|
|
||
| Check that NGINX Agent successfully started the syslog receiver: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sudo tail /var/log/nginx-agent/agent.log | grep "syslogserver" | ||
| ``` | ||
|
|
||
| You should see a log entry like this: | ||
|
|
||
| ``` | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| time=2026-03-20T00:05:10.212Z level=INFO msg="Found available local NGINX App Protect syslogserver configured on port 1514" | ||
| ``` | ||
|
|
||
| To debug security events being sent to NGINX One Console, tail the agent logs: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sudo tail /var/log/nginx-agent/opentelemetry-collector-agent.log -f | ||
| ``` | ||
|
|
||
| ## Test security event detection | ||
|
|
||
| Generate test security violations to verify the pipeline is working. | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. Trigger some violations with these example requests: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| curl -X SEARCH -k -v 'http://127.0.0.1/helloworld' | ||
|
|
||
| curl -k -v 'http://127.0.0.1/a=<script>getAllMoneyV2()</script>' | ||
| ``` | ||
|
|
||
| You should receive a response indicating the request was rejected: | ||
|
|
||
| ```html | ||
| <html><head><title>Request Rejected</title></head><body>The requested URL was rejected. Please consult with your administrator... | ||
| ``` | ||
|
|
||
| 2. Verify that security events are being sent to NGINX One Console: | ||
|
|
||
| ```bash | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sudo tail /var/log/nginx-agent/opentelemetry-collector-agent.log -n 200 | ||
| ``` | ||
|
|
||
| Look for log entries showing the violations being forwarded. | ||
|
|
||
| Your security monitoring setup is now complete. Security events from F5 WAF for NGINX are now being forwarded to NGINX One Console, where you can monitor and analyze them in the security dashboard. | ||
sylwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.