Skip to content

Client basic auth support #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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