google/internal/externalaccount: Adding metadata verification
Change-Id: I4d664862b7b287131c1481b238ebd0875f7c233b GitHub-Last-Rev: 74bcc33f5ed4863c740aaf09ad4ee3ac4366e8e1 GitHub-Pull-Request: golang/oauth2#608 Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/449975 Run-TryBot: Cody Oss <codyoss@google.com> Auto-Submit: Cody Oss <codyoss@google.com> Reviewed-by: Leo Siracusa <leosiracusa@google.com> Reviewed-by: Cody Oss <codyoss@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
committed by
Gopher Robot
parent
68a41d64f9
commit
ec4a9b2ff2
@@ -213,6 +213,10 @@ func (c *Config) parse(ctx context.Context) (baseCredentialSource, error) {
|
||||
awsCredSource.IMDSv2SessionTokenURL = c.CredentialSource.IMDSv2SessionTokenURL
|
||||
}
|
||||
|
||||
if err := awsCredSource.validateMetadataServers(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return awsCredSource, nil
|
||||
}
|
||||
} else if c.CredentialSource.File != "" {
|
||||
|
||||
Reference in New Issue
Block a user