Skip to content

Support /etc/containerd/certs.d/<HOST:PORT>/hosts.toml#642

Merged
AkihiroSuda merged 5 commits intocontainerd:masterfrom
AkihiroSuda:hosts-toml
Jan 11, 2022
Merged

Support /etc/containerd/certs.d/<HOST:PORT>/hosts.toml#642
AkihiroSuda merged 5 commits intocontainerd:masterfrom
AkihiroSuda:hosts-toml

Conversation

@AkihiroSuda
Copy link
Copy Markdown
Member

@AkihiroSuda AkihiroSuda commented Dec 20, 2021

@AkihiroSuda AkihiroSuda added enhancement New feature or request impact/changelog labels Dec 20, 2021
@AkihiroSuda AkihiroSuda force-pushed the hosts-toml branch 8 times, most recently from a1ffe2b to d0942a3 Compare December 23, 2021 12:58
@AkihiroSuda AkihiroSuda added this to the v0.16.0 milestone Dec 23, 2021
@AkihiroSuda AkihiroSuda changed the title [WIP] Support /etc/containerd/certs.d/<HOST:PORT>/hosts.toml Support /etc/containerd/certs.d/<HOST:PORT>/hosts.toml Dec 24, 2021
Comment thread cmd/nerdctl/login.go
if acArg == host {
if auth.RegistryToken != "" {
// Even containerd/CRI does not support RegistryToken as of v1.4.3,
// so, nobody is actually using RegistryToken?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not really necessary and the only use of it I know of was for Docker swarm. It solves the problem of sending unscoped credentials to nodes, however, the tokens end up being long lived and passed directly to registries. The better solution is using scoped refresh tokens. It would be good to support scoping somewhere here, although that does not work well with the docker login approach.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the current goal is to just emulate Swarm-less docker login

@AkihiroSuda AkihiroSuda linked an issue Jan 5, 2022 that may be closed by this pull request
See `docs/registry.md`

Fix issue 639

`nerdctl login` still ignore the hosts dir.
Fixed in the next commit.

Signed-off-by: Akihiro Suda <[email protected]>
Depends on containerd/containerd PR 6396

Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda AkihiroSuda marked this pull request as ready for review January 7, 2022 06:02
@AkihiroSuda AkihiroSuda requested review from dmcgowan and ktock January 7, 2022 06:03
Copy link
Copy Markdown
Member

@ktock ktock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AkihiroSuda AkihiroSuda merged commit 254f4eb into containerd:master Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request impact/changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for mirrors Support /etc/containerd/certs.d/<HOST>/hosts.toml (with tests)

3 participants