File tree Expand file tree Collapse file tree 6 files changed +25
-30
lines changed Expand file tree Collapse file tree 6 files changed +25
-30
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,6 @@ template: |
95
95
## Resources
96
96
97
97
* Functional configuration examples (check `converge.yml` under each `molecule` scenario) -- [github.com/nginxinc/ansible-role-nginx-config/tree/$RESOLVED_VERSION/molecule](https://github.com/nginxinc/ansible-role-nginx-config/tree/$RESOLVED_VERSION/molecule).
98
- * Ansible Galaxy repository -- [galaxy.ansible.com/nginxinc/nginx ](https://galaxy.ansible.com/nginxinc/nginx_config).
98
+ * Ansible Galaxy repository -- [galaxy.ansible.com/nginxinc/nginx_config ](https://galaxy.ansible.com/nginxinc/nginx_config).
99
99
* NGINX Ansible role & collection introductory blog -- [nginx.com/blog/announcing-nginx-core-collection-ansible](https://www.nginx.com/blog/announcing-nginx-core-collection-ansible).
100
100
* NGINX: Better with Ansible demo -- [github.com/alessfg/nginx-ansible-demo](https://github.com/alessfg/nginx-ansible-demo).
Original file line number Diff line number Diff line change @@ -558,7 +558,8 @@ nginx_config_http_template:
558
558
key_file : /path/to/file
559
559
key_request : /path/to/file
560
560
leeway : 0s
561
- type : signed # One of 'signed' or 'encrypted'
561
+ type : signed # One of 'signed', 'encrypted' or 'nested'
562
+ required : $valid_jwt_iss # String or list
562
563
api : # Configure NGINX Plus HTTP API
563
564
enable : # true # Set to Boolean directly to simply enable the 'api' directive
564
565
write : true # Boolean
@@ -575,7 +576,7 @@ nginx_config_http_template:
575
576
number : 32 # Required
576
577
size : 4k # Required
577
578
comp_level : 1
578
- disable : [] # string or list
579
+ disable : [] # String or list
579
580
http_version : 1.1 # Optional -- One of '1.0' or '1.1'
580
581
min_length : 20
581
582
proxied : [] # Set to 'false' to set to 'off' -- otherwise, you can specify a string or a list
Original file line number Diff line number Diff line change @@ -17,15 +17,15 @@ ENV {{ var }} {{ value }}
17
17
RUN \
18
18
if [ $(command -v apt-get) ]; then \
19
19
apt-get update \
20
- && DEBIAN_FRONTEND=noninteractive apt-get install -y aptitude bash ca-certificates curl iproute2 python-apt python3 python3-apt procps sudo systemd systemd-sysv vim \
20
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y aptitude bash curl dirmngr iproute2 python3 python3-apt procps sudo systemd systemd-sysv vim \
21
21
&& apt-get clean; \
22
22
elif [ $(command -v dnf) ]; then \
23
23
dnf makecache \
24
- && dnf --assumeyes install bash iproute /usr/bin/dnf-3 /usr/bin/python3 /usr/bin/python3-config vim \
24
+ && dnf --assumeyes install bash iproute sudo /usr/bin/dnf-3 /usr/bin/python3 /usr/bin/python3-config vim \
25
25
&& dnf clean all; \
26
26
elif [ $(command -v yum) ]; then \
27
27
yum makecache fast \
28
- && yum install -y bash iproute /usr/bin/python /usr/bin/python2-config sudo vim yum-plugin-ovl \
28
+ && yum install -y bash iproute initscripts sudo /usr/bin/python /usr/bin/python2-config vim yum-plugin-ovl \
29
29
&& sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf \
30
30
&& yum clean all; \
31
31
elif [ $(command -v zypper) ]; then \
@@ -34,10 +34,10 @@ RUN \
34
34
&& zypper clean -a; \
35
35
elif [ $(command -v apk) ]; then \
36
36
apk update \
37
- && apk add --no-cache bash ca-certificates curl openrc python3 sudo vim; \
37
+ && apk add --no-cache bash curl openrc python3 sudo vim; \
38
38
echo 'rc_provide="loopback net"' >> /etc/rc.conf; \
39
39
elif [ $(command -v xbps-install) ]; then \
40
40
xbps-install -Syu \
41
- && xbps-install -y bash ca-certificates iproute2 python3 sudo vim \
41
+ && xbps-install -y bash iproute2 python3 sudo vim \
42
42
&& xbps-remove -O; \
43
43
fi
Original file line number Diff line number Diff line change 24
24
main :
25
25
load_module :
26
26
- modules/ngx_http_app_protect_module.so
27
- - modules/ngx_http_app_protect_dos_module.so
27
+ # - modules/ngx_http_app_protect_dos_module.so
28
28
user : nginx
29
29
worker_processes : auto
30
30
error_log :
206
206
- variable : $job
207
207
name : info
208
208
leeway : 0s
209
- type : signed
209
+ type : nested
210
+ require : jwt
210
211
auth_request :
211
212
uri : false
212
213
set :
310
311
dest : syslog:server=10.1.1.1:514
311
312
- path : /etc/app_protect/conf/log_default.json
312
313
dest : syslog:server=10.1.1.2:514
313
- app_protect_dos :
314
- enable : true
315
- policy_file : /etc/app_protect/conf/BADOSDefaultPolicy.json
316
- security_log_enable : true
317
- security_log :
318
- path : /etc/app_protect_dos/log-default.json
319
- dest : syslog:server=10.1.1.1:514
314
+ # app_protect_dos:
315
+ # enable: true
316
+ # policy_file: /etc/app_protect/conf/BADOSDefaultPolicy.json
317
+ # security_log_enable: true
318
+ # security_log:
319
+ # path: /etc/app_protect_dos/log-default.json
320
+ # dest: syslog:server=10.1.1.1:514
320
321
auth_jwt :
321
322
enable :
322
323
realm : realm
Original file line number Diff line number Diff line change 20
20
- name : Install NGINX Plus
21
21
hosts : all
22
22
tasks :
23
- - name : Set repo if Debian
24
- set_fact :
25
- version : " =24-2~{{ ansible_facts['distribution_release'] }}"
26
- when : ansible_facts['os_family'] == "Debian"
27
- - name : Set repo if Red Hat
28
- set_fact :
29
- version : " -24-2.{{ (ansible_facts['distribution']=='Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
30
- when : ansible_facts['os_family'] == "RedHat"
31
-
32
23
- name : Install NGINX
33
24
include_role :
34
25
name : nginxinc.nginx
35
26
vars :
36
27
nginx_type : plus
37
- nginx_version : " {{ version }}"
38
28
nginx_license :
39
29
certificate : ../common/files/license/nginx-repo.crt
40
30
key : ../common/files/license/nginx-repo.key
41
31
nginx_remove_license : false
42
32
43
- - name : Install NGINX App Protect WAF and NGINX App Protect DoS
33
+ - name : Install NGINX App Protect WAF
44
34
include_role :
45
35
name : nginxinc.nginx_app_protect
46
36
vars :
47
37
nginx_app_protect_waf_enable : true
48
- nginx_app_protect_dos_enable : true
38
+ nginx_app_protect_dos_enable : false
49
39
nginx_app_protect_setup_license : false
50
40
nginx_app_protect_remove_license : false
51
41
nginx_app_protect_install_signatures : false
Original file line number Diff line number Diff line change @@ -70,7 +70,10 @@ auth_jwt_key_request {{ auth_jwt['key_request'] }};
70
70
{% if auth_jwt ['leeway' ] is defined %}
71
71
auth_jwt_leeway {{ auth_jwt['leeway'] }};
72
72
{% endif %}
73
- {% if auth_jwt ['type' ] is defined and auth_jwt ['type' ] in ['signed' , 'encrypted' ] %}
73
+ {% if auth_jwt ['type' ] is defined and auth_jwt ['type' ] in ['signed' , 'encrypted' , 'nested' ] %}
74
74
auth_jwt_type {{ auth_jwt['type'] }};
75
75
{% endif %}
76
+ {% if auth_jwt ['require' ] is defined %}
77
+ auth_jwt_require {{ auth_jwt['require'] if auth_jwt['require'] is string else auth_jwt['require'] | join(' ') }};
78
+ {% endif %}
76
79
{% endmacro %}
You can’t perform that action at this time.
0 commit comments