Steve L.
Steve L.

Reputation: 1138

Configuring Impersonation for Azure Function Running in an On-Prem Windows Container

I'm running a hello world azure function app with an HTTP trigger in a windows container on-prem (yay!).

The question I have now is is it possible to impersonate the user initiating a request from the HTTP trigger? The goal is to allow the function to talk to our in-house authorization system and get back an authorization token.

Could it be just a matter of changing the authorization level to something like Authorization.User?

Upvotes: 0

Views: 1066

Answers (1)

Jerry Liu
Jerry Liu

Reputation: 17790

It's possible. We send identity info to the Http Trigger, it talks to authorization backend and brings back a token to the trigger, we get the token as a response of the Http trigger.

Since it's an in-house authorization system we can't rely on the authorization level of Http trigger. It is used for Functions deployed in Azure site, where we need to provide a corresponding key to access Http trigger secured by different auth level.

BTW, the auth level should always be anonymous(e.g AuthorizationLevel.Anonymous in c#) if we work with Http trigger in on-prem container. Because locally we don't have any key to access the trigger secured by level other than anonymous.

Upvotes: 1

Related Questions