-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Improved handling of subcommands (don't allow ACL on first-arg of a sub-command) #10147
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
Conversation
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
Fix redis#10132 Changes: 1. ACL: Block the first-arg mechanism on subcommands (we keep if in non-subcommands for backward comp.) 2. COMMAND: When looking up a command, insist the command name doesn't contain extra words. Example: When a user issues `GET key` we want `lookupCommand` to return `getCommand` but when if COMMAND calls `lookupCommand` with `get|key` we want it to fail. Other changes: 1. ACLSetUser: prevent a redundant command lookup
oranagra
reviewed
Jan 19, 2022
oranagra
approved these changes
Jan 20, 2022
Member
|
@redis/core-team FYI, removing an extra ACL capability that we almost added in 7.0. |
soloestoy
approved these changes
Jan 21, 2022
This was referenced Jan 23, 2022
oranagra
added a commit
that referenced
this pull request
Jan 29, 2022
We recently removed capabilities from the first-arg feature of ACL and added a warning. but we didn't document it. ref: #10147 and redis/redis-doc#1761
oranagra
pushed a commit
that referenced
this pull request
Mar 8, 2022
introduced in #10147 since we blocked the first-arg mechanism on subcommands
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix #10132
Recently we added extensive support for sub-commands in for redis 7.0, this meant that the old ACL mechanism for
sub-commands wasn't needed, or actually was improved (to handle both include and exclude control, like for commands), but only for real sub-commands.
The old mechanism in ACL was renamed to first-arg, and was able to match the first argument of any
command (including sub-commands).
We now realized that we might wanna completely delete that first-arg feature some day, so the first step
was not to give it new capabilities in 7.0 and it didn't have before.
Changes:
Example: When a user issues
GET keywe wantlookupCommandto returngetCommandbutwhen if COMMAND calls
lookupCommandwithget|keywe want it to fail.Other changes: