How to use the policyuniverse.action.build_service_actions_from_service_data 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 / policyuniverse / __init__.py View on Github external
from policyuniverse.action import build_service_actions_from_service_data


# Logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

# Read Input Data
service_data_path = os.path.join(
    os.path.dirname(os.path.realpath(__file__)), "data.json"
)

service_data = json.load(open(service_data_path, "r"))

_action_categories.update(build_action_categories_from_service_data(service_data))
all_permissions.update(build_service_actions_from_service_data(service_data))

# These have been refactored to other files, but
# some dependencies still try to import them from here:
from policyuniverse.expander_minimizer import expand_policy
from policyuniverse.expander_minimizer import get_actions_from_statement