Yes fnox looks great. It seems the cache is directory based here and not session based. Not sure if I like that. If my agent starts to snoop around he might use other caches transparently.
Wow this is incredibly similar. I guess it seems that the notable difference is that the cached results are written to a directory - which is exactly what I wanted to avoid. So depends on what you want to cache I guess.
Yes - but I'm out of ideas. How else support long running agents without leaving secrets in files or by default exposed in the environment. That way I get notified the first time before they ask for credentials.
Fnox (by jdx of mise) supports fetching secrets and caching the results either in local age encrypted files or in a background daemon (in memory only) to minimize repeated gets. The daemon is per terminal instance too I believe so you fetching a secret once doesn't store it for the whole session.
It's not a perfect fix but it keeps secrets out of env with (so far for me) minimal inconvenience.
If I already approved it once I already have to assume it could have been leaked. The cache doesn't change much about it if the agent / tenant is asking for something it already has.
I don't want to store them in a file since I don't trust my agents with that data. Instead, the daemon secures the values using/under an HMAC key, making them virtually impossible to guess.
Yes, exactly. This is especially frustrating when I leave an agent running for a long time and it gets stuck on my build scripts because it's waiting for my approval.
I just want to avoid leaving my credentials and secrets on the filesystem.
EDIT: I use a lot of direnv / mise. So reloading credentials with different values is common.