Skip to content

Commit 1edf2c0

Browse files
committed
fix inbound traffic by bypassing sg inbound rules on NLB; updated docs
1 parent e1daa6e commit 1edf2c0

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ curl -sS -w '\nHTTP %{http_code}\n' http://<ncc-endpoint-rule-domain>:8080/statu
8686
```
8787

8888
### Limitations / Trade-Offs
89-
Before going to production, please review the following [limitations & trade-offs](terraform/README.md#limitations--tradeoffs-of-the-current-implementation).
89+
Before going to production, please review the following [limitations & trade-offs](terraform/README.md#limitations--tradeoffs-of-the-current-implementation).

terraform/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,9 @@ This module is intentionally minimal right now. The following limitations are im
283283
- Databricks enforces limits around NCCs, private endpoints, and private endpoint rules (including limits on the number of domain names per rule).
284284
- Treat these as **external constraints** that influence how you model `dbx_proxy_listener`.
285285
- Reference: [Configure private connectivity to resources in your VPC](https://docs.databricks.com/aws/en/security/network/serverless-network-security/pl-to-internal-network).
286+
287+
- **PrivateLink NLB SG ingress enforcement**
288+
- Currently, if bootstrapped, the NLB gets created with a dedicated Security Group attached, which would allow to control ingress to the NLB, enforced with `enforce_security_group_inbound_rules_on_private_link_traffic = on`.
289+
- The above setting would also allow to see individual client-IPs as source in network packets (which would be favorable in general)
290+
- However, we are not able to lock-down the inbound rules on the NLB Security Group due to missing information like Security Group ID or VPC endpoint ID of the consumer side (Databricks Serverless).
291+
- Therefore, we are using `enforce_security_group_inbound_rules_on_private_link_traffic = on`, which bypasses the Security Group inbound rules, and solely rely on the endpoint service `allowed_principals` and manual acceptance to control inbound traffic to the NLB.

terraform/aws/modules/load-balancer/nlb.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ resource "aws_lb" "this" {
1111
enable_cross_zone_load_balancing = true
1212
enable_deletion_protection = false
1313

14+
# PrivateLink traffic bypasses NLB SG ingress when this is off. We use off
15+
# because the service owner cannot restrict ingress by endpoint SG/CIDR without
16+
# consumer-provided details; access is instead controlled via endpoint service
17+
# allowed_principals and manual acceptance.
18+
enforce_security_group_inbound_rules_on_private_link_traffic = "off"
19+
1420
tags = var.tags
1521
}
1622

@@ -42,6 +48,11 @@ resource "aws_security_group" "this" {
4248
cidr_blocks = var.subnet_cidrs
4349
}
4450

51+
# We can not lock down ingress to individual sources since we don't know the
52+
# source IP addresses or Security Group IDs the traffic is originating from.
53+
# Therefore, we allow all ingress traffic on the SG level. Ingress is controlled
54+
# by the endpoint service allowed_principals and manual acceptance.
55+
4556
tags = merge(
4657
var.tags,
4758
{

0 commit comments

Comments
 (0)