Commit graph

71 commits

Author SHA1 Message Date
shin-
9be5db8704 Handle 401 response in auth.Login() for authed private registries 2013-12-03 16:32:13 +01:00
Michael Crosby
a37b155384 Split auth on first colon 2013-11-29 15:14:36 -08:00
Guillaume J. Charmes
5e941f1ca0
Lintify code with confidence=1 2013-11-18 16:24:11 -08:00
Solomon Hykes
8d3e35cd8d Split auth tests between unit tests and integration tests 2013-11-15 01:13:20 +00:00
Solomon Hykes
5c175357aa Hack: fix tests which didn't cleanup properly 2013-10-18 02:13:36 +00:00
Michael Crosby
826aaa0e9b Merge pull request #1990 from modcloth-labs/more-tests-for-auth-registry-resolution
Adding more tests around `auth.ResolveAuthConfig`
2013-10-03 14:45:02 -07:00
Victor Vieux
6496059154 fix panic with wrong dockercfg file 2013-09-30 11:07:32 +00:00
Dan Buch
edde4f55e0 Adding more tests around auth.ResolveAuthConfig
mostly because I've been failing at getting docker `0.6.2` working with
docker-registry `0.6.0` with regard to login and push.  I suspect there
may be some mismatched expectations between `auth.ResolveAuthConfig` and
`registry.ResolveRepositoryName`, but I haven't done enough research or
experimentation to think it's anything more than user error.  More tests
are good, no?
2013-09-24 12:36:50 -04:00
Dan Buch
a7db125480 Minor spelling correction of protocoll -> protocol 2013-09-23 23:14:42 -04:00
Nick Stinemates
d6cf41cbe6 Add MAINTAINERS
Making sure we're consistent across our project.
2013-09-16 04:45:01 +00:00
Marco Hennings
fcee6056dc Login against private registry
To improve the use of docker with a private registry the login
command is extended with a parameter for the server address.

While implementing i noticed that two problems hindered authentication to a
private registry:

1. the resolve of the authentication did not match during push
   because the looked up key was for example localhost:8080 but
   the stored one would have been https://localhost:8080

   Besides The lookup needs to still work if the https->http fallback
   is used

2. During pull of an image no authentication is sent, which
   means all repositories are expected to be private.

These points are fixed now. The changes are implemented in
a way to be compatible to existing behavior both in the
API as also with the private registry.

Update:

- login does not require the full url any more, you can login
  to the repository prefix:

  example:
  docker logon localhost:8080

Fixed corner corner cases:

- When login is done during pull and push the registry endpoint is used and
  not the central index

- When Remote sends a 401 during pull, it is now correctly delegating to
  CmdLogin

- After a Login is done pull and push are using the newly entered login data,
  and not the previous ones. This one seems to be also broken in master, too.

- Auth config is now transfered in a parameter instead of the body when
  /images/create is called.
2013-09-03 20:45:49 +02:00
Victor Vieux
18962d0ff3 load authConfig only when needed and fix useless WARNING 2013-08-19 11:42:38 +00:00
Victor Vieux
3c9f9945c9 prevent crash when .dockercfg not readable 2013-08-14 10:26:18 +00:00
Nan Monnand Deng
7bade49d4c update auth_test.go 2013-08-02 14:08:16 -04:00
Nan Monnand Deng
4bd287e107 auth with user agent 2013-08-02 03:30:45 -04:00
Guillaume J. Charmes
394941b6b0 Switch json/payload order 2013-07-29 11:30:17 -07:00
Guillaume J. Charmes
8ca7b0646e Refactor checksum 2013-07-29 11:30:17 -07:00
Michael Crosby
0fc11699ab Add regression test for authConfig overwrite 2013-07-25 03:25:16 +00:00
Michael Crosby
9332c00ca5 Copy authConfigs on save so data is not modified
SaveConfig sets the Username and Password to an empty string
on save.  A copy of the authConfigs need to be made so that the
in memory data is not modified.
2013-07-25 00:35:52 +00:00
Victor Vieux
f4b41e1a6c fix tests 2013-07-24 12:28:22 +00:00
Victor Vieux
3bae188b8d change dockercfg to json and support multiple auth remote 2013-07-23 15:07:18 +00:00
Sam Alba
33d97e81eb Removed DOCKER_INDEX_URL 2013-07-09 08:10:43 -07:00
Sam Alba
be49f0a118 Merging from master 2013-07-05 12:27:10 -07:00
Sam Alba
66a9d06d9f Adding support for nicer URLs to support standalone registry (+ some registry code cleaning) 2013-07-05 12:20:58 -07:00
Caleb Spare
1277dca335 Style fixes for fmt + err usage.
fmt.Printf and friends will automatically format using the error
interface (.Error()) preferentially; no need to do err.Error().
2013-07-04 14:33:17 -07:00
Sam Alba
3175e56ad0 URL schemes of both Registry and Index are now consistent 2013-06-27 17:55:17 -07:00
Victor Vieux
639833aaf5 fix tests 2013-06-21 09:20:57 +00:00
Victor Vieux
8f2a80804c Merge branch 'master' into fix-auth 2013-06-21 09:18:03 +00:00
Guillaume J. Charmes
930e1d8830 Merge pull request #941 from dotcloud/makefile_test_subpackages
gofmt and test sub directories in makefile
2013-06-20 11:18:37 -07:00
Victor Vieux
5dcab2d361 gofmt and test sub directories in makefile 2013-06-19 14:50:58 +00:00
Guillaume J. Charmes
6dccdd657f remove offline mode from auth unit tests 2013-06-18 17:09:47 -07:00
Guillaume J. Charmes
13e03a6911 Fix the auth tests and add the offline mode 2013-06-17 11:29:02 -07:00
Victor Vieux
90f6bdd6e4 update docs, remove config file on 401 2013-06-14 13:38:51 +00:00
Victor Vieux
c906239220 bump to master 2013-06-05 10:23:45 +00:00
Victor Vieux
fd224ee590 linted names 2013-06-04 18:00:22 +00:00
Victor Vieux
86ada2fa5d drop/omit 2013-06-04 13:51:12 +00:00
Victor Vieux
3dd1e4d58c added docs and moved to api version 1.2 2013-06-03 12:09:16 +00:00
Victor Vieux
49e656839f move auth to the client WIP 2013-05-30 15:39:43 +00:00
Guillaume J. Charmes
08e5f12954 Merge pull request #739 from dotcloud/push_issue-1
- Registry: Cereate a new registry object for each request (~session)
2013-05-29 09:22:12 -07:00
Solomon Hykes
24ddfe3f25 Documented who decides what and how. 2013-05-28 19:39:09 -07:00
Guillaume J. Charmes
b76d6120ac Update tests with new cookies for registry 2013-05-28 17:35:10 -07:00
Guillaume J. Charmes
fef816163c Merge pull request #618 from titanous/cleanup
Misc. cleanup
2013-05-15 18:05:31 -07:00
Jonathan Rudenberg
aa0d40747c Remove broken, redundant struct tag 2013-05-15 16:02:24 -04:00
shin-
17ad00a35e gofmt pass 2013-05-14 22:00:24 +00:00
shin-
20a57f15b9 Added login/account creation tests 2013-05-14 22:00:24 +00:00
shin-
2b620efffd Allow index server address to vary during execution 2013-05-14 22:00:24 +00:00
shin-
fc1d1d871b Find docker index URL in ENV before using default value. Unit tests for docker pull 2013-05-14 22:00:24 +00:00
Sam Alba
a372f982c1 Switching to prod index server 2013-05-06 10:57:38 -07:00
Sam Alba
0f68042053 Handled wrong user credentials by re-init the auth file (it was impossible to login after having wrong crendentials) 2013-05-06 10:57:03 -07:00
shin-
18796d55a6 Fixed some login quirks 2013-05-06 10:57:00 -07:00