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

Enforce network rules by default #47

Open
6 of 25 tasks
hknutsen opened this issue Jul 12, 2023 · 13 comments
Open
6 of 25 tasks

Enforce network rules by default #47

hknutsen opened this issue Jul 12, 2023 · 13 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@hknutsen hknutsen self-assigned this Jul 12, 2023
@hknutsen
Copy link
Member Author

Investigate if any other modules require similar updates.

@helenakallekleiv
Copy link
Contributor

In addition to Storage and Key Vault, a similar update to the Service Bus module may be required (based on policy).

@hknutsen hknutsen changed the title Enforce network rules Enforce network rules by default Sep 7, 2023
@hknutsen hknutsen removed their assignment Jan 9, 2024
@hknutsen hknutsen added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 2, 2024
@musifalsk
Copy link

musifalsk commented Aug 7, 2024

  • terraform-azurerm-postgres - public_network_access_enabled
variable "public_network_access_enabled" {
  description = "Should public network access be enabled for this PostgreSQL server?"
  type        = bool
  default     = true
}
  • terraform-azurerm-sql - firewall_rules
variable "firewall_rules" {
  description = "A map of firewall rules to be configured for this SQL server."

  type = map(object({
    name             = string
    start_ip_address = string
    end_ip_address   = string
  }))

  default = {
    "azure" = {
      name             = "AllowAllWindowsAzureIps"
      start_ip_address = "0.0.0.0"
      end_ip_address   = "0.0.0.0"
    }
  }
}
  • terraform-azurerm-automation - public_network_access_enabled
variable "public_network_access_enabled" {
  description = "Should public network access be enabled for this Automation account?"
  type        = bool
  default     = true
}
  • terraform-azurerm-acr - public_network_access_enabled
variable "public_network_access_enabled" {
  description = "Should public network access be enabled for this Container Registry?"
  type        = bool
  default     = true
}
  • terraform-azurerm-synapse - public_network_access_enabled
variable "public_network_access_enabled" {
  description = "Whether public network access is allowed for the workspace. Defaults to false"
  type        = bool

  default = true
}

variable "allowed_firewall_rules" {
  description = "List  of rules allowing certain ips through the firewall."
  type = list(object({
    name : string
    start_ip_address : string
    end_ip_address : string
  }))

  default = []
}

@musifalsk
Copy link

musifalsk commented Aug 7, 2024

  • terraform-azurerm-function-app - missing variable for ip_restriction. Should this be implemented as an option?

@musifalsk
Copy link

musifalsk commented Aug 7, 2024

  • terraform-azurerm-service-bus
    image
    This is the only configuration i could find for this, not sure if this relates to inbound or outbound access. I cannot find this setting or other restrictive network setting on the namespace in the azure portal.

NB! The Service Bus module is missing essential resources to become complete:

  • azurerm_servicebus_queue
  • azurerm_servicebus_namespace_authorization_rule
  • azurerm_servicebus_queue_authorization_rule

You need at least one of each of these resources together with th namespace resource to have an operational Service Bus

@musifalsk
Copy link

  • terraform-azurerm-grafana
    public_network_access_enabled is hardcoded in this module. Should this be changed to a variable with a default value of disabled?
public_network_access_enabled     = true

@musifalsk
Copy link

remains to clarify what to do and not

@hknutsen
Copy link
Member Author

Regarding public network access:

We usually leave it enabled, but deny all traffic by default. For example, look at the wording in the features section in the Key Vault module README:

Image

@helenakallekleiv
Copy link
Contributor

  • terraform-azurerm-service-bus
    image
    This is the only configuration i could find for this, not sure if this relates to inbound or outbound access. I cannot find this setting or other restrictive network setting on the namespace in the azure portal.

Could be useful: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/servicebus_namespace_network_rule_set

@helenakallekleiv
Copy link
Contributor

Moving back to "In progress". Se if we can create new subissues from this after some investigation.

@hknutsen
Copy link
Member Author

hknutsen commented Aug 23, 2024

@hknutsen
Copy link
Member Author

hknutsen commented Oct 2, 2024

Could add overview of all module repos in issue description to keep track of which modules we have checked and not.

Copy link
Contributor

There has been no activity on this issue for 60 days. stale label will be added. If no additional activity occurs, the issue will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants