Skip to content

Commit

Permalink
Merge pull request #1334 from buildpacks/fix/keychain
Browse files Browse the repository at this point in the history
Fix auth by wrapping keychain in a ResolvedKeychain
  • Loading branch information
jabrown85 authored Apr 10, 2024
2 parents 137225b + 2670257 commit 85f22a0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions auth/keychain.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ func DefaultKeychain(images ...string) (authn.Keychain, error) {
return nil, err
}

keychains := []authn.Keychain{envKeychain, authn.DefaultKeychain}

keychains := []authn.Keychain{
envKeychain,
NewResolvedKeychain(authn.DefaultKeychain, images...),
}
if vendorKeychainEnabled("amazon") {
keychains = append(keychains, amazonKeychain)
keychains = append(keychains, NewResolvedKeychain(amazonKeychain, images...))
}
if vendorKeychainEnabled("azure") {
keychains = append(keychains, azureKeychain)
keychains = append(keychains, NewResolvedKeychain(azureKeychain, images...))
}

return authn.NewMultiKeychain(
Expand Down

0 comments on commit 85f22a0

Please sign in to comment.