Skip to content

Conversation

@ag-TJNII
Copy link
Contributor

This PR adds client auth support via simple HTTP basic auth. The flow here is:

  • The admin creates a htpasswd file using normal tools, and volume mounts that into the container
  • The CLIENT_AUTH_USER_FILE ENV var is set to the htpasswd file path in the container
  • The presence of the CLIENT_AUTH_USER_FILE variable enables the client_auth.conf file in the nginx config, which configures basic auth via ngx_http_auth_basic_module.

To pull from the registry clients must now auth with docker login using credentials from the htpasswd file. Unauthenticated clients will get a error.

When CLIENT_AUTH_USER_FILE is unset (the default) application behavior is unchanged.

This feature is useful in environments where having an open proxy that can pull from ECR is undesirable for security reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant