You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add firewall support to http based alertmanager receiver integrations (#4085)
* Introduced firewall in the Alertmanager to block specific addresses in receiver integrations
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Adapted implementation based on new design in prometheus/common
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Updated doc
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Fixed doc
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Improved doc
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Improved config description
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,7 @@
54
54
*[ENHANCEMENT] Ruler: Added `-ruler.enabled-tenants` and `-ruler.disabled-tenants` to explicitly enable or disable rules processing for specific tenants. #4074
55
55
*[ENHANCEMENT] Block Storage Ingester: `/flush` now accepts two new parameters: `tenant` to specify tenant to flush and `wait=true` to make call synchronous. Multiple tenants can be specified by repeating `tenant` parameter. If no `tenant` is specified, all tenants are flushed, as before. #4073
56
56
*[ENHANCEMENT] Alertmanager: validate configured `-alertmanager.web.external-url` and fail if ends with `/`. #4081
57
+
*[ENHANCEMENT] Alertmanager: added `-alertmanager.receivers-firewall.block.cidr-networks` and `-alertmanager.receivers-firewall.block.private-addresses` to block specific network addresses in HTTP-based Alertmanager receiver integrations. #4085
57
58
*[ENHANCEMENT] Allow configuration of Cassandra's host selection policy. #4069
58
59
*[ENHANCEMENT] Store-gateway: retry synching blocks if a per-tenant sync fails. #3975#4088
59
60
*[ENHANCEMENT] Add metric `cortex_tcp_connections` exposing the current number of accepted TCP connections. #4099
Copy file name to clipboardExpand all lines: docs/blocks-storage/production-tips.md
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -105,3 +105,14 @@ You can see that the initial migration is done by looking for the following mess
105
105
The rule of thumb to ensure memcached is properly scaled is to make sure evictions happen infrequently. When that's not the case and they affect query performances, the suggestion is to scale out the memcached cluster adding more nodes or increasing the memory limit of existing ones.
106
106
107
107
We also recommend to run a different memcached cluster for each cache type (metadata, index, chunks). It's not required, but suggested to not worry about the effect of memory pressure on a cache type against others.
108
+
109
+
## Alertmanager
110
+
111
+
### Ensure Alertmanager networking is hardened
112
+
113
+
If the Alertmanager API is enabled, users with access to Cortex can autonomously configure the Alertmanager, including receiver integrations that allow to issue network requests to the configured URL (eg. webhook). If the Alertmanager network is not hardened, Cortex users may have the ability to issue network requests to any network endpoint including services running in the local network accessible by the Alertmanager itself.
114
+
115
+
Despite hardening the system is out of the scope of Cortex, Cortex provides a basic built-in firewall to block connections created by Alertmanager receiver integrations:
Copy file name to clipboardExpand all lines: docs/configuration/v1-guarantees.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,10 @@ Currently experimental features are:
41
41
- Azure blob storage.
42
42
- Zone awareness based replication.
43
43
- Ruler API (to PUT rules).
44
-
- Alertmanager API
44
+
- Alertmanager:
45
+
- API (enabled via `-experimental.alertmanager.enable-api`)
46
+
- Sharding of tenants across multiple instances (enabled via `-alertmanager.sharding-enabled`)
47
+
- Receiver integrations firewall (configured via `-alertmanager.receivers-firewall.*`)
45
48
- Memcached client DNS-based service discovery.
46
49
- Delete series APIs.
47
50
- In-memory (FIFO) and Redis cache.
@@ -61,7 +64,6 @@ Currently experimental features are:
61
64
- The bucket index support in the querier and store-gateway (enabled via `-blocks-storage.bucket-store.bucket-index.enabled=true`) is experimental
62
65
- The block deletion marks migration support in the compactor (`-compactor.block-deletion-marks-migration-enabled`) is temporarily and will be removed in future versions
63
66
- Querier: tenant federation
64
-
- Alertmanager: Sharding of tenants across multiple instances
65
67
- The thanosconvert tool for converting Thanos block metadata to Cortex
66
68
- HA Tracker: cleanup of old replicas from KV Store.
67
69
- Flags for configuring whether blocks-ingester streams samples or chunks are temporary, and will be removed when feature is tested:
f.Var(&cfg.CIDRNetworks, prefix+".cidr-networks", fmt.Sprintf("Comma-separated list of network CIDRs to %s in Alertmanager receiver integrations.", action))
25
+
f.BoolVar(&cfg.PrivateAddresses, prefix+".private-addresses", false, fmt.Sprintf("True to %s private and local addresses in Alertmanager receiver integrations. It blocks private addresses defined by RFC 1918 (IPv4 addresses) and RFC 4193 (IPv6 addresses), as well as loopback, local unicast and local multicast addresses.", action))
0 commit comments