microsoft / microsoft-performance-toolkit-sdk

Software Development Kit for the Microsoft Performance ToolKit
MIT License
156 stars 55 forks source link

Add support for specifying authentication providers #359

Closed mslukebo closed 5 months ago

mslukebo commented 6 months ago

Is your feature request an entirely new concept? Yes.

Is your feature request related to an existing component? No.

Is your feature request related to a problem? Please describe. In many situations, a plugin may require performing some kind of authentication (e.g. fetching access tokens on behalf of a user). Currently, a plugin would need to implement all the logic for performing the authentication. This can cause issues where, from the perspective of the user, authentication flows "randomly" happen.

Describe the solution you'd like Authentication flows should happen at the application (SDK Driver) layer, not at the plugin layer. A plugin should initiate these flows, but the logic for how they happen should be defined by the application. Specifically, the application environment should provide ways to fetch classes that can provide authentication flows. Engine users should also be able to provide these classes, which then are added to the engine application environment.