Skip to content

Commit

Permalink
openapi: Fix approle reponse duration types (#25510)
Browse files Browse the repository at this point in the history
  • Loading branch information
averche authored Feb 21, 2024
1 parent 3b3dc14 commit 8af67e1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
30 changes: 15 additions & 15 deletions builtin/credential/approle/path_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ can only be set during role creation and once set, it can't be reset later.`,
Description: "Number of times a secret ID can access the role, after which the secret ID will expire.",
},
"secret_id_ttl": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: "Duration in seconds after which the issued secret ID expires.",
},
Expand All @@ -233,12 +233,12 @@ can only be set during role creation and once set, it can't be reset later.`,
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.`,
},
"token_explicit_max_ttl": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: "If set, tokens created via this role carry an explicit maximum TTL. During renewal, the current maximum TTL values of the role and the mount are not checked for changes, and any updates to these values will have no effect on the token being renewed.",
},
"token_max_ttl": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: "The maximum lifetime of the generated token",
},
Expand All @@ -248,7 +248,7 @@ can only be set during role creation and once set, it can't be reset later.`,
Description: "If true, the 'default' policy will not automatically be added to generated tokens",
},
"token_period": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: "If set, tokens created via this role will have no max lifetime; instead, their renewal period will be fixed to this value.",
},
Expand All @@ -264,7 +264,7 @@ can only be set during role creation and once set, it can't be reset later.`,
Description: "The type of token to generate, service or batch",
},
"token_ttl": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: "The initial ttl of the token to generate",
},
Expand All @@ -274,7 +274,7 @@ can only be set during role creation and once set, it can't be reset later.`,
Description: "The maximum number of times a token may be used, a value of zero means unlimited",
},
"period": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: false,
Description: tokenutil.DeprecationText("token_period"),
Deprecated: true,
Expand Down Expand Up @@ -656,7 +656,7 @@ to 0, meaning no expiration.`,
Description: "OK",
Fields: map[string]*framework.FieldSchema{
"secret_id_ttl": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: "Duration in seconds after which the issued secret ID should expire. Defaults to 0, meaning no expiration.",
},
Expand Down Expand Up @@ -705,13 +705,13 @@ to 0, meaning no expiration.`,
Description: "OK",
Fields: map[string]*framework.FieldSchema{
"period": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: false,
Description: tokenutil.DeprecationText("token_period"),
Deprecated: true,
},
"token_period": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: defTokenFields["token_period"].Description,
},
Expand Down Expand Up @@ -799,7 +799,7 @@ to 0, meaning no expiration.`,
Description: "OK",
Fields: map[string]*framework.FieldSchema{
"token_ttl": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: defTokenFields["token_ttl"].Description,
},
Expand Down Expand Up @@ -843,7 +843,7 @@ to 0, meaning no expiration.`,
Description: "OK",
Fields: map[string]*framework.FieldSchema{
"token_max_ttl": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: defTokenFields["token_max_ttl"].Description,
},
Expand Down Expand Up @@ -955,7 +955,7 @@ Overrides secret_id_ttl role option when supplied. May not be longer than role's
Description: "Accessor of the secret ID",
},
"secret_id_ttl": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: "Duration in seconds after which the issued secret ID expires.",
},
Expand Down Expand Up @@ -1008,7 +1008,7 @@ Overrides secret_id_ttl role option when supplied. May not be longer than role's
Description: "Accessor of the secret ID",
},
"secret_id_ttl": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: "Duration in seconds after which the issued secret ID expires.",
},
Expand Down Expand Up @@ -1117,7 +1117,7 @@ Overrides secret_id_ttl role option when supplied. May not be longer than role's
Description: "Accessor of the secret ID",
},
"secret_id_ttl": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: "Duration in seconds after which the issued secret ID expires.",
},
Expand Down Expand Up @@ -1257,7 +1257,7 @@ Overrides secret_id_ttl role option when supplied. May not be longer than role's
Description: "Accessor of the secret ID",
},
"secret_id_ttl": {
Type: framework.TypeDurationSecond,
Type: framework.TypeInt64,
Required: true,
Description: "Duration in seconds after which the issued secret ID expires.",
},
Expand Down
3 changes: 3 additions & 0 deletions changelog/25510.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
openapi: Fixing approle reponse duration types
```

0 comments on commit 8af67e1

Please sign in to comment.