本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
AWS Security Token Service 的動作、資源和條件索引鍵
AWS 安全性權杖服務 (服務前置詞:sts
) 提供下列服務特定資源、動作和條件內容金鑰,以便在 IAM 權限政策中使用。
參考資料:
-
了解如何設定此服務。
-
檢視可供此服務使用的 API 操作清單。
-
了解如何使用 IAM 許可政策來保護此服務及其資源。
主題
AWS Security Token Service 定義的動作
您可在 IAM 政策陳述式的 Action
元素中指定以下動作。使用政策來授予在 AWS 中執行操作的許可。在政策中使用動作時,通常會允許或拒絕存取相同名稱的 API 操作或 CLI 命令。不過,在某些情況下,單一動作可控制對多個操作的存取。或者,某些操作需要多種不同的動作。
「動作」資料表的資源類型欄會指出每個動作是否支援資源層級的許可。如果此欄沒有值,您必須在政策陳述式的 Resource
元素中指定政策適用的所有資源 ("*")。如果資料欄包含資源類型,則您可以在具有該動作的陳述式中指定該類型的 ARN。如果動作具有一或多個必要資源,呼叫者必須具有對這些資源使用動作的許可。表格中的必要資源會以星號 (*) 表示。如果您使用 IAM 政策中的 Resource
元素限制資源存取,則每種必要的資源類型必須要有 ARN 或模式。某些動作支援多種資源類型。如果資源類型是選用 (未顯示為必要),則您可以選擇使用其中一種選用資源類型。
「動作」資料表的條件索引鍵欄包含您可以在政策陳述式的 Condition
元素中指定的索引鍵。如需有關與服務資源相關聯之條件索引鍵的詳細資訊,請參閱「資源類型」資料表的條件索引鍵欄。
注意
資源條件索引鍵會列在資源類型資料表中。您可以在「動作」資料表的資源類型 (*必填) 欄中找到適用於動作的資源類型連結。「資源類型」資料表中的資源類型包括條件索引鍵欄,其中包含套用至「動作」資料表中動作的資源條件索引鍵。
如需下表各欄的詳細資訊,請參閱動作資料表。
動作 | 描述 | 存取層級 | 資源類型 (*必填項目) | 條件索引鍵 | 相依動作 |
---|---|---|---|---|---|
AssumeRole | 授與取得一組暫時安全登入資料的權限,您可以用來存取您通常無法存取的 AWS 資源 | 寫入 | |||
cognito-identity.amazonaws.com:amr cognito-identity.amazonaws.com:aud |
|||||
AssumeRoleWithSAML | 准許透過 SAML 驗證回應,為已驗證過的使用者取得一組臨時安全憑證 | 寫入 | |||
saml:eduorgidentityauthnpolicyuri saml:edupersonprimaryaffiliation saml:edupersonprimaryorgunitdn |
|||||
AssumeRoleWithWebIdentity | 准許為在行動或 Web 應用程式中,透過 Web 身分提供者驗證的使用者取得一組臨時安全憑證 | 寫入 | |||
cognito-identity.amazonaws.com:amr cognito-identity.amazonaws.com:aud |
|||||
DecodeAuthorizationMessage | 授與從回應要求而傳回的已編碼訊息中,解碼有關要求授權狀態之其他資訊的權限 AWS | 寫入 | |||
GetAccessKeyInfo | 准許取得以參數形式傳遞至請求的存取金鑰 ID 相關詳細資訊 | 讀取 | |||
GetCallerIdentity | 准許取得 IAM 身分的詳細資訊,該身分的憑證會用來呼叫 API | 讀取 | |||
GetFederationToken | 准許為聯合身分使用者取得一組臨時安全憑證 (包括存取金鑰 ID、私密存取金鑰和安全字符) | 讀取 | |||
GetServiceBearerToken [僅限許可] | 授予取得 AWS 根使用者、IAM 角色或 IAM 使用者的 STS 承載權杖的權限 | 讀取 | |||
GetSessionToken | 授與取得 AWS 帳戶 或 IAM 使用者的一組臨時安全登入資料 (包含存取金鑰 ID、秘密存取金鑰和安全性權杖) 的權限 | 讀取 | |||
SetContext [僅限許可] | 准許在 STS 工作階段上設定內容索引鍵 | 寫入 | |||
SetSourceIdentity [僅限許可] | 准許在 STS 工作階段上設定來源身分 | 寫入 | |||
TagSession [僅限許可] | 准許將標籤新增至 STS 工作階段 | 標記 | |||
AWS Security Token Service 定義的資源類型
此服務會定義下列資源類型,並可用在 IAM 許可政策陳述式的 Resource
元素中。動作資料表中的每個動作都會指明可使用該動作指定的資源類型。資源類型也能定義您可以在政策中包含哪些條件索引鍵。這些索引鍵都會顯示在表格的最後一欄。如需下表各欄的詳細資訊,請參閱資源類型表。
AWS Security Token Service 的條件索引鍵
AWS 安全性權杖服務會定義下列可在 IAM 政策Condition
元素中使用的條件金鑰。您可以使用這些索引鍵來縮小套用政策陳述式的條件。如需下表各欄的詳細資訊,請參閱條件索引鍵資料表。
若要檢視所有服務都可使用的全域條件索引鍵,請參閱可用全域條件索引鍵。
條件索引鍵 | 描述 | Type |
---|---|---|
accounts.google.com:aud | 依 Google 應用程式 ID 篩選存取權 | 字串 |
accounts.google.com:oaud | 依 Google 對象篩選存取權 | 字串 |
accounts.google.com:sub | 依宣告主旨 (Google 使用者 ID) 篩選存取權 | 字串 |
aws:RequestTag/${TagKey} | 依要求中傳遞的標籤來篩選存取權 | 字串 |
aws:ResourceTag/${TagKey} | 依與資源關聯的標籤來篩選存取權 | 字串 |
aws:TagKeys | 依要求中傳遞的標籤索引鍵來篩選存取權 | ArrayOfString |
cognito-identity.amazonaws.com:amr | 依 Amazon Cognito 登入資訊篩選存取權 | 字串 |
cognito-identity.amazonaws.com:aud | 依 Amazon Cognito 身分集區 ID 篩選存取權 | 字串 |
cognito-identity.amazonaws.com:sub | 依宣告主旨 (Amazon Cognito 使用者 ID) 篩選存取權 | 字串 |
graph.facebook.com:app_id | 依 Facebook 應用程式 ID 篩選存取權 | 字串 |
graph.facebook.com:id | 依 Facebook 使用者 ID 篩選存取權 | 字串 |
iam:ResourceTag/${TagKey} | 依連接至擔任角色的標籤篩選存取權 | 字串 |
saml:aud | 依顯示 SAML 宣告的端點 URL 篩選存取權 | 字串 |
saml:cn | 依 eduOrg 屬性篩選存取權 | ArrayOfString |
saml:commonName | 依 commonName 屬性篩選存取權 | 字串 |
saml:doc | 依用來擔任角色的委託人篩選存取權 | 字串 |
saml:eduorghomepageuri | 依 eduOrg 屬性篩選存取權 | ArrayOfString |
saml:eduorgidentityauthnpolicyuri | 依 eduOrg 屬性篩選存取權 | ArrayOfString |
saml:eduorglegalname | 依 eduOrg 屬性篩選存取權 | ArrayOfString |
saml:eduorgsuperioruri | 依 eduOrg 屬性篩選存取權 | ArrayOfString |
saml:eduorgwhitepagesuri | 依 eduOrg 屬性篩選存取權 | ArrayOfString |
saml:edupersonaffiliation | 依 eduPerson 屬性篩選存取權 | ArrayOfString |
saml:edupersonassurance | 依 eduPerson 屬性篩選存取權 | ArrayOfString |
saml:edupersonentitlement | 依 eduPerson 屬性篩選存取權 | ArrayOfString |
saml:edupersonnickname | 依 eduPerson 屬性篩選存取權 | ArrayOfString |
saml:edupersonorgdn | 依 eduPerson 屬性篩選存取權 | 字串 |
saml:edupersonorgunitdn | 依 eduPerson 屬性篩選存取權 | ArrayOfString |
saml:edupersonprimaryaffiliation | 依 eduPerson 屬性篩選存取權 | 字串 |
saml:edupersonprimaryorgunitdn | 依 eduPerson 屬性篩選存取權 | 字串 |
saml:edupersonprincipalname | 依 eduPerson 屬性篩選存取權 | 字串 |
saml:edupersonscopedaffiliation | 依 eduPerson 屬性篩選存取權 | ArrayOfString |
saml:edupersontargetedid | 依 eduPerson 屬性篩選存取權 | ArrayOfString |
saml:givenName | 依 givenName 屬性篩選存取權 | 字串 |
saml:iss | 依發行者 (由 URN 代表) 篩選存取權 | 字串 |
saml:mail | 依 mail 屬性篩選存取權 | 字串 |
saml:name | 依 name 屬性篩選存取權 | 字串 |
saml:namequalifier | 依發行者的雜湊值、帳戶 ID 和易記名稱篩選存取權 | 字串 |
saml:organizationStatus | 依 organizationStatus 屬性篩選存取權 | 字串 |
saml:primaryGroupSID | 依 primaryGroupSID 屬性篩選存取權 | 字串 |
saml:sub | 依宣告主旨 (SAML 使用者 ID) 篩選存取權 | 字串 |
saml:sub_type | 依值的持續性、暫時性或完整格式的 URI 篩選存取權 | 字串 |
saml:surname | 依 surname 屬性篩選存取權 | 字串 |
saml:uid | 依 uid 屬性篩選存取權 | 字串 |
saml:x500UniqueIdentifier | 依 uid 屬性篩選存取權 | 字串 |
sts:AWSServiceName | 依取得承載字符的服務篩選存取權 | 字串 |
sts:DurationSeconds | 依取得承載字符時的持續時間 (以秒為單位) 篩選存取權 | 字串 |
sts:ExternalId | 依您在另一個帳戶中擔任角色時所需的唯一識別符篩選存取權 | 字串 |
sts:RequestContext/${ContextKey} | 依從受信任內容提供者擷取的簽署內容聲明中的內嵌工作階段鍵/值對來篩選存取權 | 字串 |
sts:RequestContextProviders | 依內容提供者 ARN 篩選存取權 | ArrayOfARN |
sts:RoleSessionName | 依您擔任角色時所需的角色工作階段名稱篩選存取權 | 字串 |
sts:SourceIdentity | 依請求中傳遞的來源身分篩選存取權 | 字串 |
sts:TransitiveTagKeys | 依請求中傳遞的轉移標籤索引鍵篩選存取權 | ArrayOfString |
www.amazon.com:app_id | 依 Login with Amazon 應用程式 ID 篩選存取權 | 字串 |
www.amazon.com:user_id | 依 Login with Amazon 使用者 ID 篩選存取權 | 字串 |