TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

What You See Is Not What You Get: Weird Behaviors in S3 Bucket Policies

2 点作者 elfakyn超过 4 年前

1 comment

elfakyn超过 4 年前
I wrote this up since, over the past year, I&#x27;ve encountered more and more weird behavior with s3 bucket policies.<p>I haven&#x27;t seen all of this behavior documented in a single place, so here it is.<p>Some of it has security implications (such as being able to brute force usernames) that is worth knowing about.<p>A TL;DR of the security stuff:<p>* Brute-forcing valid principal names is possible, since you can&#x27;t create a bucket policy with an invalid principal.<p>* User compromise will break cross-account access, since if AWS becomes aware of a compromise, they will want you to delete the user and recreate it.<p>* Explicit denies will stop working if the principal is deleted and recreated, since they operate internally on the Principal ID and not the ARN<p>* Canonical IDs offer no extra security compared to account ARNs, since it&#x27;s trivial to convert them back and get an account number.