policyuniverse
policyuniverse copied to clipboard
CLI for expansion
It would be nice if there was a small CLI tool available when you installed that would allow you to quickly expand wildcards without having to hop into a python shell. Imagining something like:
policyuniverse expand --action 'swf:res*'
"Action": [
"swf:respondactivitytaskcanceled",
"swf:respondactivitytaskcompleted",
"swf:respondactivitytaskfailed",
"swf:responddecisiontaskcompleted"
]
Alternatively if you wanted to output the full policy:
policyuniverse expand --action 'swf:res*' --resource '*' --effect 'Allow'
{
"Statement": [{
"Action": [
"swf:respondactivitytaskcanceled",
"swf:respondactivitytaskcompleted",
"swf:respondactivitytaskfailed",
"swf:responddecisiontaskcompleted"
],
"Resource": "*",
"Effect": "Allow"
}]
}
I was hoping the same, but for minification ;)
@TryTryAgain Same. I'd like given a policy, make it smaller
@mwarkentin - Cloudsplaining does have an expand-policy
subcommand. It would be pretty straightforward to also have a minimize-policy
subcommand as well
This does sound neat, but since policyuniverse is more of a library than a CLI tool, I'm thinking @kmcquade's plug sounds pretty good. 😉
That being said, I'm more than happy to review a PR (or a proposal) for a CLI.
Shameless plug, but check out my project aws-policy-generator. It uses policyuniverse under the hood to do all the heavy lifting.
Neat, thanks for sharing @jtyers!
That’s awesome!!
On Wed, Jun 22, 2022 at 11:42 AM Patrick Sanders @.***> wrote:
Neat, thanks for sharing @jtyers https://github.com/jtyers!
— Reply to this email directly, view it on GitHub https://github.com/Netflix-Skunkworks/policyuniverse/issues/38#issuecomment-1163425761, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5DLJVGTS7WVWU3H2Z6ZXTVQNF7VANCNFSM4LUIAUXA . You are receiving this because you are subscribed to this thread.Message ID: @.***>