icingadb/pkg
Alvar Penning 3a6df542f7
overdue: Temporary Key in "icingadb:" Namespace
The get_overdues.lua script uses a temporary Redis key to store data. So
far, this key was a random UUID, not being prefixed or namespaced. This
does not work when applying Redis ACLs on keys, as this random key is
unpredictable. Now, this key is prefixed with "icingadb:temp:".

This was initially reported in the Community Forum[^0] where the user
applied ACLs to the Redis user for Icinga DB.

It was easy to reproduce this by creating or reconfiguring a dedicated
Redis user, allowing all operations on keys in the "icinga:" and
"icingadb:" namespaces.

> 127.0.0.1:6380> ACL SETUSER icingadb on >icingadb ~icinga:* ~icingadb:* +@all
> OK
> 127.0.0.1:6380> ACL LIST
> 1) "user default on nopass sanitize-payload ~* &* +@all"
> 2) "user icingadb on sanitize-payload #1631be4f74353b72282ba144d82b6764f885feefc99c15c2c5f37b5c65bb3006 ~icinga:* ~icingadb:* resetchannels +@all"

After a while, the previous code failed as expected.

> 2026-01-07T11:22:10.253Z    FATAL   icingadb        NOPERM No permissions to access a key
> can't execute Redis script
> github.com/icinga/icingadb/pkg/icingadb/overdue.Sync.sync
>     /go/src/github.com/Icinga/icingadb/pkg/icingadb/overdue/sync.go:164
> github.com/icinga/icingadb/pkg/icingadb/overdue.Sync.Sync.func3
>     /go/src/github.com/Icinga/icingadb/pkg/icingadb/overdue/sync.go:70
> golang.org/x/sync/errgroup.(*Group).Go.func1
>     /go/pkg/mod/golang.org/x/sync@v0.19.0/errgroup/errgroup.go:93
> runtime.goexit
>     /usr/local/go/src/runtime/asm_amd64.s:1700

With this change, Icinga DB only uses these two namespaces and
continuous to operate.

[^0]: https://community.icinga.com/t/redis-user-acl-for-icingadb/15309
2026-01-07 12:33:13 +01:00
..
common golangci-lint: Address forcetypeassert 2025-10-14 15:12:57 +02:00
contracts Support dependency/redundancy group state checksum on the fly 2025-04-04 12:16:14 +02:00
icingadb overdue: Temporary Key in "icingadb:" Namespace 2026-01-07 12:33:13 +01:00
icingaredis telemetry: Remove leftover Stats.Callback 2025-11-17 09:20:07 +01:00
notifications notifications: Close Prepared Statement 2025-12-15 11:23:44 +01:00