Skip to content

Allow empty scope authorization#3889

Merged
estesp merged 1 commit intocontainerd:masterfrom
dmcgowan:allow-empty-scope
Dec 12, 2019
Merged

Allow empty scope authorization#3889
estesp merged 1 commit intocontainerd:masterfrom
dmcgowan:allow-empty-scope

Conversation

@dmcgowan
Copy link
Copy Markdown
Member

Registries may allow using token authorization without explicitly setting the scope. This may cover use cases where no scope is required for an endpoint or the registry is only covering authentication using the token. This aligns with the oauth2 spec which specifies the scope as optional.

Registries may allow using token authorization without
explicitly setting the scope. This may cover use cases where
no scope is required for an endpoint or the registry is only
covering authentication using the token. This aligns with the
oauth2 spec which specifies the scope as optional.

Signed-off-by: Derek McGowan <[email protected]>
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Dec 12, 2019

Build succeeded.

@AkihiroSuda
Copy link
Copy Markdown
Member

Any known registry service that had hit the issue?

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

@dmcgowan
Copy link
Copy Markdown
Member Author

@AkihiroSuda see the conversation that back-referenced this. I don't think any registry is legitimately using this feature, however, we don't have a good reason to deviate from the oauth spec on this. This is more to help ensure that if a registry has a bug around setting the scope, the bug is manifesting itself during authorizing a token, rather than validating the WWW-Authenticate header.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 12, 2019

Codecov Report

Merging #3889 into master will increase coverage by 0.02%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3889      +/-   ##
==========================================
+ Coverage   42.32%   42.34%   +0.02%     
==========================================
  Files         130      130              
  Lines       14678    14679       +1     
==========================================
+ Hits         6212     6216       +4     
+ Misses       7540     7538       -2     
+ Partials      926      925       -1
Flag Coverage Δ
#linux 45.75% <66.66%> (+0.01%) ⬆️
#windows 37.82% <71.42%> (+0.02%) ⬆️
Impacted Files Coverage Δ
remotes/docker/authorizer.go 71.67% <71.42%> (+1.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55698e6...08517e5. Read the comment docs.

Copy link
Copy Markdown
Member

@mxpv mxpv left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit ff91f22 into containerd:master Dec 12, 2019
KrazyKayaker pushed a commit to KrazyKayaker/containerd that referenced this pull request Jan 2, 2020
@zot24
Copy link
Copy Markdown

zot24 commented Jan 4, 2020

Will this be on a milestone before 1.4, like a patch release for 1.3.3? just wondering as I can only see a old milestone 1.3.1 and the next release 1.4 which doesn't contain this PR

btw I'm asking as suggested here https://github.com/containerd/containerd/blob/master/RELEASES.md#next-release 🤓

paleozogt pushed a commit to paleozogt/containerd that referenced this pull request Feb 13, 2020
dweomer pushed a commit to dweomer/containerd that referenced this pull request Apr 9, 2020
dweomer pushed a commit to dweomer/containerd that referenced this pull request Apr 11, 2020
dweomer pushed a commit to dweomer/containerd that referenced this pull request Apr 16, 2020
dweomer pushed a commit to dweomer/containerd that referenced this pull request Jul 24, 2020
dweomer pushed a commit to k3s-io/containerd that referenced this pull request Jul 27, 2020
@dmcgowan dmcgowan deleted the allow-empty-scope branch March 23, 2022 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants