summaryrefslogtreecommitdiff
path: root/docker/auth/auth.py
Commit message (Collapse)AuthorAgeFilesLines
* Use url-safe base64 when encoding auth header803-urlsafe-b64Joffrey F2015-10-091-1/+1
| | | | | | + regression test Signed-off-by: Joffrey F <joffrey@docker.com>
* Add logging for auth loading/resolutionAanand Prasad2015-08-201-6/+29
| | | | Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
* Merge branch 'fix-build-auth' of https://github.com/moutten/docker-py into ↵Joffrey F2015-07-201-6/+0
|\ | | | | | | moutten-fix-build-auth
| * Switch to send full AuthConfig object for build actionMatt Outten2015-07-171-6/+0
| | | | | | | | | | | | In order to support the docker API for version 1.7+, this command changes the way the `X-Registry-Config` header is sent when attempting to build an image.
* | Use constant for deprecation message in auth.pyJoffrey F2015-07-201-3/+4
| |
* | Stop pinging registries from the clientAanand Prasad2015-07-201-18/+13
|/ | | | | | | | | | | | | | | | | The daemon already pings the registry, so doing it on our end is redundant and error-prone. The `insecure_registry` argument to `push()`, `pull()` and `login()` has been deprecated - in the latter case, it wasn't being used anyway. The `insecure` argument to `docker.auth.resolve_repository_name()` has also been deprecated. `docker.utils.ping_registry()` has been deprecated. `docker.auth.expand_registry_url()` has been removed. Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
* Prefer new Docker config location and format.Kevin Martin2015-06-281-12/+44
| | | | | | | | This tries to load Docker authentication info from ~/.docker/config.json before falling back to its legacy location and format at ~/.dockercfg. Resolves https://github.com/docker/docker-py/issues/648
* Update docker-py to use a more portable sense of HOME.Matt Moore2015-05-211-1/+1
| | | | | This makes docker-py consistent with Docker's newish way of establishing the path to .dockercfg: https://github.com/docker/docker/blob/master/pkg/homedir/homedir.go
* Modify expand_registry_url to support v2 private registries.support_v2_private_registryJoffrey F2015-04-221-1/+1
|
* Handle passwords with ':' characters.dlorenc2015-03-031-1/+1
| | | | Signed-off-by: dlorenc <lorenc.d@gmail.com>
* shorter convert_to_hostnameJoffrey F2015-02-271-3/+1
|
* Update resolve_authconfig to bring it in line with Docker clientAanand Prasad2015-02-271-27/+19
| | | | | | | Instead of expanding the registry name we're looking for to a full URL, strip entries in the authconfig down to just the hostname. Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
* Additional tests and small improvement to auth.resolve_authconfigJoffrey F2015-02-011-2/+2
|
* fix registry url canonicalization in resolve_authconfigJames Pharaoh2015-01-291-1/+1
|
* removed exception thrown if registry.hub.docker.com is explicitly defined in ↵Ken Leidal2015-01-081-1/+1
| | | | repository param for client.pull
* updated parameter name to make more sense.abanna2014-12-181-6/+4
|
* adding the ability to login with different dockercfg files.Alex Banna2014-12-181-4/+12
|
* Fix expand_registry_rul to be consistent with docker client.Matt Moore2014-11-251-4/+2
| | | | | | | | | | | | | | | | In docker-py's auth.py the functions 'resolve_repository_name' and 'expand_registry_url' work together to result a hostname prefix to a base URL suitable for interaction as a Docker registry. For example, "docker push foo.com/bar/baz" would try to resolve the hostname "foo.com". These functions loosely correlate to 'ResolveRepositoryName' and 'newEndpoint' in the docker client code, respectively. You can see from their implementations: - ResolveRepositoryName: https://github.com/docker/docker/blob/master/registry/registry.go#L191 - newEndpoint: https://github.com/docker/docker/blob/master/registry/endpoint.go#L71 that neither of them appends 'v1' to the hostname during resolution. This change simply removes the 'v1' suffix from these code paths, which enables docker-py to authenticate against private registries with which the docker client can already.
* Don't fallback to HTTP unless insecure_registry is specified when ↵insecure_registryJoffrey F2014-08-221-6/+12
| | | | pushing/pulling
* Relative 'errors' imports, for consistencyAanand Prasad2014-04-231-1/+1
|
* Create scope for docker client specific errorsEvgeniy L2014-04-061-6/+9
| | | | | | | | | With more granular and specific exceptions user will be able to handle errors properly. Also changed raising of Exception to more specific TypeError which python raises in case of wrong arguments.
* Updated unit tests API version, flake8 fixesshin-2014-04-041-0/+1
|
* Make sure the build command in the client sends the auth credentials along. ↵Joseph Schorr2014-04-041-0/+10
| | | | Required for "FROM " lines that pull from private registries
* Fixes for flake8Evgeniy L2014-03-281-1/+1
| | | | | | Next rules were broken * E265 block comment should start with '# ' * E713 test for membership should be 'not in'
* Use relative importsAanand Prasad2014-01-161-1/+1
|
* Rework auth config loading and use of auth data for login/pull/pushMaxime Petazzoni2014-01-071-41/+59
| | | | Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
* fix auth ping to httpsFernando2013-11-281-1/+1
|
* Fixed auth stuff for Python 3shin-2013-11-151-2/+2
|
* Avoid an additional level of indentationshin-2013-11-081-21/+23
|
* Don't fail loading the configuration when .dockercfg doesn't existMaxime Petazzoni2013-11-071-27/+30
| | | | Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
* Fixed typoJason Sommer2013-10-201-1/+1
|
* Refactoring, Python 3 compatibility, Tests working with python 3, cleaned up ↵shin-2013-10-151-0/+130
imports.