# Vault Approle token - is there a way to extend token\_duration?

**URL:** <https://discuss.hashicorp.com/t/vault-approle-token-is-there-a-way-to-extend-token-duration/21537>\
**Category:** Vault\
**Created:** [March 1, 2021, 4:11pm UTC](https://discuss.hashicorp.com/t/vault-approle-token-is-there-a-way-to-extend-token-duration/21537 "2021-03-01T16:11:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TatusGepetto](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/tatusgepetto/32/17648_2.png) [@TatusGepetto](https://discuss.hashicorp.com/u/TatusGepetto)\
**Post date:** [March 1, 2021, 4:11pm UTC](https://discuss.hashicorp.com/t/vault-approle-token-is-there-a-way-to-extend-token-duration/21537/1 "2021-03-01T16:11:19Z")

</div>

Hi,

just a question about approle token duration. Due to my tests, I can see that the maximum token duration is 768h and cannot be extended. Is there a way to make it permanent? I see it’s making a bit complicated things for integration with OpenStack Barbican, where the vault is a backed for secret stores. In barbican configuration you need to apply:

```auto
[vault_plugin]
root_token_id =
approle_role_id =
approle_secret_id =

```

So if I will use a bit different token than root\_token I need to refresh it every 768h. Is there a way to extend this period?  
Cause in the other hand I need to execute such commands one time per month:

```auto
ROLE_ID=$(vault read -format=yaml auth/approle/role/barbican-test-2/role-id | grep role_id | awk '{print $2}')
SECRET_ID=$(vault write -f -format=json auth/approle/role/barbican-test-2/secret-id | jq -r '.data.secret_id')
vault write auth/approle/login role_id=$ROLE_ID secret_id=$SECRET_ID
echo $ROLE_ID
echo $SECRET_ID

```

to get a new token.

Thanks in advance for your hints.

Best regards,  
Jan
