S3 Error executing ListBuckets

Open
#92 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
aws, php
Domain
cloud

Research direction

Start by reproducing the S3 job from the S3 job tab with the scoped IAM policy shown in the report, then trace the code path that issues the ListBuckets request. Done means backups work for a restricted bucket path without requiring overly broad permissions; the issue names no files or tests to run.

Written by the indexing model from the issue text.

Description

I use BackWPup on a number of sites with their own IAM user with credentials giving access to a particular bucket path. This has worked for a long time, but seems broken in 3.6.10

This is happening on all my sites.

On the S3 job tab I get this error:
Error executing "ListBuckets" on "https://s3.ap-southeast-2.amazonaws.com/"; AWS HTTP error: Client error: 'GET https://s3.ap-southeast-2.amazonaws.com/' resulted in a '403 Forbidden' response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>ACD02C (truncated...) AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message></Error>

The IAM user policy looks like this:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt1441240868000",
            "Effect": "Allow",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::[MY_BUCKET]",
                "arn:aws:s3:::[MY_BUCKET]/my/backup/path*"
            ]
        }
    ]
}

I don't want to use overly broad permissions.
Thanks

BackWPUp 3.6.10
WordPress 5.2.2
PHP 7.2

Dominant language
PHP
Stars
95
Forks
46
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wp-media/backwpup

All issues in wp-media/backwpup

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.