Repository: hashicorp/vault
File: builtin/credential/approle/path_role.go (Go)

Code before:
							"bind_secret_id": {
								Type:        framework.TypeBool,
								Required:    true,
								Description: "Impose secret ID to be presented when logging in using this role.",
							},
							"secret_id_bound_cidrs": {
								Type:        framework.TypeCommaStringSlice,
								Required:    true,
								Description: "Comma separated string or list of CIDR blocks. If set, specifies the blocks of IP addresses which can perform the login operation.",
							},
							"secret_id_num_uses": {
								Type:        framework.TypeInt,
								Required:    true,
								Description: "Number of times a secret ID can access the role, after which the secret ID will expire.",
							},
							"secret_id_ttl": {
								Type:        framework.TypeInt64,
								Required:    true,
								Description: "Duration in seconds after which the issued secret ID expires.",
							},
							"local_secret_ids": {
								Type:        framework.TypeBool,
								Required:    true,
								Description: "If true, the secret identifiers generated using this role will be cluster local. This can only be set during role creation and once set, it can't be reset later",
							},
							"token_bound_cidrs": {
								Type:        framework.TypeCommaStringSlice,
								Required:    true,
								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.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.TypeInt64,
								Required:    true,
								Description: "The maximum lifetime of the generated token",
							},
							"token_no_default_policy": {
								Type:        framework.TypeBool,
								Required:    true,
								Description: "If true, the 'default' policy will not automatically be added to generated tokens",
							},
							"token_period": {
								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.",
							},
							"token_policies": {

Review comment (suggestion):
Ah, okay, I was going to comment about not wanting to make a breaking change by removing these fields, but it looks like we add them back later. I had to expand the top part to see that these were a part of the Fields field in the response, but it looks like it checks out!

Code after:
							"bind_secret_id": {
								Type:        framework.TypeBool,
								Required:    true,
								Description: "Impose secret ID to be presented when logging in using this role.",
							},
							"secret_id_bound_cidrs": {
								Type:        framework.TypeCommaStringSlice,
								Required:    true,
								Description: "Comma separated string or list of CIDR blocks. If set, specifies the blocks of IP addresses which can perform the login operation.",
							},
							"secret_id_num_uses": {
								Type:        framework.TypeInt,
								Required:    true,
								Description: "Number of times a secret ID can access the role, after which the secret ID will expire.",
							},
							"secret_id_ttl": {
								Type:        framework.TypeInt64,
								Required:    true,
								Description: "Duration in seconds after which the issued secret ID expires.",
							},
							"local_secret_ids": {
								Type:        framework.TypeBool,
								Required:    true,
								Description: "If true, the secret identifiers generated using this role will be cluster local. This can only be set during role creation and once set, it can't be reset later",
							},
							"period": {
								Type:        framework.TypeInt64,
								Required:    false,
								Description: tokenutil.DeprecationText("token_period"),
								Deprecated:  true,
							},
							"policies": {
								Type:        framework.TypeCommaStringSlice,
								Required:    false,
								Description: tokenutil.DeprecationText("token_policies"),
								Deprecated:  true,
							},
						},
					}},
				},
			},
			logical.DeleteOperation: &framework.PathOperation{
				Callback:  b.pathRoleDelete,
				Responses: responseNoContent,
			},
		},
		HelpSynopsis:    strings.TrimSpace(roleHelp["role"][0]),
		HelpDescription: strings.TrimSpace(roleHelp["role"][1]),
	}

	tokenutil.AddTokenFields(p.Fields)