I want this tokens only to operate with the secrets, and i want to set for some vaults, infinite duration, and some of them, with a 10 years, or 1 year duration, is this possible?
I have read some documentation about -period and -ttl examples, but i cannot see how to get this working.
Well there are no such thing as infinite tokens (other than the root token). You can change the max ttl in your cluster configuration to anything you want – it isn’t recommended or best practice though. Hopefully it’s just you and your Vault otherwise I REALLY wouldn’t recommend doing this.
$ vault token lookup 96ddf4bc-d217-f3ba-f9bd-017055595017
will give you the TTL of your token.
There are two TTLs on tokens a “default” and a “max” which are defined during the mount configuration. If default < max, then you can renew the TTL up to max.