Skip to content
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

[Bug]: Running token command with new SSO profile/session config format returns an error #606

Closed
amorey opened this issue Jun 16, 2023 · 3 comments · Fixed by #628
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@amorey
Copy link

amorey commented Jun 16, 2023

What happened?

Running token command with AWS SSO's newer profile/session config format returns an error:

$ export AWS_PROFILE="my-profile"
$ aws-iam-authenticator token -i my-cluster-name
could not get token: could not create session: profile "my-profile" is configured to use SSO but is missing required configuration: sso_region, sso_start_url

What you expected to happen?

token command to generate a token using the SSO credentials

Anything else we need to know?

Here's what the aws config file looks like (produced by aws configure sso):

[profile my-profile]
sso_session = my-sso-session
sso_account_id = 1234567890
sso_role_name = MyRole
region = us-east-1

[sso-session my-sso-session]
sso_start_url = https://myorganization.awsapps.com/start/
sso_region = us-east-1
sso_registration_scopes = sso:account:access

Installation tooling

other (please specify in description)

AWS IAM Authenticator client version

0.6.2

Client information

- OS/arch: macOS/amd64
- kubernetes client & version: n/a

Kubernetes API Version

n/a

kubeconfig user

n/a
@amorey amorey added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 16, 2023
@tapanhalani
Copy link

Same thing happening with me on authenticator version 0.6.10 , using it from a WSL2 ubuntu on windows.

@vutny
Copy link
Contributor

vutny commented Aug 28, 2023

This is still an issue in version 0.6.11.
It looks like the root cause is lying down in aws-sdk-go v1 module, but it should be fixed by this commit: aws/aws-sdk-go@d744468

Need to bump github.com/aws/aws-sdk-go at least to v1.44.298

@vutny
Copy link
Contributor

vutny commented Aug 28, 2023

Submitted PR #628

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants