redis: say whether it still holds a consumer's ACL user

The server keeps ACL users in memory only, so a restart forgets every
consumer while the provisioner keeps running (hq issue 120). holds()
checks ACL GETUSER for the user, enabled, with the mesh's password, so
the harness makes a forgotten user again. Needs mesh-sdk 0.1.1.
This commit is contained in:
jochen
2026-09-26 00:53:13 +02:00
parent 76ca479f37
commit 3d271f72ea
3 changed files with 30 additions and 2 deletions
+7
View File
@@ -43,4 +43,11 @@ runProvisioner("redis-cache", {
await redis.deleteAclUser(p.as);
await announce("module.redis.cache.deprovisioned", { username: p.as });
},
// This server keeps its ACL users in memory only, so a restart of it forgets every consumer while
// this provisioner keeps running. Asked every minute, so a forgotten user is made again instead
// of every consumer failing to authenticate in silence (novox/hq issue 120).
async holds(p: Provision): Promise<boolean> {
return redis.holdsAclUser(p.as, p.password);
},
});