Replies: 2 comments 2 replies
-
I'm not sure that answers my entire question, but it's progress. |
Beta Was this translation helpful? Give feedback.
-
\o hey @jerrac sorry about the delay. :-) I'd suggest taking a look at the Vault tutorials. For licensing reasons, we were not able to fork these, but they should still largely be relevant. To answer this:
Typically you'd use an auth method, perhaps tied to your platform. So if you were running on Kubernetes, you'd use https://openbao.org/docs/auth/kubernetes/. Or perhaps from GitLab CI pipelines or GitHub Actions, you'd use JWT auth against their provided ID token: https://openbao.org/docs/auth/jwt/. Maybe you have a TPM and can securely provision a certificate key into it, so you'd do TLS mutual auth: https://openbao.org/docs/auth/cert/. &c. There's more plugins in the ecosystem (AWS, GCP, ... &c) but some of these haven't yet been forked, just lacking a bit of time and maintainer interest in doing so. :-) You would then issue a login request with this authentication information and OpenBao would provision a token (that expires still, so you'd have to re-login or renew it) that your app would use for subsequent requests. Sometimes you'd prefer your app doesn't handle this at all, so you'd use auto-authing proxy -- then your app would "just" make OpenBao requests (to the proxy) and the proxy would handle the details of authentication. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Hey all,
I've been wanting to implement Vault (now OpenBao) for a long time, but only recently have been able to start the process. I currently have a test cluster up and running, but I'm not quite finding the right search terms or docs to really understand how to implement things. I just don't know my way around the community yet. So, while I'm sure this question is answered somewhere, in all or in parts, I haven't found that answer yet. :\
To explain my title question a bit better, I want my authentication method between my app and OpenBao to be replaced, not just renewed. So if I use a token, I'd get a brand new token from OpenBao right before the old one expires. And then my app would use that token to access the database/kv/etc. secrets it needs to do what it does.
The idea is that all the secrets for my app should rotate frequently. Right now I'm not figuring out how to make the "App to OpenBao" secret rotate.
My thought was that it would look something like the following for a MariaDB based app:
Where I'm stuck is on how to replace that initial token with something new. I see that tokens have a max ttl, and that ttl applies to all child tokens. Which means that if I create an initial token and give it to my app to use, then that token can only create new tokens that live as long as it lives. I also see that I can renew a token lease until we hit the max ttl, but that means the token itself doesn't get replaced until the ttl ends, and then I have to in and give the app a new token myself.
I also see AppRole is an option. But it looks like it works by using an role id and secret id, then creating a token. Which leads back to my previous issues...
Anyway, I am working through the official docs, and I've been searching for Vault based articles, so maybe I'll figure it out. In the meantime, hopefully my question is somewhat clear, and maybe someone could point me in the right direction. I'd really appreciate that.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions