common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
1.06k stars 93 forks source link

add --chain flag to assume another role inline #527

Closed JoshuaWilkes closed 11 months ago

JoshuaWilkes commented 11 months ago

What changed?

Fixes #506

Also fixes a bug with --exec where existing AWS_ env vars are passed through from the callers environment, this can mean that AWS_PROFILE may be set and not overwritten

I now strip the AWS_PROFILE env var from the pass through env

Why?

How did you test it?

Usage can be either with --exec or just a regular profile assume base-profile --chain arn:aws:iam::12345678912:role/aws-josh --exec -- aws sts get-caller-identity assume base-profile --chain arn:aws:iam::12345678912:role/aws-josh

Potential risks

Is patch release candidate?

Link to relevant docs PRs