Skip to content

Feature request: add docker secret file support for AWS secrets #482

@e3elettronica

Description

@e3elettronica

We are using latest docker container image.
It would be safe and usefull to be able to provide AWS key ID and secret using standard docker secrets way.

The same is already implemented for database user password, which could be provided either by DB_PASS env variable, or by DB_PASS_FILE secret file env variable, or inside the config file.

It could be implemented either in the entrypoint with some code like the following

if [ -n "${AWS_ACCESS_KEY_ID_FILE-}" ]; then
  if [ -f "${AWS_ACCESS_KEY_ID_FILE}" ]; then
    export AWS_ACCESS_KEY_ID=$(cat "${AWS_ACCESS_KEY_ID_FILE}")
  fi
fi

if [ -n "${AWS_SECRET_ACCESS_KEY_FILE-}" ]; then
  if [ -f "${AWS_SECRET_ACCESS_KEY_FILE}" ]; then
    export AWS_SECRET_ACCESS_KEY=$(cat "${AWS_SECRET_ACCESS_KEY_FILE}")
  fi
fi

or inside the program itself.

At the moment it is needed to create a custom image wrapping the default entrypoint in a custom one, performing the secrets checking/reading/export before running the original entrypoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions