bifrost/playbooks/roles/bifrost-ironic-install/templates/nginx_conf.d_bifrost-ironic.conf.j2
Dmitry Tantsur c0f901c1b4 Make ironic and inspector listen on Unix sockets
This way we don't expose the plain text endpoints to anyone even locally.

Change-Id: I40b3e863f78e185c39a20f4254b68b8140eea9e0
Depends-On: https://review.opendev.org/c/openstack/ironic/+/828508
Depends-On: https://review.opendev.org/c/openstack/ironic-inspector/+/827124
2022-02-09 11:06:41 +01:00

36 lines
1.3 KiB
Django/Jinja

server {
listen 6385 ssl http2;
server_name {{ ansible_hostname }};
ssl_certificate {{ tls_certificate_path }};
ssl_certificate_key {{ ironic_private_key_path }};
location / {
proxy_pass http://unix:/run/ironic/ironic.socket:;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port 6385;
}
}
{% if enable_inspector | bool %}
server {
listen 5050 ssl http2;
server_name {{ ansible_hostname }};
ssl_certificate {{ tls_certificate_path }};
ssl_certificate_key {{ ironic_inspector_private_key_path }};
location / {
proxy_pass http://unix:/run/ironic/ironic-inspector.socket:;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port 5050;
}
}
{% endif %}