docs: PrivateLink troubleshooting for NLB security group enforcement#36623
docs: PrivateLink troubleshooting for NLB security group enforcement#36623materializekatrina wants to merge 1 commit into
Conversation
| **Remarks**: | ||
|
|
||
| a. Network Load Balancers do not have associated security groups. Therefore, the security groups for your targets must use IP addresses to allow traffic. | ||
| a. Network Load Balancers do not have associated security groups by default. Therefore, the security groups for your targets must use IP addresses to allow traffic. |
There was a problem hiding this comment.
Double-checking ... this is pre-change content ... but since we're here:
The "Therefore, " sentence , is this the same or different as point b) below?
Will also ask Justin.
|
|
||
| b. You can't use the security groups for the clients as a source in the security groups for the targets. Therefore, the security groups for your targets must use the IP addresses of the clients to allow traffic. For more details, check the [AWS documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-register-targets.html). | ||
|
|
||
| c. If you have associated a [security group with your Network Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-security-groups.html) and enabled **Enforce inbound rules on PrivateLink traffic**, the NLB's inbound rules will be applied to traffic arriving from Materialize's VPC endpoint. In that case, the source IPs are private IPs from Materialize's VPC — **not** the IPs of any client (e.g., `kcat` or a Kafka client running from a workstation or bastion host) that you might use to verify connectivity to the brokers directly. Inbound rules that only permit your own test traffic will silently block Materialize, even when your own connectivity tests succeed. To resolve this, either disable **Enforce inbound rules on PrivateLink traffic**, or add inbound rules to the NLB's security group that permit the relevant ports (each broker's listener port and the health check port) from a source that covers Materialize's VPC endpoint traffic. |
There was a problem hiding this comment.
So ... we seem to be modifying content shown on
https://preview.materialize.com/materialize/36623/ingest-data/network-security/privatelink/
Did we want to update the content in https://preview.materialize.com/materialize/36623/ingest-data/postgres/amazon-rds/#b-optional-configure-network-security page and such?
|
|
||
| b. You can't use the security groups for the clients as a source in the security groups for the targets. Therefore, the security groups for your targets must use the IP addresses of the clients to allow traffic. For more details, check the [AWS documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-register-targets.html). | ||
|
|
||
| c. If you have associated a [security group with your Network Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-security-groups.html) and enabled **Enforce inbound rules on PrivateLink traffic**, the NLB's inbound rules will be applied to traffic arriving from Materialize's VPC endpoint. In that case, the source IPs are private IPs from Materialize's VPC — **not** the IPs of any client (e.g., `kcat` or a Kafka client running from a workstation or bastion host) that you might use to verify connectivity to the brokers directly. Inbound rules that only permit your own test traffic will silently block Materialize, even when your own connectivity tests succeed. To resolve this, either disable **Enforce inbound rules on PrivateLink traffic**, or add inbound rules to the NLB's security group that permit the relevant ports (each broker's listener port and the health check port) from a source that covers Materialize's VPC endpoint traffic. |
There was a problem hiding this comment.
Also, maybe make it leaner? And perhaps list the disabling to be the second bullet point(?) since it seems kind of permissive for all inbound traffic and not just materialize's traffic.
If you have associated a security group with your Network Load Balancer and
enabled **Enforce inbound rules on PrivateLink traffic**, the security group's
inbound rules also apply to traffic from Materialize's VPC endpoint. Any traffic
not explicitly permitted, including Materialize's, will be silently blocked.
To resolve this either:
- Add inbound rules to the NLB's security group that permit the listener port
and the health check port from a source covering Materialize's VPC endpoint
traffic, or
- Disable **Enforce inbound rules on PrivateLink traffic**.
Motivation
Customer hit a silent PrivateLink failure:
psqlfrom their bastion worked, but Materialize source creation failed. Their NLB security group had Enforce inbound rules on PrivateLink traffic enabled with rules that only allowed their own test IPs — traffic from Materialize's VPC endpoint arrives with different source IPs, so it was silently dropped.Our docs don't mention this, and still claim "NLBs do not have associated security groups" (no longer true since AWS added the feature in 2023).
Slack thread: https://materializeinc.slack.com/archives/C08K5GHRV1S/p1779207642559229
Changes
In each of the three PrivateLink setup shortcodes (PostgreSQL, MySQL, Kafka):