Skip to content
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

Implement Basic Authentication for notary-server #48

Open
marcofranssen opened this issue Jul 13, 2020 · 1 comment
Open

Implement Basic Authentication for notary-server #48

marcofranssen opened this issue Jul 13, 2020 · 1 comment
Labels
good first issue Good for newcomers

Comments

@marcofranssen
Copy link
Member

When connecting dctna-server to https://notary.docker.io a 401 response is returned.

In order for this to work we need to add a basic authentication handler so we can connect to the notary server.

An starting point can be found here.
https://github.com/docker/cli/blob/master/cli/trust/trust.go#L173

@marcofranssen marcofranssen added the good first issue Good for newcomers label Jul 13, 2020
@marcofranssen
Copy link
Member Author

marcofranssen commented Jul 13, 2020

Current implementation does support Basic Authentication by setting the NOTARY_AUTH variable, as most of the implementation was taken from the notary project.

Doing the following in the terminal where the dctna-server is ran should be sufficient to connect to the docker hub registry.

export NOTARY_AUTH="$(echo youruser:yourpassword | base64)"
./dctna-server

For a cleaner codebase and better end user experience of dctna-server configurability the implementation can still be improved in a way it was implemented in the docker trust cli.

Also to make this a bit more secure by reading those credentials for example from Hashicorp vault or any other secure store could be a good addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant