-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create read and write roles and enforce them during s3 access
- Loading branch information
1 parent
598941e
commit 09bcaf1
Showing
3 changed files
with
156 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- create roles for parquet object store read and write if they do not exist | ||
DO $$ | ||
BEGIN | ||
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'parquet_object_store_read') THEN | ||
CREATE ROLE parquet_object_store_read; | ||
END IF; | ||
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'parquet_object_store_write') THEN | ||
CREATE ROLE parquet_object_store_write; | ||
END IF; | ||
END $$; | ||
|
||
-- create parquet schema if it does not exist | ||
CREATE SCHEMA IF NOT EXISTS parquet; | ||
REVOKE ALL ON SCHEMA parquet FROM public; | ||
GRANT USAGE ON SCHEMA parquet TO public; | ||
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA parquet TO public; |
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