Azure 前门和自定义域

发布于 2025-01-14 12:37:00 字数 2034 浏览 4 评论 0 原文

我正在尝试使用 Azure Front Door Premium 配置自定义域,因为它是唯一允许我拥有自定义域的域。

主要问题是证书。我有自己的 SSL 证书。 Azure Front Door Premium 允许仅从 Azure Key Vault 选择 SSL 证书。因此,我创建了一个并添加了证书。美好的。当我尝试使用此屏幕添加新域时

在此处输入图像描述

我可以从列表中选择一个 Secret。要添加证书,现在我必须从 Azure Key Vault 在 Azure Front Door 中添加机密。因此,我打开Secret,选择证书并单击“添加”。

输入图片此处描述

不幸的是,我收到错误

无法创建秘密“azuksch-CelloSSL-latest”。错误:我们无权访问此机密。转到 Key Vault 帐户中的“访问策略”,授予 Microsoft.AzureFrontDoor-Cdn 获取机密的权限。

遵循 Microsoft 文档,我必须使用此命令将 Azure Front Door 添加到我的 Azure Active Directory,

az ad sp create --id ad0e1c7e-6d38-4ba4-9efd-0bc77ba9f037 --role Contributor

但该命令不起作用。我必须删除命令的最后一部分,因为 role 无法识别。

输入图片此处描述

因此,我运行了

az ad sp create --id ad0e1c7e-6d38-4ba4-9efd-0bc77ba9f037

,但当我尝试在 Azure Front Door 中添加机密时遇到了同样的问题。我用谷歌搜索了一下,发现我必须为 Azure Front Door Premium 运行另一个命令

az ad sp create --id 205478c0-bd83-4e1b-a9d6-db63a3e1e1c8

在此处输入图像描述

并选择所有三个下拉列表的所有选项。现在,我有很多访问策略

在此处输入图像描述

结果:我总是遇到相同的错误

无法创建秘密“azuksch-CelloSSL-latest”。错误:我们无权访问此机密。转到 Key Vault 帐户中的“访问策略”,授予 Microsoft.AzureFrontDoor-Cdn 获取机密的权限。

我可以修复它吗?

I'm trying to configure a custom domain with Azure Front Door Premium because it is the only one that allows me to have a custom domain.

The main issue is the certificate. I have my own SSL certificate. Azure Front Door Premium allows to select an SSL certificate only from an Azure Key Vault. So, I created one and I added the certificate. Fine. When I try to add the new domain with this screen

enter image description here

I can select a Secret from the list. To add a certificate, now I have to add a secret in Azure Front Door from Azure Key Vault. So, I open the Secret I select the certificate and click Add.

enter image description here

Unfortunately, I get an error

Failed to create the secret 'azuksch-CelloSSL-latest'. Error: We don't have permission to access this secret. Go to "Access policies" in your Key Vault account to give Microsoft.AzureFrontDoor-Cdn permission to get secrets.

Following the Microsoft documentation, I have to add the Azure Front Door to my Azure Active Directory with this command

az ad sp create --id ad0e1c7e-6d38-4ba4-9efd-0bc77ba9f037 --role Contributor

but the command doesn't work. I have to remove the last part of the command because role is not recognised.

enter image description here

So, I run

az ad sp create --id ad0e1c7e-6d38-4ba4-9efd-0bc77ba9f037

but I have the same issue when I try to add the secret in Azure Front Door. I googled a bit and I found that I have to run another command for Azure Front Door Premium

az ad sp create --id 205478c0-bd83-4e1b-a9d6-db63a3e1e1c8

enter image description here

and selected all the options for all three dropdown list. Now, I have a lot of Access policies

enter image description here

Result: I always get the same error

Failed to create the secret 'azuksch-CelloSSL-latest'. Error: We don't have permission to access this secret. Go to "Access policies" in your Key Vault account to give Microsoft.AzureFrontDoor-Cdn permission to get secrets.

Can I fix it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

瑕疵 2025-01-21 12:37:00

您最初使用 ID ad0e1c7e-6d38-4ba4-9efd-0bc77ba9f037 创建的服务主体适用于 Azure Front Door,而不是 < strong>Azure Front Door Premium。

因此,它不会授予Microsoft.AzureFrontDoor-Cdn 的权限。您所关注的文档也与Azure Front Door相关,而不是Azure Front Door Premium

微软文档

为 Azure Front Door 注册服务主体每个租户只能注册一次

因此,即使您使用此 id 205478c0-bd83-4e1b-a9d6-db63a3e1e1c8 再次创建服务主体,据我所知,它也无法工作。尝试删除您使用 ID ad0e1c7e-6d38-4ba4-9efd-0bc77ba9f037 创建的第一个服务主体

另外,请查看以下来自 Microsoft Doc

Azure Front Door 标准版/高级版(预览版) 目前处于公共预览版。此预览版本在没有服务级别协议的情况下提供,并且不建议用于生产工作负载。某些功能可能不受支持或者功能可能受到限制。

由于它仍处于预览阶段,因此某些功能将无法使用。因此,对于解决方法,您可以使用Azure Front Door。要了解如何使用Azure Front Door添加自定义域,请浏览此参考(如果有帮助)。

The service principal that you initially created using id ad0e1c7e-6d38-4ba4-9efd-0bc77ba9f037 is for Azure Front Door not for Azure Front Door Premium.

So, it won’t give permissions for Microsoft.AzureFrontDoor-Cdn. The documentation that you are following is also related to Azure Front Door not Azure Front Door Premium.

As mentioned in this Microsoft Doc:

Registering service principal for Azure Front Door can only done once per tenant.

So, even you created service principal again using this id 205478c0-bd83-4e1b-a9d6-db63a3e1e1c8 it won’t work as far as I understand. Try deleting the first service principal that you created using id ad0e1c7e-6d38-4ba4-9efd-0bc77ba9f037

Also, please check below note from Microsoft Doc:

Azure Front Door Standard/Premium (Preview) is currently in public preview. This preview version is provided without a service level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities. 

As it is still in preview, some features won’t work. So, for the workaround you can make use of Azure Front Door. To know how to add custom domain with Azure Front Door, go through this reference if it is helpful.

岛歌少女 2025-01-21 12:37:00

Azure Front Door 标准版/高级版不再提供公共预览版,但已升级为正式版。

我还可以确认您确实可以向租户注册经典和标准/高级服务主体,并授予他们访问 显示 Microsoft.Azure.FrontDoor 和 Microsoft.AzureFrontDoor-CDN 的访问策略

并且仍然让 Front Door Standard/Premium 将证书添加到 Secret 存储并将它们分配给域。

Azure Front Door Standard/Premium is no longer in Public Preview but has graduated to General Availability.

I can also confirm that you can indeed register both the Classic and Standard/Premium Service Principal with your tenant and grant them access to Access policies showing both Microsoft.Azure.FrontDoor and Microsoft.AzureFrontDoor-CDN

And still have Front Door Standard/Premium add certificates to the Secret store and assign them to domains.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文