-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[AppConfig] az appconfig kv delete/set/set-keyvault
: Add key validations for null or empty space key parameter
#26928
Conversation
️✔️AzureCLI-FullTest
|
Hi @albertofori, |
️✔️AzureCLI-BreakingChangeTest
|
AppConfig |
az appconfig kv delete/set/set-keyvault
: Add key validations for null or empty space keysaz appconfig kv delete/set/set-keyvault
: Add key validations for null or empty space key parameter
@@ -250,7 +251,7 @@ def load_arguments(self, _): | |||
c.argument('secret_identifier', validator=validate_secret_identifier, help="ID of the Key Vault object. Can be found using 'az keyvault {collection} show' command, where collection is key, secret or certificate. To set reference to the latest version of your secret, remove version information from secret identifier.") | |||
|
|||
with self.argument_context('appconfig kv delete') as c: | |||
c.argument('key', help='Support star sign as filters, for instance * means all key and abc* means keys with abc as prefix.') | |||
c.argument('key', validator=validate_non_empty_key, help='Support star sign as filters, for instance * means all key and abc* means keys with abc as prefix.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use validate_key
directly? The character restrictions apply for delete command too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. The reason for separating the two was that the delete parameter could also be a filter. But specifying any of the restricted characters without any wildcard should return nothing from the backend anyway since no kv could have been created with such a key. As you rightly pointed out, it is even rejected by the backend.
This has been updated, thanks!
az appconfig kv delete/set/set-keyvault
: Add key validations for null or empty space key parameteraz appconfig kv delete/set/set-keyvault
: Add key validations for null or empty space key parameter
…tions for null or empty space key parameter (Azure#26928)
Related command
az appconfig kv set
az appconfig kv set-keyvault
az appconfig kv delete
Description
Adds validations to ensure that key parameters and filters that are empty or whitespace are rejected for kv
set
,set-keyvault
anddelete
commands.Testing Guide
History Notes
[AppConfig]
az appconfig kv delete/set/set-keyvault
: Add key validations for null or empty space keysThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.