Accept "user <name> on|off" ACL rule
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cpp
- Domain
- authorization, databases
Research direction
Start in acl_family.cc at MaterializeFileContents and inspect how ACL file lines are tokenized and validated. Reproduce with an ACL file containing user default off using --aclfile or ACL LOAD, then verify that the minimal rule loads successfully without unintended category, key, or pubsub changes.
Written by the indexing model from the issue text.
Description
Describe the bug
Dragonfly's ACL file parser rejects lines with fewer than 4 whitespace-separated tokens, including minimal lines like user default off that Redis and Valkey accept.
To Reproduce
Create an ACL file containing:
user default off
Start Dragonfly with --aclfile=/path/to/file or run ACL LOAD.
Expected behavior
Matching Redis/Valkey, the file loads successfully, creating/updating the default user with no additional category/key/pubsub changes beyond.
Actual behavior
ERR Error loading: /path/users.acl Error materializing acl file
Root cause
In acl_family.cc, MaterializeFileContents requires at least 4 tokens per line:
std::vector<std::string_view> cmds = absl::StrSplit(command, ' ', absl::SkipEmpty());
if (!absl::EqualsIgnoreCase(cmds[0], "USER") || cmds.size() < 4) {
return {};
}
user default off produces only 3 tokens (USER, default, off), so it's rejected outright.
- Dominant language
- C++
- Stars
- 31.6k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 126
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dragonflydb/dragonfly
-
test_migration_timeout_on_sync: CI timeout due to costly re-sync after intentional migration failure Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
dragonflydb/dragonfly#7261 · 3 comments ·
-
bug
dragonflydb/dragonfly#8361 · 1 comment · 1 assignee ·
-
bug epoll failing-test python
Difficulty 4/5 3-5 days Newbie friendliness 25/100
dragonflydb/dragonfly#8360 ·
-
CI epoll failing-test
Difficulty 3/5 1-2 days Newbie friendliness 68/100
dragonflydb/dragonfly#8359 ·
-
failing-test iouring
Difficulty 3/5 1-2 days Newbie friendliness 55/100
dragonflydb/dragonfly#8357 ·
All issues in dragonflydb/dragonfly
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·