Hi, I’m following this doc to set up file_path auditing device. I understand that the username/passwords/tokens in the audit log are are hashed with a salt using HMAC-SHA256.
My goal is to use Vault to translate a token/username/password back to the original token (non hashed version) so that I know who initiated that request.
In my payload.json file, I have the hashed token like this:
{
“input”: “hmac-sha256:0f6621d2813df41ccf2ffabd7dd97148c0302aae59e00f81abb41ae5c0000000”
}
When I run the following Vault command:
curl
–header “X-Vault-Token: hvs.rUzPWfowWGKDQcxhV0000000”
–request POST
–data @payload.json
http://127.0.0.1:8200/v1/sys/audit-hash/vault_audit_1
I get this output:
{“hash”:“hmac-sha256:22947eca0c31dff00b0d2f6bd32fe5824b81e72dce89eaf5a888600aa0000000”,“request_id”:“f0d73cbc-5bb8-e8a8-f554-6b03fb2f622c”,“lease_id”:"",“renewable”:false,“lease_duration”:0,“data”:{“hash”:“hmac-sha256:22947eca0c31dff00b0d2f6bd32fe5824b81e72dce89eaf5a888600aa8a5c42e”},“wrap_info”:null,“warnings”:null,“auth”:null}
I’m failing to understand how to use the above data to audit who requested a username/password since the data is hashed here.
- some values are masked intentionally