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
Describe the bug
When using postgresql backend with cubbyhole, the entries in postgresql are not getting removed once the token expires, causing db size to increase with each cubbyhole operation. vault cli reports incorrectly that the entry no longer exists.
To Reproduce
Steps to reproduce the behavior:
Install vault using postgresql backend
Check the size of vault table in postgres after initializing and unsealing vault
$ vault login <short_lived_token>
Error authenticating: error looking up token: Error making API request.
URL: GET http://127.0.0.1:8200/v1/auth/token/lookup-self
Code: 403. Errors:
* permission denied
# check size of table
psql > select count(*) from vault_kv_store ;
count
-------
18 <--- Should ideally go back to 17
(1 row)
# check table entries
psql> select * from vault_kv_store where parent_path like '%short%';
-[ RECORD 1 ]-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
parent_path | /logical/<some_string>/<another_string>/path/to/short/ <--- should this even exist ?
path | /logical/<some_string>/<another_string>/path/to/short/lived/
key | bucket
value | \x<very_long_string_of_data>
Expected behavior
Token expiration for cubbyhole should ideally remove all the entries from database associated with that cubbyhole. In the example, the final count of db entries should be 17, not 18.
Environment:
Vault Server Version (retrieve with vault status): 1.0.0
Vault CLI Version (retrieve with vault version): Vault v1.0.0 ('c19cef14891751a23eaa9b41fd456d1f99e7e856')
If only the token is created (without any cubbyhole associated with it), all associated entries in the database are getting cleaned up when the token expires.
The text was updated successfully, but these errors were encountered:
I poked at this and found that this line is not resulting in the same cubbyholeID as was used to save the secret. The cubbyholeID is generated randomly so will have to come from storage.
When I simply update the token store to always revoke the cubbyhole secret using the te.CubbyholeID, it causes the deletion to be successful and solves the problem in this issue reproduction. However, that approach to fixing it causes the following tests to fail:
Describe the bug
When using postgresql backend with cubbyhole, the entries in postgresql are not getting removed once the token expires, causing db size to increase with each cubbyhole operation. vault cli reports incorrectly that the entry no longer exists.
To Reproduce
Steps to reproduce the behavior:
vault
usingpostgresql
backendcubbyhole
mount using the short lived tokenExpected behavior
Environment:
vault status
): 1.0.0vault version
): Vault v1.0.0 ('c19cef14891751a23eaa9b41fd456d1f99e7e856')Vault server configuration file(s):
Additional context
The text was updated successfully, but these errors were encountered: