Scheduler Authentication Handler

May 6, 2014 at 12:19 PM
I wanted to move Windows scheduler tasks to the Azure scheduler using secure https endpoints. To accomplish this, I wrote a Scheduler Authentication Handler which follows the implementation of Microsoft.Owin.Security.MicrosoftAccount. I have named it Microsoft.Owin.Security.Scheduler.

To use this Authentication Handler in a WebApi you would configure it in the Startup.cs as follows:
app.UseSchedulerAuthentication(new SchedulerAuthenticationOptions()
{
    JobId = "JobId",
    JobSecret = "JobSecret"
});
When configuring the Job in the Azure management portal you would add a header "x-ms-scheduler-jobid" with the JobId and the body would contain the job secret.

For now this is a prototype implementation. However, if Jobs are updated in the future to automatically send the Job Id in the header and a secret in the header or body, this would allow for a simple and secure implementation of https scheduler endpoints.

I would like to contribute my code, but wanted to discuss the feature and get any feedback the Katana community might provide.

Daniel
Coordinator
May 6, 2014 at 4:39 PM
One of the best places to contribute owin middleware right now is https://github.com/owin-middleware. General discussions are held here: https://jabbr.net/#/rooms/owin.
Marked as answer by Tratcher on 5/21/2014 at 2:12 PM