assume-role icon indicating copy to clipboard operation
assume-role copied to clipboard

clean environment every time

Open veqryn opened this issue 7 years ago • 3 comments

Fixes https://github.com/remind101/assume-role/issues/18


This change is Reviewable

veqryn avatar Aug 11 '17 22:08 veqryn

I looked through the old issues and found people had similar issues in the past. It seems though that some people need these environment variables to connect to get the new session/assumed-role? If so, then we can't clear it any time. Instead, we should force it to use the profile, as the correct credentials will be stored under there (or its parent profile).

veqryn avatar Aug 11 '17 23:08 veqryn

Hm.. trying this and its not working:

	sess := session.Must(session.NewSession(&aws.Config{
		Credentials: credentials.NewSharedCredentials("", profile),
	}))

Output:

error: SharedCredsLoad: failed to get profile
caused by: section 'eo' does not exist

veqryn avatar Aug 11 '17 23:08 veqryn

I've been running into this issue as well where the env variables are used, it would be better if this tool used the credentials from the credentials config file and generated a config file and set the assumed credentials, it would allow for a daemonised assume-role process that can run just before the expiration of the token to be regenerated.

jcftang avatar Aug 29 '18 07:08 jcftang