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

Mapproxy rejects colon in s3 bucket name #876

Open
nitzanmorr opened this issue Jan 21, 2024 · 1 comment
Open

Mapproxy rejects colon in s3 bucket name #876

nitzanmorr opened this issue Jan 21, 2024 · 1 comment

Comments

@nitzanmorr
Copy link

nitzanmorr commented Jan 21, 2024

Context

I'm trying to connect mapproxy to an s3 compatible storage service and use a bucket that's owned by another user. When using this method: <bucket_owner_id>:<bucket_name> the service will not start the server because it won't accept a colon (:) in the bucket name (provided in the config file). Needless to say, my user has permission for this bucket using a bucket policy.

Expected Behavior

The mapproxy server should start and connect to the s3 cache provider as this method (providing <bucket_owner_id>:<bucket_name> as the bucket name) is a legit way to connect to external s3 buckets and works for me in other instances.

Actual Behavior

Mapproxy will not start properly and gives the following error: "Invalid bucket name : Bucket name must match the regex "^[a-zA-Z0-9.-_]{1,255}$" or be an ARN matching the regex..."

Possible Fix

Might need to adjust the boto validation on the bucket name to allow for a colon in the bucket name.

Steps to Reproduce

  1. Start a mapproxy server and provide a bucket name in the following form: <bucket_owner_id:bucket_name>
  2. Watch the logs and see that the server did not start and got the error

Context

Your Environment

  • Version used: 2.0.2
  • Environment name and version (e.g. Python 2.7.5 with mod_wsgi 4.5.9):
  • Server type and version:
  • Operating System and version: windows 11
@simonseyock
Copy link
Contributor

Thanks for reporting this issue @nitzanmorr

In theory I'd say this should work, but sadly do not have a license for s3 and cannot verify it. If you can provide a sensible fix for this issue, and test it, we are happy to assist you in creating a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants