AssumeRole
Table of Contents- Introduction
- API Request Parameters
- Sample
POSTRequest - Sample Response
- Using AssumeRole API
- Explore Further
Introduction
Returns a set of temporary security credentials that you can use to access MinIO resources. AssumeRole requires authorization credentials for an existing user on MinIO. The advantages of this API are- To be able to reliably use S3 multipart APIs feature of the SDKs without re-inventing the wheel of pre-signing the each URL in multipart API. This is very tedious to implement with all the scenarios of fault tolerance that’s already implemented by the client SDK. The general client SDKs don’t support multipart with presigned URLs.
- To be able to easily get the temporary credentials to upload to a prefix. Make it possible for a client to upload a whole folder using the session. The server side applications need not create a presigned URL and serve to the client for each file. Since, the client would have the session it can do it by itself.
API Request Parameters
Version
Indicates STS API version information, the only supported value is ‘2011-06-15’. This value is borrowed from AWS STS API documentation for compatibility reasons.| Params | Value |
|---|---|
| Type | String |
| Required | Yes |
AUTHPARAMS
Indicates STS API Authorization information. If you are familiar with AWS Signature V4 Authorization header, this STS API supports signature V4 authorization as mentioned hereDurationSeconds
The duration, in seconds. The value can range from 900 seconds (15 minutes) up to 7 days. If value is higher than this setting, then operation fails. By default, the value is set to 3600 seconds.| Params | Value |
|---|---|
| Type | Integer |
| Valid Range | Minimum value of 900. Maximum value of 604800. |
| Required | No |
Policy
An IAM policy in JSON format that you want to use as an inline session policy. This parameter is optional. Passing policies to this operation returns new temporary credentials. The resulting session’s permissions are the intersection of the canned policy name and the policy set here. You cannot use this policy to grant more permissions than those allowed by the canned policy name being assumed.| Params | Value |
|---|---|
| Type | String |
| Valid Range | Minimum length of 1. Maximum length of 2048. |
| Required | No |
Response Elements
XML response for this API is similar to AWS STS AssumeRoleErrors
XML error response for this API is similar to AWS STS AssumeRoleSample POST Request
Sample Response
Using AssumeRole API
Use the same username and password created in the previous steps.
NOTE: In the following commands--role-arnand--role-session-nameare not meaningful for MinIO and can be set to any value satisfying the command line requirements.
