I am confused about token ttls and more over what is in:
https://www.terraform.io/docs/providers/vault/r/aws_auth_backend_role.htmltoken_ttl - (Optional) The incremental lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
token_max_ttl - (Optional) The maximum lifetime for generated tokens in number of seconds. Its current value will be referenced at renewal time.
So if I understand correctly token_ttl is used when we renew the token and the validity of this renewal will be whatever is configured in token_ttl. For token_max_ttl is basically the cap of this token e.g we can NOT extend/renew the token more then whatever is configured in token_max_ttl (if we want to we need to relogin or obtain a new token). Do I understand correctly?
Right now I have the following setup:
```
vault auth list --detailed
Path Plugin Accessor Default TTL Max TTL Token Type Replication Seal Wrap Options Description UUID
---- ------ -------- ----------- ------- ---------- ----------- --------- ------- ----------- ----
aws/ aws auth_aws_b08bfc9e 259200 system default-service replicated false map[] n/a 55a4d5f3-0d3a-d928-1e46-edb301dcd9ee
token/ token auth_token_7199488a system system default-service replicated false map[] token based credentials 42cd0247-b423-6467-9b20-cf376eb73a02
```
```
vault read auth/aws/role/my_role
Key Value
--- -----
allow_instance_migration false
auth_type iam
bound_account_id []
bound_ami_id []
bound_ec2_instance_id <nil>
bound_iam_instance_profile_arn []
bound_iam_principal_arn [......]
bound_iam_principal_id [... .....]
bound_iam_role_arn []
bound_region []
bound_subnet_id []
bound_vpc_id []
disallow_reauthentication false
inferred_aws_region n/a
inferred_entity_type n/a
policies [my policies ]
resolve_aws_unique_ids true
role_id 5120e8a1-99be-e6fc-16ca-8d93f51bbb44
role_tag n/a
token_bound_cidrs []
token_explicit_max_ttl 0s
token_max_ttl 0s
token_no_default_policy false
token_num_uses 0
token_period 0s
token_policies [my policies]
token_ttl 1h30m
token_type default
```
```
vault token lookup
Key Value
--- -----
accessor fK...............RG
creation_time 1573715787
creation_ttl 1h30m
display_name aws-............
entity_id 4c45a17e-b405-0c29-9dad-83c6653073d7
expire_time 2019-11-14T08:46:27.423114114Z
explicit_max_ttl 0s
id s.................Q
issue_time 2019-11-14T07:16:27.423113835Z
meta map[]
num_uses 0
orphan true
path auth/aws/login
policies []
renewable true
ttl 1h29m52s
type service
```
So In this example my token is valid for 1h30m and I can renew it within this period. Since I dont set token_max_ttl or token_explicit_max_ttl thats default which I believe is 30 or 31 days. What is the cap of my token? When I will not be able to renew it?
My end goal is to have a high number/long live token but if I can't renew it within a range then to expire. Something like have the validity of the token for 60 days, renew it every 24h if renew does not happen in 24h just expire? Can I achieve this is configuring token_ttl = 24h and max_token_ttl = 1440h (60 days)?