Currently, impersonation is only possible at the time an application is deployed, and this cannot be changed over the lifetime of the app.
In some use cases, the same program operates on different data, depending on its runtime arguments. For such cases, it can be necessary to impersonate a different principal for every run. The principal (and keytab?) are thus provided as runtime arguments when the program is started, given that the user who initiates the run is authorized to impersonate that principal.