秘密名称不支持特殊字符 [英] Secret name is not supporting special character
问题描述
我有一个要求,我需要将我的秘密名称存储为fname_lname.但是当我尝试使用下划线时,出现以下错误.为了暂时避免错误,我编写了一个实用程序,可将下划线转换为连字符,反之亦然.
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-]+$'.
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-]+$'.
推荐答案
似乎我们找不到关于不支持基本特殊字符的任何技术原因.同样在REST API 设置机密中,它只是提到的名字应该
像Regex pattern: ^[0-9a-zA-Z-]+$
一样没有理由,应该是故意设计的.
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.
这篇关于秘密名称不支持特殊字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!