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

Feature Request: Avoid calling GetBucketLocation API if not required #637

Open
harai opened this issue Dec 8, 2023 · 0 comments
Open

Feature Request: Avoid calling GetBucketLocation API if not required #637

harai opened this issue Dec 8, 2023 · 0 comments

Comments

@harai
Copy link

harai commented Dec 8, 2023

Is your feature request related to a problem? Please describe.

I'm using this plugin on AWS. On Storage Settings page, GetBucketLocation API is always called and results in AccessDenied error.

AccessDenied error

Since I know the region the S3 bucket is located in, I'm manually specifying it like this:

define( 'AS3CF_SETTINGS', serialize( array(
	'provider' => 'aws',
	'use-server-roles' => true,
	'bucket' => 'my-bucket',
	'region' => 'ap-northeast-1',
) ) );

I don't allow the plugin to call GetBucketLocation API.

Describe the solution you'd like
The API call should be omitted if the region is manually specified.

Describe alternatives you've considered
Allowing the plugin to call GetBucketLocation might be an alternative solution, but it is against the principle of least privilege. On some managed WordPress environment, it's almost impossible to add such an extra permission just to make this plugin work without error.

Additional context
None.

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

No branches or pull requests

1 participant