You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works :)
The problem is with the update interval: the default ttl for this secret from vault is 60m, so vault-agent updates the template after about 53 minutes (which is neither 2/3 nor 85%? - see here). The app "consuming" the credentials file checks for new credentials every 15 minutes. Now because these intervals overlap, there's a regular timeframe where the app will get credentials valid for less than 15 minutes (remaining), so the credentials will expire before the next check. I can get the app to check every 5 minutes (minimum, it seems), which makes the window smaller, but it's still there. Also changing the TTL on the leased secret only moves the expired-creds window around, but never eliminates it.
Describe the solution you'd like
If I could tell vault-agent e.g. in the template, when it should renew the leased secret, in my scenario after 44 minutes, the consuming app would always get credentials that are still valid until the next check (>15m). In my scenario, if the leased secret where to be updated after 2/3 of the TTL, so 40m, it would solve my specific problem, but having it completely configurable would probably be better.
Something like: {{- with secret "aws/logging/sts/vector" "renew-after:40m" }}
or {{- with secret "aws/logging/sts/vector" "renew-after-percent-of-ttl:60" }}
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Requesting a specific ttl for the lease only moves the window around.
Explain any additional use-cases
If there are any use-cases that would help us understand the use/need/value please share them as they can help us decide on acceptance and prioritization.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
I found something else that might be relevant, but doesn't seem to be adhered to. Here it speaks of lease_renewal_threshold = 0.90, so 90% of the lease time, but the log entries don't give me values matching that. At least it varies a great deal - see the following log entries:
We're using vault-agent as a sidecar to get credentials for an approle on AWS with a template for /.aws/credentials like this:
It works :)
The problem is with the update interval: the default ttl for this secret from vault is 60m, so vault-agent updates the template after about 53 minutes (which is neither 2/3 nor 85%? - see here). The app "consuming" the credentials file checks for new credentials every 15 minutes. Now because these intervals overlap, there's a regular timeframe where the app will get credentials valid for less than 15 minutes (remaining), so the credentials will expire before the next check. I can get the app to check every 5 minutes (minimum, it seems), which makes the window smaller, but it's still there. Also changing the TTL on the leased secret only moves the expired-creds window around, but never eliminates it.
Describe the solution you'd like
If I could tell vault-agent e.g. in the template, when it should renew the leased secret, in my scenario after 44 minutes, the consuming app would always get credentials that are still valid until the next check (>15m). In my scenario, if the leased secret where to be updated after 2/3 of the TTL, so 40m, it would solve my specific problem, but having it completely configurable would probably be better.
Something like:
{{- with secret "aws/logging/sts/vector" "renew-after:40m" }}
or
{{- with secret "aws/logging/sts/vector" "renew-after-percent-of-ttl:60" }}
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Requesting a specific ttl for the lease only moves the window around.
Explain any additional use-cases
If there are any use-cases that would help us understand the use/need/value please share them as they can help us decide on acceptance and prioritization.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: