Skip to content

Commit

Permalink
use a cred refresher (#267)
Browse files Browse the repository at this point in the history
identical implementation as
chainguard-dev/terraform-provider-apko#435
  • Loading branch information
joshrwolf authored Jan 7, 2025
1 parent 6a43e57 commit 1459b7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"net/url"
"sync"
"time"

"github.com/chainguard-dev/terraform-provider-cosign/pkg/private/secant/fulcio"
rclient "github.com/chainguard-dev/terraform-provider-cosign/pkg/private/secant/rekor/client"
Expand Down Expand Up @@ -105,7 +106,7 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
return
}

kc := authn.NewMultiKeychain(google.Keychain, authn.DefaultKeychain)
kc := authn.NewMultiKeychain(google.Keychain, authn.RefreshingKeychain(authn.DefaultKeychain, 30*time.Minute))
ropts := []remote.Option{
remote.WithAuthFromKeychain(kc),
remote.WithUserAgent("terraform-provider-apko/" + p.version),
Expand Down

0 comments on commit 1459b7c

Please sign in to comment.