Skip to content

Commit fecb4e6

Browse files
committed
Remove relay SAS keys
All deployed environments must use managed identities for security reasons. For authenticating both the web application and the gateways.
1 parent 2d09f36 commit fecb4e6

3 files changed

Lines changed: 0 additions & 30 deletions

File tree

infrastructure/modules/arc-infra/outputs.tf

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,3 @@ output "app_insights_connection_string" {
3333
sensitive = true
3434
value = var.enable_arc_servers ? module.app_insights[0].connection_string : null
3535
}
36-
37-
output "relay_listen_sas_keys" {
38-
description = "Per-machine relay listen SAS primary keys, keyed by Arc resource name. Used by the deploy pipeline to write .env files."
39-
sensitive = true
40-
value = var.enable_arc_servers ? {
41-
for k, rule in azurerm_relay_hybrid_connection_authorization_rule.per_machine_listen :
42-
k => rule.primary_key
43-
} : {}
44-
}

infrastructure/modules/arc-infra/relay.tf

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,6 @@ resource "azurerm_relay_hybrid_connection" "per_machine" {
4545
requires_client_authorization = true
4646
}
4747

48-
# Listen-only SAS rule per HC — retained for local development / break-glass access.
49-
# Production relay authentication uses Managed Identity (see relay_listener_role below).
50-
resource "azurerm_relay_hybrid_connection_authorization_rule" "per_machine_listen" {
51-
for_each = local.arc_machines
52-
53-
name = "listen"
54-
hybrid_connection_name = azurerm_relay_hybrid_connection.per_machine[each.key].name
55-
namespace_name = local.relay_namespace_name
56-
resource_group_name = local.relay_namespace_rg
57-
58-
listen = true
59-
send = false
60-
manage = false
61-
}
62-
6348
# Look up each discovered Arc machine to obtain its system-assigned managed identity.
6449
# Static machines (registered in the same apply) are excluded — they are not yet
6550
# visible to the data source and will be picked up on the next apply after onboarding.

infrastructure/terraform/outputs.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,3 @@ output "relay_namespace_hostname" {
88
description = "Relay namespace FQDN for AZURE_RELAY_NAMESPACE in the gateway .env"
99
value = module.arc_infra.relay_namespace_hostname
1010
}
11-
12-
output "relay_listen_sas_keys" {
13-
description = "Per-machine relay listen SAS primary keys, keyed by Arc resource name"
14-
sensitive = true
15-
value = module.arc_infra.relay_listen_sas_keys
16-
}

0 commit comments

Comments
 (0)