Azure Key Vault参数参考限制 [英] Azure Key Vault parameter reference limit

查看:79
本文介绍了Azure Key Vault参数参考限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Team,


当我从ARM模板参数文件中的全局密钥保管库中引用了30多个密钥时,我的部署中出现以下错误。


部署指定了太多KeyVault参数引用。 KeyVault参数引用的最大值为"30"。


请帮助我如何覆盖此限制或从Key Vault引用超过30个密钥/密钥的替代方法?


谢谢,


Narendra

解决方案

如果您正在进行原始api调用getsecret,那么这是一个限制,原因  秘密可能非常大(每个超过20k)。众所周知,对于大量
的小秘密而言,这不是最佳选择,但我们没有看到性能不佳的报告。请注意,C#和SDK允许这种非常强大的方式在处理当前页面时请求下一页:



var page = await kvClient.GetSecretsAsync(vaultAddress);


        while(page!= null)


        {


           任务<&的iPage LT; SecretItem>> nextPageTask = null;


            //如果有下一页,请立即询问。


            if(page.NextPageLink!= null)


                nextPageTask = kvClient.GetSecretsNextAsync(page.NextPageLink);


            //处理当前页面的项目。


            foreach(页面中的var项目)


                Console.WriteLine(item.Id);


            if(nextPageTask == null)


               休息;


            //等待下一页到达。


            page = await nextPageTask;


        }


Hello Team,

When I reference more than 30 keys from my global Key Vault in ARM template parameter file, then I get the following error in my deployments.

The deployment has specified too many KeyVault parameter references. The maximun of KeyVault parameter references is '30'.

Please help me how to override this limit or what is the alternative to reference more than 30 secrets/keys from Key Vault?

Thanks,

Narendra

解决方案

In case you are making a raw api call getsecret, then it is a limitation, reason that secrets can be very large (over 20k each). It is well-known that this is not optimal for a large number of small secrets, yet we don't see reports of bad performance. Note that C# and the SDK allows this very powerful way to request the next page while you process the current one:

var page = await kvClient.GetSecretsAsync( vaultAddress );

        while ( page != null )

        {

            Task<IPage<SecretItem>> nextPageTask = null;

            // If there is a next page, ask for it immediately.

            if ( page.NextPageLink != null )

                nextPageTask = kvClient.GetSecretsNextAsync( page.NextPageLink );

            // Process the items of current page.

            foreach ( var item in page )

                Console.WriteLine( item.Id );

            if ( nextPageTask == null )

                break;

            // Await for the next page to arrive.

            page = await nextPageTask;

        }


这篇关于Azure Key Vault参数参考限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