This commit is contained in:
Jeff Mitchell 2019-07-01 08:58:40 -04:00
parent fcb58cd11b
commit 3c5f5d87e6
4 changed files with 30 additions and 2 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.20190629203621-46ce1bedd3be
github.com/hashicorp/vault/sdk v0.1.12-0.20190701125757-fcb58cd11b4a
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

@ -272,4 +272,5 @@ type TokenCreateRequest struct {
NumUses int `json:"num_uses"`
Renewable *bool `json:"renewable,omitempty"`
Type string `json:"type"`
EntityAlias string `json:"entity_alias"`
}

View file

@ -73,47 +73,74 @@ func TokenFields() map[string]*framework.FieldSchema {
"token_bound_cidrs": &framework.FieldSchema{
Type: framework.TypeCommaStringSlice,
Description: `Comma separated string or JSON list of CIDR blocks. If set, specifies the blocks of IP addresses which are allowed to use the generated token.`,
DisplayAttrs: &framework.DisplayAttributes{
Name: "Generated Token's Bound CIDRs",
},
},
"token_explicit_max_ttl": &framework.FieldSchema{
Type: framework.TypeDurationSecond,
Description: tokenExplicitMaxTTLHelp,
DisplayAttrs: &framework.DisplayAttributes{
Name: "Generated Token's Explicit Maximum TTL",
},
},
"token_max_ttl": &framework.FieldSchema{
Type: framework.TypeDurationSecond,
Description: "The maximum lifetime of the generated token",
DisplayAttrs: &framework.DisplayAttributes{
Name: "Generated Token's Maximum TTL",
},
},
"token_no_default_policy": &framework.FieldSchema{
Type: framework.TypeBool,
Description: "If true, the 'default' policy will not automatically be added to generated tokens",
DisplayAttrs: &framework.DisplayAttributes{
Name: "Do Not Attach 'default' Policy To Generated Tokens",
},
},
"token_period": &framework.FieldSchema{
Type: framework.TypeDurationSecond,
Description: tokenPeriodHelp,
DisplayAttrs: &framework.DisplayAttributes{
Name: "Generated Token's Period",
},
},
"token_policies": &framework.FieldSchema{
Type: framework.TypeCommaStringSlice,
Description: "Comma-separated list of policies",
DisplayAttrs: &framework.DisplayAttributes{
Name: "Generated Token's Policies",
},
},
"token_type": &framework.FieldSchema{
Type: framework.TypeString,
Default: "default-service",
Description: "The type of token to generate, service or batch",
DisplayAttrs: &framework.DisplayAttributes{
Name: "Generated Token's Type",
},
},
"token_ttl": &framework.FieldSchema{
Type: framework.TypeDurationSecond,
Description: "The initial ttl of the token to generate",
DisplayAttrs: &framework.DisplayAttributes{
Name: "Generated Token's Initial TTL",
},
},
"token_num_uses": &framework.FieldSchema{
Type: framework.TypeInt,
Description: "The maximum number of times a token may be used, a value of zero means unlimited",
DisplayAttrs: &framework.DisplayAttributes{
Name: "Maximum Uses of Generated Tokens",
},
},
}
}

2
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.20190629203621-46ce1bedd3be => ./sdk
# github.com/hashicorp/vault/sdk v0.1.12-0.20190701125757-fcb58cd11b4a => ./sdk
github.com/hashicorp/vault/sdk/helper/salt
github.com/hashicorp/vault/sdk/helper/strutil
github.com/hashicorp/vault/sdk/helper/wrapping