My approle authentication is only valid for a set amount of time?

Hi

I use TeamCity and the integration with Hashicorp Vault. I have everything setup with approle authentication and it works fine. However, after a while, I get this error:

Canceled (Failed to get HashiCorp Vault wrapped token from TeamCity server for the project connection with ID ‘Vault’: Failed to request token: Failed to fetch HashiCorp Vault wrapped token: Cannot log in to HashiCorp Vault using APPROLE method: inva…

I can fix this by writing the secret id again (using a command on vault) and saving that in the TeamCity vault configuration and that fixes the error, so it seems like the authentication is valid for a specific time. Is there a way to diagnose this?

Without seeing your Vault and approle configuration, i’m just guessing. My first guess is you have a TTL on your role, so at a certain point the secret expires?