How to use the policyuniverse._get_desired_actions_from_statement function in policyuniverse

To help you get started, we’ve selected a few policyuniverse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Netflix-Skunkworks / policyuniverse / tests / TestMethods.py View on Github external
def test_get_desired_actions_from_statement(self):
        result = _get_desired_actions_from_statement(dc(WILDCARD_POLICY_1['Statement'][0]))
        self.assertEqual(result, set(EXPANDED_ACTIONS_1))
github Netflix-Skunkworks / policyuniverse / tests / TestMethods.py View on Github external
def test_get_desired_actions_from_statement_1(self):
        statement = {
            "Action": ["ec2:thispermissiondoesntexist"],
            "Resource": "*",
            "Effect": "Allow"
        }
        self.assertRaises(Exception, _get_desired_actions_from_statement, statement)