Commit a0af0382 by Fred Smith

Merge pull request #2450 from edx/revert-2322-smarnach/selective-http-auth

Revert ff670ea8
parents 399635f2 cb50d7bb
...@@ -113,28 +113,3 @@ nginx_cfg: ...@@ -113,28 +113,3 @@ nginx_cfg:
NGINX_ROBOT_RULES: [ ] NGINX_ROBOT_RULES: [ ]
NGINX_EDXAPP_EMBARGO_CIDRS: [] NGINX_EDXAPP_EMBARGO_CIDRS: []
CERTS_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
ECOMMERCE_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
EDXAPP_CMS_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
EDXAPP_LMS_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
EDXAPP_LMS_PREVIEW_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
KIBANA_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
ORA_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
PROGRAMS_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
XQUEUE_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
XSERVER_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
NGINX_CREATE_HTPASSWD_FILE: >
{{
CERTS_ENABLE_BASIC_AUTH or
ECOMMERCE_ENABLE_BASIC_AUTH or
EDXAPP_CMS_ENABLE_BASIC_AUTH or
EDXAPP_LMS_ENABLE_BASIC_AUTH or
EDXAPP_LMS_PREVIEW_ENABLE_BASIC_AUTH or
KIBANA_ENABLE_BASIC_AUTH or
ORA_ENABLE_BASIC_AUTH or
PROGRAMS_ENABLE_BASIC_AUTH or
XQUEUE_ENABLE_BASIC_AUTH or
XSERVER_ENABLE_BASIC_AUTH
}}
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
name={{ COMMON_HTPASSWD_USER }} name={{ COMMON_HTPASSWD_USER }}
password={{ COMMON_HTPASSWD_PASS }} password={{ COMMON_HTPASSWD_PASS }}
path={{ nginx_htpasswd_file }} path={{ nginx_htpasswd_file }}
when: NGINX_CREATE_HTPASSWD_FILE when: COMMON_ENABLE_BASIC_AUTH
- name: Create nginx log file location (just in case) - name: Create nginx log file location (just in case)
file: > file: >
......
{% if COMMON_ENABLE_BASIC_AUTH %}
satisfy any; satisfy any;
allow 127.0.0.1; allow 127.0.0.1;
...@@ -16,3 +17,4 @@ ...@@ -16,3 +17,4 @@
index index.html index index.html
proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Proto https;
{% endif %}
...@@ -3,9 +3,8 @@ server { ...@@ -3,9 +3,8 @@ server {
location / { location / {
root {{ CERTS_WEB_ROOT }}; root {{ CERTS_WEB_ROOT }};
{% if CERTS_ENABLE_BASIC_AUTH %} {% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri $uri/valid.html =404; try_files $uri $uri/valid.html =404;
} }
} }
...@@ -74,9 +74,7 @@ error_page {{ k }} {{ v }}; ...@@ -74,9 +74,7 @@ error_page {{ k }} {{ v }};
} }
location / { location / {
{% if EDXAPP_CMS_ENABLE_BASIC_AUTH %} {% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_cms_app; try_files $uri @proxy_to_cms_app;
} }
......
...@@ -38,9 +38,6 @@ server { ...@@ -38,9 +38,6 @@ server {
} }
location / { location / {
{% if ECOMMERCE_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_app; try_files $uri @proxy_to_app;
} }
......
...@@ -31,9 +31,7 @@ server { ...@@ -31,9 +31,7 @@ server {
error_log {{ nginx_log_dir }}/kibana.error.log error; error_log {{ nginx_log_dir }}/kibana.error.log error;
# Access restriction # Access restriction
{% if KIBANA_ENABLE_BASIC_AUTH %} {% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
# Set image format types to expire in a very long time # Set image format types to expire in a very long time
location ~* ^.+\.(jpg|jpeg|gif|png|ico)$ { location ~* ^.+\.(jpg|jpeg|gif|png|ico)$ {
......
...@@ -37,9 +37,8 @@ server { ...@@ -37,9 +37,8 @@ server {
} }
location / { location / {
{% if EDXAPP_LMS_PREVIEW_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %} {% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_lms-preview_app; try_files $uri @proxy_to_lms-preview_app;
} }
......
...@@ -93,9 +93,7 @@ error_page {{ k }} {{ v }}; ...@@ -93,9 +93,7 @@ error_page {{ k }} {{ v }};
} }
location / { location / {
{% if EDXAPP_LMS_ENABLE_BASIC_AUTH %} {% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
{% if NGINX_EDXAPP_EMBARGO_CIDRS -%} {% if NGINX_EDXAPP_EMBARGO_CIDRS -%}
if ( $embargo ) { if ( $embargo ) {
rewrite ^ /embargo; rewrite ^ /embargo;
...@@ -169,9 +167,7 @@ error_page {{ k }} {{ v }}; ...@@ -169,9 +167,7 @@ error_page {{ k }} {{ v }};
error_page 503 = /server/rate-limit.html; error_page 503 = /server/rate-limit.html;
{%- endif -%} {%- endif -%}
{% if EDXAPP_LMS_ENABLE_BASIC_AUTH %} {%- include "basic-auth.j2" %}
{%- include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_lms_app; try_files $uri @proxy_to_lms_app;
} }
......
...@@ -8,9 +8,8 @@ server { ...@@ -8,9 +8,8 @@ server {
listen {{ ORA_NGINX_PORT }} default_server; listen {{ ORA_NGINX_PORT }} default_server;
location / { location / {
{% if ORA_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %} {% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_app; try_files $uri @proxy_to_app;
} }
......
...@@ -38,9 +38,6 @@ server { ...@@ -38,9 +38,6 @@ server {
} }
location / { location / {
{% if PROGRAMS_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_app; try_files $uri @proxy_to_app;
} }
......
...@@ -8,9 +8,7 @@ server { ...@@ -8,9 +8,7 @@ server {
listen {{ XQUEUE_NGINX_PORT }} default_server; listen {{ XQUEUE_NGINX_PORT }} default_server;
location / { location / {
{% if XQUEUE_ENABLE_BASIC_AUTH %} {% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_app; try_files $uri @proxy_to_app;
} }
......
...@@ -18,9 +18,7 @@ server { ...@@ -18,9 +18,7 @@ server {
listen {{ XSERVER_NGINX_PORT }} default_server; listen {{ XSERVER_NGINX_PORT }} default_server;
location / { location / {
{% if XSERVER_ENABLE_BASIC_AUTH %} {% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_app; try_files $uri @proxy_to_app;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment