Repository navigation
Description
- Concourse version: 3.6
- Deployment type (BOSH/Docker/binary): Docker
- Infrastructure/IaaS: Kubernetes
I'm using Concourse with vault creds (approle auth).
Issue : After a while concourse end up with this error : failed to renew entry: past the max TTL, cannot renew.
My approle config
vault read auth/approle/role/concourse-preprod-ro
Key Value
--- -----
bind_secret_id true
bound_cidr_list
period 180
policies [concourse-preprod-ro]
secret_id_num_uses 0
secret_id_ttl 0
token_max_ttl 300
token_num_uses 0
token_ttl 180
Policy on it allow to renew the token and period is configured. Concourse work well and is able to renew token.
But after 300s (seems to be my token_max_ttl) I have this error in Concourse :
{"timestamp":"..................;","source":"atc","message":"atc.credential-manager.renew.succeeded","log_level":1,"data":{"lease-duration":180,"name":"vault","policies":["concourse-preprod-ro","default"],"session":"3.82","token-accessor":"4b603430-...-a50c1f489aea"}}
...
{"timestamp":"1516201866.820190430","source":"atc","message":"atc.credential-manager.renew.failed","log_level":2,"data":{"error":"Error making API request.\n\nURL: PUT https://.../v1/auth/token/renew-self\nCode: 500. Errors:\n\n* 1 error occurred:\n\n* failed to renew entry: past the max TTL, cannot renew","name":"vault","session":"3.83"}}
{"timestamp":"1516201867.904133797","source":"atc","message":"atc.credential-manager.renew.failed","log_level":2,"data":{"error":"Error making API request.\n\nURL: PUT https://.../v1/auth/token/renew-self\nCode: 403. Errors:\n\n* permission denied","name":"vault","session":"3.84"}}
Several renew.succeeded then renew.failed with this error past the max TTL, cannot renew followed by permission denied because my token finally expired.
My token is renew until to reach the token_max_ttl and can't be renew anymore.
Expected behavior : I would expect Concourse to do a login again with the approle and ask for a new token. But, I feel that concourse do login one time at startup and then do only renew : https://github.com/concourse/atc/blob/master/creds/vault/vault_factory.go#L59
Workaround : If I restart my web/atc Concourse ask for a new token with the approle and then renew it until token_max_ttl again. Or remove token_max_ttl which is not ideal for a security aspect.
Activity
Fix Vault token max_ttl renewal issue for auth backends
Fix Vault token max_ttl renewal issue for auth backends
Fix Vault token max_ttl renewal issue for auth backends
vito commentedon Apr 11, 2018
This should be fixed by vmware-archive/atc#256
bump etree tsa handlers mux clockwork goxmldsig genproto grpc
onprem: remove vault tunning for cc
onprem: remove vault tunning for cc
onprem: remove vault tunning for cc