我已在AWS EC2服务器中安装了Hashicorp Vault,并尝试使用AWS Lambda函数和“AWS身份验证”访问存储在Vault中的密钥。但是我得到了以下错误
{u'errors': [u'error performing token check: failed to look up namespace from the token: no namespace']}
我基本上做了以下几点
已在EC2服务器中安装Hashicorp Vault,已启用AWS身份验证
制定政策和政策;使用AWS角色在Vault中创建角色
创建了一个基于Python的AWS Lambda函数,该函数生成已签名的AWS STS请求
使用已签名的请求,成功登录到vault服务器。答复如下
{
u'lease_id': u'',
u'warnings': [
u'TTL of "768h" exceeded the effective max_ttl of "500h"; TTL value is capped accordingly'
],
u'wrap_info': None,
u'auth': {
u'token_policies': [
u'default',
u'examplepolicy'
],
u'orphan': True,
u'entity_id': u'xxxxxxxxxxxxxx',
u'token_type': u'service',
u'lease_duration': 1800000,
u'policies': [
u'default',
u'examplepolicy'
],
u'client_token': u'xxxxxxxxxxxxxx',
u'accessor': u'xxxxxxxxxxxxxx',
u'renewable': True,
u'metadata': {
u'auth_type': u'iam',
u'account_id': u'xxxxxxxxxxxxxx',
u'role_id': u'xxxxxxxxxxxxxx'
}
},
u'lease_duration': 0,
u'request_id': u'xxxxxxxxxxxxxx',
u'data': None,
u'renewable': False
}
现在使用上面的客户机令牌,尝试获取一个密钥,如下所示
secretKey=requests.get(url1,headers={“X-Vault-Token”:clienttoken})
执行上述行后,我立即出现以下错误
{u'errors':[u'error执行令牌检查:无法从令牌中查找名称空间:没有名称空间']}
目前没有回答
相关问题 更多 >
编程相关推荐