Skip to content

Commit

Permalink
Add google.com host suffix to gcrane keychain (#1039)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjohnsonjr authored Jun 4, 2021
1 parent 3bfab55 commit b69114f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/v1/google/keychain.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type googleKeychain struct {
func (gk *googleKeychain) Resolve(target authn.Resource) (authn.Authenticator, error) {
// Only authenticate GCR and AR so it works with authn.NewMultiKeychain to fallback.
host := target.RegistryStr()
if host != "gcr.io" && !strings.HasSuffix(host, ".gcr.io") && !strings.HasSuffix(host, ".pkg.dev") {
if host != "gcr.io" && !strings.HasSuffix(host, ".gcr.io") && !strings.HasSuffix(host, ".pkg.dev") && !strings.HasSuffix(host, ".google.com") {
return authn.Anonymous, nil
}

Expand Down

0 comments on commit b69114f

Please sign in to comment.