-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
approle "expiration: revoked lease" stderr logs #8117
Comments
It sounds like you were generating leases faster than you can revoke them. To prevent this in future, consider increasing TTLs. For now, assuming the messages you cite are representative (i.e. they're mostly about auth/approle/dev), given that you've deleted the roles it should sort itself out on its own. You should be able to monitor the situation using the metric |
@ncabatoff is there a good way to link the leases we're seeing to a specific approle? Even though we've deleted all the roles from the approle auth method in question (auth/approle/dev), we're still seeing the revoked lease messages this morning, almost a full day later. Basically, can we link a lease id like "lease_id=auth/approle/dev/login/h9d7dea14c17ded56097bf4203ce6c6a7179213851c06f9395c43d3329d97530d" to one of our pre-existing approles? We're still looking into the telemetry solution you suggested and how we can consume that. |
We were able to check the vault.expire.num_leases metric and it is... enlightening! Here's our output: [2020-01-08 09:55:20 -0600 CST][G] 'vault.expire.num_leases': 448155.000 We've got nearly half a million of these left to work through, and at the rate we're seeing Vault expire them, that's really not a feasible solution. Is there a way to mass expire all of these leases? |
You could try a prefix-based revoke: https://www.vaultproject.io/docs/commands/lease/revoke.html |
@ncabatoff does that work for approle leases (in an auth method) rather than in a secrets engine lease? |
If you have audit logs enabled, looking that requests against auth/approle/dev/login would get you a step closer in that direction. The process might be a bit tedious since the secret ID value will be hashed, but you could correlate it by listing the IDs for a role via https://www.vaultproject.io/api/auth/approle/index.html#list-secret-id-accessors and then calculating hash of those by using https://www.vaultproject.io/api/system/audit-hash.html. |
Yes it does. |
We had the same issue yesterday. A bit of context on this warning :
Just FYI, in our case, as we had an incident due to this, we decided to take a few actions following an internal post-mortem :
Maybe this warning could be a bit more visible / documented in Vault documentation ? |
Due to the age of this issue and its quiescence, I'm going to go ahead and close it. Please feel free to re-open it if the behavior persists in current versions of Vault. Thanks! |
We are running vault 1.0.3 community version. 3 Vault nodes on EC2 running in HA mode backed by 5 Consul EC2 instances.
Our vault stderr contains logs like this at an incredibly high rate, roughly 114,000 times in the last 4 hours:
We tried disabling the "dev" approle auth method with plans to re-enable it, but this operation would time out. So then we restored consul to a snapshot from about an hour before disabling this approle auth method, and we have deleted all roles from this approle auth method. But this message still occurs.
The text was updated successfully, but these errors were encountered: