-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not expose additional ports (#331)
## Overview Docker compose no longer exposes any container ports outside the default network except for ports 80 and 443 from the proxy container. This ensures that ports that are not intended for external access are not exposed to the wider internet even if firewall rules are not set correctly. Note that if the `monitoring` component is used then port 9100 will be exposed from the `node-exporter` container. This is because this container must be run on the host machine's network and unfortunately there is no known workaround that would not require this port to be exposed on the host machine. ## Changes **Non-breaking changes** - Changes all internal URL references to components **Breaking changes** - removes the lb_flyingpigeon endpoint because it requires direct access to an exposed port ## Related Issue / Discussion - Resolves #222 ## Additional Information Links to other issues or sources. - This does not make any changes to the components that are deprecated in #311
- Loading branch information
Showing
65 changed files
with
220 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.28.0 2023-08-10T19:23:14Z | ||
1.29.0 2023-08-10T19:38:10Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
birdhouse/components/monitoring/config/magpie/config.yml.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
providers: | ||
grafana: | ||
# below URL is only used to fill in the required location in Magpie | ||
# actual auth validation is performed with Twitcher 'verify' endpoint without accessing this proxied URL | ||
url: http://proxy:80 | ||
title: Grafana | ||
public: true | ||
c4i: false | ||
type: api | ||
sync_type: api | ||
prometheus: | ||
# below URL is only used to fill in the required location in Magpie | ||
# actual auth validation is performed with Twitcher 'verify' endpoint without accessing this proxied URL | ||
url: http://proxy:80 | ||
title: Prometheus | ||
public: true | ||
c4i: false | ||
type: api | ||
sync_type: api | ||
alertmanager: | ||
# below URL is only used to fill in the required location in Magpie | ||
# actual auth validation is performed with Twitcher 'verify' endpoint without accessing this proxied URL | ||
url: http://proxy:80 | ||
title: AlertManager | ||
public: true | ||
c4i: false | ||
type: api | ||
sync_type: api | ||
|
||
permissions: | ||
- service: grafana | ||
permission: read | ||
group: administrators | ||
action: create | ||
- service: grafana | ||
permission: write | ||
group: administrators | ||
action: create | ||
- service: prometheus | ||
permission: read | ||
group: administrators | ||
action: create | ||
- service: prometheus | ||
permission: write | ||
group: administrators | ||
action: create | ||
- service: alertmanager | ||
permission: read | ||
group: administrators | ||
action: create | ||
- service: alertmanager | ||
permission: write | ||
group: administrators | ||
action: create |
7 changes: 7 additions & 0 deletions
7
birdhouse/components/monitoring/config/magpie/docker-compose-extra.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: "3.4" | ||
|
||
services: | ||
magpie: | ||
volumes: | ||
- ./components/monitoring/config/magpie/config.yml:${MAGPIE_PERMISSIONS_CONFIG_PATH}/monitoring.yml:ro | ||
- ./components/monitoring/config/magpie/config.yml:${MAGPIE_PROVIDERS_CONFIG_PATH}/monitoring.yml:ro |
57 changes: 57 additions & 0 deletions
57
birdhouse/components/monitoring/config/proxy/conf.extra-service.d/monitoring.conf.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
location /grafana { | ||
auth_request /secure-grafana-auth; | ||
auth_request_set $auth_status $upstream_status; | ||
proxy_pass http://grafana:3000; | ||
proxy_set_header Host $host; | ||
} | ||
|
||
location /prometheus { | ||
auth_request /secure-prometheus-auth; | ||
auth_request_set $auth_status $upstream_status; | ||
proxy_pass http://prometheus:9090; | ||
proxy_set_header Host $host; | ||
} | ||
|
||
location /alertmanager { | ||
auth_request /secure-alertmanager-auth; | ||
auth_request_set $auth_status $upstream_status; | ||
proxy_pass http://alertmanager:9093; | ||
proxy_set_header Host $host; | ||
} | ||
|
||
location = /secure-grafana-auth { | ||
internal; | ||
proxy_pass https://${PAVICS_FQDN_PUBLIC}${TWITCHER_VERIFY_PATH}/grafana$request_uri; | ||
proxy_pass_request_body off; | ||
proxy_set_header Host $host; | ||
proxy_set_header Content-Length ""; | ||
proxy_set_header X-Original-URI $request_uri; | ||
proxy_set_header X-Forwarded-Proto $real_scheme; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Host $host:$server_port; | ||
} | ||
|
||
location = /secure-prometheus-auth { | ||
internal; | ||
proxy_pass https://${PAVICS_FQDN_PUBLIC}${TWITCHER_VERIFY_PATH}/prometheus$request_uri; | ||
proxy_pass_request_body off; | ||
proxy_set_header Host $host; | ||
proxy_set_header Content-Length ""; | ||
proxy_set_header X-Original-URI $request_uri; | ||
proxy_set_header X-Forwarded-Proto $real_scheme; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Host $host:$server_port; | ||
} | ||
|
||
location = /secure-alertmanager-auth { | ||
internal; | ||
proxy_pass https://${PAVICS_FQDN_PUBLIC}${TWITCHER_VERIFY_PATH}/alertmanager$request_uri; | ||
proxy_pass_request_body off; | ||
proxy_set_header Host $host; | ||
proxy_set_header Content-Length ""; | ||
proxy_set_header X-Original-URI $request_uri; | ||
proxy_set_header X-Forwarded-Proto $real_scheme; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Host $host:$server_port; | ||
} |
6 changes: 6 additions & 0 deletions
6
birdhouse/components/monitoring/config/proxy/docker-compose-extra.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: "3.4" | ||
|
||
services: | ||
proxy: | ||
volumes: | ||
- ./components/monitoring/config/proxy/conf.extra-service.d:/etc/nginx/conf.extra-service.d/monitoring:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.