cue-labs / oci

Go modules related to OCI (Open Container Initiative) registries
Apache License 2.0
24 stars 4 forks source link

ociregistry/ociclient: implement auth #10

Closed rogpeppe closed 10 months ago

rogpeppe commented 1 year ago

Currently ociclient knows nothing about authentication or authorization, but it should support the most common standard auth methods, hopefully without incurring large dependency requirements.

This package is likely a good place to start.

tianon commented 10 months ago

Now that cuelabs.dev/go/oci/ociregistry/ociauth is a thing (and ociclient knows how to use it), this is fixed, right? :eyes:

mvdan commented 10 months ago

I believe so, this issue is quite old and we've supported (and used) Docker-style auth with OCI requests for some months now.

For example, see our use in the cmd/cue tool here: https://github.com/cue-lang/cue/blob/64a117c07a084f82970596f3ac67023087952f4f/cmd/cue/cmd/registry.go#L44-L82

What matters for the "standard" Docker-style auth is ociauth.Load and ociauth.NewStdAuthorizer.