Commit Graph

69 Commits

Author SHA1 Message Date
6e0c243c2e Lintify code with confidence=1
Upstream-commit: 5e941f1ca035bb1ec014c18d277aecaa41deba85
Component: engine
2013-11-18 16:24:11 -08:00
2a4f3940f0 Split auth tests between unit tests and integration tests
Upstream-commit: 8d3e35cd8d92d184dc66041c235163cab4953842
Component: engine
2013-11-15 01:13:20 +00:00
c53c4a96f0 Hack: fix tests which didn't cleanup properly
Upstream-commit: 5c175357aaa7e011e3535eeb1ee162450f390b9e
Component: engine
2013-10-18 02:13:36 +00:00
c443ca5ca0 Merge pull request #1990 from modcloth-labs/more-tests-for-auth-registry-resolution
Adding more tests around `auth.ResolveAuthConfig`
Upstream-commit: 826aaa0e9bb9625fc8a1accfcc566f06baf0223f
Component: engine
2013-10-03 14:45:02 -07:00
bc13d7f295 fix panic with wrong dockercfg file
Upstream-commit: 649605915428e0ee81cf49d15e949d48da20110c
Component: engine
2013-09-30 11:07:32 +00:00
64137c780a 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?
Upstream-commit: edde4f55e08c879e5a5fdb74abd6e5cc751e4dbb
Component: engine
2013-09-24 12:36:50 -04:00
0f5b1c7220 Minor spelling correction of protocoll -> protocol
Upstream-commit: a7db1254807307b0ac4d9bb0dc784d12caa54237
Component: engine
2013-09-23 23:14:42 -04:00
c157c0dfdc Add MAINTAINERS
Making sure we're consistent across our project.
Upstream-commit: d6cf41cbe62ffaf2ed5bedf107d8bc4f804d3658
Component: engine
2013-09-16 04:45:01 +00:00
e60a2a9f3c 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.
Upstream-commit: fcee6056dc50de7698772a3049cdfa1eb0f2416f
Component: engine
2013-09-03 20:45:49 +02:00
a4c8dff47f load authConfig only when needed and fix useless WARNING
Upstream-commit: 18962d0ff33cfa6ba2976aa459c766acfd23c1bf
Component: engine
2013-08-19 11:42:38 +00:00
58b5c00cf9 prevent crash when .dockercfg not readable
Upstream-commit: 3c9f9945c949e981a4c09da915ea28356b2c58ae
Component: engine
2013-08-14 10:26:18 +00:00
a320ff8945 update auth_test.go
Upstream-commit: 7bade49d4c661c5037de586e6f69291999038ef9
Component: engine
2013-08-02 14:08:16 -04:00
1c96da0a53 auth with user agent
Upstream-commit: 4bd287e107eab1623a0e77aeaecda77fc26e7536
Component: engine
2013-08-02 03:30:45 -04:00
0e6bb26f77 Switch json/payload order
Upstream-commit: 394941b6b0a30fecf8ae7b6de5880fa553141f93
Component: engine
2013-07-29 11:30:17 -07:00
e9895c9839 Refactor checksum
Upstream-commit: 8ca7b0646e6c4346075656f46847f53c2e868a3d
Component: engine
2013-07-29 11:30:17 -07:00
e6f304a5c6 Add regression test for authConfig overwrite
Upstream-commit: 0fc11699ab26121e4f89808ffacb2becf536ff5d
Component: engine
2013-07-25 03:25:16 +00:00
164f76762a 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.
Upstream-commit: 9332c00ca562e97045490d3d45d8f805fae30330
Component: engine
2013-07-25 00:35:52 +00:00
f910d92ead fix tests
Upstream-commit: f4b41e1a6c2c5d531451bf2feeb3877e03eb8c1c
Component: engine
2013-07-24 12:28:22 +00:00
001001e211 change dockercfg to json and support multiple auth remote
Upstream-commit: 3bae188b8dc51911a44ea1c7b5681f9f07f9d3af
Component: engine
2013-07-23 15:07:18 +00:00
0cf9a0c877 Removed DOCKER_INDEX_URL
Upstream-commit: 33d97e81ebc4d25ecc7366aeef625e51aa69478c
Component: engine
2013-07-09 08:10:43 -07:00
bf4fc24d05 Merging from master
Upstream-commit: be49f0a1182164d0d279484ec35931c1e3ef6d3c
Component: engine
2013-07-05 12:27:10 -07:00
057f0a4b6f Adding support for nicer URLs to support standalone registry (+ some registry code cleaning)
Upstream-commit: 66a9d06d9fa7a382c6852cf047e1448e0d3e1782
Component: engine
2013-07-05 12:20:58 -07:00
2eb55531d3 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().
Upstream-commit: 1277dca3358874d0701685f7ebb52ce66be1b385
Component: engine
2013-07-04 14:33:17 -07:00
5063918d95 URL schemes of both Registry and Index are now consistent
Upstream-commit: 3175e56ad03cbe0118c0982606c5eba9e34c1b07
Component: engine
2013-06-27 17:55:17 -07:00
d6ca59c4cd fix tests
Upstream-commit: 639833aaf53d741176e0b4f817cbbf5a5da24037
Component: engine
2013-06-21 09:20:57 +00:00
32f89c6b42 Merge branch 'master' into fix-auth
Upstream-commit: 8f2a80804ce6f3ab77057a25180a27e3b346778b
Component: engine
2013-06-21 09:18:03 +00:00
1c0d014a0f Merge pull request #941 from dotcloud/makefile_test_subpackages
gofmt and test sub directories in makefile
Upstream-commit: 930e1d883046c819a5b28d2ccef43fe4f7d0ebfc
Component: engine
2013-06-20 11:18:37 -07:00
e55048dc4d gofmt and test sub directories in makefile
Upstream-commit: 5dcab2d361956e75d00d5bee18371395f17a663f
Component: engine
2013-06-19 14:50:58 +00:00
dc08f9942c remove offline mode from auth unit tests
Upstream-commit: 6dccdd657f715c164f2fe6fc786c8274a2425f1b
Component: engine
2013-06-18 17:09:47 -07:00
74040db600 Fix the auth tests and add the offline mode
Upstream-commit: 13e03a691145921ffc17c56db24f06eacca99a77
Component: engine
2013-06-17 11:29:02 -07:00
2a4a4027de update docs, remove config file on 401
Upstream-commit: 90f6bdd6e41ec352009ffbd073c1f45983abb74b
Component: engine
2013-06-14 13:38:51 +00:00
83d9b24a84 bump to master
Upstream-commit: c906239220c7ba06b8615f001fab2f42fb063aeb
Component: engine
2013-06-05 10:23:45 +00:00
4747c5b99f linted names
Upstream-commit: fd224ee590dc9f003f6507b529a9f47cceb02c44
Component: engine
2013-06-04 18:00:22 +00:00
9c0086fb7d drop/omit
Upstream-commit: 86ada2fa5d00820288df8a59eca3deef83f4aeb6
Component: engine
2013-06-04 13:51:12 +00:00
f6d51d4fe0 added docs and moved to api version 1.2
Upstream-commit: 3dd1e4d58c9d676d49f41db450c3d42901526edc
Component: engine
2013-06-03 12:09:16 +00:00
e8420b7464 move auth to the client WIP
Upstream-commit: 49e656839fb3d846dc65fec544f2984a9c72a2cf
Component: engine
2013-05-30 15:39:43 +00:00
f8799691fc Merge pull request #739 from dotcloud/push_issue-1
- Registry: Cereate a new registry object for each request (~session)
Upstream-commit: 08e5f1295487f2c06639bc8ac97be35f30359534
Component: engine
2013-05-29 09:22:12 -07:00
52887551f6 Documented who decides what and how.
Upstream-commit: 24ddfe3f25f99db5a23f62d411c949b2236288a1
Component: engine
2013-05-28 19:39:09 -07:00
f9738020b7 Update tests with new cookies for registry
Upstream-commit: b76d6120ac66a853d177f7e53318ab1ee75dca92
Component: engine
2013-05-28 17:35:10 -07:00
f90a47c969 Merge pull request #618 from titanous/cleanup
Misc. cleanup
Upstream-commit: fef816163cf9713b7943025a8739717c971b269c
Component: engine
2013-05-15 18:05:31 -07:00
78f17c9e49 Remove broken, redundant struct tag
Upstream-commit: aa0d40747caa8cd9c5cee56046cac011bc3d1065
Component: engine
2013-05-15 16:02:24 -04:00
cfa86c4776 gofmt pass
Upstream-commit: 17ad00a35e3cafc7e9386eb4c6522630a886c29f
Component: engine
2013-05-14 22:00:24 +00:00
679935b8f2 Added login/account creation tests
Upstream-commit: 20a57f15b91ec9aae74fffb897035a7665a3dcf6
Component: engine
2013-05-14 22:00:24 +00:00
76f4659754 Allow index server address to vary during execution
Upstream-commit: 2b620efffd53fab63bc7b874c96da0693e604278
Component: engine
2013-05-14 22:00:24 +00:00
7c7dc4a8d7 Find docker index URL in ENV before using default value. Unit tests for docker pull
Upstream-commit: fc1d1d871b2f952ce83a6b7cedcdf4a86f0c953b
Component: engine
2013-05-14 22:00:24 +00:00
c1a0fe8c7f Switching to prod index server
Upstream-commit: a372f982c1383a3b4d742ef4f4de1a645cd7434d
Component: engine
2013-05-06 10:57:38 -07:00
54c93226ae Handled wrong user credentials by re-init the auth file (it was impossible to login after having wrong crendentials)
Upstream-commit: 0f68042053ac652de13cd68086d0188ac0ecf9b6
Component: engine
2013-05-06 10:57:03 -07:00
1a3f29f52a Fixed some login quirks
Upstream-commit: 18796d55a66f2f072349c54085516fe038bd8283
Component: engine
2013-05-06 10:57:00 -07:00
d624761cb2 Fixed typo in 'username or email already exists'
Upstream-commit: 594827d41640eb6a6a878c29aca87f7a4ce6249c
Component: engine
2013-05-06 10:56:59 -07:00
a0dca19377 Fixed docker login
Upstream-commit: 84be35dce10682266b9a35d4156997c84485c769
Component: engine
2013-05-06 10:54:48 -07:00