๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Error

์Šคํ”„๋ง์—์„œ Redis ACL ์ ์šฉ์ด ์•ˆ๋˜๋Š” ์ด์œ  (RedisCommandExecutionException : NOPERM this user has no permissions to run the ...)

by ํ‘์‹œ๋ฐ” 2024. 7. 14.

๐Ÿ˜ฌ ์ƒํ™ฉ

์Šคํ”„๋ง ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ์›น ์†Œ์ผ“ ๊ธฐ๋Šฅ์„ Redis๋กœ ๊ตฌํ˜„ํ•œ ๋’ค, Redis์— ์•„๋ฌด๋‚˜ ์ ‘๊ทผํ•  ์ˆ˜ ์—†๋„๋ก ์ ‘๊ทผ ๊ถŒํ•œ์„ ์ถ”๊ฐ€ํ•˜๊ธฐ ์œ„ํ•ด Redis์—์„œ AUTH ๋ช…๋ น์–ด๋กœ id, pw ๋ช…๋ น์–ด๋ฅผ ๊ณ„์ •์„ ์ƒ์„ฑํ•˜๊ณ  ๊ถŒํ•œ์„ ์ฃผ์—ˆ๋‹ค.

 

ํ•˜์ง€๋งŒ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์›น ์†Œ์ผ“ Redis pub/sub ๊ณผ์ •์—์„œ ํ•˜๊ธฐ ์ด๋ฏธ์ง€์™€ ๊ฐ™์€ Redis ๊ด€๋ จ ์˜ˆ์™ธ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉฐ ์ •์ƒ์ ์œผ๋กœ ๊ธฐ๋Šฅ์ด ์ž‘๋™ํ•˜์ง€ ์•Š์•˜๋‹ค.

์›์ธ

WAS ์„œ๋ฒ„ OS์ธ ์šฐ๋ถ„ํˆฌ 22.04 LTS์—์„œapt ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ์ž๋ฅผ ํ†ตํ•ด ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋ณธ Redis ๋ฒ„์ „์€ ์ผ๋ฐ˜์ ์œผ๋กœ 6.0.x ์ด๋‹ค. ํ•˜์ง€๋งŒ Redis Pub/Sub ์ฑ„๋„ ์•ก์„ธ์Šค ๊ด€๋ฆฌ ACL์€ 6.2 ์ด์ƒ์˜ ๋ฒ„์ „๋ถ€ํ„ฐ ์ง€์›ํ–ˆ๋‹ค. ๊ทธ๋ž˜์„œ ACL์ด ์ •์ƒ์ ์œผ๋กœ ์ ์šฉ๋˜์ง€ ์•Š์€ ๊ฒƒ์ด๋‹ค.

 

ํ•ด๊ฒฐ

WAS ์„œ๋ฒ„์˜ Redis ๋ฒ„์ „์„ ๊ฐ•์ œ๋กœ ์ตœ์‹  ๋ฒ„์ „(7.x)์œผ๋กœ ์˜ฌ๋ฆฌ๊ณ , ๊ณ„์ • ์ƒ์„ฑ ๋ฐ ์ฑ„๋„ ๊ถŒํ•œ์„ ์ ์šฉํ•œ ๋’ค ๋‹ค์‹œ ํ…Œ์ŠคํŠธํ•˜์˜€๋”๋‹ˆ ์„ฑ๊ณตํ•˜์˜€๋‹ค.

๐Ÿ“š  REFERENCE

https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/

๋Œ“๊ธ€