Amazon 定 Location Service 的靜態資料加密 - Amazon Location Service

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

Amazon 定 Location Service 的靜態資料加密

Amazon 定 Location Service 預設提供加密功能,以使用 AWS 擁有的加密金鑰保護靜態的敏感客戶資料。

  • AWS 擁有的金鑰 — Amazon Location 預設會使用這些金鑰來自動加密個人識別資料。您無法檢視、管理或使用 AWS 擁有的金鑰,也無法稽核其使用情況。不過,您不需要採取任何動作或變更任何程式,即可保護加密您資料的金鑰。如需詳細資訊,請參閱《AWS Key Management Service 開發人員指南》中的 AWS 擁有的金鑰

依預設加密靜態資料,有助於降低保護敏感資料所涉及的營運開銷和複雜性。同時,其可讓您建置符合嚴格加密合規性和法規要求的安全應用程式。

雖然您無法停用此層加密或選取替代加密類型,但您可以在建立追蹤器和地理圍欄收集資源時選擇客戶管理的金鑰,在現有 AWS 擁有的加密金鑰上新增第二層加密:

  • 客戶受管金鑰 — Amazon Location 支援使用您建立、擁有和管理的對稱客戶受管金鑰,以針對現有 AWS 擁有的加密新增第二層加密。您可以完全控制此層加密,因此能執行以下任務:

    • 建立和維護金鑰政策

    • 建立和維護IAM政策和補助金

    • 啟用和停用金鑰政策

    • 輪換金鑰密碼編譯資料

    • 新增標籤

    • 建立金鑰別名

    • 安排金鑰供刪除

    如需詳細資訊,請參閱AWS Key Management Service 開發人員指南中的客戶管理金鑰

下表摘要說明 Amazon 位置如何加密個人識別資料。

資料類型 AWS 擁有的金鑰加密 客戶自管金鑰加密 (選用)
Position

包含裝置位置詳細資料的點幾何圖形。

已啟用 已啟用
PositionProperties

一組與位置更新相關聯的鍵值對。

已啟用 已啟用
GeofenceGeometry

表示地理圍欄區域的多邊形地理圍欄幾何圖形。

已啟用 已啟用
DeviceId

將裝置位置更新上傳至追蹤器資源時指定的裝置識別碼。

已啟用 不支援
GeofenceId

存儲地理圍欄幾何圖形或給定地理圍欄集合中的一批地理圍欄時指定的標識符。

已啟用 不支援
注意

Amazon Location 可使用 AWS 擁有的金鑰自動啟用靜態加密,以免費保護個人識別資料。

但是,使用客戶管理的金鑰需要 AWS KMS 支付費用。如需有關定價的詳細資訊,請參閱定AWS Key Management Service 價

如需有關的詳細資訊 AWS KMS,請參閱「什麼是 AWS Key Management Service?

Amazon Location Service 如何使用贈款 AWS KMS

Amazon 位置需要授權才能使用您的客戶受管金鑰。

當您建立使用客戶管理金鑰加密的追蹤器資源或地理圍欄集合時,Amazon Location 會將CreateGrant請求傳送至以代表您建立授權。 AWS KMS中的授權 AWS KMS 用於授予 Amazon 位置存取客戶帳戶中KMS金鑰的權限。

Amazon 位置需要授權,才能在下列內部操作中使用客戶受管金鑰:

  • 發送DescribeKey請求 AWS KMS 以驗證在創建跟踪器或地理圍欄集合時輸入的對稱客戶託管KMS密鑰 ID 是否有效。

  • 傳送GenerateDataKeyWithoutPlaintext要求 AWS KMS 以產生由客戶管理金鑰加密的資料金鑰。

  • 發送解密請求 AWS KMS 以解密加密的數據密鑰,以便將其用於加密您的數據。

您可以隨時撤銷授予的存取權,或移除服務對客戶受管金鑰的存取權。如果這樣做,Amazon Location 將無法存取客戶受管金鑰加密的任何資料,這會影響依賴該資料的操作。例如,如果您嘗試從 Amazon Location 無法存取的加密追蹤器取得裝置位置,則作業會傳回錯AccessDeniedException誤。

