-
Notifications
You must be signed in to change notification settings - Fork 224
Login with source_profile doesn't work on current version #182
Comments
Interesting. We don't really use |
From git bisect
Related to #174 To be specific, - session, err = p.assumeRoleFromSession(session, role)
+ creds, err := p.assumeRoleFromSession(creds, role) causes the issue because it shadows outer My workaround diff --git a/lib/provider.go b/lib/provider.go
index f956cfa..b2650d4 100644
--- a/lib/provider.go
+++ b/lib/provider.go
@@ -157,7 +157,8 @@ func (p *Provider) Retrieve() (credentials.Value, error) {
// roles directly.
if p.profile != source {
if role, ok := p.profiles[p.profile]["role_arn"]; ok {
- creds, err := p.assumeRoleFromSession(creds, role)
+ var err error
+ creds, err = p.assumeRoleFromSession(creds, role)
if err != nil {
return credentials.Value{}, err
} |
Nice, good work! I'm pretty sure That patch looks good to me, @yhlee-tw; wanna submit a PR? |
do not shadow outer creds fixes segmentio#182
Can we please get a bugfix release for this? One errant |
do not shadow outer creds fixes #182
Hey there, we have some new users who are using the latest version of the tool that are having issues running
aws-okta login <x>
where profile x is configured with a source_profile. They get logged into the source account Console rather than the target account.Looking through CloudTrail logs we see the assumerole into the target account (presumably to generate the federated login token) but do not see any actual ConsoleLogin attempt after that.
Giving these users an older binary off of my machine fixed the issue, so it may have been a somewhat recent change that broke this or somehow changed the behavior.
The text was updated successfully, but these errors were encountered: