Can i create vault token with no expiry?

can i create vault token with no expiry using this command ?
vault token create -policy=my-policy

Only the root token can have no expiration. Can you share more about your use case and what you are trying to do?

I am configuring spring cloud config and vault. based on client application name i have to create path in vault like secret/application-name and i will store secrets in the path. Then i will create policy for the path with read capability. Then I have to create token based on the policy and will use that token in client application.

Thanks for that additional information. While I am not a developer, does this help you with requesting and renewing a token?

Depending on how/where your application will run, there may also be other options to authenticating with Vault. For example, if your application runs on an AWS EC2 instance, you could use the AWS auth method or if it runs in some Kubernetes service, the Kubernetes auth method.

You might also consider posting a new message with a title like “How to renew tokens in Spring” so someone with experience here might be able to respond.