Skip to content

An attacker can flood the storage by direct uploading files #13

@choonkeat

Description

@choonkeat

Though attache presign uploads offers the same protection as S3 direct upload

The pre-signed URLs are valid only for the specified duration.

Within that duration, an attacker can still upload as many files.

To mitigate that, we can adopt the refile and shrine procedure of always uploading to cache then promote to store only when the client app sends a confirmation ping

Current proposal is for /promote to mimic the /delete endpoint

  • require a pre-signed HTTP POST (but valid duration must be pretty short, like < 30s)
  • params include a list of filenames to confirm (batch operation)
  • image server perform promotion async, responds to client app immediately

@janko-m if async promotion fails in the background, what does a shrine user do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions