Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion idtoken/compute.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package idtoken

import (
"context"
"fmt"
"net/url"
"time"
Expand Down Expand Up @@ -40,7 +41,7 @@ func (c computeIDTokenSource) Token() (*oauth2.Token, error) {
v.Set("audience", c.audience)
v.Set("format", "full")
urlSuffix := "instance/service-accounts/default/identity?" + v.Encode()
res, err := metadata.Get(urlSuffix)
res, err := metadata.GetWithContext(context.Background(), urlSuffix)
if err != nil {
return nil, err
}
Expand Down
3 changes: 2 additions & 1 deletion internal/s2a.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package internal

import (
"context"
"encoding/json"
"log"
"sync"
Expand Down Expand Up @@ -78,7 +79,7 @@ func (cs *reuseMTLSConfigSource) Config() (*mtlsConfig, error) {
type metadataMTLSAutoConfig struct{}

var httpGetMetadataMTLSConfig = func() (string, error) {
return metadata.Get(configEndpointSuffix)
return metadata.GetWithContext(context.Background(), configEndpointSuffix)
}

func (cs *metadataMTLSAutoConfig) Config() (*mtlsConfig, error) {
Expand Down
Loading