简体   繁体   English

如何使用基于证书的服务主体对 azure 容器注册表进行身份验证

[英]How to authenticate with azure container registry using cert-based service principal

I'm following the below tutorial to push docker image to my ACR.我正在按照以下教程将 docker 图像推送到我的 ACR。 I'm authenticating using AAD service principal.我正在使用 AAD 服务主体进行身份验证。 The article mentions the steps to authenticate when the AAD service principal has a password, mine has a certificate not a password.文章提到了当 AAD 服务主体有密码时进行身份验证的步骤,我的有证书而不是密码。

article: https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-service-principal#feedback文章: https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-service-principal#feedback

I tried converting the cert pfx to bytes then base64 encode it and pass it as password to docker login command but that didn't work, I got authentication error.我尝试将 cert pfx 转换为字节,然后 base64 对其进行编码并将其作为密码传递给 docker 登录命令,但这不起作用,我遇到了身份验证错误。

I found the answer here: https://github.com/Azure/acr/blob/master/docs/AAD-OAuth.md The steps involve using the AAD token to get an access token from ACR, then use that one to pull/push using docker CLI我在这里找到了答案: https://github.com/Azure/acr/blob/master/docs/AAD-OAuth.md这些步骤涉及使用 AAD 令牌从 ACR 获取访问令牌,然后使用该令牌拉/push 使用 docker CLI

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用服务主体和 Python SDK 对 Azure 进行身份验证? - How do I authenticate to Azure using a Service Principal and the Python SDK? Azure 容器实例:在 ARM 模板中使用基于客户端证书的服务主体向私有 ACR 进行身份验证 - Azure Container Instances: authenticate to private ACR with client certificate based service principal in ARM template 如何使用应用程序 ID(服务主体)的令牌向 Azure Devops 进行身份验证? - How to authenticate to Azure Devops by using token of an Application ID(service principal)? Azure 服务主体从容器注册表中拉取映像 - Azure Service Principal pull images from Container Registry 从Azure Kubernetes Service使用Azure容器注册表进行身份验证时发出的问题 - Issue of while Authenticate with Azure Container Registry from Azure Kubernetes Service How do I authenticate using a managed identity from gitlab-ci to push a docker container from gitlab registry to Azure web service? - How do I authenticate using a managed identity from gitlab-ci to push a docker container from gitlab registry to Azure web service? 我可以使用服务主体使用基于角色的访问控制来对不在Azure中托管的应用程序进行身份验证吗? - Can I use Service Principal to authenticate an application that is not hosted in Azure using role-based access control? 使用服务主体对 Azure 函数应用进行身份验证的正确方法是什么? - What is the correct way to authenticate an Azure function app using a service principal? 在 Azure 中存储服务主体凭据以使用 Python 对 Key Vault 进行身份验证 - Storing Service Principal Credentials in Azure to Authenticate Key Vault using Python 是否可以通过Java Azure SDK使用服务主体向CosmosDB进行身份验证? - Is it possible to authenticate to CosmosDB using a service principal with the Java Azure SDK?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM