Open source software that provides AWS temporary credentials with k8s clusters running outside AWS
- Your new root CA certificate is stored in locksmith/build/secrets/ca_crt.pem
- Your new root CA private key is stored in locksmith/build/secrets/ca_key.pem
cd locksmith/build
chmod +x ./create_secret_ca.sh
./create_secret_ca.sh
- Your new server certificate is stored in locksmith/build/secrets/server_crt.pem
- Your new server private key is stored in locksmith/build/secrets/server_key.pem
cd locksmith/build
chmod +x ./create_secret_server.sh
./create_secret_server.sh
rolesanywhere-trust-policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "rolesanywhere.amazonaws.com"
},
"Action": [
"sts:AssumeRole",
"sts:SetSourceIdentity",
"sts:TagSession"
]
}
]
}
cd locksmith
export AWS_TRUST_ANCHOR_ARN=(ARN for your trust anchor)
export AWS_PROFILE_ARN=(ARN for your AWS profile)
export AWS_ROLE_ARN=(ARN for the AWS role that you are going to assume)
export AWS_REGION=(your AWS region)
docker compose up -d
kubectl create secret tls tls-secret \
--cert=(path to your server certificate) \
--key=(path to your private key)
kubectl create secret generic aws-config \
--from-literal="aws-trust-anchor-arn=$AWS_TRUST_ANCHOR_ARN" \
--from-literal="aws-profile-arn=$AWS_PROFILE_ARN" \
--from-literal="aws-role-arn=$AWS_ROLE_ARN" \
--from-literal="aws-region=$AWS_REGION"
See an example