diff --git a/.gitignore b/.gitignore index 2fbc202..be3b6dc 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,7 @@ DS_STORE /config/proxy-https/cert.pem /config/proxy-https/key.pem + +source.json +out.json +security.yml \ No newline at end of file diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index b0c3b60..fd805e9 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -223,14 +223,6 @@ defmodule Dispatcher do forward conn, path, "http://kalliope-api/v3/api-docs/" end - match "/delta/*path", %{ layer: :api_services, accept: %{ json: true } } do - forward conn, path, "http://kalliope-api/delta/" - end - - match "/bulk/*path", %{ layer: :api_services, accept: %{ json: true } } do - forward conn, path, "http://kalliope-api/bulk" - end - match "/changes/*path", %{ layer: :api_services, accept: %{ json: true } } do forward conn, path, "http://kalliope-api/changes/" end diff --git a/config/kalliope/bulk/.gitkeep b/config/kalliope/bulk/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/config/kalliope/security-dev.yml b/config/kalliope/security-dev.yml new file mode 100644 index 0000000..80aa4b7 --- /dev/null +++ b/config/kalliope/security-dev.yml @@ -0,0 +1,9 @@ +# disabled on dev +application: + security: + enabled: false +spring: + autoconfigure: + exclude: + - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration + - org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration diff --git a/config/proxy/web.conf b/config/proxy/web.conf deleted file mode 100644 index a79cf44..0000000 --- a/config/proxy/web.conf +++ /dev/null @@ -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; - } - - } - -} \ No newline at end of file diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 173bfbe..ff00bfb 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -3,6 +3,8 @@ version: '3.4' services: identifier: restart: "no" + ports: + - "80:80" dispatcher: restart: "no" triplestore: @@ -18,7 +20,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 +33,6 @@ services: restart: "no" login: restart: "no" - web: - ports: - - "80:80" - restart: "no" frontend: restart: "no" uri-info: diff --git a/docker-compose.yml b/docker-compose.yml index 5496a9c..ad3faf9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -79,7 +79,7 @@ services: restart: always logging: *default-logging kalliope-api: - image: lblod/jsonld-delta-service:0.2.0 + image: lblod/jsonld-delta-service:0.3.2 volumes: - ./config/kalliope:/config - ./data/files:/share @@ -153,17 +153,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: