common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
956 stars 90 forks source link

AWS command hanging after assume when running on WSL #610

Closed alastairmontgomery1-nhs closed 4 months ago

alastairmontgomery1-nhs commented 4 months ago

I've just installed granted on WSL Ubuntu and seeing some weird behavior with aws command hanging after I've assumed into a role.

Running with the --exec option works.

assume "my_role" --exec 'aws s3 ls'

but

assume "my_role"
aws s3 ls

just hangs and never returns.

I can see two processes running related to this

alastair    1631    1137  0 14:22 pts/0    00:00:00 aws s3 ls
alastair    1636    1631  0 14:22 pts/0    00:00:00 granted credential-process --profile my_role

any idea what is going wrong?

This is in the log file

alastair@LPT-CY9M593:~/.granted$ cat log
{"level":"debug","ts":"2024-02-15T14:48:37Z","msg":"profile registry not configured. Skipping auto sync."}
{"level":"debug","ts":"2024-02-15T14:48:37Z","msg":"process args","execFlag":"","osargs":["assumego","NHSE-Spine-Path-to-Live/Admin"],"c.args":["NHSE-Spine-Path-to-Live/Admin"]}
{"level":"debug","ts":"2024-02-15T14:48:37Z","msg":"processed profile nameNHSE-Spine-Path-to-Live/Admin"}
{"level":"debug","ts":"2024-02-15T14:48:37Z","msg":"exec config:<nil>"}
{"level":"info","ts":"2024-02-15T14:48:48Z","logger":"clio.success","msg":"[NHSE-Spine-Path-to-Live/Admin](eu-west-2) session credentials will expire in 1 hour"}
{"level":"debug","ts":"2024-02-15T14:48:53Z","msg":"profile registry not configured. Skipping auto sync."}
{"level":"debug","ts":"2024-02-15T14:48:53Z","msg":"running credential process with config","profile":"NHSE-Spine-Path-to-Live/Admin","url":"","window":900,"disableCredentialProcessCache":false}
{"level":"debug","ts":"2024-02-15T14:48:53Z","msg":"error loading cached credentials","error":"The specified item could not be found in the keyring"}
shwethaumashanker commented 4 months ago

[Issue resolved in Slack]

TLDR: Installing pass fixed the issue (docs)