Allocation Of Parties With JWT Tokens on Ledger

In a more traditional API architecture, and API key might be generated each time a user logs in.

Can we do the same thing with JWT tokens and daml? For example, after a period of time the JWT token expires and then the admin sets the JWT token for that party the next time they log in (assuming when the user logs in they newly generate a JWT token that gets passed to the admin)?

In other words, can the admin of a ledger dynamically update a JWT token for a party based on whatever JWT token gets generated when a party logs in with a username/password?

We’re still using daml-on-sql-1.18.1 if that is a consideration.

There is nothing that prevents this, but this needs to be implemented as part of the authentication infrastructure paired with the participant. The runtime components which are shipped as part of Daml, including Canton, the HTTP JSON API Service, etc. all allow you to configure a JWKS endpoint that should enable you to be more flexible in your token rotation policy.