Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

What is the minimal IAM policy for this plugin? #7

Open
iainelder opened this issue Jul 18, 2018 · 2 comments
Open

What is the minimal IAM policy for this plugin? #7

iainelder opened this issue Jul 18, 2018 · 2 comments
Labels
question Further information is requested

Comments

@iainelder
Copy link

iainelder commented Jul 18, 2018

I am using the verdaccio-s3-storage plugin on an EC2 instance to persist verdaccio's application data to an S3 bucket.

Through trial and error, and finally reading the source code, I have an IAM policy that the plugin appears to work with. See the YAML CloudFormation fragment below for a precise definition.

A summary of my findings:

  • The getObject, putObject, headObject, and deleteObject SDK methods require their direct cognate actions GetObject, PutObject, HeadObject, and DeleteObject on all keys.
  • The listObjectsV2 SDK method requires the ListBucket action on the bucket.
  • The put SDK method requires the ListMultipartUploadParts and AbortMultipartUpload actions on all keys, and the ListBucketMultipartUploads action on the bucket.

Have I missed something?

Could you document the correct answer somewhere?

      Policies:
        - PolicyName: verdaccio-storage
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
              - Effect: Allow
                Action:
                  - s3:GetObject
                  - s3:PutObject
                  - s3:DeleteObject
                  - s3:HeadObject
                  - s3:ListMultipartUploadParts
                  - s3:AbortMultipartUpload
                Resource:
                  - !Sub "arn:aws:s3:::${VerdaccioStorageBucket}/*"
              - Effect: Allow
                Action:
                  - s3:ListBucketMultipartUploads
                  - s3:ListBucket
                Resource:
                  - !Sub "arn:aws:s3:::${VerdaccioStorageBucket}"
@mattemoore
Copy link

This HAS HAS HAS to get into the proper documentation. Without this posting we never would have gotten this plugin to work.

@apexskier apexskier added the question Further information is requested label Feb 9, 2019
@TrejGun
Copy link

TrejGun commented Jun 20, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants