aws-keycloak icon indicating copy to clipboard operation
aws-keycloak copied to clipboard

Add support for AWS SDK credential provider compatible output

Open mlaouichi opened this issue 1 year ago • 0 comments

The AWS SDK allows sourcing credentials from external processes.

This PR adds support for the expected output format through a new command "acp" This enables the use of profiles set up this way

[profile myenv]
credential_process=aws-keycloak -p power-myenv acp
# Export the profile name, prepend it or use a dedicated tool such as oh-my-zsh asp
AWS_PROFILE=myenv aws sts get-caller-identity

[...]

When run on its own, this is the expected output

$> aws-keycloak -p power-myenv acp
{"Version":1,"AccessKeyId":"xxx","SecretAccessKey":"xxx","SessionToken":"xxx","Expiration":"2024-01-18T03:40:09.000Z"}

mlaouichi avatar Jan 18 '24 02:01 mlaouichi