Skip to content

Conversation

@guybe7
Copy link
Collaborator

@guybe7 guybe7 commented Jan 19, 2022

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:

  1. ACL: Block the first-arg mechanism on subcommands (we keep if in non-subcommands for backward compatibility)
  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

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 oranagra changed the title Improved handling of subcommands Improved handling of subcommands (don't allow ACL on first-arg of a sub-command) Jan 20, 2022
@oranagra oranagra added the release-notes indication that this issue needs to be mentioned in the release notes label Jan 20, 2022
@oranagra
Copy link
Member

@redis/core-team FYI, removing an extra ACL capability that we almost added in 7.0.

@oranagra oranagra merged commit a6fd2a4 into redis:unstable Jan 22, 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

Labels

release-notes indication that this issue needs to be mentioned in the release notes

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Lookup subcommand more strictly and consistently

3 participants