Q61. AWS Secrets Manager로 데이터베이스 자격 증명 안전하게 관리하기
AWS 자격증을 준비하는 여러분, 안녕하세요. 오늘은 데이터베이스 자격 증명 관리에 관한 중요한 문제를 살펴보겠습니다. 이 문제는 보안과 자동화의 균형을 잡는 방법을 테스트합니다.
문제 상황
Q1:
한 회사가 AWS에서 2계층 웹 애플리케이션을 개발하고 있습니다. 회사 개발자는 백엔드 Amazon RDS 데이터베이스에 직접 연결되는 Amazon EC2 인스턴스에 애플리케이션을 배포했습니다. 회사는 애플리케이션에 데이터베이스 자격 증명을 하드코딩해서는 안 됩니다. 또한 회사는 정기적으로 데이터베이스 자격 증명을 자동으로 교체하는 솔루션을 구현해야 합니다.
최소한의 운영 오버헤드로 이러한 요구 사항을 충족하는 솔루션은 무엇입니까?
<small>A company is developing a two-tier web application on AWS. The company's developers have deployed the application on Amazon EC2 instances that connect directly to a backend Amazon RDS database. The company must not hardcode database credentials into the application. The company also needs to implement a solution to automatically rotate database credentials regularly.
What solution will meet these requirements with the LEAST operational overhead?</small>
선택지
A. 인스턴스 메타데이터에 데이터베이스 자격 증명을 저장합니다. Amazon EventBridge(Amazon CloudWatch Events) 규칙을 사용하여 RDS 자격 증명과 인스턴스 메타데이터를 동시에 업데이트하는 예약된 AWS Lambda 함수를 실행합니다.
<small>Store the database credentials in instance metadata. Use an Amazon EventBridge (Amazon CloudWatch Events) rule to run a scheduled AWS Lambda function that updates the RDS credentials and the instance metadata simultaneously.</small>
B. 암호화된 Amazon S3 버킷의 구성 파일에 데이터베이스 자격 증명을 저장합니다. Amazon EventBridge(Amazon CloudWatch Events) 규칙을 사용하여 RDS 자격 증명과 구성 파일의 자격 증명을 동시에 업데이트하는 예약된 AWS Lambda 함수를 실행합니다. S3 버전 관리를 사용하여 이전 값으로 폴백하는 기능을 보장합니다.
<small>Store the database credentials in a configuration file in an encrypted Amazon S3 bucket. Use an Amazon EventBridge (Amazon CloudWatch Events) rule to run a scheduled AWS Lambda function that updates the RDS credentials and the credentials in the configuration file simultaneously. Use S3 versioning to ensure the ability to fall back to previous values.</small>
C. 데이터베이스 자격 증명을 AWS Secrets Manager에 암호로 저장합니다. 보안 비밀에 대한 자동 순환을 켭니다. EC2 역할에 필요한 권한을 연결하여 보안 암호에 대한 액세스 권한을 부여합니다.
<small>Store the database credentials as a secret in AWS Secrets Manager. Turn on automatic rotation for the secret. Attach the required permissions to the EC2 role to grant access to the secret.</small>
D. 데이터베이스 자격 증명을 AWS Systems Manager Parameter Store에 암호화된 파라미터로 저장합니다. 암호화된 매개변수에 대해 자동 회전을 켭니다. EC2 역할에 필요한 권한을 연결하여 암호화된 파라미터에 대한 액세스 권한을 부여합니다.
<small>Store the database credentials as an encrypted parameter in AWS Systems Manager Parameter Store. Turn on automatic rotation for the encrypted parameter. Attach the required permissions to the EC2 role to grant access to the encrypted parameter.</small>
정답 및 해설
정답은 C입니다.
AWS Secrets Manager는 데이터베이스 자격 증명과 같은 민감한 정보를 안전하게 저장하고 관리하는 데 가장 적합한 서비스입니다. 이 서비스는 다음과 같은 이유로 주어진 요구 사항을 가장 잘 충족합니다:
-
자격 증명 하드코딩 방지: Secrets Manager를 사용하면 애플리케이션 코드에 자격 증명을 직접 포함시키지 않고도 필요할 때 안전하게 검색할 수 있습니다.
-
자동 교체: Secrets Manager는 자격 증명의 자동 교체 기능을 기본적으로 제공합니다. 이는 정기적인 보안 업데이트를 위한 요구 사항을 충족합니다.
-
최소한의 운영 오버헤드: 자동 교체 기능이 내장되어 있어 추가적인 Lambda 함수나 EventBridge 규칙을 설정할 필요가 없습니다.
-
EC2 역할 통합: EC2 인스턴스에 적절한 IAM 역할을 부여하여 Secrets Manager의 비밀에 안전하게 액세스할 수 있습니다.
<small>The correct answer is C.
AWS Secrets Manager is the most suitable service for securely storing and managing sensitive information like database credentials. This service best meets the given requirements for the following reasons:
-
Prevents hardcoding of credentials: Using Secrets Manager allows the application to retrieve credentials securely when needed without including them directly in the application code.
-
Automatic rotation: Secrets Manager provides built-in functionality for automatic rotation of credentials, meeting the requirement for regular security updates.
-
Minimal operational overhead: With built-in rotation capabilities, there's no need to set up additional Lambda functions or EventBridge rules.
-
EC2 role integration: By granting the appropriate IAM role to EC2 instances, they can securely access secrets in Secrets Manager.</small>
오답 설명
A. 인스턴스 메타데이터: 보안에 취약하며 자동 교체 기능이 없습니다.
<small>A. Instance metadata: This is less secure and lacks built-in rotation capabilities.</small>
B. S3 버킷: 구현이 복잡하고 자동 교체를 위해 추가 구성이 필요합니다.
<small>B. S3 bucket: This is more complex to implement and requires additional configuration for automatic rotation.</small>
D. Systems Manager Parameter Store: 자격 증명 저장에 사용할 수 있지만, 자동 교체 기능이 제한적입니다.
<small>D. Systems Manager Parameter Store: While it can store credentials, it has limited automatic rotation capabilities compared to Secrets Manager.</small>
결론
이 문제는 AWS에서 민감한 정보를 안전하게 관리하는 방법을 테스트합니다. AWS Secrets Manager는 데이터베이스 자격 증명과 같은 중요한 정보를 저장하고 자동으로 교체하는 데 가장 적합한 서비스입니다. 이는 보안을 강화하고 운영 오버헤드를 최소화하는 데 도움이 됩니다.
<small>This question tests knowledge of securely managing sensitive information in AWS. AWS Secrets Manager is the most appropriate service for storing and automatically rotating critical information like database credentials. It helps enhance security and minimize operational overhead.</small>
댓글
댓글 쓰기