gcavalcante8808/rolesanywhere-credential-helper

By gcavalcante8808

Updated almost 2 years ago

Daily docker builds of AWS roles anywhere credential helper for Linux, including arm64 arch.

Image
Security
Integration & delivery
0

2.2K

gcavalcante8808/rolesanywhere-credential-helper repository overview

↖️ Table of Contents

Roles Anywhere Credential Helper - Docker Image


This repository serves as a source for gcavalcante8808/rolesanywhere-credential-helper docker image with daily Linux builds for arm64 and amd64.

Usage

You can call the image directly using the following command:

docker run -it --rm gcavalcante8808/rolesanywhere-credential-helper:v1.1.1 version

You can also copy the binary in your docker image by using the following statement in your Dockerfile:

COPY --from=gcavalcante8808/rolesanywhere-credential-helper:v1.1.1 /usr/bin/aws_signing_helper /usr/bin/aws_signing_helper

Important note: the credentials helper binary is build using the main aws script and thus relies on linux and gblic libraries to work.

Automatic creation of the .aws/credentials file

It's possible to create a credentials file automatically by settings the following environment variables:

Environment VariableDescriptionDefaultRequired?
CREATE_AWS_CREDENTIALS_FILEShould the entrypoint create an aws credential file? Any value set here will enable the behavior.Empty - the file is not created by default.NO
CREDENTIALS_FILE_PATHWhere should the entrypoint create the credentials file?If not provided, ${HOME}/.aws is assumed, which translates to /root/.aws in the default configuration.NO
CERTIFICATE_FILE_PATHFilesystem full path of the PEM public Key.N/Awhen CREATE_AWS_CREDENTIALS_FILE is set.
CERTIFICATE_KEY_PATHFilesystem Full Path of the PEM private key.N/Awhen CREATE_AWS_CREDENTIALS_FILE is set.
TRUST_ANCHOR_ARNAWS Roles Anywhere Trust Anchor ARN.N/Awhen CREATE_AWS_CREDENTIALS_FILE is set.
PROFILE_ARNAWS Roles Anywhere Trust Profile ARN.N/Awhen CREATE_AWS_CREDENTIALS_FILE is set.
ROLE_ARNAWS IAM Role ARN.N/Awhen CREATE_AWS_CREDENTIALS_FILE is set.

The credentials file created use the external authentication format like the one bellow:

[default]
    credential_process = ./aws_signing_helper credential-process --certificate /path/to/certificate --private-key /path/to/private-key --trust-anchor-arn arn:aws:rolesanywhere:region:account:trust-anchor/TA_ID --profile-arn arn:aws:rolesanywhere:region:account:profile/PROFILE_ID --role-arn arn:aws:iam::account:role/role-name-with-path

Check https://docs.aws.amazon.com/rolesanywhere/latest/userguide/credential-helper.html#credential-helper-examples for details regarding the helper command.

Author

Author: Gabriel Cavalcante (gabriel.cavalcante88 at gmail.com)

Tag summary

Content type

Image

Digest

sha256:b9a5cdf99

Size

40.1 MB

Last updated

almost 2 years ago

docker pull gcavalcante8808/rolesanywhere-credential-helper:v1.1.1_alpine3.19