-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Option to specify a custom JSON policy file #14
Comments
I'm tempted to support three variants of this here:
It's a little weird to have an option which can tell the difference between a file name and a literal string of JSON, but it's not hard to implement - check if the passed string starts with a |
I can use |
Tested my work in progress like this:
Where {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ListObjectsInBucketIsMyCustomSid",
"Effect": "Allow",
"Action": ["s3:ListBucket"],
"Resource": ["arn:aws:s3:::$!BUCKET_NAME!$"]
},
{
"Sid": "AllObjectActions",
"Effect": "Allow",
"Action": "s3:*Object",
"Resource": ["arn:aws:s3:::$!BUCKET_NAME!$/*"]
}
]
} |
Here's what happens if you feed it valid JSON that does not form a valid policy document:
I'm not going to bother catching that, I think the erro message is clear enough as it stands. |
Realized I missed something here: the username and policy name generated still has |
Based on #11 I'm now thinking that there is value in applying custom policies - since that way people can tweak the policies used and share them with others.
Maybe a
--policy policy.json
option would be useful?One challenge: the need to hard-code the name of the bucket into that policy. So perhaps it supports the absolute dumbest template system ever, like literally replacing
$!BUCKET_NAME!$
in the JSON with the name of the bucket.The text was updated successfully, but these errors were encountered: