Azure-sdk-for-python: [azure-mgmt-network] No security rule name validation

Created on 30 Aug 2018  路  3Comments  路  Source: Azure/azure-sdk-for-python

There is no security rule names validation when create via azure.mgmt.network.NetworkManagementClient.security_rules.create_or_update()

As a result, I was able to create rules with names similar to this one: c7n-policy-6.367126014858692e+17
I'm not able to edit these rules via Azure Portal. (Portal doesn't allow to use similar names).

Network Network - Virtual Network RestAPI Service Attention bug

All 3 comments

Hi @logachev
Seems to be me there is two bugs in one here:

  • The server itself should test and refuse names that are invalid. This way, you won't be in a situation where the portal cannot edit something you created with the SDK (which is really bad :()
  • The SDK could test with a regexp if the name is valid without even talking to Azure

@MikhailTryakhov your thought on this?

@chandrasekarsrinivasan please add validator on NRP layer?
@lmazuel that's good idea to implement such validator on SDK level

We do not to have any name validation on clients (Portal, SDK or PS). Let me follow up with Portal on what restrictions are added and why this is showing up on SecurityRules only (This can happen with any resource).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Korijn picture Korijn  路  3Comments

stawo picture stawo  路  3Comments

yunhaoling picture yunhaoling  路  3Comments

lumigogogo picture lumigogogo  路  3Comments

vnimbalkar picture vnimbalkar  路  4Comments