-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[a2-694] Add policy for applications service IAM v1 and v2 (#462)
* [a2-694] Add policy for applications service IAM v1 and v2 - For v1 add resource service_groups - For v2 add resource applications:serviceGroups Signed-off-by: kmacgugan <[email protected]> * -Add v2 IAM policies to viewer and editor role -Update v1 policies to actually be v1 policy and not the v2 ones Signed-off-by: kmacgugan <[email protected]> * Split iam role migration to datamigration directory Signed-off-by: kmacgugan <[email protected]> * Regenerate protos, remove END; from sql Signed-off-by: kmacgugan <[email protected]> * Add documents for default policies Signed-off-by: kmacgugan <[email protected]>
- Loading branch information
Kyleen
authored
Jun 5, 2019
1 parent
cc42fcb
commit 7392f96
Showing
10 changed files
with
186 additions
and
114 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
15 changes: 15 additions & 0 deletions
15
components/authz-service/storage/postgres/datamigration/sql/07_update_v2_roles.up.sql
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
BEGIN; | ||
|
||
UPDATE iam_roles | ||
SET | ||
actions = actions || '{applications:*:list, applications:*:get}' | ||
WHERE | ||
id = 'viewer'; | ||
|
||
UPDATE iam_roles | ||
SET | ||
actions = actions || '{applications:*}' | ||
WHERE | ||
id = 'editor'; | ||
|
||
COMMIT; |
13 changes: 13 additions & 0 deletions
13
components/authz-service/storage/postgres/migration/sql/45_add_application_policies.up.sql
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
BEGIN; | ||
|
||
INSERT INTO policies | ||
VALUES ('aee14d59-da0b-4974-ba6d-1a018b024874', | ||
'{"action": "*", "effect": "allow", "resource": "service_groups", "subjects": ["user:*"]}', | ||
CURRENT_TIMESTAMP, | ||
1, | ||
TRUE) | ||
ON CONFLICT (id) DO UPDATE | ||
SET policy_data='{"action": "*", "effect": "allow", "resource": "service_groups", "subjects": ["user:*"]}', | ||
deletable=TRUE; | ||
|
||
COMMIT; |
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
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
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