Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWSSDK.S3 3.7.307.4 escapes colon in bucket name in GetPreSignedURL #3239

Closed
desdoades opened this issue Mar 28, 2024 · 7 comments
Closed

AWSSDK.S3 3.7.307.4 escapes colon in bucket name in GetPreSignedURL #3239

desdoades opened this issue Mar 28, 2024 · 7 comments
Labels
bug This issue is a bug. s3

Comments

@desdoades
Copy link

desdoades commented Mar 28, 2024

Describe the bug

We use ceph S3 where bucket names are not a subdomain but after the domain, e.g. https://example.com/11213ef55:mybucket/path/to/file.jpg.
When using AWSSDK.S3 3.7.307.4 it percent-encodes a colon in the bucket name (which is a valid character in an URL path) when calling GetPreSignedURL(request).
This breaks the upload to our S3 file host since it can not match to the correct bucket.

Can this be fixed on your end or would you say thats a problem of the ceph S3?

Expected Behavior

We are currently on AWSSDK 3.7.103.13 where it does not percent-encode a colon in the bucket name.
In this version the file upload to S3 works.

Current Behavior

Because of the colon percent-encode the s3 ceph file server returns a

Forbidden AccessDenied...
when trying to upload a file to the pre signed URL.

Reproduction Steps

That should not be neccessary

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

AWSSDK.S3 3.7.307.4

Targeted .NET Platform

.NET 8

Operating System and version

Windows 10

@desdoades desdoades added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 28, 2024
@desdoades desdoades changed the title AWSSDK.S3 3.7.307.4 escapes colon in URL path AWSSDK.S3 3.7.307.4 escapes colon in bucket name Mar 28, 2024
@desdoades desdoades changed the title AWSSDK.S3 3.7.307.4 escapes colon in bucket name AWSSDK.S3 3.7.307.4 escapes colon in bucket name in GetPreSignedURL Mar 28, 2024
@ashishdhingra ashishdhingra added s3 needs-investigation and removed needs-triage This issue or PR still needs to be triaged. labels Mar 29, 2024
@ashishdhingra
Copy link
Contributor

ashishdhingra commented Mar 29, 2024

@desdoades Good morning. Thanks for reporting the issue. Could you please share if you are using AWS S3 service or simulated service that mimics S3?

Thanks,
Ashish

EDIT: Looks like you are using CEPH S3 service.

@ashishdhingra ashishdhingra added needs-reproduction This issue needs reproduction. and removed needs-investigation labels Mar 29, 2024
@ashishdhingra
Copy link
Contributor

Need reproduction with actual AWS S3 service.

@ashishdhingra
Copy link
Contributor

@desdoades Good afternoon. Please confirm if your bucket is named 11213ef55:mybucket. AWS S3 console doesn't allow : (colon) character in bucket name. I'm unsure how CEPH S3 service is allowing it. So it appears be an issue with CEPH S3 side, not SDK side since : is not a valid character in bucket name.

Thanks,
Ashish

@ashishdhingra ashishdhingra added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-reproduction This issue needs reproduction. labels Mar 29, 2024
@desdoades
Copy link
Author

Dear @ashishdhingra,

we are not using AWS S3 but netways S3 which uses ceph. As I said it does not have the bucketname in the subdomain but in the path.
Our actual bucket is not named 11213ef55:mybucket but very similar, so it does contain a colon.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Apr 3, 2024
@ashishdhingra
Copy link
Contributor

Dear @ashishdhingra,

we are not using AWS S3 but netways S3 which uses ceph. As I said it does not have the bucketname in the subdomain but in the path. Our actual bucket is not named 11213ef55:mybucket but very similar, so it does contain a colon.

@desdoades Thanks for the reply. As mentioned in my previous comment, colon : character is not supported in AWS bucket names. The colon : is a reserved character in a URL and it has a special meaning in identifying the protocol used in the URL (http:, https:, ftp: etc.). However, you can still add a colon in other parts of a URL by using URL encoding. URL encoding is a process of converting reserved characters into their corresponding hexadecimal code so that they can be safely transmitted over the internet.

Please contact Ceph S3 support to handle this character at their end (this may be as simple as decoding the URL before processing various segments).

Thanks,
Ashish

@ashishdhingra ashishdhingra added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Apr 5, 2024
@desdoades
Copy link
Author

Dear @ashishdhingra,

While AWS might not support them many site allow colons in the URL.
Still thank you, I understand you wont do anything about it. I will try to reach our ceph S3 support.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Apr 6, 2024
@ashishdhingra ashishdhingra closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
Copy link

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. s3
Projects
None yet
Development

No branches or pull requests

2 participants