question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Appservice]: access-restriction remove by ip address does not work since the ip address check

See original GitHub issue

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug Before this version it was possible to remove an access-restriction by ip address. After the version checking duplicates over ip address the remove by ip address is not working anymore. And I think the problem is related to that pull request : https://github.com/Azure/azure-cli/commit/2b78c06b2d32cd9461e1b1545e065c7430365674#diff-5091ef8c5edecc1ae2c3ffd1896ff7d2R195. Maybe @Kotasudhakarreddy can help on this

To Reproduce Repro Step:

> az functionapp config access-restriction add -g XXX -n XXX --ip-address 40.114.193.214/32 --priority 200 --rule-name "Azure 1"

> az functionapp config access-restriction remove -g XXX -n XXX --ip-address 40.114.193.214/32

Command group 'functionapp config access-restriction' is in preview. It may be changed/removed in a future release.

IP address 40.114.193.214/32 already exists.Cannot add duplicate IP address values.

The error message : “IP address 40.114.193.214/32 already exists.Cannot add duplicate IP address values” is not relevant in case of deletion. I have this problem since the last docker pull and I know that it was possible to have duplicate in previous version.

Expected behavior Same output when deleting by name :

> az functionapp config access-restriction remove -g XXX -n XXX --rule-name "Azure 1"
Command group 'functionapp config access-restriction' is in preview. It may be changed/removed in a future release.

[
  {
    "action": "Allow",
    "description": null,
    "ipAddress": "104.40.254.139/32",
    "name": "Azure 6",
    "priority": 200,
    "subnetMask": null,
    "subnetTrafficTag": null,
    "tag": "Default",
    "vnetSubnetResourceId": null,
    "vnetTrafficTag": null
  },
  {
    "action": "Deny",
    "description": "Deny all access",
    "ipAddress": "Any",
    "name": "Deny all",
    "priority": 2147483647,
    "subnetMask": null,
    "subnetTrafficTag": null,
    "tag": null,
    "vnetSubnetResourceId": null,
    "vnetTrafficTag": null
  }
]

Environment summary Env: docker linux container on windows :

REPOSITORY                                                   TAG                 IMAGE ID            CREATED             SIZE
mcr.microsoft.com/azure-cli                                  latest              55a65eee1172        5 days ago          681MB
 az version
{
  "azure-cli": "2.10.0",
  "azure-cli-command-modules-nspkg": "2.0.3",
  "azure-cli-core": "2.10.0",
  "azure-cli-nspkg": "3.0.4",
  "azure-cli-telemetry": "1.0.4",
  "extensions": {}
}```

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
Kotasudhakarreddycommented, Aug 6, 2020

able to repro the issue. sorry for inconvenience. Will give the fix in next release.

2reactions
Kotasudhakarreddycommented, Aug 6, 2020

Looking in to it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set up Azure App Service access restrictions - Microsoft Learn
When a request is made to your app, the FROM address is evaluated against the rules in your access restriction list. If the...
Read more >
Advanced access restriction scenarios in Azure App Service
Access restriction advanced scenarios: Filter by http header; Multi-source rules; Block a single IP address; Restrict access to the SCM site.
Read more >
Azure AppService IP address restrictions - Stack Overflow
I have configured the Single IP Address to my Azure app service which works successfully fine: enter image description here.
Read more >
Azure DevOps – Access Restriction of Azure App Service ...
That's it. We have added an Allow rule for a Single IP Address to access the Azure App Service. Users from other IP...
Read more >
How To Automatically Protect Azure App Services - Dev Genius
This is a function from the Azure Az PowerShell module. ... The IP address is the address that can access the App Service....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found