-
Notifications
You must be signed in to change notification settings - Fork 578
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
Redis username support for icingadb feature #9536
Labels
Comments
Got mine to work with the following. Still testing: add "user:" to redis in config.yml index 38571e3..a3e4a31 100644
--- a/pkg/config/redis.go
+++ b/pkg/config/redis.go
@@ -22,6 +22,7 @@ type Redis struct {
Host string `yaml:"host"`
Port int `yaml:"port" default:"6380"`
Password string `yaml:"password"`
+ Username string `yaml:"user"`
TlsOptions TLS `yaml:",inline"`
Options icingaredis.Options `yaml:"options"`
}
@@ -47,6 +48,7 @@ func (r *Redis) NewClient(logger *logging.Logger) (*icingaredis.Client, error) {
options := &redis.Options{
Dialer: dialWithLogging(dialer, logger),
+ Username: r.Username,
Password: r.Password,
DB: 0, // Use default DB,
ReadTimeout: r.Options.Timeout, |
oxzi
added a commit
that referenced
this issue
Jul 30, 2024
The Redis ACL system was introduced with Redis 6.0. It introduced users with precisely granular permissions. This change allows Icinga 2 to use the Icinga DB feature against a Redis with an ACL user. This was reflected in the documentation, next to the already implemented, but undocumented Redis database. Closes #9536.
Thanks for your request and your prototype in Icinga DB. I have implemented this change in Icinga/icinga-go-library#52 and #10102. |
oxzi
added a commit
that referenced
this issue
Jul 31, 2024
The Redis ACL system was introduced with Redis 6.0. It introduced users with precisely granular permissions. This change allows Icinga 2 to use the Icinga DB feature against a Redis with an ACL user. This was reflected in the documentation, next to the already implemented, but undocumented Redis database. Closes #9536.
oxzi
added a commit
that referenced
this issue
Sep 19, 2024
The Redis ACL system was introduced with Redis 6.0. It introduced users with precisely granular permissions. This change allows Icinga 2 to use the Icinga DB feature against a Redis with an ACL user. This was reflected in the documentation, next to the already implemented, but undocumented Redis database. Closes #9536.
oxzi
added a commit
that referenced
this issue
Sep 23, 2024
The Redis ACL system was introduced with Redis 6.0. It introduced users with precisely granular permissions. This change allows Icinga 2 to use the Icinga DB feature against a Redis with an ACL user. This was reflected in the documentation, next to the already implemented, but undocumented Redis database. Closes #9536.
oxzi
added a commit
that referenced
this issue
Oct 4, 2024
The Redis ACL system was introduced with Redis 6.0. It introduced users with precisely granular permissions. This change allows Icinga 2 to use the Icinga DB feature against a Redis with an ACL user. This was reflected in the documentation, next to the already implemented, but undocumented Redis database. Closes #9536.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
The icingadb feature allows password to be specified for Redis.
However Redis since version 6 actually uses username/password/acls sets and (as stated here https://raw.githubusercontent.com/redis/redis/7.0/redis.conf ) the deprecated "requirepass" it is actually a compatibility layer which sets the password for the "default" user.
Which means from Icinga2 icingadb feature I can only connect to Redis using the "default" user.
icingadb-redis package is providing Redis 7 so if fully supports multiple users.
Describe the solution you'd like
I'd like to be able to specify a username in the icingadb feature configuration for Redis.
Describe alternatives you've considered
The alternative is to use only one user, the one called "default", with a password set by the deprecated "requirepass" configuration in Redis.
Additional context
Security wise, it would be good practice to setup in Redis a dedicated user for Icinga2 icingadb feature with write access, and a separate user for icingadb-web with only read access (which can also be used by icingadb for instance).
It is very possible I do not fully understand things about Icinga very well, so please correct me if I'm wrong.
The text was updated successfully, but these errors were encountered: