-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve descriptions and file organization for repo-level policy guide (
#496)
- Loading branch information
Showing
12 changed files
with
179 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 8 additions & 6 deletions
14
...guides/repo_level_policy_data_firewall.tf → ...ides/repo_level_policies/data_firewall.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
# Creates MySQL data repository | ||
resource "cyral_repository" "repo" { | ||
# Creates a MySQL data repository named "mysql-1" | ||
resource "cyral_repository" "mysql1" { | ||
type = "mysql" | ||
name = "my_mysql" | ||
name = "mysql-1" | ||
|
||
repo_node { | ||
host = "mysql.cyral.com" | ||
port = 3306 | ||
} | ||
} | ||
|
||
# create policy instance from template | ||
# Creates a policy instance from template to filter table | ||
# 'finance.cards', returning only data where | ||
# finance.cards.country = 'US' for users not in 'Admin' group | ||
resource "cyral_rego_policy_instance" "policy" { | ||
name = "data-firewall-policy" | ||
category = "SECURITY" | ||
description = "Filter 'finance.cards' when someone (except 'Admin' group) reads it" | ||
description = "Returns only data where finance.cards.country = 'US' in table 'finance.cards' for users not in 'Admin' group" | ||
template_id = "data-firewall" | ||
parameters = "{ \"dataSet\": \"finance.cards\", \"dataFilter\": \" finance.cards.country = 'US' \", \"labels\": [\"CCN\"], \"excludedIdentities\": { \"groups\": [\"Admin\"] } }" | ||
enabled = true | ||
scope { | ||
repo_ids = [cyral_repository.repo.id] | ||
repo_ids = [cyral_repository.mysql1.id] | ||
} | ||
tags = ["tag1", "tag2"] | ||
} |
Oops, something went wrong.