-
Notifications
You must be signed in to change notification settings - Fork 484
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
fix: Addressed permission error in redis v7 #4027 #4118
Conversation
Signed-off-by: Kyle Morton <kylex.f.morton@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to allchannels
@@ -103,7 +103,7 @@ const ( | |||
aclFileConfigTemplate = "aclfile {{.ACLFilePath}}" | |||
|
|||
// aclDefaultUserTemplate is the ACL rule for "default" user | |||
aclDefaultUserTemplate = "user {{.RedisUser}} on allkeys +@all -@dangerous #{{.Sha256RedisPwd}}" | |||
aclDefaultUserTemplate = "user {{.RedisUser}} on allkeys &* +@all -@dangerous #{{.Sha256RedisPwd}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aclDefaultUserTemplate = "user {{.RedisUser}} on allkeys &* +@all -@dangerous #{{.Sha256RedisPwd}}" | |
aclDefaultUserTemplate = "user {{.RedisUser}} on allkeys allchannels +@all -@dangerous #{{.Sha256RedisPwd}}" |
@@ -81,9 +81,9 @@ func TestGenerateACLConfig(t *testing.T) { | |||
} | |||
|
|||
require.Equal(t, 1, len(outputlines)) | |||
require.Equal(t, fmt.Sprintf("user default on allkeys +@all -@dangerous #%x", | |||
require.Equal(t, fmt.Sprintf("user default on allkeys &* +@all -@dangerous #%x", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require.Equal(t, fmt.Sprintf("user default on allkeys &* +@all -@dangerous #%x", | |
require.Equal(t, fmt.Sprintf("user default on allkeys allchannels +@all -@dangerous #%x", |
sha256.Sum256([]byte(testFakePwd))), outputlines[0]) | ||
// should not be equal if use different password | ||
require.NotEqual(t, fmt.Sprintf("user default on allkeys +@all -@dangerous #%x", | ||
require.NotEqual(t, fmt.Sprintf("user default on allkeys &* +@all -@dangerous #%x", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require.NotEqual(t, fmt.Sprintf("user default on allkeys &* +@all -@dangerous #%x", | |
require.NotEqual(t, fmt.Sprintf("user default on allkeys allchannels +@all -@dangerous #%x", |
Signed-off-by: Kyle Morton <kylex.f.morton@intel.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Signed-off-by: Kyle Morton kylex.f.morton@intel.com
Closes #4027
PR Checklist
Please check if your PR fulfills the following requirements:
BREAKING CHANGE:
describing the break)Testing Instructions
New Dependency Instructions (If applicable)