Home > database >  How can I deny all the public access to my azure cache for redis?
How can I deny all the public access to my azure cache for redis?

Time:03-04

I want to deny all the public traffic from accessing my cache redis, I could not find any proper solution, any help will be appriciated.

CodePudding user response:

You can make use of Private Endpoint to do that. Instructions specific to securing an Azure Cache for Redis so that it is not accessible publicly can be found here: https://docs.microsoft.com/en-us/azure/azure-cache-for-redis/cache-private-link.

CodePudding user response:

As the question is about denying the public traffic, I would suggest you to do it via Azure built in policy.

Azure Cache for Redis should disable public network access denies the public endpoint access. Assign this at the appropriate level in your tenant.

Here is the snippet from above policy definition::

"policyRule": {
  "if": {
    "allOf": [
      {
        "field": "type",
        "equals": "Microsoft.Cache/Redis"
      },
      {
        "field": "Microsoft.Cache/Redis/publicNetworkAccess",
        "notEquals": "Disabled"
      }
    ]
  },
  "then": {
    "effect": "[parameters('effect')]"
  }
}
  • Related