Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Secret name is not supporting special character

I have a requirement where I need to store my secret name as fname_lname. But when I tried with underscore I got following error. For time being to bypass the error I wrote a utility to convert from underscore to hyphen and vice versa.

Is there any reason why there is no support for basic special character like underscore?

az keyvault secret set --vault-name 'my-kv' -n 'fname_lname' -v 'myvalue' parameter 'secret_name' must conform to the following pattern: '^[0-9a-zA-Z-]+$'.

like image 984
lambodar Avatar asked Oct 19 '25 04:10

lambodar


1 Answers

It seems that we could not find any technical reason as to why the basic special characters are not supported. Also in the REST API Set Secret, it just mentioned the name should be like Regex pattern: ^[0-9a-zA-Z-]+$ without the reason, it should by designed.

There are also some user voices in the azure feedback: Secret Names do not support special characters, if you want to improve azure keyvault, you could vote it.

like image 187
Joy Wang Avatar answered Oct 21 '25 16:10

Joy Wang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!