Skip to content

Commit

Permalink
fix: set jvs config properly to initialize jvs client (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
yolocs committed Sep 15, 2022
1 parent 3e8294e commit d9f7b23
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion clients/go/pkg/auditopt/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (
"fmt"
"io/fs"
"os"
"time"

"cloud.google.com/go/logging"
"github.com/abcxyz/jvs/client-lib/go/client"
Expand Down Expand Up @@ -259,7 +260,13 @@ func labelsFromConfig(cfg *api.Config) audit.Option {
}

func justificationFromConfig(ctx context.Context, cfg *api.Config) (audit.Option, error) {
jvsClient, err := client.NewJVSClient(ctx, &client.JVSConfig{JVSEndpoint: cfg.Justification.PublicKeysEndpoint})
// TODO(#299): allow overriding these values via JVS env var.
jvsconfig := &client.JVSConfig{
JVSEndpoint: cfg.Justification.PublicKeysEndpoint,
Version: 1,
CacheTimeout: 5 * time.Minute,
}
jvsClient, err := client.NewJVSClient(ctx, jvsconfig)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit d9f7b23

Please sign in to comment.