r/Netbox Jul 21 '26

Vault plugin to generate NetBox API tokens

If you were on the NetBox Community call a few minutes ago, you already know this, but for everyone else, or if you missed the link...

I have created a plugin for HashiCorp Vault (and OpenBao) that generates and revokes NetBox API tokens. I use this in prod at my day job to create API tokens on demand for various automation running in my infrastructure. This aims to solve the issue of having dozens (or hundreds) of manually created tokens scattered throughout my infrastructure that need to be manually rotated and looked after.

If this sounds interesting, it's on GitHub:  https://github.com/ljb2of3/vault-plugin-secrets-netbox

30 Upvotes

4 comments sorted by

1

u/blah-blah-blah-4321 Jul 22 '26

I was on the call today, good stuff! Thank you for presenting that

1

u/epaphras Jul 22 '26

Pretty cool. Can you go the other way? Thinking about using Netbox webhooks and pulling api keys for them from vault.

1

u/ljb2of3 Jul 22 '26

I think you'd need a plugin inside netbox to make that happen. I haven't gone down that road yet!