S3 presigned URLs not working with Safari 15/iOS 15

0

We are migrating a project to PHP SDK V3 from V2. During the testing, we found the images using presigned URLs generated by PHP SDK V3 cannot successfully work with Safari 15/iOS 15. It is easy to test this problem by constructing a simple html file like this: <img src="presigned S3 URL">

Then open the html file in Safari, the image will not be successfully downloaded (403 error) unless you turn off the "Hide IP address" option in Safari 15's preference settings. In Safari 15/iOS 15, the "Hide IP address" is turned on by default, so it's not an option to ask end-users to turn it off. Nevertheless, if you generate the presigned S3 URL by PHP SDK v2, the presigned URLs will work well in Safari 15. We think the V4 signature algorithm used in PHP SDK v3 includes more header checking which failed in Safari 15. Please help us to solve this problem. Thanks a lot.

質問済み 2年前250ビュー
1回答
0
承認された回答

We found the problem. It is due to that Safari will use apple's machine to download the image file when the "Hide IP address" option is turned on. That machine's IP address is not in the allowed range of the IAM group user which generate the presigned url. Although we are still not sure why v2 signature used by PHP SDK v2 is OK on this situation.

回答済み 2年前
profile picture
エキスパート
レビュー済み 21日前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