Skip to content
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

Adding bloom acl category to commands. Added tests to check that the commands contain the correct acl categories #29

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

zackcam
Copy link
Contributor

@zackcam zackcam commented Dec 6, 2024

Changes

Addressing issue: #11
Currently the dependency for valkey_module doesn't have the change required to create acl categories so the cargo.toml file will be updated once that change is released.
Updated dependency of valkey-modules to v0.1.3
Changes in this pr include having to add an 8.0 and 7.2 feature flag as the create_acl_category and set_acl_category methods are behind these flags in the dependency.
For each bloom command we have added a bloom category as well as created the bloom category.

Testing

Testing: There are two tests. We have test that creates two users one with bloom acl category access and one without. We then check that we get the expected behavior when running bloom commands. The other test, checks that acl categories are set correctly for each command. We check that both bloom and other categories are present.

Cargo.toml Outdated Show resolved Hide resolved
["BF.INFO", bloom_info_command, "readonly fast", 1, 1, 1],
["BF.INSERT", bloom_insert_command, "write fast deny-oom", 1, 1, 1],
["BF.LOAD", bloom_load_command, "write fast deny-oom", 1, 1, 1]
["BF.ADD", bloom_add_command, "write fast deny-oom", 1, 1, 1, "bloom"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Member

@KarthikSubbarao KarthikSubbarao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved and waiting for the new valkeymodule-rs version to be released. Then, the version in cargo.toml can be updated and we can merge this in.

Confirmed that all tests pass once we use the new version.

…commands contain the correct acl categories

Signed-off-by: zackcam <[email protected]>
@KarthikSubbarao KarthikSubbarao merged commit a5ec8de into valkey-io:unstable Dec 10, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants