Commit Graph

24 Commits

Author SHA1 Message Date
Matt Fluet aa13df40b1 Fix for empty auth keys in config.json
Signed-off-by: Matt Fluet <matt.fluet@appian.com>
2019-08-15 18:15:57 -04:00
Joffrey F a823acc2ca Make dockerpycreds part of the SDK under docker.credentials
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-04-30 23:37:55 -07:00
Joffrey F cc38efa68e Add some credHelpers tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-30 14:41:56 -08:00
Joffrey F 01ccaa6af2 Make AuthConfig a dict subclass for backward-compatibility
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-30 13:51:01 -08:00
Joffrey F bc5d7c8cb6 Modernize auth management
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-28 19:32:01 -08:00
Joffrey F 8c35eee0fb Fix support for legacy .dockercfg auth config format
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-06-27 17:04:32 -07:00
Joffrey F 3498b63fb0 Fix authconfig resolution when credStore is used combined with login()
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-13 18:55:56 -08:00
Joffrey F ccbde11c8d Improve separation between auth_configs and general_configs
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-30 18:42:38 -08:00
Fumiaki MATSUSHIMA dd858648a0 Use config.json for detachKeys
Signed-off-by: Fumiaki Matsushima <mtsmfm@gmail.com>
2018-01-30 17:16:23 -08:00
Joffrey F 3422211309 Use pytest asserts
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-30 14:26:24 -08:00
Joffrey F 320c810471 Support credHelpers section in config.json
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-06-22 11:51:31 -07:00
Aanand Prasad fb4969f744 Fix auth config path on Windows
The Engine client looks *only* at the USERPROFILE environment variable
on Windows, so we should do that too.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-12-02 18:02:09 +00:00
Ben Firshman d5bc7dc99a
Drop support for Python 2.6
Because it's ancient. If you're still using it, you can use an old
version of docker-py.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Ben Firshman 2c9d1110f0
Make docker.auth a single file
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Joffrey F d731a4315c Add support for identity tokens in config file.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-15 14:28:09 -07:00
Joffrey F 541edd7ffb Don't raise InvalidConfigError when auth dict doesn't have an 'auth' key
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-04-05 14:05:33 -07:00
Joffrey F dc198be26c Don't break when parsing unknown config keys
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-09 12:08:34 -08:00
Pavel Kravchenko 84a72f49e9 Add HttpHeaders support in load_config
Signed-off-by: Pavel Kravchenko <kpavel@il.ibm.com>
2016-01-18 14:29:31 -08:00
Aanand Prasad 25b188440a Treat 'index.docker.io' repo names as 'docker.io'
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-12-10 12:42:54 +00:00
Aanand Prasad 9b890c4540 Refactor resolve_authconfig tests
The structure of the fake config dictionary was not reflective of what
actual parsed config looks like.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-12-10 12:42:54 +00:00
Joffrey F 6d0e2d69d5 Update auth.resolve_repository_name
More relaxed version that matches the constraints imposed by the
current version of the docker daemon.
Few unit tests to verify the new cases.
Client.pull was trying to set the tag value when it wasn't supposed
to, fixed now.
utils.parse_repository_tag is simpler and supports @sha... notation

Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-23 18:43:02 -08:00
Alejandro Brito Monedero a695f0ca5a Fix #627
Docker-py couldn't pull private images if the account have non ascii chars
in either user or password. It that case an exception ending with no auth
credentials.
Instead docker client (golang) don't suffer this issue.

Also add a test to check the login or password even with non ascii char have
a valid auth dictionary

Signed-off-by: Alejandro Brito Monedero <abrito@alea-soluciones.com>
2015-10-29 16:12:30 +01:00
Alejandro Brito Monedero 22da6ace7a Fix auth.load_config bug calling parse_auth
When load_config found and auths section it didn't call parse_auth only with
the auths section. Instead it called parse_auth with all the configuration.

There is also a test to check this case

Signed-off-by: Alejandro Brito Monedero <alejandro.monedero@gmail.com>
2015-10-27 09:03:28 +01:00
Joffrey F 93a296fb04 Reorganize test directories
More clearly separate unit and integration tests
Allow splitting into multiple files
Cleaner

Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-21 16:02:09 -07:00