Skip to content

Commit 26f109a

Browse files
authored
Merge branch 'main' into nic-release-5.1
2 parents 1fbb9bf + 5019dac commit 26f109a

File tree

150 files changed

+1760
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+1760
-243
lines changed

.github/workflows/build-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
5959
call-docs-build-push:
6060
needs: prod-check-branch
61-
uses: nginxinc/docs-actions/.github/workflows/docs-build-push.yml@cc69def33942d819719164723b35b5163d838276 # v1.0.9
61+
uses: nginxinc/docs-actions/.github/workflows/docs-build-push.yml@285440f02d9967b62aeb1b7e0b5c2c70d4f950cf # v1.0.10
6262
with:
6363
production_url_path: ""
6464
preview_url_path: "${{ vars.PREVIEW_URL_PATH }}"

CONTRIBUTING.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Contributing guidelines
22

3-
The following is a set of guidelines for community contributions to this
4-
project. We really appreciate your desire to contribute!
3+
The following is a set of guidelines for community contributions to this project.
54

6-
If you are an F5 employee, see the following additional guidance [For F5 Employees](./F5-NGINX-team-notes.md).
5+
We really appreciate your desire to contribute!
6+
7+
If you are an F5 employee, see the following additional guidance on [Maintainers etiquette](/documentation/maintainers-etiquette.md).
78

89
## Table of contents
910

@@ -12,8 +13,8 @@ If you are an F5 employee, see the following additional guidance [For F5 Employe
1213
- [Open a Discussion](#open-a-discussion)
1314
- [Submit a Pull Request](#submit-a-pull-request)
1415
- Review our [Git style guide](#git-style-guide)
15-
- Review our Documentation [style guide](./templates/style-guide.md)
16-
- Review our [Contributing guidelines for writers](./CONTRIBUTING_DOCS.md)
16+
- Review the [Writing style guide](/documentation/style-guide.md)
17+
- Review [Managing content with Hugo](/documentation/writing-hugo.md)
1718
- [Issue Lifecycle](#issue-lifecycle)
1819
- [Additional NGINX documentation](#additional-nginx-documentation)
1920
- [F5 Contributor License Agreement (CLA)](#f5-contributor-license-agreement)
@@ -51,6 +52,7 @@ our documentation as described in our [support](./SUPPORT.md) page.
5152
### Git style guide
5253

5354
- Keep a clean, concise and meaningful Git commit history on your branch, rebasing locally and squashing before you submit a PR
55+
- We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) formatting.
5456
- Follow the guidelines of writing a good commit message as described here <https://chris.beams.io/posts/git-commit/>
5557
and summarized in the next few points:
5658

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
HUGO?=hugo
22
HUGO_VERSION?=$(shell hugo version 2>/dev/null | awk '{print $$2}' | cut -d '.' -f 2)
3-
HUGO_IMG?=hugomods/hugo:std-go-git-0.134.3
3+
HUGO_IMG?=hugomods/hugo:std-go-git-0.147.8
44

55
THEME_MODULE = github.com/nginxinc/nginx-hugo-theme
66

7-
ifeq ($(shell [ $(HUGO_VERSION) -gt 133 2>/dev/null ] && echo true || echo false), true)
8-
$(info Hugo is available and has a version greater than 133. Proceeding with build.)
7+
ifeq ($(shell [ $(HUGO_VERSION) -gt 146 2>/dev/null ] && echo true || echo false), true)
8+
$(info Hugo is available and has a version greater than 146. Proceeding with build.)
99
else
10-
$(warning Hugo is not available or using a version less than 134. Attempting to use docker. HUGO_VERSION=$(HUGO_VERSION))
10+
$(warning Hugo is not available or using a version less than 147. Attempting to use docker. HUGO_VERSION=$(HUGO_VERSION))
1111
HUGO=docker run --rm -it -v ${CURDIR}:/src -p 1313:1313 ${HUGO_IMG} /src/hugo-entrypoint.sh
1212
ifeq (, $(shell docker version 2> /dev/null))
13-
$(error Hugo (>0.134) or Docker are required to build the local previews.)
13+
$(error Hugo (>0.147) or Docker are required to build the local previews.)
1414
endif
1515
endif
1616

_banners/agent-v3-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{< banner "notice" "NGINX Agent 3.0 is now available" >}}
22

33

4-
F5 NGINX One Console does not currently support Agent 3.x. If you are using NGINX One Console in your environment, upgrade to the latest Agent 2.x version by following the [Upgrade NGINX Agent](/nginx-agent/installation-upgrade/upgrade/) guide.
4+
F5 NGINX One Console and NGINX Instance Manager (NIM) do not currently support Agent 3.x. If you are using NGINX One Console or NGINX Instance Manager in your environment, upgrade to the latest Agent 2.x version by following the [Upgrade NGINX Agent](/nginx-agent/installation-upgrade/upgrade/) guide.
55

66
Please see the [Technical specifications](/nginx-agent/technical-specifications/) for product compatibility.
77

content/agent/installation-upgrade/installation-unprivileged.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ weight: 450
44
toc: true
55
type: how-to
66
product: Agent
7+
docs: DOCS-1781
78
---
89

910
## Overview
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
docs:
3+
files:
4+
- content/nginx-one/workshops/lab5/upgrade-nginx-plus-to-latest-version.md
5+
- content/includes/use-cases/monitoring/enable-nginx-plus-api.md
6+
---
7+
8+
```nginx
9+
# This block enables the NGINX Plus API and dashboard
10+
# For configuration and security recommendations, see:
11+
# https://docs.nginx.com/nginx/admin-guide/monitoring/live-activity-monitoring/#configuring-the-api
12+
server {
13+
# Change the listen port if 9000 conflicts
14+
# (8080 is the conventional API port)
15+
listen 9000;
16+
17+
location /api/ {
18+
# To restrict write methods (POST, PATCH, DELETE), uncomment:
19+
# limit_except GET {
20+
# auth_basic "NGINX Plus API";
21+
# auth_basic_user_file /path/to/passwd/file;
22+
# }
23+
24+
# Enable API in write mode
25+
api write=on;
26+
27+
# To restrict access by network, uncomment and set your network:
28+
# allow 192.0.2.0/24 # replace with your network
29+
# deny all;
30+
}
31+
32+
# Serve the built-in dashboard at /dashboard.html
33+
location = /dashboard.html {
34+
root /usr/share/nginx/html;
35+
}
36+
}
37+
```
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Enable Forward Proxy Settings for IP Intelligence Client.
2+
3+
To configure proxy settings, edit the client configuration file:
4+
Path:
5+
```shell
6+
/etc/app_protect/tools/iprepd.cfg
7+
```
8+
Example configuration:
9+
```shell
10+
EnableProxy=True
11+
ProxyHost=5.1.2.4
12+
ProxyPort=8080
13+
ProxyUsername=admin # Optional
14+
ProxyPassword=admin # Optional
15+
CACertPath=/etc/ssl/certs/ca-certificates.crt # Optional
16+
```
17+
After saving the changes, restart the client to apply the new settings.
18+
```shell
19+
/opt/app_protect/bin/iprepd /etc/app_protect/tools/iprepd.cfg > ipi.log 2>&1 &
20+
```
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#### IP-Address-Lists feature as part of Override Rules feature.
2+
3+
The Override Rules feature allows you to override original or parent policy settings.
4+
5+
Rules are defined using specific conditions, which can include an IP Address Lists based on the declarative policy JSON schema.
6+
7+
When triggered, the rule is applied to the _clientIp_ attribute using the _matches_ function.
8+
9+
'clientIp.matches(ipAddressLists["standalone"])'
10+
11+
Here is a policy example:
12+
13+
```json
14+
{
15+
"policy": {
16+
"name": "ip_group_override_rule",
17+
"template": {
18+
"name": "POLICY_TEMPLATE_NGINX_BASE"
19+
},
20+
"applicationLanguage": "utf-8",
21+
"caseInsensitive": false,
22+
"enforcementMode": "blocking",
23+
"ip-address-lists": [
24+
{
25+
"name": "standalone",
26+
"ipAddresses": [
27+
{
28+
"ipAddress": "1.1.1.1/32"
29+
}
30+
]
31+
}
32+
],
33+
"override-rules": [
34+
{
35+
"name": "myRule1",
36+
"condition": "clientIp.matches(ipAddressLists['standalone'])",
37+
"actionType": "extend-policy",
38+
"override": {
39+
"policy": {
40+
"enforcementMode": "transparent"
41+
}
42+
}
43+
}
44+
]
45+
}
46+
}
47+
```
48+
49+
The previous example policy contains an IP address lists with the name "standalone", used for the override rule condition "clientIp.matches(ipAddressLists['standalone'])".
50+
The condition means that the rule enforcement is applied and override base policy enforcement when clientIp is matched to one of ipAddresses in ipAddressList with name "standalone".
51+
The value used for the override condition must exist and exactly match the name in "ip-address-lists".
52+
53+
#### Possible errors
54+
55+
| Error text | Input | Explanation |
56+
| -----------| ------------- | ------------ |
57+
| _Invalid field invalidList_ | _clientIp.matches(invalidList['standalone']);_ | An incorrect keyword was used instead of _ipAddressLists_ |
58+
| _Invalid value empty string_ | _clientIp.matches(ipAddressLists['']_ | An empty name was provided |
59+
| _Failed to compile policy - 'ipGroupOverridePolicy'_ | _uri.matches(ipAddressLists['standalone']);_ | Used _ipAddressLists_ without the _clientIP_ attribute |
60+
61+
62+
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
IP address lists is a feature to organize lists of allowed and forbidden IP addresses across several lists with common attributes.
2+
3+
This allows you to control unique policy settings for incoming requests based on specific IP addresses.
4+
5+
Each IP address list contains a unique name, enforcement type (_always_, _never_ and _policy-default_), and list of IP addresses.
6+
7+
8+
An example of a declarative policy using IP address lists configuration:
9+
10+
```json
11+
{
12+
"policy": {
13+
"name": "IpGroups_policy",
14+
"template": {
15+
"name": "POLICY_TEMPLATE_NGINX_BASE"
16+
},
17+
"applicationLanguage": "utf-8",
18+
"caseInsensitive": false,
19+
"enforcementMode": "blocking",
20+
"ip-address-lists": [
21+
{
22+
"name": "Standalone",
23+
"description": "Optional Description",
24+
"blockRequests": "policy-default",
25+
"setGeolocation": "IN",
26+
"ipAddresses": [
27+
{
28+
"ipAddress": "1.2.3.4/32"
29+
},
30+
{
31+
"ipAddress": "1111:fc00:0:112::2"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
}
38+
39+
```
40+
The example with IP-Group definition in external file external_ip_groups.json:
41+
42+
```json
43+
{
44+
"policy": {
45+
"name": "IpGroups_policy2",
46+
"template": {
47+
"name": "POLICY_TEMPLATE_NGINX_BASE"
48+
},
49+
"applicationLanguage": "utf-8",
50+
"caseInsensitive": false,
51+
"enforcementMode": "blocking",
52+
"ip-address-lists": [
53+
{
54+
"name": "external_ip_groups",
55+
"description": "Optional Description",
56+
"blockRequests": "always",
57+
"setGeolocation": "IL",
58+
"$ref": "file:///tmp/policy/external_ip_groups.json"
59+
}
60+
]
61+
}
62+
}
63+
```
64+
Example of the file external_ip_groups.json
65+
66+
```json
67+
{
68+
"name": "External IP address lists",
69+
"description": "Optional Description",
70+
"blockRequests": "always",
71+
"setGeolocation": "IR",
72+
"ipAddresses": [
73+
{
74+
"ipAddress": "66.51.41.21"
75+
},
76+
{
77+
"ipAddress": "66.52.42.22"
78+
}
79+
]
80+
}
81+
```

0 commit comments

Comments
 (0)