diff --git a/vault/logical_system.go b/vault/logical_system.go index eda1575946a9..fd9fe69d8fef 100644 --- a/vault/logical_system.go +++ b/vault/logical_system.go @@ -3709,6 +3709,7 @@ func sanitizeMountPath(path string) string { func checkListingVisibility(visibility ListingVisibilityType) error { switch visibility { + case ListingVisibilityDefault: case ListingVisibilityHidden: case ListingVisibilityUnauth: default: diff --git a/vault/mount.go b/vault/mount.go index 7a2c70b90d63..5d89e1285c87 100644 --- a/vault/mount.go +++ b/vault/mount.go @@ -45,8 +45,10 @@ const ( type ListingVisibilityType string const ( + // ListingVisibilityDefault is the default value for listing visibility + ListingVisibilityDefault ListingVisibilityType = "" // ListingVisibilityHidden is the hidden type for listing visibility - ListingVisibilityHidden ListingVisibilityType = "" + ListingVisibilityHidden ListingVisibilityType = "hidden" // ListingVisibilityUnauth is the unauth type for listing visibility ListingVisibilityUnauth ListingVisibilityType = "unauth" ) diff --git a/website/source/api/system/mounts.html.md b/website/source/api/system/mounts.html.md index d09a31ca139d..d6040aa1a66a 100644 --- a/website/source/api/system/mounts.html.md +++ b/website/source/api/system/mounts.html.md @@ -98,7 +98,8 @@ This endpoint enables a new secrets engine at the given path. that will not be HMAC'd by audit devices in the response data object. - `listing_visibility` `(string: "")` - Speficies whether to show this mount - in the UI-specific listing endpoint. + in the UI-specific listing endpoint. Valid values are `"unauth"` or + `"hidden"`. If not set, behaves like `"hidden"`. - `passthrough_request_headers` `(array: [])` - Comma-separated list of headers to whitelist and pass from the request to the backend. @@ -229,8 +230,9 @@ This endpoint tunes configuration parameters for a given mount point. list of keys that will not be HMAC'd by audit devices in the response data object. -- `listing_visibility` `(string: "")` - Speficies whether to show this mount - in the UI-specific listing endpoint. Valid values are `"unauth"` or `""`. +- `listing_visibility` `(string: "")` - Speficies whether to show this mount in + the UI-specific listing endpoint. Valid values are `"unauth"` or `"hidden"`. + If not set, behaves like `"hidden"`. - `passthrough_request_headers` `(array: [])` - Comma-separated list of headers to whitelist and pass from the request to the backend.