설명
예시의 노드 기반 Redis OSS 복제 그룹은 AtRestEncryptionEnabled의 기본값이 false입니다. 생성 시 true로 설정하면 백업과 동기화·백업·스왑 중 디스크에 기록되는 데이터를 보호합니다.
잠재적 영향
암호화되지 않은 백업 사본을 입수하면 캐시에 저장된 세션, 토큰이나 개인정보를 읽을 수 있습니다.
해결 방법
- 서비스 관리형 키 또는 필요한 권한을 부여한 고객 관리형 KMS 키를 사용하세요. TLS와 사용자 인증은 별도로 설정하세요.
- 기존 그룹은 백업한 뒤 저장 암호화를 켠 새 그룹으로 복원하세요. 백업 이후의 쓰기도 반영할 방법을 정하세요. 복원한 데이터와 애플리케이션 연결을 확인한 뒤 새 엔드포인트로 전환하세요.
예시
두 예시는 노드 한 개를 생성합니다. VPC의 캐시 서브넷 그룹을 지정하고 보안 그룹의 접근을 제한하세요. 고가용성과 데이터 이전은 별도로 구성해야 합니다.
변경 전
yaml
Parameters:
CacheSubnetGroupName:
Type: String
CacheSecurityGroups:
Type: List<AWS::EC2::SecurityGroup::Id>
Resources:
ReplicationGroup:
Type: AWS::ElastiCache::ReplicationGroup
Properties:
ReplicationGroupDescription: example
AtRestEncryptionEnabled: false
Engine: redis
CacheNodeType: cache.t3.micro
NumCacheClusters: 1
CacheSubnetGroupName: !Ref CacheSubnetGroupName
SecurityGroupIds: !Ref CacheSecurityGroups
변경 후
yaml
Parameters:
CacheSubnetGroupName:
Type: String
CacheSecurityGroups:
Type: List<AWS::EC2::SecurityGroup::Id>
Resources:
ReplicationGroup:
Type: AWS::ElastiCache::ReplicationGroup
Properties:
ReplicationGroupDescription: example
AtRestEncryptionEnabled: true
Engine: redis
CacheNodeType: cache.t3.micro
NumCacheClusters: 1
CacheSubnetGroupName: !Ref CacheSubnetGroupName
SecurityGroupIds: !Ref CacheSecurityGroups