기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
Amazon SNS 데이터 보호 정책 예제
다음 예는 중요한 데이터를 감사 및 거부하는 데 사용할 수 있는 데이터 보호 정책입니다. 예제 애플리케이션이 포함된 전체 자습서는 Amazon의 메시지 데이터 보호 소개 SNS
주제
감사 정책 예시
감사 정책을 사용하면 최대 99% 의 인바운드 메시지를 감사하고 조사 결과를 Amazon CloudWatch, Amazon Data Firehose 및 Amazon S3로 보낼 수 있습니다.
예를 들어 감사 정책을 만들어 시스템에서 중요한 데이터를 실수로 보내거나 받는지 여부를 평가할 수 있습니다. 감사 결과 시스템에서 신용 카드 정보가 필요하지 않은 시스템에 신용 카드 정보를 보내는 것으로 나타나면 데이터 보호 정책을 구현하여 데이터 전달을 차단할 수 있습니다.
다음 예제는 신용 카드 번호를 찾고 그 결과를 CloudWatch Logs, Firehose 및 Amazon S3로 전송하여 주제를 관통하는 메시지의 99% 를 감사합니다.
데이터 보호 정책:
{ "Name": "__example_data_protection_policy", "Description": "Example data protection policy", "Version": "2021-06-01", "Statement": [ { "DataDirection": "Inbound", "Principal": ["*"], "DataIdentifier": [ "arn:aws:dataprotection::aws:data-identifier/CreditCardNumber" ], "Operation": { "Audit": { "SampleRate": "99", "FindingsDestination": { "CloudWatchLogs": { "LogGroup": "<example log name>" }, "Firehose": { "DeliveryStream": "<example stream name>" }, "S3": { "Bucket": "<example bucket name>" } } } } } ] }
감사 결과 형식 예시:
{ "messageId": "...", "callerPrincipal": "arn:aws:sts::123456789012:assumed-role/ExampleRole", "resourceArn": "arn:aws:sns:us-east-1:123456789012:ExampleArn", "dataIdentifiers": [ { "name": "CreditCardNumber", "count": 1, "detections": [ { "start": 1, "end": 2 } ] } ], "timestamp": "2021-04-20T00:33:40.241Z" }
인바운드 비식별 마스킹 문이 포함된 정책 예시
다음 예에서는 메시지 콘텐츠에서 민감한 데이터를 마스킹하여 사용자가 CreditCardNumber
가 포함된 메시지를 주제에 게시하지 못하도록 차단합니다.
{ "Name": "__example_data_protection_policy", "Description": "Example data protection policy", "Version": "2021-06-01", "Statement": [ { "DataDirection": "Inbound", "Principal": [ "arn:aws:iam::123456789012:user/ExampleUser" ], "DataIdentifier": [ "arn:aws:dataprotection::aws:data-identifier/CreditCardNumber" ], "Operation": { "Deidentify": { "MaskConfig": { "MaskWithCharacter": "#" } } } } ] }
인바운드 비식별 마스킹 결과 예시:
// original message My credit card number is 4539894458086459 // delivered message My credit card number is ################
인바운드 비식별 수정 문이 포함된 정책 예시
다음 예에서는 메시지 콘텐츠에서 민감한 데이터를 수정하여 사용자가 CreditCardNumber
가 포함된 메시지를 주제에 게시하지 못하도록 차단합니다.
{ "Name": "__example_data_protection_policy", "Description": "Example data protection policy", "Version": "2021-06-01", "Statement": [ { "DataDirection": "Inbound", "Principal": [ "arn:aws:iam::123456789012:user/ExampleUser" ], "DataIdentifier": [ "arn:aws:dataprotection::aws:data-identifier/CreditCardNumber" ], "Operation": { "Deidentify": { "RedactConfig": {} } } } ] }
인바운드 비식별 수정 결과 예시:
// original message My credit card number is 4539894458086459 // delivered message My credit card number is
아웃바운드 비식별 마스킹 문이 포함된 정책 예시
다음 예에서는 메시지 콘텐츠에서 민감한 데이터를 마스킹하여 사용자가 CreditCardNumber
가 포함된 메시지를 수신하지 않도록 차단합니다.
{ "Name": "__example_data_protection_policy", "Description": "Example data protection policy", "Version": "2021-06-01", "Statement": [ { "DataDirection": "Outbound", "Principal": [ "arn:aws:iam::123456789012:user/ExampleUser" ], "DataIdentifier": [ "arn:aws:dataprotection::aws:data-identifier/CreditCardNumber" ], "Operation": { "Deidentify": { "MaskConfig": { "MaskWithCharacter": "-" } } } } ] }
아웃바운드 비식별 마스킹 결과 예시:
// original message My credit card number is 4539894458086459 // delivered message My credit card number is ----------------
아웃바운드 비식별 수정 문이 포함된 정책 예시
다음 예에서는 메시지 콘텐츠에서 민감한 데이터를 수정하여 사용자가 CreditCardNumber
가 포함된 메시지를 수신하지 않도록 차단합니다.
{ "Name": "__example_data_protection_policy", "Description": "Example data protection policy", "Version": "2021-06-01", "Statement": [ { "DataDirection": "Outbound", "Principal": [ "arn:aws:iam::123456789012:user/ExampleUser" ], "DataIdentifier": [ "arn:aws:dataprotection::aws:data-identifier/CreditCardNumber" ], "Operation": { "Deidentify": { "RedactConfig": {} } } } ] }
아웃바운드 비식별 수정 결과 예시:
// original message My credit card number is 4539894458086459 // delivered message My credit card number is
정책 인바운드 거부 명령문 예시
다음 예에서는 사용자가 메시지 콘텐츠에 CreditCardNumber
가 있는 주제에 메시지를 게시하지 못하도록 차단합니다. API응답에서 거부된 페이로드의 상태 코드는 403 AuthorizationError "“입니다.
{ "Name": "__example_data_protection_policy", "Description": "Example data protection policy", "Version": "2021-06-01", "Statement": [ { "DataDirection": "Inbound", "Principal": [ "arn:aws:iam::123456789012:user/ExampleUser" ], "DataIdentifier": [ "arn:aws:dataprotection::aws:data-identifier/CreditCardNumber" ], "Operation": { "Deny": {} } } ] }
정책 아웃바운드 거부 명령문 예시
다음 예시에서는 다음을 포함하는 메시지를 AWS 계정이 수신하지 못하도록 CreditCardNumber
차단합니다.
{ "Name": "__example_data_protection_policy", "Description": "Example data protection policy", "Version": "2021-06-01", "Statement": [ { "DataDirection": "Outbound", "Principal": [ "arn:aws:iam::123456789012:user/ExampleUser" ], "DataIdentifier": [ "arn:aws:dataprotection::aws:data-identifier/CreditCardNumber" ], "Operation": { "Deny": {} } } ] }
Amazon에서 로그인한 아웃바운드 거부 결과 예제: CloudWatch
{ "notification": { "messageMD5Sum": "2e8f58ff2eeed723b56b15493fbfb5a5", "messageId": "8747a956-ebf1-59da-b291-f2c2e4b87c9c", "topicArn": "arn:aws:sns:us-east-2:664555388960:test1", "timestamp": "2022-09-08 15:40:57.144" }, "delivery": { "deliveryId": "6a422437-78cc-5171-ad64-7fa3778507aa", "destination": "arn:aws:sqs:us-east-2:664555388960:test", "providerResponse": "The topic's data protection policy prohibits this message from being delivered to <subscription arn>", "dwellTimeMs": 22, "attempts": 1, "statusCode": 403 }, "status": "FAILURE" }