簡體   English   中英

如何找出誰在 aws ec2 中創建了密鑰對?

[英]How to find out who created a Key Pair in aws ec2?

我擁有對 AWS 賬戶的完全訪問權限,可以查看所有創建和使用的密鑰,並且需要知道擁有私鑰的人。 但 AWS UI 不提供任何關於密鑰對的信息,除了 ID、名稱、類型、指紋

是否可以識別誰在 AWS EC2 中創建了某個密鑰對?

如果CloudTrail 已設置,它將記錄包含用戶的事件。 以下內容摘自AWS Cloudtrail 文檔

{"Records": [{
    "eventVersion": "1.0",
    "userIdentity": {
        "type": "IAMUser",
        "principalId": "EX_PRINCIPAL_ID",
        "arn": "arn:aws:iam::123456789012:user/Alice",
        "accountId": "123456789012",
        "accessKeyId": "EXAMPLE_KEY_ID",
        "userName": "Alice",
        "sessionContext": {"attributes": {
            "mfaAuthenticated": "false",
            "creationDate": "2014-03-06T15:15:06Z"
        }}
    },
    "eventTime": "2014-03-06T17:10:34Z",
    "eventSource": "ec2.amazonaws.com",
    "eventName": "CreateKeyPair",
    "awsRegion": "us-east-2",
    "sourceIPAddress": "72.21.198.64",
    "userAgent": "EC2ConsoleBackend, aws-sdk-java/Linux/x.xx.fleetxen Java_HotSpot(TM)_64-Bit_Server_VM/xx",
    "requestParameters": {"keyName": "mykeypair"},
    "responseElements": {
        "keyName": "mykeypair",
        "keyFingerprint": "30:1d:46:d0:5b:ad:7e:1b:b6:70:62:8b:ff:38:b5:e9:ab:5d:b8:21",
        "keyMaterial": "\u003csensitiveDataRemoved\u003e"
    }
}]}

如果在創建密鑰對時未啟用 cloudTrail,我認為您可能不走運。 如果您有付費支持,您可以向 AWS 提出問題或以其他方式使用 AWS 論壇——他們可能比我了解更多。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM