Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the default duration for assuming an AWS role from 90m to 60m #1074

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

onkarbhat
Copy link
Contributor

@onkarbhat onkarbhat commented Aug 25, 2021

Change Overview

Change the default duration for assuming an AWS role from 90m to 60m since newly created IAM role's have a default max duration of 60m.

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • #XXX

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

…since newly created IAM role's have a default max duration of 60m.
@vkamra
Copy link

vkamra commented Aug 25, 2021

@onkarbhat - what is the default used in AWS SDK when one is not specified? Should we use that - since it matches previous behavior (and override in specific cases - like Kopia)?

The other question is that if we are going to use a higher value for Kopia operations - isn't it better to catch the issue earlier during profile creation/validation?

I may not be able to re-review - so please don't block behind this if we need something for the release.

@onkarbhat
Copy link
Contributor Author

@vkamra - The default is 60m when no duration is specified. See the row for AssumeRoleWithWebIdentity here - https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session . I am not sure why the previous default in Kanister was 90 minutes. Based on the information in this link, and also considering that the max duration for a new IAM role also default to 60 minutes, the default of 60 minutes in Kanister makes sense.

Yes, improving profile validation will be helpful. It will require that we get the settings (including the max session duration ) for an IAM role and compare that with the default/configured duration. We will have to check if this requires that a user/role be setup with the necessary permissions to query for IAM roles though - I'll confirm if this is needed. But we can add this later ( should not block this change )

@mergify mergify bot merged commit d3b8b81 into master Aug 25, 2021
@mergify mergify bot deleted the assume_role_duation_default branch August 25, 2021 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants