AWS provides a feature called AssumeRole to retrieve temporary security credentials for IAM roles.
The IAM roles can belong to someone elses AWS account, allowing you to act on their behalf.
Using KKP you are able to use the AssumeRole
feature to easily deploy user clusters to AWS accounts that you normally do not have access to.
sts:AssumeRole
aws sts assume-role --role-arn "arn:aws:iam::YOUR_AWS_ACCOUNT_B_ID:role/YOUR_IAM_ROLE" --role-session-name "test" --external-id "YOUR_EXTERNAL_ID_IF_SET"
External ID
is optional but recommended when configuring the trust relationship. It helps avoiding the confused deputy problemCreating a new cluster using an assumed role is a breeze.
During cluster creation choose AWS as your provider and configure the cluster to your liking.
After entering your AWS access credentials (access key ID and secret access key) choose “Enable Assume Role” (1), enter the ARN of the IAM role you would like to assume in field (2) (IAM role ARN should be in the format arn:aws:iam::ID_OF_AWS_ACCOUNT_B:role/ROLE_NAME
) and if the IAM role has an optional External ID
add it in field (3).
After that you can proceed as usual.
Please note that KKP has no way to clean up clusters after a trust relationship has been removed. You should assure that all resources managed by KKP have been shut down before removing access.