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

SSO profile not working #74

Closed
andrewlytle opened this issue Oct 5, 2021 · 3 comments
Closed

SSO profile not working #74

andrewlytle opened this issue Oct 5, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@andrewlytle
Copy link

I'm running into a similar problem to #13

I'm using AWS SSO to login, and I can do successfully and run commands from the v2 cli, but when I try to run Rain I get an unable to find valid credentials error.

rain ls --profile <profile_name_redacted> --debug
panic: unable to find valid credentials [recovered]
	panic: unable to find valid credentials

goroutine 1 [running]:
github.com/aws-cloudformation/rain/internal/cmd.execute.func1(0xc0000a1f58)
	github.com/aws-cloudformation/rain/internal/cmd/wrap.go:77 +0x225
panic(0x18d5700, 0xc000062f10)
	runtime/panic.go:965 +0x1b9
github.com/aws-cloudformation/rain/internal/aws.loadConfig(0x1fc9a90, 0xc0001ba1d0, 0xc000028c80, 0xb, 0x1)
	github.com/aws-cloudformation/rain/internal/aws/aws.go:80 +0x906
github.com/aws-cloudformation/rain/internal/aws.NamedConfig(0xc000028c80, 0xb, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	github.com/aws-cloudformation/rain/internal/aws/aws.go:114 +0x149
github.com/aws-cloudformation/rain/internal/aws.Config(...)
	github.com/aws-cloudformation/rain/internal/aws/aws.go:95
github.com/aws-cloudformation/rain/internal/cmd/ls.glob..func1(0x2302560, 0xc00054c960, 0x0, 0x3)
	github.com/aws-cloudformation/rain/internal/cmd/ls/ls.go:44 +0x368
github.com/spf13/cobra.(*Command).execute(0x2302560, 0xc00054c930, 0x3, 0x3, 0x2302560, 0xc00054c930)
	github.com/spf13/[email protected]/command.go:856 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x2302ce0, 0xc00004c740, 0x1068aa8, 0xc000000180)
	github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:897
github.com/aws-cloudformation/rain/internal/cmd.execute(0x2302ce0, 0x0)
	github.com/aws-cloudformation/rain/internal/cmd/wrap.go:86 +0x65
github.com/aws-cloudformation/rain/internal/cmd.Execute(0x2302ce0)
	github.com/aws-cloudformation/rain/internal/cmd/wrap.go:95 +0x2b
main.main()
	command-line-arguments/main.go:23 +0x2d
❯ rain --version
Rain v1.2.0 darwin/amd64

❯ aws --version
aws-cli/2.2.41 Python/3.8.8 Darwin/20.6.0 exe/x86_64 prompt/off
@andrewlytle
Copy link
Author

andrewlytle commented Oct 5, 2021

I was able to work around by using temp keys into ~/.aws/credentials using https://gist.github.com/robvanderleek/7dd54a53ce72e835ac1f319ef2631c5e but @benkehoe would yell

@benkehoe
Copy link

benkehoe commented Oct 5, 2021

github.com/aws/aws-sdk-go-v2/config is currently at v1.1.6 in rain v1.2.0, it should be updated to v1.3.0 for up-to-date AWS SSO support.

I think you can use aws-sso-util credential-process to get around this in a better manner than credential stuffing, but there was this bug about that in the go v1 SDK, I'm not sure if that affected the v2 SDK as well or not.

@stilvoid stilvoid added the bug Something isn't working label Oct 7, 2021
@stilvoid
Copy link
Member

I've updated to the latest version of the SDK in main. New release will be coming soon. Please let me know if that fixes this issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants