-
-
Notifications
You must be signed in to change notification settings - Fork 839
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
Initial Implementation #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pin https://github.com/cloudposse/terraform-aws-iam-s3-user
to the latest release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
@maximmi fix CI |
…le enable flag, output improved, example added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments. Rebuild readme.
In the trello ticket for this @igor has stipulated the policy must provide the following permissions: ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetBucketLocation", "s3:ListBucketMultipartUploads" ], "Resource": "arn:aws:s3:::S3_BUCKET_NAME" }, { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:ListMultipartUploadParts", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::S3_BUCKET_NAME/*" } ] } ``` Without passing in the bare bucket in `s3_resources` we will only end up with: ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetBucketLocation", "s3:ListBucketMultipartUploads" "s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:ListMultipartUploadParts", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::S3_BUCKET_NAME/*" } ] } ``` Which means the user will be unable to list the contents of the bucket. See [1]. Given the change in this commit the policy will end up being something like: ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetBucketLocation", "s3:ListBucketMultipartUploads" "s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:ListMultipartUploadParts", "s3:AbortMultipartUpload" ], "Resource": [ "arn:aws:s3:::S3_BUCKET_NAME" "arn:aws:s3:::S3_BUCKET_NAME/*" ] } ] } ``` Due to the current limitations of the underlying `terraform-aws-iam-s3-user` module this means we may be giving more permissions than we wanted to the entire bucket for said user and this should not be used for shared buckets namespaced by a key prefix. [1] https://github.com/cloudposse/terraform-aws-iam-s3-user/blob/master/main.tf#L1-L9
@maximmi @joshmyers |
@aknysh I have added |
e25e2d0
to
eac2345
Compare
what
why
notes
user_enabled = true
, the module provisions a basic IAM user with permissions to access the bucketenabled