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 policy read differs from vault policy fmt #29460

Open
Kloppi313 opened this issue Jan 30, 2025 · 0 comments
Open

vault policy read differs from vault policy fmt #29460

Kloppi313 opened this issue Jan 30, 2025 · 0 comments

Comments

@Kloppi313
Copy link
Contributor

Kloppi313 commented Jan 30, 2025

Describe the bug
When you want to get an actual policy to edit, you export it via
vault policy read POLICYNAME > FILE

But the format command makes changes to FILE:

cp FILE FILE_FMT
vault policy fmt FILE_FMT
diff FILE FILE_FMT

In my case fmt adds linebreaks.

To Reproduce
Steps to reproduce the behavior:

  1. See description

Expected behavior
vault policy fmt
should not make changes to the output of
vault policy read

I guess running the read commando should pipe the output also through fmt and it would be fine

Environment:

  • Vault Server Version (retrieve with vault status): 1.18.3
  • Vault CLI Version (retrieve with vault version): 1.18.3
  • Server Operating System/Architecture: Ubuntu 22

Vault server configuration file(s):

should not be necessary

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants