-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate privileges and users and roles
- Loading branch information
1 parent
bf3144e
commit 160e07d
Showing
4 changed files
with
41 additions
and
34 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
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,17 +1,16 @@ | ||
USE WAREHOUSE COMPUTE_ORG; | ||
USE ROLE SECURITYADMIN; | ||
-- ACCOUNTADMIN privileges | ||
GRANT ROLE ACCOUNTADMIN | ||
TO USER "[email protected]"; | ||
|
||
// Grant system roles to users | ||
-- SYSADMIN privileges | ||
GRANT ROLE SYSADMIN | ||
TO USER "[email protected]"; | ||
|
||
GRANT ROLE SYSADMIN | ||
TO USER "[email protected]"; | ||
|
||
// GENIE | ||
USE ROLE USERADMIN; | ||
CREATE ROLE IF NOT EXISTS GENIE_ADMIN; | ||
USE ROLE SECURITYADMIN; | ||
-- GENIE privileges | ||
GRANT ROLE GENIE_ADMIN | ||
TO ROLE USERADMIN; | ||
GRANT ROLE GENIE_ADMIN | ||
|
@@ -21,12 +20,7 @@ TO USER "[email protected]"; | |
GRANT ROLE GENIE_ADMIN | ||
TO USER "[email protected]"; | ||
|
||
// RECOVER | ||
USE ROLE USERADMIN; | ||
CREATE ROLE IF NOT EXISTS RECOVER_DATA_ENGINEER; | ||
CREATE ROLE IF NOT EXISTS RECOVER_DATA_ANALYTICS; | ||
|
||
USE ROLE SECURITYADMIN; | ||
-- RECOVER privileges | ||
GRANT ROLE RECOVER_DATA_ENGINEER | ||
TO ROLE USERADMIN; | ||
GRANT ROLE RECOVER_DATA_ANALYTICS | ||
|
@@ -38,29 +32,15 @@ TO USER "[email protected]"; | |
GRANT ROLE RECOVER_DATA_ENGINEER | ||
TO USER "[email protected]"; | ||
|
||
// AD | ||
USE ROLE USERADMIN; | ||
CREATE ROLE IF NOT EXISTS AD; | ||
USE ROLE SECURITYADMIN; | ||
-- AD privileges | ||
GRANT ROLE AD | ||
TO ROLE USERADMIN; | ||
GRANT ROLE AD | ||
TO USER "[email protected]"; | ||
|
||
USE ROLE USERADMIN; | ||
CREATE ROLE IF NOT EXISTS MASKING_ADMIN; | ||
GRANT ROLE MASKING_ADMIN | ||
TO USER "[email protected]"; | ||
USE ROLE ACCOUNTADMIN; | ||
GRANT APPLY MASKING POLICY ON ACCOUNT | ||
TO ROLE MASKING_ADMIN; | ||
|
||
USE ROLE USERADMIN; | ||
CREATE ROLE IF NOT EXISTS DATA_ENGINEER; | ||
USE ROLE SECURITYADMIN; | ||
-- Data engineer privileges | ||
GRANT ROLE DATA_ENGINEER | ||
TO ROLE USERADMIN; | ||
|
||
GRANT ROLE DATA_ENGINEER | ||
TO USER "[email protected]"; | ||
GRANT ROLE DATA_ENGINEER | ||
|
@@ -71,3 +51,10 @@ GRANT ROLE DATA_ENGINEER | |
TO USER "[email protected]"; | ||
GRANT ROLE DATA_ENGINEER | ||
TO USER "[email protected]"; | ||
|
||
-- Create governance privileges | ||
GRANT ROLE MASKING_ADMIN | ||
TO USER "[email protected]"; | ||
USE ROLE ACCOUNTADMIN; | ||
GRANT APPLY MASKING POLICY ON ACCOUNT | ||
TO ROLE MASKING_ADMIN; |
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,16 @@ | ||
USE WAREHOUSE COMPUTE_ORG; | ||
USE ROLE USERADMIN; | ||
|
||
-- system wide roles | ||
CREATE ROLE IF NOT EXISTS MASKING_ADMIN; | ||
CREATE ROLE IF NOT EXISTS DATA_ENGINEER; | ||
|
||
-- GENIE roles | ||
CREATE ROLE IF NOT EXISTS GENIE_ADMIN; | ||
|
||
-- RECOVER roles | ||
CREATE ROLE IF NOT EXISTS RECOVER_DATA_ENGINEER; | ||
CREATE ROLE IF NOT EXISTS RECOVER_DATA_ANALYTICS; | ||
|
||
-- AD | ||
CREATE ROLE IF NOT EXISTS AD; |
File renamed without changes.