You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For private registries, one must be able to provide basic auth creds, via NOTARY_AUTH env var or interactively. However, the code assumes that all readOnly operations can be anonymous, which in turn suppresses sending the auth header.
We discovered this problem because #1315 made lookup a readOnly operation, so now notary lookup cannot be used with private registries even if NOTARY_AUTH is set.
Reverting ad8b0a7 fixes the problem for us, though I believe the real issue is that readOnly is synonymous with "anonymous".
The text was updated successfully, but these errors were encountered:
Fixesnotaryproject#1525.
authRoundTripper.RountTrip first tries to access a server anonymously.
This attempt fails if fetching a token requires basic authentication, but
t.RoundTrip returns a non-nil error even if fetching a token fails due to
http.StatusUnauthorized(401).
This change fixes the issue by checking whether the non-nil error is
actually caused by http.StatusUnauthorized(401) or not.
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
yoheiueda
added a commit
to yoheiueda/notary
that referenced
this issue
Jun 29, 2021
Fixesnotaryproject#1525.
authRoundTripper.RountTrip first tries to access a server anonymously.
This attempt fails if fetching a token requires basic authentication, but
t.RoundTrip returns a non-nil error even if fetching a token fails due to
http.StatusUnauthorized(401).
This change fixes the issue by checking whether the non-nil error is
actually caused by http.StatusUnauthorized(401) or not.
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
For private registries, one must be able to provide basic auth creds, via
NOTARY_AUTH
env var or interactively. However, the code assumes that allreadOnly
operations can be anonymous, which in turn suppresses sending the auth header.We discovered this problem because #1315 made lookup a
readOnly
operation, so nownotary lookup
cannot be used with private registries even ifNOTARY_AUTH
is set.Reverting ad8b0a7 fixes the problem for us, though I believe the real issue is that
readOnly
is synonymous with "anonymous".The text was updated successfully, but these errors were encountered: