aws-keycloak
aws-keycloak copied to clipboard
Add support for AWS SDK credential provider compatible output
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"}