-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Database-level access control #2309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
7d14bb1
Add database-level access control
dvkashapov 97a27c5
Fix selector flag assignment and apply clang-format
dvkashapov b2fd61a
Extend serverCommand with get_dbid_args, unify ACL checks
dvkashapov b4adb23
Run generate commands
dvkashapov c0709a1
Merge remote-tracking branch 'upstream/unstable' into unstable
dvkashapov 88d96ba
Fix tests and apply clang
dvkashapov 98f4550
Delete CROSS_DB and NOT_IMPLEMENTED
dvkashapov e6c10dd
Delete CROSS_DB from commands.def
dvkashapov 74ccbec
Add db+= and db-= syntax
dvkashapov 8bc8d13
Fix comment style
dvkashapov a4397dc
clang-format fix
dvkashapov fa90b04
Refactor and add more tests
dvkashapov a3af4f6
Merge remote-tracking branch 'upstream/unstable' into unstable
dvkashapov 15068cf
Fix reason in ACL LOG and add test
dvkashapov ec93e49
Use cmd->fullname when no argpos
dvkashapov 711b4f3
Add module api for db-level check and test
dvkashapov fc5bc3a
apply pr suggestions
dvkashapov 10d7499
apply clang-format
dvkashapov 7f0e020
add ALL_DBS flag to migration/slot commands
dvkashapov b6ab15b
db= syntax, acl getuser support
dvkashapov 0562230
Return ACL_DENIED_DB only for R/W commands in forbidden db
dvkashapov 04568af
Use sds
dvkashapov 19186e7
Merge remote-tracking branch 'upstream/unstable' into unstable
dvkashapov d35a3a7
Merge remote-tracking branch 'upstream/unstable' into unstable
dvkashapov f725b5a
Merge remote-tracking branch 'upstream/unstable' into unstable
dvkashapov a16ffb6
Add new errmsg for invalid dbid
dvkashapov 7825f1d
Delete prev module api for databases
dvkashapov 1b88e62
Add new API
dvkashapov a17927a
Reorder transaction_db_id in select and more MULTI/EXEC tests
dvkashapov 3f437c8
Apply review suggestions
dvkashapov efa1125
Comment for VM_ACLCheckCommandPermissions and delete reset dbid
dvkashapov c3afa10
Revert reset in multi, move errno ERANGE
dvkashapov d7c9bd2
make ACLSelectorCanAccessDb static inline
dvkashapov 42b8334
Restrict all commands with keys/keyspace, add alldbs to FLUSHSLOT
dvkashapov 16dc2dc
Eval/func tests, clean up some lines
dvkashapov 5dbce55
New api with denial_reason ptr
dvkashapov 5d815aa
Merge remote-tracking branch 'upstream/unstable' into unstable
dvkashapov 0ba174a
Small fixes
dvkashapov ab93b29
Change wording in JSON files
dvkashapov 8ce4a75
Apply review suggestions
dvkashapov 41703e4
Merge remote-tracking branch 'upstream/unstable' into unstable
dvkashapov 1411b8a
Update lua and module api to use new VM_ACL check
dvkashapov 19ae1b7
Merge remote-tracking branch 'upstream/unstable' into unstable
dvkashapov 755678a
Apply review suggestions
dvkashapov da84977
Del test for COUNTKEYSINSLOT
dvkashapov 5666547
Delete get_dbid_args for MIGRATE
dvkashapov e7907a5
Del dbid >= server.dbnum
dvkashapov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -10,7 +10,8 @@ | |
| "command_flags": [ | ||
| "NO_ASYNC_LOADING", | ||
| "ADMIN", | ||
| "STALE" | ||
| "STALE", | ||
| "ALL_DBS" | ||
| ], | ||
| "arguments": [ | ||
| { | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |
| "SLOW", | ||
| "WRITE" | ||
| ], | ||
| "get_dbid_args": "copyDbIdArgs", | ||
| "key_specs": [ | ||
| { | ||
| "flags": [ | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -17,7 +17,8 @@ | |
| ] | ||
| ], | ||
| "command_flags": [ | ||
| "WRITE" | ||
| "WRITE", | ||
| "ALL_DBS" | ||
| ], | ||
| "acl_categories": [ | ||
| "DANGEROUS", | ||
|
|
||
|
dvkashapov marked this conversation as resolved.
|
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |
| "KEYSPACE", | ||
| "WRITE" | ||
| ], | ||
| "get_dbid_args": "moveDbIdArgs", | ||
| "key_specs": [ | ||
| { | ||
| "flags": [ | ||
|
|
||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ | |
| "KEYSPACE", | ||
| "WRITE" | ||
| ], | ||
| "get_dbid_args": "swapdbDbIdArgs", | ||
| "arguments": [ | ||
| { | ||
| "name": "index1", | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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
|
dvkashapov marked this conversation as resolved.
|
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.