Vault event hooks

Hi :wave:

I am working on a personal project where I have vault deployed on a raspberry pi with a SenseHAT. The idea is to store my secrets there, like a LastPass replacement.

The SenseHAT has an 8x8 LED matrix that I’d like to use fort some kind of visual feedback when secrets are stored in the vault, when secrets are read, when the vault is sealed, etc.

I was thinking having a python script, using hvac to control the SenseHAT, but:

How do I know when things change in the vault?

I could do this with polling, but I’d rather have something event-driven. Does Vault have hooks or is this something better done with the telemetry?

I don’t think Vault supports events or notifications on secret-changes natively. So, polling is your only option at the moment.

I guess the reason this is not available, is because this would be closely tied to the backend you are using (Consul has a concept of “watches” for this, but not every backend has such a thing).

1 Like

As @jeroenjacobs79 says, notifications aren’t there now in Vault… But, if you’re looking for when things are read or activity occurs, the audit log might be the place to monitor and parse what you’re looking for.

1 Like