Skip to content
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 secrets move fails due to whitespace #18236

Closed
maxforster1983 opened this issue Dec 6, 2022 · 3 comments · Fixed by #19585
Closed

Vault secrets move fails due to whitespace #18236

maxforster1983 opened this issue Dec 6, 2022 · 3 comments · Fixed by #19585
Labels
bug Used to indicate a potential bug core/secret

Comments

@maxforster1983
Copy link

Previously we were able to successfully "rename" a users space by using the secrets move functionality by running:

vault secrets move 'Personal Secrets: user.example' 'Personal Secrets: user.newexample'

This is particularly of use in the event that users firstname.lastname is used and their last name changes as an example.

However since upgrading our Vault instance and since 1.11.4 this now returns an error:

Error moving secrets engine Personal Secrets: user.example/ to Personal Secrets: user.newexample/: Error making API request.

URL: POST http://x.x.x.x:8200/v1/sys/remount
Code: 400. Errors:

  • 'from' path cannot contain whitespace

The same steps have been tested on 1.12.1 and 1.12.2 and the issue persists.

@VioletHynes VioletHynes added the bug Used to indicate a potential bug label Mar 16, 2023
@VioletHynes
Copy link
Contributor

This looks like a bug - you can create mounts with whitespace in the name and it seems like the initial intent was to disallow leading and trailing spaces, since mounts cannot have leading or trailing spaces. Thanks for the report! I'm going to look into a fix.

@VioletHynes
Copy link
Contributor

This was introduced by #14492

@VioletHynes
Copy link
Contributor

Looks like this got closed with the merge of my PR.

Thanks for the report! This will be fixed in 1.14, and the next dot release for 1.11, 1.12, and 1.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug core/secret
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants