A company runs an application that sends logs to a log group in Amazon CloudWatch Logs. The email addresses of the application users are in the logs. The company’s developers need to view the logs in CloudWatch Logs. A security engineer must ensure that the developers who access the log group cannot see the user email addresses.
Which solution will meet this requirement?
A. Use Amazon Macie to scan the log group. Configure Macie to use a custom data identifier that uses a regular expression to identify an email address pattern. Activate automated data discovery in Macie.
B. Create an AWS Key Management Service (AWS KMS) key. Configure the log group to use the key to encrypt the logs. Configure the key policy to deny access to the IAM role that the developers assume to use CloudWatch Logs.
C. Create a subscription filter for the log group. Configure the log subscription to send the log data to an AWS Lambda function. Program the Lambda function to parse the log entries and to mask values that are email addresses.
D. Configure a data protection policy for the log group. Specify the AWS managed data identifier of EmailAddress for the type of data to mask. Activate data protection for the log group.
D
一家公司运行一个应用程序,该程序将日志发送到亚马逊云监控日志(Amazon CloudWatch Logs)中的一个日志组。应用程序用户的电子邮件地址包含在日志中。公司的开发人员需要查看 CloudWatch Log 中的日志。安全工程师必须确保访问该日志组的开发人员无法看到用户电子邮件地址。
哪种解决方案能满足这一要求?
公司应用程序日志含用户邮箱地址,开发人员需查看日志,安全工程师要确保开发人员访问日志组时看不到邮箱地址,需找出满足此要求的方案。
技巧:排除明显错误选项,在没有明显错误的选项中选择最合理的选项。
A. 不正确。使用 Amazon Macie 扫描日志组。配置 Macie 使用通过正则表达式识别邮箱地址模式的自定义数据标识符。在 Macie 中激活自动化数据发现。Amazon Macie 主要用于数据发现和分类,虽能识别邮箱地址,但不能直接对日志中的邮箱地址进行掩码处理,无法满足开发人员查看日志时看不到邮箱地址的要求。
B. 不正确。创建 AWS Key Management Service(AWS KMS)密钥。配置日志组使用该密钥加密日志。配置密钥策略,拒绝开发人员用于使用 CloudWatch Log 的身份和访问管理(Identity and Access Management,IAM)角色访问该密钥。此方法是通过限制对加密密钥的访问来限制对日志的访问,开发人员无法解密日志就无法查看,但这会导致开发人员完全无法查看日志,而非仅隐藏邮箱地址,不满足要求。
C. 不正确。为日志组创建订阅过滤器。配置日志订阅将日志数据发送到 AWS Lambda 函数。对 Lambda 函数进行编程,使其解析日志条目并对邮箱地址值进行掩码处理。通过将日志数据发送到 Lambda 函数并编程处理,能直接对日志中的邮箱地址进行掩码,开发人员查看的日志中邮箱地址被隐藏,满足要求。
D. 正确。为日志组配置数据保护策略。指定用于要掩码数据类型的 AWS 托管数据标识符 Email Address。激活日志组的数据保护。配置数据保护策略并指定邮箱地址标识符后,激活数据保护可自动对日志中的邮箱地址进行掩码,开发人员查看日志时看不到邮箱地址,满足要求。
Amazon Macie:它是一项数据安全服务,可扫描 AWS 环境中的数据,能使用自定义数据标识符(通过正则表达式识别特定模式)来识别敏感数据,还可激活自动化数据发现功能,但主要侧重于数据发现和分类,并非直接对日志中的敏感数据进行处理隐藏。
AWS Key Management Service(AWS KMS):用于创建和管理加密密钥,可配置日志组使用密钥加密日志,通过密钥策略控制对密钥的访问,进而控制对加密日志的访问,但这种方式主要是限制对日志的访问权限,而非隐藏日志中的特定敏感信息。
AWS Lambda:是一项无服务器计算服务,可创建订阅过滤器将日志数据发送到 Lambda 函数,通过编程 Lambda 函数对日志条目进行解析,并对敏感信息(如邮箱地址)进行掩码处理,能直接满足隐藏日志中敏感信息的需求。
数据保护策略:可为日志组配置数据保护策略,指定要掩码的数据类型(如使用 AWS 托管的数据标识符识别邮箱地址),激活数据保护后,可自动对日志中的指定类型数据进行掩码处理,直接满足隐藏敏感信息的要求。