-
Notifications
You must be signed in to change notification settings - Fork 24.4k
ACL channels permission handling for save/load scenario. #8794
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
Conversation
|
@madolson @itamarhaber Please take a look. |
|
This change also broke another test |
|
Currently |
|
@huangzhw Yeah the idea is similar, but we should output |
|
Yes, I understand. Is there any principles that |
|
sorry to join the party late, not sure what i missed but i wanna point out:
I think the difficulty resolving the remaining issue is that the mechanism of loading ACL file doesn't necessarily knows the server configuration ( so i think we need to choose between:
i prefer 1. but maybe we'll need 2. too in order to gracefully handle acl files generated by earlier versions of redis 6.2. |
|
@madolson @hpatro @huangzhw @itamarhaber due to the urgency of the matter (we planned on releasing 6.2.2 tomorrow), and since i'm not fully sure if i'm missing anything in this PR, i created a simplified one based on this one, in which i reverted all the interface changes and just kept the new tests and the modification to ACLDescribeUser (to always use if we're all happy, i'll push that commit here close the other PR. |
|
@oranagra The concern which I had was With the suggested PR, we will still be in a state if a user applies |
|
@hpatro thanks for clearing that out, but i think that this but anyway i think it is still be clearer that anyway, we're a bit short in time. do you see any problem with what's in the current form of the other PR? |
|
@oranagra Apart from that the PR looks fine to me. |
|
@hpatro i pushed the commits into this PR, and edited the top comment to reflect the change and understandings. I'll use this top comment (first part of it) as the squash-merge commit comment, and also refer to it in the release notes. please have a look and edit to improve. |
|
@oranagra LGTM. |
In the initial release of Redis 6.2 setting a user to only allow pubsub access to a specific channel, and doing ACL SAVE, resulted in an assertion when ACL LOAD was used. This was later changed by redis#8723 (not yet released), but still not properly resolved (now it errors instead of crash). The problem is that the server that generates an ACL file, doesn't know what would be the setting of the acl-pubsub-default config in the server that will load it. so ACL SAVE needs to always start with resetchannels directive. This should still be compatible with old acl files (from redis 6.0), and ones from earlier versions of 6.2 that didn't mess with channels. Co-authored-by: Harkrishn Patro <harkrisp@amazon.com> Co-authored-by: Oran Agra <oran@redislabs.com>
In the initial release of Redis 6.2 setting a user to only allow pubsub access to
a specific channel, and doing ACL SAVE, resulted in an assertion when
ACL LOAD was used. This was later changed by #8723 (not yet released),
but still not properly resolved (now it errors instead of crash).
The problem is that the server that generates an ACL file, doesn't know what
would be the setting of the acl-pubsub-default config in the server that will load it.
so ACL SAVE needs to always start with resetchannels directive.
This should still be compatible with old acl files (from redis 6.0), and ones from earlier
versions of 6.2 that didn't mess with channels.
Scenario:
aclfile.aclfilecontent after saving it.Possible scenarios: