aws-sdk-ios icon indicating copy to clipboard operation
aws-sdk-ios copied to clipboard

AWSS3PresignedURL does not support path style addresses

Open garygriswold opened this issue 7 years ago • 4 comments

To help us solve your problem better, please answer the following list of questions.

  • What service are you using? S3

  • In what version of SDK are you facing the problem? iOS 2.5.7

  • Is the issue limited to Simulators / Actual Devices? It is a limitation in this SDK compared to other AWS SDK's

  • Can your problem be resolved if you bump to a higher version of SDK? No

  • Is this problem related to specific iOS version? No

  • How are you consuming the SDK? CocoaPods / Carthage / Prebuilt frameworks? Prebuilt Frameworks

  • Can you give us steps to reproduce with a minimal, complete, and verifiable example? Please include any specific network conditions that might be required to reproduce the problem. When performing any data transfer operation, this SDK always produces a virtual style URL, unless the bucket name is invalid for use on a URL. This is compared to many other AWS SDK's that include a configuration option such as s3ForcePathStyle = bool

I have been able to fix this problem for my current use by creating private copies of AWSS3PreSignedURL and AWSS3TransferUtility, and modifying the first to always generate a path style URL.

From looking at stackoverflow there appear to be a number of Amazon SDK's that do not support this feature. My purpose in writing this is to emphasize the importance of this feature for some applications.

KEY THOUGHT: Path style URLs are a security feature, because the path becomes an entry in the header and is fully encrypted by SSL/TLS. While a virtual style URL is sent out to DNS unencrypted. I will use the example of an encrypted letter as a simile. 1. Sending a message to a personal domain is like sending a letter to a public address. 2. Sending a message to a virtual address is like sending a letter to a PO box. It is somewhat hidden, but with a little investigation the identity of the recipient is revealed. 3. Sending a message with a path address is like sending a letter to a general mail drop, which will distribute the letter, leaving no public way to identify the recipient.

garygriswold avatar May 29 '17 04:05 garygriswold

Hello @garygriswold Thanks for mentioning this. I will take this as a feature request to the team.

Thanks, Rohan

rohandubal avatar May 31 '17 17:05 rohandubal

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 11 '18 01:04 stale[bot]

Thanks for taking care of this problem.

garygriswold avatar Apr 11 '18 02:04 garygriswold

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 11 '18 02:05 stale[bot]

@garygriswold Sorry we have not responded to this issue in a while. I've looked through our Objective-C and Swift SDKs for any mentions of s3ForcePathStyle and there is not any. I see it is supported in our JavaScript SDK.

Please let us know if you want this to be a feature request and we can make a feature request with the Swift SDK.

brennanMKE avatar Sep 23 '22 23:09 brennanMKE

Actually, I was just given this issue which is the feature which supports this option for the Swift SDK.

https://github.com/awslabs/aws-sdk-swift/pull/607

brennanMKE avatar Sep 23 '22 23:09 brennanMKE

Brennan,

Wonderful. I am currently using my own hack of this function, and it getting quite old.

Gary

Sent from my iPhone

On Sep 23, 2022, at 7:24 PM, Brennan Stehling @.***> wrote:

 Actually, I was just given this issue which is the feature which supports this option for the Swift SDK.

awslabs/aws-sdk-swift#607

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

garygriswold avatar Oct 11 '22 07:10 garygriswold

Closing as this is addressed in https://github.com/awslabs/aws-sdk-swift/pull/607

phantumcode avatar Dec 01 '22 21:12 phantumcode