diff --git a/vendor/github.com/hashicorp/vault-plugin-auth-gcp/plugin/cli.go b/vendor/github.com/hashicorp/vault-plugin-auth-gcp/plugin/cli.go index dc17f54cc..fb3b71f2e 100644 --- a/vendor/github.com/hashicorp/vault-plugin-auth-gcp/plugin/cli.go +++ b/vendor/github.com/hashicorp/vault-plugin-auth-gcp/plugin/cli.go @@ -8,9 +8,9 @@ import ( "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/go-gcp-common/gcputil" "github.com/hashicorp/vault/api" + "github.com/hashicorp/vault/helper/parseutil" "golang.org/x/oauth2" "google.golang.org/api/iam/v1" - "strconv" "strings" "time" ) @@ -44,15 +44,14 @@ func getSignedJwt(role string, m map[string]string) (string, error) { } } - var ttlMin = int64(defaultIamMaxJwtExpMinutes) + var ttl = time.Duration(defaultIamMaxJwtExpMinutes) * time.Minute jwtExpStr, ok := m["jwt_exp"] if ok { - ttlMin, err = strconv.ParseInt(jwtExpStr, 10, 64) + ttl, err = parseutil.ParseDurationSecond(jwtExpStr) if err != nil { return "", fmt.Errorf("could not parse jwt_exp '%s' into integer value", jwtExpStr) } } - ttl := time.Minute * time.Duration(ttlMin) jwtPayload := map[string]interface{}{ "aud": fmt.Sprintf("http://vault/%s", role), diff --git a/vendor/vendor.json b/vendor/vendor.json index 62eb137da..af9d782f1 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1309,10 +1309,10 @@ "revisionTime": "2018-06-06T02:20:31Z" }, { - "checksumSHA1": "SMQTceFhHRKV9aFfpy7YUdL/BSY=", + "checksumSHA1": "SjXo3W6G8ippBVEZpYe63C2/KJo=", "path": "github.com/hashicorp/vault-plugin-auth-gcp/plugin", - "revision": "88de4611ed29dc576719b15cae2c943e6ecc992f", - "revisionTime": "2018-07-10T20:29:00Z" + "revision": "ce466e5ee54ee8b93ab3b15ac5b7df564f3412dc", + "revisionTime": "2018-08-03T20:34:32Z" }, { "checksumSHA1": "en64nC2RYQjJuHMcWMqwmDBU9bc=",