remove proxy for basic auth

This commit is contained in:
Nordine Bittich
2021-10-21 18:15:29 +02:00
parent 93e75cb09e
commit db5dec4a39
5 changed files with 19 additions and 105 deletions

3
.gitignore vendored
View File

@@ -22,3 +22,6 @@ DS_STORE
/config/proxy-https/cert.pem
/config/proxy-https/key.pem
source.json
out.json

View File

@@ -0,0 +1,10 @@
application:
security:
enabled: true
source: /config/source.json
output: /config/out.json
allowedIpAddresses: []
#server:
#forward-headers-strategy: NATIVE
#tomcat:
# remote-ip-header: x-real-ip

View File

@@ -1,88 +0,0 @@
events {
}
http {
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name dev.contacthub.lblod.info;
location /v3/api-docs {
auth_basic "Contact Hub realm";
auth_basic_user_file /etc/nginx/conf.d/nginx.htpasswd;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://identifier;
client_max_body_size 3072m;
}
location /delta {
auth_basic "Contact Hub realm";
auth_basic_user_file /etc/nginx/conf.d/nginx.htpasswd;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://identifier;
client_max_body_size 3072m;
}
location /bulk {
auth_basic "Contact Hub realm";
auth_basic_user_file /etc/nginx/conf.d/nginx.htpasswd;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://identifier;
client_max_body_size 3072m;
}
location /changes {
auth_basic "Contact Hub realm";
auth_basic_user_file /etc/nginx/conf.d/nginx.htpasswd;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://identifier;
client_max_body_size 3072m;
}
location /consolidated {
auth_basic "Contact Hub realm";
auth_basic_user_file /etc/nginx/conf.d/nginx.htpasswd;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://identifier;
client_max_body_size 3072m;
}
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://identifier;
client_max_body_size 3072m;
}
location ~ /authorization/callback(.*) {
rewrite ^ /torii/redirect.html permanent;
}
}
}

View File

@@ -18,7 +18,9 @@ services:
cache:
restart: "no"
kalliope-api:
restart: "no"
environment:
SPRING_SECURITY_CONFIG: "/config/security-dev.yml"
restart: "no"
deltanotifier:
restart: "no"
mocklogin:
@@ -29,10 +31,6 @@ services:
restart: "no"
login:
restart: "no"
web:
ports:
- "80:80"
restart: "no"
frontend:
restart: "no"
uri-info:

View File

@@ -17,6 +17,8 @@ services:
- "logging=true"
restart: always
logging: *default-logging
ports:
- "80:80"
dispatcher:
image: semtech/mu-dispatcher:latest
volumes:
@@ -79,7 +81,7 @@ services:
restart: always
logging: *default-logging
kalliope-api:
image: lblod/jsonld-delta-service:0.2.0
image: lblod/jsonld-delta-service:latest
volumes:
- ./config/kalliope:/config
- ./data/files:/share
@@ -138,17 +140,6 @@ services:
- "logging=true"
restart: always
logging: *default-logging
web:
image: nginx:1.21.3
volumes:
- ./config/proxy:/etc/nginx/conf.d
- ./config/proxy/web.conf:/etc/nginx/nginx.conf:ro
links:
- identifier:identifier
labels:
- "logging=true"
restart: always
logging: *default-logging
frontend:
image: lblod/frontend-contact-hub:1.1.0
volumes: