Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent overriding system level SSL certificates #812

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions commands/svc.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ if [[ "${WARDEN_PARAMS[0]}" == "up" ]]; then
stores:
default:
defaultCertificate:
certFile: /etc/ssl/certs/${WARDEN_SERVICE_DOMAIN}.crt.pem
keyFile: /etc/ssl/certs/${WARDEN_SERVICE_DOMAIN}.key.pem
certFile: /etc/ssl/certs/warden/${WARDEN_SERVICE_DOMAIN}.crt.pem
keyFile: /etc/ssl/certs/warden/${WARDEN_SERVICE_DOMAIN}.key.pem
certificates:
EOT

for cert in $(find "${WARDEN_SSL_DIR}/certs" -type f -name "*.crt.pem" | sed -E 's#^.*/ssl/certs/(.*)\.crt\.pem$#\1#'); do
cat >> "${WARDEN_HOME_DIR}/etc/traefik/dynamic.yml" <<-EOF
- certFile: /etc/ssl/certs/${cert}.crt.pem
keyFile: /etc/ssl/certs/${cert}.key.pem
- certFile: /etc/ssl/certs/warden/${cert}.crt.pem
keyFile: /etc/ssl/certs/warden/${cert}.key.pem
EOF
done

Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
volumes:
- ${WARDEN_HOME_DIR}/etc/traefik/traefik.yml:/etc/traefik/traefik.yml
- ${WARDEN_HOME_DIR}/etc/traefik/dynamic.yml:/etc/traefik/dynamic.yml
- ${WARDEN_HOME_DIR}/ssl/certs:/etc/ssl/certs
- ${WARDEN_HOME_DIR}/ssl/certs:/etc/ssl/certs/warden
- /var/run/docker.sock:/var/run/docker.sock
labels:
- traefik.enable=true
Expand Down