Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

azure functions Authentication

I am writing an http trigger azure function which validates a Json and stores it in a Database. Multiple clients(other servers)call this function. Azure function app provides different authorization levels(function, admin) which issues one password which can be used by all the clients and secure the function app. I would like to know if we can issue different passwords for different clients or implement authorization protocols like Oauth or similar for more security.

like image 383
Sushruth Avatar asked Jul 19 '18 02:07

Sushruth


1 Answers

Here is an authentication way for you to refer, you could try to configure Authentication / Authorization in the Platform features in your function app.

You could follow the steps below.

  1. At first, go to Integrate of your Httptrigger, set Authorization level to Anonymous.

enter image description here

2.Got to Authentication / Authorization, in this scenario, for example, I configure it with Log in with Azure Active Directory and Save the configuration, refer to the screenshot.

enter image description here

3.Then go to the Azure Active Directory in the portal, you could find your app registration.

enter image description here

4.Configure the homepage in the Manifest with your Httptrigger URL (you could get it with </> Get function URL in your Httptrigger), save the manifest.

enter image description here

5.Try to log in the HttpTrigger with the url like https://yourfunction.azurewebsites.net/api/yourhttptrigger?xxxxx in the browser, it will redirect to the AAD login page, use the AAD account to log in, then could see your HttpTrigger.

enter image description here

enter image description here

For more details, refer to this article.

like image 119
Joy Wang Avatar answered Oct 16 '22 10:10

Joy Wang