Allow users to provide a policy document or policies ARNs to AssumeRoleProvider
builder
#641
Closed
1 of 2 tasks
Labels
Describe the feature
I would be great if an user could provide an IAM policy document and/or a list of policy ARNs to the
AssumeRoleProvider
builder, this allow users to dynamically add IAM policies to the IAM role it wishes to assume, without having to explicitly use the STS client to assume the role which the desired policies and then build a custom credential provider from the credentials of the assumed role.Use Case
A user who wishes to create a dynamo db client (for example) with fine-grained control, using a certain IAM policy(s) could just use the
AssumeRoleProvider
credential provider in the following way:currently, to achieve what is described above the user have to make an
assume_role
request using the sts client, and then implement their own custom credential provider, which will be used when creating the dynamodb (in this example) client configuration.Proposed Solution
Include a
set_policy
and/orset_policy_arns
methods in theAssumeRoleProvider
builder, similarly how is done in the sts clientOther Information
Let me know if I should provide a correct/more concise example, or if there is anything else I can add to make the request more clear.
Acknowledgements
A note for the community
Community Note
The text was updated successfully, but these errors were encountered: