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

UI HMAC Never Base64 encoded #18071

Closed
BHanq opened this issue Nov 22, 2022 · 1 comment
Closed

UI HMAC Never Base64 encoded #18071

BHanq opened this issue Nov 22, 2022 · 1 comment
Labels

Comments

@BHanq
Copy link

BHanq commented Nov 22, 2022

Describe the bug
Vault UI HMAC feature in ui/vault/secrets/transit/actions/?action=hmac is bugged and consider the input as “not base64 encoded”. Even if the base 64 checkbox is ticked.

To Reproduce
Steps to reproduce the behavior:

  1. Run vault server -dev
  2. Run vault secrets enable transit
  3. Run vault write -f transit/keys/my-key
  4. Go on http://127.0.0.1:8200/ui/vault/secrets/transit/actions/my-key?action=hmac
  5. Put the same input while ticking the checkbox
  6. Repeat the same input but without ticking it
  7. See that the output is the same...

Expected behavior
Outputs shouldn't be identical since a base64 should occurs in one case and not in the other

Environment:

  • Vault Server Version:
    image

  • Vault CLI Version : 1.11.2

  • Server Operating System/Architecture: Ubuntu on WSL

Vault server configuration file(s):
None (Vault Dev Server)

Additional context
Image, without ticking the checkbox
image

Image, while ticking the checkbox
image

@Monkeychip
Copy link
Contributor

Thank you @BHanq for reporting this issue. I just posted a PR for a fix that will backport the fix as far back as 1.11.

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

No branches or pull requests

3 participants