-
Notifications
You must be signed in to change notification settings - Fork 826
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
Handle [sso-session] section #1088
Conversation
2c18da7
to
204fe62
Compare
vault/config.go
Outdated
func (s ProfileSection) IsEmpty() bool { | ||
s.Name = "" | ||
return s == ProfileSection{} | ||
} | ||
|
||
// ProfileSections returns all the profile sections in the config | ||
func (c *ConfigFile) ProfileSections() []ProfileSection { | ||
result := []ProfileSection{} | ||
var result []ProfileSection |
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.
Fixed IDE warning, no semantic change.
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.
why?
@@ -218,7 +218,7 @@ func (t *tempCredsCreator) provider(config *Config) (aws.CredentialsProvider, er | |||
if err != nil { | |||
return nil, err | |||
} | |||
} else if config.HasSSOStartURL() { | |||
} else if config.HasSSOStartURL() || config.HasSSOSession() { | |||
return NewSSORoleCredentialsProvider(t.keyring.Keyring, config) |
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.
In proper case, both of them are true. However, [sso-session]
may lack sso_start_url
. In that case I feel like it should still go the SSO way.
50161f3
to
a92c6b6
Compare
.gitignore
Outdated
@@ -1,3 +1,5 @@ | |||
/aws-vault | |||
/aws-vault-* | |||
/SHA256SUMS | |||
|
|||
/.idea |
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.
put this in your global gitignore
SSORegion string | ||
|
||
// SSORegistrationScopes specifies registration scopes for the AWS IAM Identity Center user portal. | ||
SSORegistrationScopes string | ||
|
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.
doesn't seem this is ever used?
a92c6b6
to
e5ee07e
Compare
New AWS CLI changed config format for SSO values. Instead of specifying
sso_start_url
andsso_region
,it now makes
sso_session
profile param, that points to a separate[sso-session]
section.This PR adds support for the
sso_session
param and parsing[sso-session]
section.