-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Added assume role credentials support from profiles #1132
Conversation
70c7ca1
to
1d5986a
Compare
1d5986a
to
1bcc8b7
Compare
end | ||
|
||
def load_profile | ||
if profile = profiles[profile_name] | ||
if profile.key?('role_arn') | ||
if source_profile = profile['source_profile'] | ||
profile['aws_access_key_id'] = profiles[source_profile]['aws_access_key_id'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But what happens if we will have the defined one from these parameters in non-source profile? Seems they will be re-written from source one. I believe the usage of method "merge" is more correct. But I agree with check the existence of source profile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I agreed it would be more convenient to have access_key and session_token in the non-source profile. But I made these changes so that it can be uniform with python and java implementations. In botocore, for example, source profile is a mandatory field, and access_key and session_token are only retrieved from source profile. Please refer https://github.com/boto/botocore/blob/develop/botocore/credentials.py#L840-L866 for more information. I believe it is the same idea in java implementation.
@awood45 Could you comment if this PR can be merged or what update is needed to get it merged? Thanks |
Primarily a matter of discussion on our end about the details of how we can best support this across SDKs (not just Ruby). I'm driving that now, working towards a sustainable and backwards-compatible solution. |
@awood45 FYI, the lack of this is forcing us to write horrid workarounds: https://github.com/bazaarvoice/cloudformation-ruby-dsl/pull/83 Please consider accepting this PR as an interim solution, possibly marked with "alpha code" warnings, if you are unable to reach an internal solution quickly. |
Alright we're moving forward, here's what I'd like to see before merging (I'll pull this down and do these things next week, but if you'd like to tackle it first, go for it):
Additionally, I'm looking at MFA support and a bit more. But we can pull down this PR once we have tests and the ENV flag in place. |
Closed in favor of #1178 |
Similar to #1092. But I made a few changes to make it consistent with python and java sdk.