Skip to content

Commit ba55d43

Browse files
committed
Prepare 0.4.2 release
1 parent b862b71 commit ba55d43

File tree

8 files changed

+207
-243
lines changed

8 files changed

+207
-243
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## 0.4.2 (Unreleased)
3+
## 0.4.2 (October 28, 2021)
44

55
BUG FIXES:
66

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ To suggest an enhancement, please create an issue on GitHub with the label `enha
5151
* Fork the repo, create a branch, implement your changes, add any relevant Molecule tests, submit a PR when your changes are **tested** (using Molecule) and ready for review.
5252
* Fill in [our pull request template](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/.github/pull_request_template.md).
5353

54-
Note: if youd like to implement a new feature, please consider creating a feature request issue first to start a discussion about the feature.
54+
Note: if you'd like to implement a new feature, please consider creating a feature request issue first to start a discussion about the feature.
5555

5656
## Code Guidelines
5757

defaults/main/template.yml

+176-212
Large diffs are not rendered by default.

molecule/common/files/http/server_one.conf

100755100644
File mode changed.

molecule/common/files/nginx.conf

100755100644
File mode changed.

molecule/common/requirements/plus_requirements.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ roles:
33
- name: nginxinc.nginx
44
version: 0.21.3
55
- name: nginxinc.nginx_app_protect
6-
version: 0.6.2
6+
version: 0.7.0

templates/http/app_protect.j2

+26-26
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,50 @@
22

33
{# NGINX HTTP App Protect WAF template -- ngx_http_app_protect_module #}
44
{% macro app_protect_waf(app_protect_waf) %}
5-
{% if app_protect_waf['enable'] is defined and app_protect_waf['enable'] is boolean %}
6-
app_protect_enable {{ app_protect_waf['enable'] | ternary('on', 'off') }};
7-
{% endif %}
8-
{% if app_protect_waf['policy_file'] is defined %}
9-
app_protect_policy_file {{ app_protect_waf['policy_file'] }};
10-
{% endif %}
11-
{% if app_protect_waf['security_log_enable'] is defined and app_protect_waf['security_log_enable'] is boolean %}
12-
app_protect_security_log_enable {{ app_protect_waf['security_log_enable'] | ternary('on', 'off') }};
13-
{% endif %}
14-
{% if app_protect_waf['security_log'] is defined and app_protect_waf['security_log'] is not string %}
15-
{% for security_log in app_protect_waf['security_log'] if app_protect_waf['security_log'] is not mapping %}
16-
app_protect_security_log {{ security_log['path'] }} {{ security_log['dest'] }};
17-
{% else %}
18-
app_protect_security_log {{ app_protect_waf['security_log']['path'] }} {{ app_protect_waf['security_log']['dest'] }};
19-
{% endfor %}
20-
{% endif %}
21-
{% if app_protect_waf['physical_memory_util_thresholds']['high'] is defined and app_protect_waf['physical_memory_util_thresholds']['low'] is defined %}{# Available only in 'http' context #}
5+
{% if app_protect_waf['physical_memory_util_thresholds']['high'] is defined and app_protect_waf['physical_memory_util_thresholds']['low'] is defined %}{# 'app_protect_physical_memory_util_thresholds' directive is only available in the 'http' context #}
226
app_protect_physical_memory_util_thresholds high={{ app_protect_waf['physical_memory_util_thresholds']['high'] }} low={{ app_protect_waf['physical_memory_util_thresholds']['low'] }};
237
{% endif %}
24-
{% if app_protect_waf['cpu_thresholds']['high'] is defined and app_protect_waf['cpu_thresholds']['low'] is defined %}{# Available only in 'http' context #}
8+
{% if app_protect_waf['cpu_thresholds']['high'] is defined and app_protect_waf['cpu_thresholds']['low'] is defined %}{# 'app_protect_cpu_thresholds' directive is only available in the 'http' context #}
259
app_protect_cpu_thresholds high={{ app_protect_waf['cpu_thresholds']['high'] }} low={{ app_protect_waf['cpu_thresholds']['low'] }};
2610
{% endif %}
27-
{% if app_protect_waf['failure_mode_action'] is defined and app_protect_waf['failure_mode_action'] in ['pass', 'drop'] %}{# Available only in 'http' context #}
11+
{% if app_protect_waf['failure_mode_action'] is defined and app_protect_waf['failure_mode_action'] in ['pass', 'drop'] %}{# 'app_protect_failure_mode_action' directive is only available in the 'http' context #}
2812
app_protect_failure_mode_action {{ app_protect_waf['failure_mode_action'] }};
2913
{% endif %}
30-
{% if app_protect_waf['cookie_seed'] is defined %}{# Available only in 'http' context #}
14+
{% if app_protect_waf['cookie_seed'] is defined %}{# 'app_protect_cookie_seed' directive is only available in the 'http' context #}
3115
app_protect_cookie_seed {{ app_protect_waf['cookie_seed'] }};
3216
{% endif %}
33-
{% if app_protect_waf['compressed_requests_action'] is defined and app_protect_waf['compressed_requests_action'] in ['pass', 'drop'] %}{# Available only in 'http' context #}
17+
{% if app_protect_waf['compressed_requests_action'] is defined and app_protect_waf['compressed_requests_action'] in ['pass', 'drop'] %}{# 'app_protect_compressed_requests_action' directive is only available in the 'http' context #}
3418
app_protect_compressed_requests_action {{ app_protect_waf['compressed_requests_action'] }};
3519
{% endif %}
36-
{% if app_protect_waf['reconnect_period_seconds'] is defined and app_protect_waf['reconnect_period_seconds'] is number %}{# Available only in 'http' context #}
20+
{% if app_protect_waf['reconnect_period_seconds'] is defined and app_protect_waf['reconnect_period_seconds'] is number %}{# 'app_protect_reconnect_period_seconds' directive is only available in the 'http' context #}
3721
app_protect_reconnect_period_seconds {{ app_protect_waf['reconnect_period_seconds'] }};
3822
{% endif %}
39-
{% if app_protect_waf['request_buffer_overflow_action'] is defined and app_protect_waf['request_buffer_overflow_action'] in ['pass', 'drop'] %}{# Available only in 'http' context #}
23+
{% if app_protect_waf['request_buffer_overflow_action'] is defined and app_protect_waf['request_buffer_overflow_action'] in ['pass', 'drop'] %}{# 'app_protect_request_buffer_overflow_action' directive is only available in the 'http' context #}
4024
app_protect_request_buffer_overflow_action {{ app_protect_waf['request_buffer_overflow_action'] }};
4125
{% endif %}
42-
{% if app_protect_waf['user_defined_signatures'] is defined and app_protect_waf['user_defined_signatures'] is not mapping %}{# Available only in 'http' context #}
26+
{% if app_protect_waf['user_defined_signatures'] is defined and app_protect_waf['user_defined_signatures'] is not mapping %}{# 'app_protect_user_defined_signatures' directive is only available in the 'http' context #}
4327
{% for signature in app_protect_waf['user_defined_signatures'] if app_protect_waf['user_defined_signatures'] is not string %}
4428
app_protect_user_defined_signatures {{ signature }};
4529
{% else %}
4630
app_protect_user_defined_signatures {{ app_protect_waf['user_defined_signatures'] }};
4731
{% endfor %}
4832
{% endif %}
33+
{% if app_protect_waf['enable'] is defined and app_protect_waf['enable'] is boolean %}
34+
app_protect_enable {{ app_protect_waf['enable'] | ternary('on', 'off') }};
35+
{% endif %}
36+
{% if app_protect_waf['policy_file'] is defined %}
37+
app_protect_policy_file {{ app_protect_waf['policy_file'] }};
38+
{% endif %}
39+
{% if app_protect_waf['security_log_enable'] is defined and app_protect_waf['security_log_enable'] is boolean %}
40+
app_protect_security_log_enable {{ app_protect_waf['security_log_enable'] | ternary('on', 'off') }};
41+
{% endif %}
42+
{% if app_protect_waf['security_log'] is defined and app_protect_waf['security_log'] is not string %}
43+
{% for security_log in app_protect_waf['security_log'] if app_protect_waf['security_log'] is not mapping %}
44+
app_protect_security_log {{ security_log['path'] }} {{ security_log['dest'] }};
45+
{% else %}
46+
app_protect_security_log {{ app_protect_waf['security_log']['path'] }} {{ app_protect_waf['security_log']['dest'] }};
47+
{% endfor %}
48+
{% endif %}
4949

5050
{% endmacro %}
5151

@@ -69,10 +69,10 @@ app_protect_dos_security_log_enable {{ app_protect_dos['security_log_enable'] |
6969
{% if app_protect_dos['security_log']['path'] is defined and app_protect_dos['security_log']['dest'] is defined %}
7070
app_protect_dos_security_log {{ app_protect_dos['security_log']['path'] }} {{ app_protect_dos['security_log']['dest'] }};
7171
{% endif %}
72-
{% if app_protect_dos['liveness']['enable'] is defined and app_protect_dos['liveness']['enable'] is boolean %}{# Available only in 'http' context #}
72+
{% if app_protect_dos['liveness']['enable'] is defined and app_protect_dos['liveness']['enable'] is boolean %}{# 'app_protect_dos_liveness' directive is only available in the 'http' context #}
7373
app_protect_dos_liveness {{ app_protect_dos['liveness']['enable'] | ternary('on', 'off') }}{{ (' uri:' + app_protect_dos['liveness']['uri'] | string) if app_protect_dos['liveness']['uri'] is defined }}{{ (' port:' + app_protect_dos['liveness']['port'] | string) if app_protect_dos['liveness']['port'] is defined }};
7474
{% endif %}
75-
{% if app_protect_dos['readiness']['enable'] is defined and app_protect_dos['readiness'] is boolean %}{# Available only in 'http' context #}
75+
{% if app_protect_dos['readiness']['enable'] is defined and app_protect_dos['readiness'] is boolean %}{# 'app_protect_dos_readiness' directive is only available in the 'http' context #}
7676
app_protect_dos_readiness {{ app_protect_dos['readiness'] | ternary('on', 'off') }}{{ (' uri:' + app_protect_dos['readiness']['uri'] | string) if app_protect_dos['readiness']['uri'] is defined }}{{ (' port:' + app_protect_dos['readiness']['port'] | string) if app_protect_dos['readiness']['port'] is defined }};
7777
{% endif %}
7878

templates/http/auth.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ auth_request_set {{ auth_request['set']['variable'] }} {{ auth_request['set']['v
4747
{% if auth_jwt['enable'] is defined %}
4848
auth_jwt {{ 'off' if not auth_jwt['enable'] }}{{ auth_jwt['enable']['realm'] if auth_jwt['enable']['realm'] is defined }}{{ (' token=' + auth_jwt['enable']['token'] | string) if auth_jwt['enable']['token'] is defined }};
4949
{% endif %}
50-
{% if auth_jwt['claim_set'] is defined %}{# 'claim_set' is only available in the 'http' context #}
50+
{% if auth_jwt['claim_set'] is defined %}{# 'claim_set' directive is only available in the 'http' context #}
5151
{% for claim in auth_jwt['claim_set'] if auth_jwt['claim_set'] is not mapping %}
5252
auth_jwt_claim_set {{ claim['variable'] }} {{ (claim['name'] if claim['name'] is string else claim['name'] | join(' ')) }};
5353
{% else %}
5454
auth_jwt_claim_set {{ auth_jwt['claim_set']['variable'] }} {{ (auth_jwt['claim_set']['name'] if auth_jwt['claim_set']['name'] is string else auth_jwt['claim_set']['name'] | join(' ')) }};
5555
{% endfor %}
5656
{% endif %}
57-
{% if auth_jwt['header_set'] is defined %}{# 'header_set' is only available in the 'http' context #}
57+
{% if auth_jwt['header_set'] is defined %}{# 'header_set' directive is only available in the 'http' context #}
5858
{% for claim in auth_jwt['header_set'] if auth_jwt['header_set'] is not mapping %}
5959
auth_jwt_header_set {{ claim['variable'] }} {{ (claim['name'] if claim['name'] is string else claim['name'] | join(' ')) }};
6060
{% else %}

0 commit comments

Comments
 (0)