Skip to content

Instantly share code, notes, and snippets.

@dustinmm80
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustinmm80/a6451cc72130089ab222 to your computer and use it in GitHub Desktop.
Save dustinmm80/a6451cc72130089ab222 to your computer and use it in GitHub Desktop.
Example of grouping variables in a Conjur policy
# List of created variables
dev_variables = [...]
# Creating a role of type 'variable_group' with name 'dev-variables'
dev_variables_group = role 'variable_group', 'dev-variables'
# Allow that role to execute the variables
dev_variables.each do |v|
v.permit 'execute', dev_variables_group
end
# dev group and layer
dev_group = group 'dev-users'
dev_layer = layer 'dev-bots'
# Grant the 'dev_variables_group' role to the group and layer, so they assume its permissions
dev_variables_group.grant_to dev_group
dev_variables_group.grant_to dev_layer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment