-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notary list requires admin permission in 0.6.0 #1308
Comments
Thanks for finding this @molepigeon and apologies for the regression! It seems like maybe updating |
molepigeon
added a commit
to molepigeon/notary
that referenced
this issue
Mar 5, 2018
Fixes notaryproject#1308 Signed-off-by: Michael Hough <michaelh@uk.ibm.com>
molepigeon
added a commit
to molepigeon/notary
that referenced
this issue
Mar 27, 2018
Fixes notaryproject#1308 Signed-off-by: Michael Hough <michaelh@uk.ibm.com>
molepigeon
added a commit
to molepigeon/notary
that referenced
this issue
Mar 27, 2018
Fixes notaryproject#1308 Signed-off-by: Michael Hough <michaelh@uk.ibm.com>
molepigeon
added a commit
to molepigeon/notary
that referenced
this issue
Apr 8, 2018
Fixes notaryproject#1308 Signed-off-by: Michael Hough <michaelh@uk.ibm.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have some images in our registry (and corresponding information in notary) that is read-only to most users. Since updating to notary 0.6.0, that read-only content hasn't been accessible. We get:
Output of
notary version
:We're using token auth for both Registry and Notary.
We've traced the problem to that Notary goes to the Oauth server asking for a
*
permission when performing a list. Because the user only has read-only access to the GUN, they're (correctly) given a 401, which is presented to the user.For 0.4.3 clients, our auth server logs:
Requested scopes: [{{repository registry.eu-de.bluemix.net/ibmliberty } pull}]
But in 0.6.0:
Requested scopes: [{{repository registry.eu-de.bluemix.net/ibmliberty } *}]
As shown above, this is a regression from 0.4.3.
The server returns a well-formed auth challenge with the correct scope if you make a request without auth:
I spent some time investigating the issue, and making sure that the problem is client side. I found that tufCommander.tufList used to call getTransport with
readOnly
as the permission in 0.4.3. Now, it calls ConfigureRepo, which in turn calls getTransport withadmin
.The way I see it, there's at least two options for how we can address this; the quick fix would be to make notary list use the
readOnly
permission again, and the harder one would be to make the notary client attempt the request to the specific resource without auth and craft an auth request according to the auth challenge the server sends.I'm happy to work on a fix for this, but would like to know which option to take before starting coding.
What are your thoughts?
The text was updated successfully, but these errors were encountered: