This commit is contained in:
Jeff Mitchell 2019-06-29 16:36:43 -04:00
parent c3b7d35ecc
commit 09f1b1f483
3 changed files with 11 additions and 3 deletions

2
go.mod
View File

@ -83,7 +83,7 @@ require (
github.com/hashicorp/vault-plugin-secrets-gcpkms v0.5.2-0.20190516000311-88f9a4f11829
github.com/hashicorp/vault-plugin-secrets-kv v0.5.2-0.20190626201950-a6e92ff82578
github.com/hashicorp/vault/api v1.0.3-0.20190627213952-21b5ec5dc34c
github.com/hashicorp/vault/sdk v0.1.12-0.20190629185034-b43299fe641c
github.com/hashicorp/vault/sdk v0.1.12-0.20190629203621-46ce1bedd3be
github.com/influxdata/influxdb v0.0.0-20190411212539-d24b7ba8c4c4
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 // indirect
github.com/jackc/pgx v3.3.0+incompatible // indirect

View File

@ -212,6 +212,14 @@ func (t *TokenParams) PopulateTokenData(m map[string]interface{}) {
m["token_type"] = t.TokenType.String()
m["token_ttl"] = int64(t.TokenTTL.Seconds())
m["token_num_uses"] = t.TokenNumUses
if len(t.TokenPolicies) == 0 {
m["token_policies"] = []string{}
}
if len(t.TokenBoundCIDRs) == 0 {
m["token_bound_cidrs"] = []string{}
}
}
// PopulateTokenAuth populates Auth with parameters

4
vendor/modules.txt vendored
View File

@ -364,7 +364,7 @@ github.com/hashicorp/vault-plugin-secrets-gcpkms
github.com/hashicorp/vault-plugin-secrets-kv
# github.com/hashicorp/vault/api v1.0.3-0.20190627213952-21b5ec5dc34c => ./api
github.com/hashicorp/vault/api
# github.com/hashicorp/vault/sdk v0.1.12-0.20190629185034-b43299fe641c => ./sdk
# github.com/hashicorp/vault/sdk v0.1.12-0.20190629203621-46ce1bedd3be => ./sdk
github.com/hashicorp/vault/sdk/helper/salt
github.com/hashicorp/vault/sdk/helper/strutil
github.com/hashicorp/vault/sdk/helper/wrapping
@ -376,11 +376,11 @@ github.com/hashicorp/vault/sdk/plugin
github.com/hashicorp/vault/sdk/helper/cidrutil
github.com/hashicorp/vault/sdk/helper/consts
github.com/hashicorp/vault/sdk/helper/locksutil
github.com/hashicorp/vault/sdk/helper/tokenutil
github.com/hashicorp/vault/sdk/helper/jsonutil
github.com/hashicorp/vault/sdk/helper/certutil
github.com/hashicorp/vault/sdk/helper/password
github.com/hashicorp/vault/sdk/helper/ldaputil
github.com/hashicorp/vault/sdk/helper/tokenutil
github.com/hashicorp/vault/sdk/helper/tlsutil
github.com/hashicorp/vault/sdk/database/dbplugin
github.com/hashicorp/vault/sdk/database/helper/dbutil