mirror of
https://github.com/cloudpanel-io/cloudpanel-ce.git
synced 2026-04-05 20:31:58 +02:00
Amazon S3 Backup Permissions Bug #94
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dkramer47 on 5/5/2025
CloudPanel version(s) affected
2.5.1
Description
I created an AWS IAM user with the following permissions for bucket
example.bucket:After doing that, I got the Access Key and Secret Key, and filled out the S3 backup form, which resulted in this error, even though all information was correct and the user had access to the bucket:
To fix it, I had to update the user policy to ALL S3 resources, then the CloudPanel form saved fine. After that I once more updated the user policy to only include the
example.bucketand objects arn, and the backup ran just fine.How to reproduce
Generate an Access/Secret Key for that user.
Fill out the CloudPanel Amazon S3 backup form using that bucket and newly created user access key and click "Save".
You should get an access error, even if all of the information is correct.
Go back to Amazon (without clearing the CloudPanel form).
Update the policy, but remove the bucket specification and set it to all resources.
Resubmit the CloudPanel form. It should save fine.
Go back to Amazon once more, reset the policy to the original bucket-specific one.
Run a CloudPanel backup. It should work as expected.
Possible Solution
It looks almost as if CloudPanel is trying to list the buckets for that user and see if the provided bucket is in that list. But from what I can tell, when a user doesn't have access to all buckets, you can't list any of them, even the ones that they have access to.
If I am correct, maybe update the logic to instead try to run a write/read on the specific bucket to know if access is there?
Additional Context
No response