建立客戶受管金鑰

您可以使用 AWS Management Console、或建立對稱的客戶管理金鑰。 AWS KMS APIs

建立對稱客戶受管金鑰

請依照《AWS Key Management Service 開發人員指南》建立對稱客戶受管金鑰的步驟進行。

金鑰政策

金鑰政策會控制客戶受管金鑰的存取權限。每個客戶受管金鑰都必須只有一個金鑰政策,其中包含決定誰可以使用金鑰及其使用方式的陳述式。在建立客戶受管金鑰時,可以指定金鑰政策。如需詳細資訊,請參閱《AWS Key Management Service 開發人員指南》中的管理客戶受管金鑰的存取

若要將客戶受管金鑰與 Amazon 位置資源搭配使用,金鑰政策中必須允許下列API操作:

  • kms:CreateGrant:新增客戶受管金鑰的授權。授予對指定KMS金鑰的控制權限,以允許存取授與 Amazon 位置所需的操作。如需有關使用授權的詳細資訊,請參閱開AWS Key Management Service 發人員指南

    這允許 Amazon 位置執行以下操作:

    • 呼叫 GenerateDataKeyWithoutPlainText 以產生加密的資料金鑰並加以儲存,因為資料金鑰不會立即用來加密。

    • 呼叫 Decrypt 以使用儲存的加密資料金鑰來存取加密的資料。

    • 設定退休本金以允許服務。RetireGrant

  • kms:DescribeKey— 提供客戶受管的金鑰詳細資訊,以允許 Amazon 位置驗證金鑰。

以下是您可以為 Amazon 位置新增的政策聲明範例:

