TIL

11장 보안

커넥션 제어

bind

패스워드

127.0.0.1:6379> CONFIG SET requirepass password
OK

Protected mode

커맨드 제어

커맨드 이름 변경

커맨드 실행 환경 제어

ACL

유저의 생성과 삭제

유저 상태 제어

패스워드

패스워드 저장 방식

커맨드 권한 제어

> ACL SETUSER user1 +@all -@admin +bgsave +slowlog|get

키 접근 제어

셀렉터

ACL SETUSER loguser ~log:* %R~mail:* %R~sms:*
ACL SETUSER loguser resetkeys ~log:* (+GET ~mail:*)

pub/sub 채널 접근 제어

유저 초기화

ACL 규칙 파일로 관리하기

aclfile /etc/redis/users/acl

SSL/TLS

SSL/TLS란?

레디스에서 SSL/TLS 사용하기

tls-port <포트 번호>
tls-cert-file /path/to/redis.crt
tls-key-file /path/to/redis.key
tls-ca-cert-file /path/to/ca.crt

SSL/TLS를 사용한 HA 구성

tls-port <포트 번호>

tls-replication yes

tls-cert-file /path/to/redis.crt
tls-key-file /path/to/redis.key
tls-ca-cert-file /path/to/ca.crt
tls-port <포트 번호>

tls-replication yes
tls-cluster yes

tls-cert-file /path/to/redis.crt
tls-key-file /path/to/redis.key
tls-ca-cert-file /path/to/ca.crt