Skip to content

Handle [sso-session] section#1088

Merged
mtibben merged 4 commits into99designs:masterfrom
dima-vm:dl/sso-session
Feb 3, 2023
Merged

Handle [sso-session] section#1088
mtibben merged 4 commits into99designs:masterfrom
dima-vm:dl/sso-session

Conversation

@dima-vm
Copy link
Copy Markdown
Contributor

@dima-vm dima-vm commented Dec 9, 2022

New AWS CLI changed config format for SSO values. Instead of specifying sso_start_url and sso_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.

Comment thread vault/config.go Outdated
// ProfileSections returns all the profile sections in the config
func (c *ConfigFile) ProfileSections() []ProfileSection {
result := []ProfileSection{}
var result []ProfileSection
Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Comment thread vault/vault.go
}
} else if config.HasSSOStartURL() {
} else if config.HasSSOStartURL() || config.HasSSOSession() {
return NewSSORoleCredentialsProvider(t.keyring.Keyring, config)
Copy link
Copy Markdown
Contributor Author

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.

Comment thread .gitignore Outdated
/aws-vault-*
/SHA256SUMS

/.idea
Copy link
Copy Markdown
Member

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

Comment thread vault/config.go

// SSORegistrationScopes specifies registration scopes for the AWS IAM Identity Center user portal.
SSORegistrationScopes string

Copy link
Copy Markdown
Member

@mtibben mtibben Dec 18, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants