@@ -23,6 +23,48 @@ class Mount < Response
2323 field :options
2424 end
2525
26+ class MountTune < Response
27+ # @!attribute [r] description
28+ # Specifies the description of the mount.
29+ # @return [String]
30+ field :description
31+
32+ # @!attribute [r] default_lease_ttl
33+ # Specifies the default time-to-live.
34+ # @return [Fixnum]
35+ field :default_lease_ttl
36+
37+ # @!attribute [r] max_lease_ttl
38+ # Specifies the maximum time-to-live.
39+ # @return [Fixnum]
40+ field :max_lease_ttl
41+
42+ # @!attribute [r] audit_non_hmac_request_keys
43+ # Specifies the comma-separated list of keys that will not be HMAC'd by audit devices in the request data object.
44+ # @return [Array<String>]
45+ field :audit_non_hmac_request_keys
46+
47+ # @!attribute [r] audit_non_hmac_response_keys
48+ # Specifies the comma-separated list of keys that will not be HMAC'd by audit devices in the response data object.
49+ # @return [Array<String>]
50+ field :audit_non_hmac_response_keys
51+
52+ # @!attribute [r] listing_visibility
53+ # Specifies whether to show this mount in the UI-specific listing endpoint.
54+ # @return [String]
55+ field :listing_visibility
56+
57+ # @!attribute [r] passthrough_request_headers
58+ # Comma-separated list of headers to whitelist and pass from the request to the plugin.
59+ # @return [Array<String>]
60+ field :passthrough_request_headers
61+
62+ # @!attribute [r] allowed_response_headers
63+ # Comma-separated list of headers to whitelist, allowing a plugin to include them in the response.
64+ # @return [Array<String>]
65+ field :allowed_response_headers
66+ end
67+
2668 class Sys < Request
2769 # List all mounts in the vault.
2870 #
@@ -57,6 +99,18 @@ def mount(path, type, description = nil, options = {})
5799 return true
58100 end
59101
102+ # Get the mount tunings at a given path.
103+ #
104+ # @example
105+ # Vault.sys.get_mount_tune("pki") #=> { :pki => #<struct Vault::MountTune default_lease_ttl=2764800> }
106+ #
107+ # @return [MountTune]
108+ def get_mount_tune ( path )
109+ json = client . get ( "/v1/sys/mounts/#{ encode_path ( path ) } /tune" )
110+ json = json [ :data ] if json [ :data ]
111+ return MountTune . decode ( json )
112+ end
113+
60114 # Tune a mount at the given path.
61115 #
62116 # @example
0 commit comments