简体   繁体   English

从 DevOps Pipeline 读取 Keyvault 机密

[英]Read Keyvault secrets from DevOps Pipeline

Trying to read Key Vault from DevOps pipeline.尝试从 DevOps 管道读取 Key Vault。 After granting Service Connection access to Key Vault, still getting below error while reading Key Vault secrets from DevOps授予对 Key Vault 的服务连接访问权限后,从 DevOps 读取 Key Vault 机密时仍然出现以下错误

Downloading secrets using: https://xx-xx-xx-kv-sit.vault.azure.net/secrets?maxresults=25&api-version=2016-10-01. 
##[error] Get secrets failed. 
Error: Client address is not authorized and caller is not a trusted service. 
Client address: xx.xx.x1.1xx

在此处输入图像描述

KeyVault firewalls setup is to allow traffic through selected networks, which is VNET xx-xx-vnet-01-np KeyVault 防火墙设置是允许流量通过选定的网络,即 VNET xx-xx-vnet-01-np

If I changed to All Networks it works fine.如果我更改为所有网络,它工作正常。

If I need to DevOps to go through above VNET where to configure?如果我需要通过上面的 VNET 对 go 进行 DevOps 到哪里配置?

If you're using a private agent, you'll need to add the subnet containing your private agent to the list of allowed subnets.如果您使用的是私有代理,则需要将包含您的私有代理的子网添加到允许的子网列表中。

If you're using a Microsoft-hosted agent, the best you can do is capture the agent's IP (using something like https://www.ipify.org/ ) and temporarily add it to the keyvault's IP address whitelist.如果您使用的是 Microsoft 托管的代理,您可以做的最好的事情是捕获代理的 IP(使用https://www.ipify.org/之类的东西)并将其临时添加到密钥库的地址 ZA121A6BA52E84CEDB26。 It's a pain.这是一种痛苦。

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

相关问题 无法从 Azure DevOps Build Pipeline 中的 Azure PowerShell 任务以纯文本形式读取 Key Vault 机密 - Cant read Key Vault secrets as plain text from Azure PowerShell task in Azure DevOps Build Pipeline 使 Azure Keyvault 机密在整个管道中可用 - Make Azure Keyvault secrets available in entire pipeline Azure DevOps CI 管道,用于 Function 与 KeyVault 集成 - Azure DevOps CI Pipeline for Function with KeyVault integration Azure DevOps:在 Bash 脚本中设置 Azure Keyvault Secrets - Azure DevOps: se Azure Keyvault Secrets in Bash Script 在任务中传递 Azure DevOps 管道机密 - Passing Azure DevOps pipeline secrets in tasks 使用 vnet 和防火墙保护时,Azure DevOps Build Pipeline 无法从 Key Vault 获取机密 - Azure DevOps Build Pipeline can't get secrets from Key Vault when secured with vnet and firewall 每当有 azure 密钥库秘密更改时,如何触发 Azure devops 管道? - How to trigger a Azure devops pipeline whenever there is azure keyvault secret change? 将 keyvault 变量传递给模板 azure devops 管道 - Pass keyvault variable to stage template azure devops pipeline Azure Devops 发布管道 - 密钥中包含特殊字符的密钥库 - Azure Devops Release Pipeline - Keyvault with special characters in the secret 从 Devopos 管道读取 KeyVault - YAML - Reading KeyVault from Devopos Pipeline - YAML
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM