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

Allow to upload images in development #52

Merged
merged 1 commit into from
Feb 29, 2020
Merged

Allow to upload images in development #52

merged 1 commit into from
Feb 29, 2020

Conversation

nashbridges
Copy link
Contributor

@nashbridges nashbridges commented Feb 29, 2020

This is part 2 for the migration.

It allows a developer to upload her/his own covers to s3. This way we don't have to have a special image processing proxy in development and can benefit from the same production proxy (currently imagekit.io).

IAM user is specified as write-only and is scoped to /dev folder, so that an attacker can't use them to overwrite/delete production images:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:DeleteObject",
                "s3:GetBucketLocation"
            ],
            "Resource": [
                "arn:aws:s3:::ua-books",
                "arn:aws:s3:::ua-books/dev/*"
            ]
        }
    ]
}

See markevans/dragonfly-s3_data_store#30 (comment) on why s3:GetBucketLocation is needed.

@nashbridges nashbridges merged commit 80045b7 into master Feb 29, 2020
@nashbridges nashbridges deleted the dev-dragonfly branch February 29, 2020 08:48
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

Successfully merging this pull request may close these issues.

None yet

1 participant