-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vault auth tune: unable to reset listing-visibility to default (empty string) #15209
Comments
@candlerb, this looks to be an inconsistency between the CLI and hitting the API directly. I have reproduced the issue locally using your CLI example. Performing the same steps with the
I believe the fix is likely pretty straightforward and is caused by the omitempty JSON tag for the |
Many thanks. I can confirm the following workaround is successful:
In the case of the CLI, I wonder if that string needs to become a string pointer? It needs to distinguish between "no change to listing_visibility" and "set listing_visibility to empty string". |
Ah, yes there is not currently a CLI flag type for a string pointer that allows for specifying between a deliberate empty string and the absence of the flag. It would be fairly straightforward to add but I think we would then be faced with a similar issue due to the fact that the data is provided as a struct that is then marshaled into JSON. The The inconsistency between the API and the CLI is unfortunate and might exist elsewhere for string fields where |
Hi @candlerb I believe
|
See also: #15209 Signed-off-by: Alexander Scheel <[email protected]>
* Match listing_visibility in system/auth with system/mounts See also: #15209 Signed-off-by: Alexander Scheel <[email protected]> * Fix path-help for listing_visibility Signed-off-by: Alexander Scheel <[email protected]>
I can confirm that "hidden" works as a value, thank you. |
See also: hashicorp#15833, hashicorp#15209 Signed-off-by: Brian Candler <[email protected]>
See also: #15833, #15209 Signed-off-by: Brian Candler <[email protected]>
Describe the bug
Having used
vault auth tune -listing-visibility=unauth
to make an auth method visible in the web UI, I cannot reset this to empty string. The command is accepted but does not make a change.To Reproduce
listing_visibility:unauth
is set both before and afterExpected behavior
It should be possible to change listing-visibility back to its default (empty string) state.
Environment:
vault status
): 1.10.1vault version
): 1.10.1Vault server configuration file(s): N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: