test(postgress): lab7 add roles ACL for redis

This commit is contained in:
Голиков Maximillian Антон
2026-11-25 14:30:27 +03:00
parent af282e75b6
commit ade54868a8
4 changed files with 52 additions and 10 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
set -eu
set -- redis
. "$(dirname "$0")/dependency-pki.sh"
password=$(openssl rand -hex 32)
hash=$(printf %s "$password" | openssl dgst -sha256 -r | cut -d' ' -f1)
printf 'rediss://api:%s@redis:6379/0\n' "$password" > "$tmp/api.url"
printf '%s\n' 'user default off' 'user health on nopass -@all +ping' \
"user api on #$hash ~session:* -@all +hello +ping +get +set +del +client|setinfo" > "$tmp/users.acl"
finish redis