test(postgress): lab7 add roles ACL for redis
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user