vault-action icon indicating copy to clipboard operation
vault-action copied to clipboard

Add base64 decoding[FEAT]

Open smark88 opened this issue 4 years ago • 2 comments

A normal thing is putting secrets in vault that are base64 coded.

Feature: Have the ability to declare if a key val is base64 and have it decoded and masked output.

smark88 avatar Aug 19 '20 21:08 smark88

It's a bit of a hidden feature that we'll see if the hashicorp team keeps, but vault-action uses a special library called JSONata to pull and process secrets. http://docs.jsonata.org/string-functions#base64decode

So you could do:

with:
    secrets: secret/data/db $base64decode(userpass) | DB_USERPASS

RichiCoder1 avatar Aug 20 '20 19:08 RichiCoder1

It seems that this workaround is not working anymore.

Unable to retrieve result for data.data."$base64decode(content)". No match data was found. Double check your Key or Selector.

kaibepperling avatar Apr 13 '22 15:04 kaibepperling