-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding schema access rules to file based system access control
Cherry pick of trinodb/trino#3766 Co-authored-by: haldes <[email protected]>
- Loading branch information
1 parent
56a0b48
commit 94af7fc
Showing
6 changed files
with
238 additions
and
12 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
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
33 changes: 33 additions & 0 deletions
33
presto-main/src/test/resources/file-based-system-access-schema.json
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,33 @@ | ||
{ | ||
"catalogs": [ | ||
{ | ||
"user": "alice", | ||
"catalog": "alice-catalog", | ||
"allow": "read-only" | ||
}, | ||
{ | ||
"allow": true | ||
} | ||
], | ||
"schemas": [ | ||
{ | ||
"schema": "secret", | ||
"owner": false | ||
}, | ||
{ | ||
"user": "admin", | ||
"schema": ".*", | ||
"owner": true | ||
}, | ||
{ | ||
"user": "bob", | ||
"schema": "bob|some-schema", | ||
"owner": true | ||
}, | ||
{ | ||
"user": "alice", | ||
"schema": "alice", | ||
"owner": true | ||
} | ||
] | ||
} |
8 changes: 4 additions & 4 deletions
8
presto-main/src/test/resources/security-config-file-with-unknown-rules.json
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,9 +1,9 @@ | ||
{ | ||
"schemas": [ | ||
"sessionProperties": [ | ||
{ | ||
"user": "(alice|bob)", | ||
"schema": "(default|pv)", | ||
"owner": true | ||
"user": "admin", | ||
"property": "max_split_size", | ||
"allow": true | ||
} | ||
] | ||
} |