我正在生成以下缓存策略:
{
'principalId': 'test_user_user_ea8a2822-0b00-4a9c-ad79-27af44700801@123.com',
'policyDocument': {
'Version': '2012-10-17',
'Statement': [{
'Action': 'execute-api:*',
'Effect': 'Deny',
'Resource': 'arn:aws:execute-api:us-east-1:12345:hahd712723/active/GET/v1/AccountA'
}]
}
}然后我向arn:aws:execute-api:us-east-1:12345:hahd712723/active/GET/v1/AccountB'提出一个请求
其中应产生:
{
'principalId': 'test_user_user_ea8a2822-0b00-4a9c-ad79-27af44700801@123.com',
'policyDocument': {
'Version': '2012-10-17',
'Statement': [{
'Action': 'execute-api:*',
'Effect': 'Allow',
'Resource': 'arn:aws:execute-api:us-east-1:12345:hahd712723/active/GET/v1/AccountB'
}]
}
}但是,我没有使用新的缓存集,而是错误地获得了拒绝策略。
似乎是唯一查看的主体Id,而且资源不受尊重。
发布于 2019-05-01 23:54:03
该策略是基于您选择的/API键的头来缓存的,而不是基于标题和资源。应该为所有资源构建策略,而不仅仅是所请求的资源。
https://stackoverflow.com/questions/55942056
复制相似问题