Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable local authentication between Airlock Processor and Azure Service Bus in Function Binding #4277

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airlock_processor/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.8.0"
__version__ = "0.8.1"
4 changes: 2 additions & 2 deletions airlock_processor/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
}
}
},
"extensionBundle": {
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[4.0.0, 5.0.0)"
"version": "[4.*, 5.0.0)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you have confirmed that the current versions we use don't support this?

}
}
38 changes: 21 additions & 17 deletions core/terraform/airlock/airlock_processor.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,27 @@ resource "azurerm_linux_function_app" "airlock_function_app" {
}

app_settings = {
"SB_CONNECTION_STRING" = var.airlock_servicebus.default_primary_connection_string
"BLOB_CREATED_TOPIC_NAME" = azurerm_servicebus_topic.blob_created.name
"TOPIC_SUBSCRIPTION_NAME" = azurerm_servicebus_subscription.airlock_processor.name
"EVENT_GRID_STEP_RESULT_TOPIC_URI_SETTING" = azurerm_eventgrid_topic.step_result.endpoint
"EVENT_GRID_STEP_RESULT_TOPIC_KEY_SETTING" = azurerm_eventgrid_topic.step_result.primary_access_key
"EVENT_GRID_DATA_DELETION_TOPIC_URI_SETTING" = azurerm_eventgrid_topic.data_deletion.endpoint
"EVENT_GRID_DATA_DELETION_TOPIC_KEY_SETTING" = azurerm_eventgrid_topic.data_deletion.primary_access_key
"WEBSITES_ENABLE_APP_SERVICE_STORAGE" = false
"AIRLOCK_STATUS_CHANGED_QUEUE_NAME" = local.status_changed_queue_name
"AIRLOCK_SCAN_RESULT_QUEUE_NAME" = local.scan_result_queue_name
"AIRLOCK_DATA_DELETION_QUEUE_NAME" = local.data_deletion_queue_name
"ENABLE_MALWARE_SCANNING" = var.enable_malware_scanning
"ARM_ENVIRONMENT" = var.arm_environment
"MANAGED_IDENTITY_CLIENT_ID" = azurerm_user_assigned_identity.airlock_id.client_id
"TRE_ID" = var.tre_id
"WEBSITE_CONTENTOVERVNET" = 1
"STORAGE_ENDPOINT_SUFFIX" = module.terraform_azurerm_environment_configuration.storage_suffix
"SB_CONNECTION_STRING" = var.airlock_servicebus.default_primary_connection_string
"SB_CONNECTION_STRING__tenantId" = azurerm_user_assigned_identity.airlock_id.tenant_id
"SB_CONNECTION_STRING__clientId" = azurerm_user_assigned_identity.airlock_id.client_id
"SB_CONNECTION_STRING__credential" = "managedidentity"
"SB_CONNECTION_STRING__fullyQualifiedNamespace" = var.airlock_servicebus_fqdn
Comment on lines +72 to +76
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider doing this like I have in the EventGrid PR.

"BLOB_CREATED_TOPIC_NAME" = azurerm_servicebus_topic.blob_created.name
"TOPIC_SUBSCRIPTION_NAME" = azurerm_servicebus_subscription.airlock_processor.name
"EVENT_GRID_STEP_RESULT_TOPIC_URI_SETTING" = azurerm_eventgrid_topic.step_result.endpoint
"EVENT_GRID_STEP_RESULT_TOPIC_KEY_SETTING" = azurerm_eventgrid_topic.step_result.primary_access_key
"EVENT_GRID_DATA_DELETION_TOPIC_URI_SETTING" = azurerm_eventgrid_topic.data_deletion.endpoint
"EVENT_GRID_DATA_DELETION_TOPIC_KEY_SETTING" = azurerm_eventgrid_topic.data_deletion.primary_access_key
"WEBSITES_ENABLE_APP_SERVICE_STORAGE" = false
"AIRLOCK_STATUS_CHANGED_QUEUE_NAME" = local.status_changed_queue_name
"AIRLOCK_SCAN_RESULT_QUEUE_NAME" = local.scan_result_queue_name
"AIRLOCK_DATA_DELETION_QUEUE_NAME" = local.data_deletion_queue_name
"ENABLE_MALWARE_SCANNING" = var.enable_malware_scanning
"ARM_ENVIRONMENT" = var.arm_environment
"MANAGED_IDENTITY_CLIENT_ID" = azurerm_user_assigned_identity.airlock_id.client_id
"TRE_ID" = var.tre_id
"WEBSITE_CONTENTOVERVNET" = 1
"STORAGE_ENDPOINT_SUFFIX" = module.terraform_azurerm_environment_configuration.storage_suffix
}

site_config {
Expand Down
3 changes: 3 additions & 0 deletions core/terraform/airlock/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ variable "airlock_servicebus" {
default_primary_connection_string = string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried to add the endpoint property here and checking if it will get populated automatically?

})
}
variable "airlock_servicebus_fqdn" {
type = string
}
variable "tre_core_tags" {
type = map(string)
}
Expand Down
1 change: 1 addition & 0 deletions core/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ module "airlock_resources" {
airlock_app_service_plan_sku = var.core_app_service_plan_sku
airlock_processor_subnet_id = module.network.airlock_processor_subnet_id
airlock_servicebus = azurerm_servicebus_namespace.sb
airlock_servicebus_fqdn = azurerm_servicebus_namespace.sb.endpoint
applicationinsights_connection_string = module.azure_monitor.app_insights_connection_string
enable_malware_scanning = var.enable_airlock_malware_scanning
arm_environment = var.arm_environment
Expand Down
1 change: 1 addition & 0 deletions core/terraform/servicebus.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resource "azurerm_servicebus_namespace" "sb" {
sku = "Premium"
premium_messaging_partitions = "1"
capacity = "1"
local_auth_enabled = false
tags = local.tre_core_tags

# Block public access
Expand Down
Loading