AssumeRoleWithCustomToken
MinIO 安全權杖服務 (STS) AssumeRoleWithCustomToken
API 端點會產生一個權杖,用於 MinIO 外部身分管理外掛程式。
請求端點
AssumeRoleWithCustomToken
端點具有以下形式
POST https://minio.example.net?Action=AssumeRoleWithCustomToken[&ARGS]
以下範例使用所有支援的引數。將 minio.example.net
主機名稱替換為 MinIO 叢集的適當 URL
POST https://minio.example.net?Action=AssumeRoleWithCustomToken
&Token=TOKEN
&Version=2011-06-15
&DurationSeconds=86000
&RoleArn="external-auth-provider"
請求查詢參數
此端點支援以下查詢參數
參數 |
類型 |
說明 |
---|---|---|
|
字串 |
必要 指定要呈現給外部身分管理員的 JSON 權杖。MinIO 期望身分管理員解析權杖,並判斷是否使用該權杖來驗證用戶端請求。 |
|
字串 |
必要 指定 |
|
字串 |
必要 指定要與此 STS 請求關聯的身分管理外掛程式組態的 ARN。 有關更多資訊,請參閱 |
|
整數 |
選用 指定臨時憑證過期之前的秒數。預設為
|
回應元素
MinIO 會傳回 AssumeRoleWithCustomTokenResult
物件,其中 AssumedRoleUser.Credentials
物件包含由 MinIO 產生的臨時憑證
AccessKeyId
- 應用程式用於驗證的存取金鑰。SecretKeyId
- 應用程式用於驗證的秘密金鑰。Expiration
- 憑證過期後的 ISO-8601 日期時間。SessionToken
- 應用程式用於驗證的工作階段權杖。使用臨時憑證時,某些 SDK 可能需要此欄位。
以下範例與 MinIO STS AssumeRoleWithCustomToken
端點傳回的回應類似
<?xml version="1.0" encoding="UTF-8"?>
<AssumeRoleWithCustomTokenResponse xmlns="https://sts.amazonaws.com/doc/2011-06-15/">
<AssumeRoleWithCustomTokenResult>
<Credentials>
<AccessKeyId>ACCESS_KEY</AccessKeyId>
<SecretAccessKey>SECRET_KEY</SecretAccessKey>
<Expiration>YYYY-MM-DDTHH:MM:SSZ</Expiration>
<SessionToken>TOKEN</SessionToken>
</Credentials>
<AssumedUser>custom:Alice</AssumedUser>
</AssumeRoleWithCustomTokenResult>
<ResponseMetadata>
<RequestId>UNIQUE_ID</RequestId>
</ResponseMetadata>
</AssumeRoleWithCustomTokenResponse>
錯誤元素
此 API 端點的 XML 錯誤回應與 AWS AssumeRoleWithWebIdentity 回應類似。