CloudFront自定义策略的多个策略声明(签名Cookie)

atp*_*atp 17 amazon-web-services amazon-cloudfront

在为签名cookie(非签名URL)使用CloudFront自定义策略时,是否可以创建具有多个语句的策略?

我已经阅读了文档,尽管所有示例都只有一个语句,但我看不到关于允许的语句数量的明确规则.

如果不可能有多个策略语句,则很难仅使用CloudFront安全性为特定用户提供签名cookie访问,即五个随机文件.任何有关如何做到这一点的提示将不胜感激.

这个问题在这里交叉发布:https://forums.aws.amazon.com/thread.jspa?threadID = 223440&tstart = 0

iti*_*skj 5

供参考

我遇到了同样的问题,并联系了 AWS 官方支持团队。

 Hello, thanks for offering us a great service. 
I am an software engineer from Japan. 

Can we have multiple custom policies, like below syntax? 

{ 
  "Statement": [ 
    { ... }, 
    { ... }, 
    { ... }, 
  ] 
} 

I have searched on the web, and found ones who are trying to 
do the same thing and forums/Q&A as well. 

However we found no answer from AWS official support teams 
nor documents saying about that. 

JSON syntax is array, so it seems to work with 
multiple statements but do not work. 

So, if it does not work, would you add a sentence 
about that on the official document?
Run Code Online (Sandbox Code Playgroud)

然后,我昨天得到了答案:

I just heard back this morning. 

You're correct, adding more than one statement 
to a custom policy is not supported. 

I'm updating the documentation now.
Run Code Online (Sandbox Code Playgroud)

因此,我认为几天后文档将更新,您无法为预签名 Cookie 的 CF 自定义策略设置多个策略声明。

  • 感谢您的明确答复! (2认同)