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

Commas break aws-sso-cli (not sure which part) #440

Closed
kevcube opened this issue Oct 18, 2022 · 0 comments · Fixed by #441
Closed

Commas break aws-sso-cli (not sure which part) #440

kevcube opened this issue Oct 18, 2022 · 0 comments · Fixed by #441
Labels
bug Something isn't working

Comments

@kevcube
Copy link
Contributor

kevcube commented Oct 18, 2022

Output of aws-sso version:

AWS SSO CLI Version 1.9.4 -- Copyright 2021-2022 Aaron Turner
f6b9b90d559de3c935000a9acf02be6aa554fb63 (Homebrew) built at 2022-10-18T15:14:56+0000

Describe the bug:
A comma in our account alias seems to be breaking an int parse somewhere
Account alias is: CompanyName, Inc.

To Reproduce:

  1. aws-sso exec (or any command that will cache a token)
  2. all following aws-sso commands fail
kevinmahoney@hostname ~ % aws-sso exec -- gossm sshh
Please use `exit` or `Ctrl-D` to quit.
PANIC   Unable to parse: Company, Inc.:CoEngAWSAdmins,1666106650  error="strconv.ParseInt: parsing \" Inc.:CoEngAWSAdmins\": invalid syntax"
panic: (*logrus.Entry) 0x14000462230

goroutine 1 [running]:
github.com/sirupsen/logrus.Entry.log({0x1400021c1c0, 0x1400044f800, {0x0, 0x0, 0x0}, 0x0, 0x0, {0x0, 0x0}, 0x0, ...}, ...)
	/Users/kevinmahoney/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/sirupsen/logrus@v1.7.0/entry.go:255 +0x358
github.com/sirupsen/logrus.(*Entry).Log(0x140004621c0, 0x0, {0x14000286fe8?, 0x1?, 0x1?})
	/Users/kevinmahoney/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/sirupsen/logrus@v1.7.0/entry.go:283 +0xec
github.com/sirupsen/logrus.(*Entry).Logf(0x140004621c0, 0x0, {0x104e5799e?, 0x40?}, {0x14000287058?, 0x104e2a004?, 0x12?})
	/Users/kevinmahoney/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/sirupsen/logrus@v1.7.0/entry.go:329 +0x88
github.com/sirupsen/logrus.(*Entry).Panicf(...)
	/Users/kevinmahoney/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/sirupsen/logrus@v1.7.0/entry.go:367
github.com/synfinatic/aws-sso-cli/sso.reformatHistory({0x14000410db0, 0x2c})
	/private/tmp/aws-sso-cli-20221018-87628-1oxxl7g/aws-sso-cli-1.9.4/sso/tags_list.go:115 +0xc4
github.com/synfinatic/aws-sso-cli/sso.(*Cache).GetRoleTagsSelect(0x1400044ed50)
	/private/tmp/aws-sso-cli-20221018-87628-1oxxl7g/aws-sso-cli-1.9.4/sso/cache.go:368 +0x3a4
main.NewTagsCompleter(0x1400044e420, 0x14000415e00, 0x105062378)
	/private/tmp/aws-sso-cli-20221018-87628-1oxxl7g/aws-sso-cli-1.9.4/cmd/aws-sso/select.go:46 +0x38
main.(*ExecCmd).Run(0x1?, 0x1400044e420)
	/private/tmp/aws-sso-cli-20221018-87628-1oxxl7g/aws-sso-cli-1.9.4/cmd/aws-sso/exec_cmd.go:100 +0x1dc
reflect.Value.call({0x104fb9aa0?, 0x14000187940?, 0x14000287a48?}, {0x104e4f916, 0x4}, {0x1400047c108, 0x1, 0x104b3ddfc?})
	/opt/homebrew/Cellar/go/1.19.2/libexec/src/reflect/value.go:584 +0x688
reflect.Value.Call({0x104fb9aa0?, 0x14000187940?, 0x104f8f940?}, {0x1400047c108?, 0x14000438000?, 0x6?})
	/opt/homebrew/Cellar/go/1.19.2/libexec/src/reflect/value.go:368 +0x90
github.com/alecthomas/kong.callMethod({0x104e4f47e, 0x3}, {0x105033620?, 0x14000187940?, 0x3?}, {0x104fb9aa0?, 0x14000187940?, 0x1?}, 0x0?)
	/Users/kevinmahoney/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/alecthomas/kong@v0.2.18/callbacks.go:97 +0x3f0
github.com/alecthomas/kong.(*Context).RunNode(0x14000271380, 0x1400021e460, {0x14000287ec8, 0x1, 0x1})
	/Users/kevinmahoney/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/alecthomas/kong@v0.2.18/context.go:731 +0x460
github.com/alecthomas/kong.(*Context).Run(0x14000264870?, {0x14000287ec8?, 0x104e53034?, 0x27?})
	/Users/kevinmahoney/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/alecthomas/kong@v0.2.18/context.go:756 +0x144
main.main()
	/private/tmp/aws-sso-cli-20221018-87628-1oxxl7g/aws-sso-cli-1.9.4/cmd/aws-sso/main.go:190 +0x86c

Expected behavior:
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: macOS
  • Version 12.6

Additional context:
Add any other context about the problem here.

Contents of ~/.aws-sso/config.yaml:

SSOConfig:
    CompanyName:
        SSORegion: us-west-2
        StartUrl: https://companyname-sso.awsapps.com/start
        DefaultRegion: us-west-2
DefaultRegion: us-west-2
ConsoleDuration: 720
CacheRefresh: 168
AutoConfigCheck: false
UrlAction: open
ConfigProfilesUrlAction: open
LogLevel: error
HistoryLimit: 10
HistoryMinutes: 1440
@kevcube kevcube added the bug Something isn't working label Oct 18, 2022
synfinatic added a commit that referenced this issue Oct 26, 2022
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

Successfully merging a pull request may close this issue.

1 participant