Run as another user
The Pronghorn class has a function called sudo that provides the ability to run a given method using the permissions of a different user. This is an asynchronous function and can only be used to call asynchronous functions.
Access the Pronghorn class
Itential Platform instantiates the Pronghorn class on startup and exposes it as the global pronghorn object. Applications and adapters may reference it directly.
sudo arguments
The sudo method takes three arguments:
Example implementation
Auditing
When sudo is used, a new session is created in addition to the one calling sudo. The executed method runs under that new session. Since there are two different sessions, there are two separate audit trails. Both the session that called sudo and the sudo session itself are automatically flagged for audit serialization.