Skip to content

Commit e146ed6

Browse files
committed
refactor: remove SSL from standalone setup
Since Zeppelin was only creating a self-signed certificate, this gave a false sense of security when in reality you'd always want to have a proxy with a proper certificate in front of this anyway. Additionally, generating the certificate at build time meant that the domain couldn't easily be changed/updated without rebuilding.
1 parent 1ef7ba8 commit e146ed6

File tree

4 files changed

+4
-25
lines changed

4 files changed

+4
-25
lines changed

.env.example

+1-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ DEVELOPMENT_SSH_PASSWORD=password
5454
# NOTE: You only need to fill in these values for running the standalone production environment
5555
# ==========================
5656

57-
STANDALONE_DOMAIN=
58-
59-
STANDALONE_WEB_PORT=443
57+
STANDALONE_WEB_PORT=80
6058

6159
# The MySQL database running in the container is exposed to the host on this port,
6260
# allowing access with database tools such as DBeaver

docker-compose.standalone.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ services:
2828
build:
2929
context: .
3030
dockerfile: docker/production/nginx/Dockerfile
31-
args:
32-
STANDALONE_DOMAIN: ${STANDALONE_DOMAIN:?Missing STANDALONE_DOMAIN}
3331
ports:
34-
- "${STANDALONE_WEB_PORT:?Missing STANDALONE_WEB_PORT}:443"
32+
- "${STANDALONE_WEB_PORT:?Missing STANDALONE_WEB_PORT}:80"
3533

3634
migrate:
3735
depends_on:

docker/production/nginx/Dockerfile

-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
FROM nginx
22

3-
ARG STANDALONE_DOMAIN
4-
5-
RUN apt-get update && apt-get install -y openssl
6-
RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/zeppelin-self-signed-cert.key -out /etc/ssl/certs/zeppelin-self-signed-cert.pem -days 3650 -subj "/CN=${STANDALONE_DOMAIN}" -nodes
7-
83
COPY ./docker/production/nginx/default.conf /etc/nginx/conf.d/default.conf
9-
RUN sed -ir "s/_STANDALONE_DOMAIN_/${STANDALONE_DOMAIN}/g" /etc/nginx/conf.d/default.conf

docker/production/nginx/default.conf

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
server {
2-
listen 443 ssl http2;
3-
listen [::]:443 ssl http2;
4-
server_name _STANDALONE_DOMAIN_;
2+
listen 80 default_server;
3+
server_name _;
54

65
# Using a variable here stops nginx from crashing if the dev container is restarted or becomes otherwise unavailable
76
set $backend_upstream "http://api:3001";
@@ -21,14 +20,4 @@ server {
2120

2221
client_max_body_size 200M;
2322
}
24-
25-
ssl_certificate /etc/ssl/certs/zeppelin-self-signed-cert.pem;
26-
ssl_certificate_key /etc/ssl/private/zeppelin-self-signed-cert.key;
27-
28-
ssl_session_timeout 1d;
29-
ssl_session_cache shared:MozSSL:10m;
30-
ssl_session_tickets off;
31-
32-
ssl_protocols TLSv1.3;
33-
ssl_prefer_server_ciphers off;
3423
}

0 commit comments

Comments
 (0)