"Statement" : [ { "Sid" : "Allow access to principals authorized to use Amazon Location", "Effect" : "Allow", "Principal" : { "AWS" : "*" }, "Action" : [ "kms:DescribeKey", "kms:CreateGrant" ], "Resource" : "*", "Condition" : { "StringEquals" : { "kms:ViaService" : "geo.region.amazonaws.com", "kms:CallerAccount" : "111122223333" } }, { "Sid": "Allow access for key administrators", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::111122223333:root" }, "Action" : [ "kms:*" ], "Resource": "arn:aws:kms:region:111122223333:key/key_ID" }, { "Sid" : "Allow read-only access to key metadata to the account", "Effect" : "Allow", "Principal" : { "AWS" : "arn:aws:iam::111122223333:root" }, "Action" : [ "kms:Describe*", "kms:Get*", "kms:List*", "kms:RevokeGrant" ], "Resource" : "*" } ]

如需有關在政策中指定許可的詳細資訊,請參閱《AWS Key Management Service 開發人員指南》

如需有關故障診斷金鑰存取的詳細資訊,請參閱《AWS Key Management Service 開發人員指南》

指定 Amazon 位置的客戶受管金鑰

您可以將客戶自管金鑰指定為下列資源的第二層加密:

建立資源時,您可以透過輸入 ID 來指定資料金鑰,Amazon Location 使用該 KMSID 來加密資源所儲存的可識別個人資料。

Amazon Location Service 加密內容

加密內容是一組選用的金鑰值對,包含資料的其他相關內容資訊。

AWS KMS 使用加密內容作為其他驗證資料,以支援已驗證的加密。當您在加密資料的要求中包含加密內容時,會將加密內容 AWS KMS 繫結至加密的資料。若要解密資料,您必須在請求中包含相同的加密內容。

Amazon Location Service 加密內容

Amazon 位置在所有密 AWS KMS 碼編譯操作中使用相同的加密內容,其中金鑰所在,值為資源 Amazon 資源名稱 (ARN)。aws:geo:arn

"encryptionContext": { "aws:geo:arn": "arn:aws:geo:us-west-2:111122223333:geofence-collection/SAMPLE-GeofenceCollection" }

使用加密內容進行監控

當您使用對稱的客戶管理金鑰來加密追蹤器或地理圍欄集合時,您也可以在稽核記錄和記錄中使用加密內容,以識別客戶管理金鑰的使用方式。加密內容也會出現在AWS CloudTrail 或 Amazon 日誌產生的 CloudWatch 日誌中。

使用加密內容控制對客戶受管金鑰的存取

您可以在金鑰政策和IAM政策中使用加密內容conditions來控制對稱客戶管理金鑰的存取。您也可以在授予中使用加密內容條件。

Amazon Location 在授權中使用加密內容約束來控制對您帳戶或區域中客戶受管金鑰的存取。授予條件會要求授予允許的操作使用指定的加密內容。

以下是授予特定加密內容之客戶受管金鑰存取權的金鑰政策陳述式範例。此政策陳述式中的條件會要求具有指定加密內容的加密內容條件。

{ "Sid": "Enable DescribeKey", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::111122223333:role/ExampleReadOnlyRole" }, "Action": "kms:DescribeKey", "Resource": "*" }, { "Sid": "Enable CreateGrant", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::111122223333:role/ExampleReadOnlyRole" }, "Action": "kms:CreateGrant", "Resource": "*", "Condition": { "StringEquals": { "kms:EncryptionContext:aws:geo:arn": "arn:aws:geo:us-west-2:111122223333:tracker/SAMPLE-Tracker" } } }

監控 Amazon 定 Location Service 的加密金鑰

當您將 AWS KMS 客戶受管金鑰與 Amazon 定 Location Service 資源搭配使用時,您可以使用AWS CloudTrailAmazon CloudWatch 日誌來追蹤 Amazon 位置傳送到的請求 AWS KMS。

下列範例是 Amazon Location 呼叫以存取由客戶受管金鑰加密的資料所呼叫的KMS操作Decrypt、、和DescribeKey監控 AWS CloudTrail 事件:CreateGrantGenerateDataKeyWithoutPlainText

CreateGrant

當您使用 AWS KMS 客戶受管金鑰加密追蹤器或地理圍欄收集資源時,Amazon Location 會代表您傳送存取帳戶中的KMS金鑰的CreateGrant AWS 請求。Amazon 位置建立的授權僅限於與 AWS KMS 客戶受管金鑰相關聯的資源。此外,當您刪除資源時,Amazon 位置會使用該RetireGrant操作移除授權。

下面的範例事件會記錄 CreateGrant 操作:

{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "AROAIGDTESTANDEXAMPLE:Sampleuser01", "arn": "arn:aws:sts::111122223333:assumed-role/Admin/Sampleuser01", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE3", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROAIGDTESTANDEXAMPLE:Sampleuser01", "arn": "arn:aws:sts::111122223333:assumed-role/Admin/Sampleuser01", "accountId": "111122223333", "userName": "Admin" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2021-04-22T17:02:00Z" } }, "invokedBy": "geo.amazonaws.com" }, "eventTime": "2021-04-22T17:07:02Z", "eventSource": "kms.amazonaws.com", "eventName": "CreateGrant", "awsRegion": "us-west-2", "sourceIPAddress": "172.12.34.56", "userAgent": "ExampleDesktop/1.0 (V1; OS)", "requestParameters": { "retiringPrincipal": "geo.region.amazonaws.com", "operations": [ "GenerateDataKeyWithoutPlaintext", "Decrypt", "DescribeKey" ], "keyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE", "granteePrincipal": "geo.region.amazonaws.com" }, "responseElements": { "grantId": "0ab0ac0d0b000f00ea00cc0a0e00fc00bce000c000f0000000c0bc0a0000aaafSAMPLE" }, "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE", "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE", "readOnly": false, "resources": [ { "accountId": "111122223333", "type": "AWS::KMS::Key", "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE" } ], "eventType": "AwsApiCall", "managementEvent": true, "eventCategory": "Management", "recipientAccountId": "111122223333" }
GenerateDataKeyWithoutPlainText

當您為追蹤器或地理圍欄收集資源啟用 AWS KMS 客戶受管金鑰時,Amazon Location 會建立唯一的表格金鑰。它會將要GenerateDataKeyWithoutPlainText求傳送至 AWS KMS 指定資源的 AWS KMS客戶管理金鑰。

下面的範例事件會記錄 GenerateDataKeyWithoutPlainText 操作:

{ "eventVersion": "1.08", "userIdentity": { "type": "AWSService", "invokedBy": "geo.amazonaws.com" }, "eventTime": "2021-04-22T17:07:02Z", "eventSource": "kms.amazonaws.com", "eventName": "GenerateDataKeyWithoutPlaintext", "awsRegion": "us-west-2", "sourceIPAddress": "172.12.34.56", "userAgent": "ExampleDesktop/1.0 (V1; OS)", "requestParameters": { "encryptionContext": { "aws:geo:arn": "arn:aws:geo:us-west-2:111122223333:geofence-collection/SAMPLE-GeofenceCollection" }, "keySpec": "AES_256", "keyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE" }, "responseElements": null, "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE", "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE", "readOnly": true, "resources": [ { "accountId": "111122223333", "type": "AWS::KMS::Key", "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE" } ], "eventType": "AwsApiCall", "managementEvent": true, "eventCategory": "Management", "recipientAccountId": "111122223333", "sharedEventID": "57f5dbee-16da-413e-979f-2c4c6663475e" }
Decrypt

當您存取加密的追蹤器或地理圍欄集合時,Amazon Location 會呼叫該Decrypt作業,使用儲存的加密資料金鑰存取加密的資料。

下面的範例事件會記錄 Decrypt 操作:

{ "eventVersion": "1.08", "userIdentity": { "type": "AWSService", "invokedBy": "geo.amazonaws.com" }, "eventTime": "2021-04-22T17:10:51Z", "eventSource": "kms.amazonaws.com", "eventName": "Decrypt", "awsRegion": "us-west-2", "sourceIPAddress": "172.12.34.56", "userAgent": "ExampleDesktop/1.0 (V1; OS)", "requestParameters": { "encryptionContext": { "aws:geo:arn": "arn:aws:geo:us-west-2:111122223333:geofence-collection/SAMPLE-GeofenceCollection" }, "keyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE", "encryptionAlgorithm": "SYMMETRIC_DEFAULT" }, "responseElements": null, "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE", "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE", "readOnly": true, "resources": [ { "accountId": "111122223333", "type": "AWS::KMS::Key", "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE" } ], "eventType": "AwsApiCall", "managementEvent": true, "eventCategory": "Management", "recipientAccountId": "111122223333", "sharedEventID": "dc129381-1d94-49bd-b522-f56a3482d088" }
DescribeKey

Amazon Location 會使用此DescribeKey操作來驗證帳 AWS KMS 戶和區域中是否存在與您的追蹤器或地理圍欄收集相關聯的客戶管理金鑰。

下面的範例事件會記錄 DescribeKey 操作:

{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "AROAIGDTESTANDEXAMPLE:Sampleuser01", "arn": "arn:aws:sts::111122223333:assumed-role/Admin/Sampleuser01", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE3", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROAIGDTESTANDEXAMPLE:Sampleuser01", "arn": "arn:aws:sts::111122223333:assumed-role/Admin/Sampleuser01", "accountId": "111122223333", "userName": "Admin" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2021-04-22T17:02:00Z" } }, "invokedBy": "geo.amazonaws.com" }, "eventTime": "2021-04-22T17:07:02Z", "eventSource": "kms.amazonaws.com", "eventName": "DescribeKey", "awsRegion": "us-west-2", "sourceIPAddress": "172.12.34.56", "userAgent": "ExampleDesktop/1.0 (V1; OS)", "requestParameters": { "keyId": "00dd0db0-0000-0000-ac00-b0c000SAMPLE" }, "responseElements": null, "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE", "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE", "readOnly": true, "resources": [ { "accountId": "111122223333", "type": "AWS::KMS::Key", "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE" } ], "eventType": "AwsApiCall", "managementEvent": true, "eventCategory": "Management", "recipientAccountId": "111122223333" }

進一步了解

下列資源會提供有關靜態資料加密的詳細資訊。